Uwe Kleine-König [Mon, 9 Sep 2024 14:40:25 +0000 (16:40 +0200)]
clk: Switch back to struct platform_driver::remove()
After commit
0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.
Convert all clk drivers to use .remove(), with the eventual goal to drop
struct platform_driver::remove_new(). As .remove() and .remove_new() have
the same prototypes, conversion is done by just changing the structure
member name in the driver initializer.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240909144026.870565-2-u.kleine-koenig@baylibre.com
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Stephen Boyd [Sat, 21 Sep 2024 21:11:05 +0000 (14:11 -0700)]
Merge branches 'clk-devm', 'clk-samsung', 'clk-rockchip' and 'clk-qcom' into clk-next
* clk-devm:
clk: provide devm_clk_get_optional_enabled_with_rate()
clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data()
* clk-samsung:
clk: samsung: add top clock support for ExynosAuto v920 SoC
clk: samsung: clk-pll: Add support for pll_531x
dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
clk: samsung: exynos7885: Add USB related clocks to CMU_FSYS
clk: samsung: clk-pll: Add support for pll_1418x
clk: samsung: exynosautov9: add dpum clock support
dt-bindings: clock: exynosautov9: add dpum clock
clk: samsung: exynos7885: Add missing MUX clocks from PLLs in CMU_TOP
clk: samsung: exynos7885: Update CLKS_NR_FSYS after bindings fix
dt-bindings: clock: exynos7885: Add indices for USB clocks
dt-bindings: clock: exynos7885: Add CMU_TOP PLL MUX indices
dt-bindings: clock: exynos7885: Fix duplicated binding
clk: samsung: exynos850: Add TMU clock
dt-bindings: clock: exynos850: Add TMU clock
* clk-rockchip:
dt-bindings: clock, reset: fix top-comment indentation rk3576 headers
clk: rockchip: remove unused mclk_pdm0_p/pdm0_p definitions
clk: rockchip: fix error for unknown clocks
clk: rockchip: rk3588: drop unused code
clk: rockchip: Add clock controller for the RK3576
clk: rockchip: Add new pll type pll_rk3588_ddr
dt-bindings: clock, reset: Add support for rk3576
dt-bindings: clock: rockchip,rk3588-cru: drop unneeded assigned-clocks
clk: rockchip: rk3588: Fix 32k clock name for pmu_24m_32k_100m_src_p
dt-bindings: clock: rockchip: remove CLK_NR_CLKS and CLKPMU_NR_CLKS
clk: rockchip: rk3399: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage
clk: rockchip: rk3368: Drop CLK_NR_CLKS usage
clk: rockchip: rk3328: Drop CLK_NR_CLKS usage
clk: rockchip: rk3308: Drop CLK_NR_CLKS usage
clk: rockchip: rk3288: Drop CLK_NR_CLKS usage
clk: rockchip: rk3228: Drop CLK_NR_CLKS usage
clk: rockchip: rk3036: Drop CLK_NR_CLKS usage
clk: rockchip: px30: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage
clk: rockchip: Set parent rate for DCLK_VOP clock on RK3228
* clk-qcom: (47 commits)
clk: qcom: videocc-sm8550: Use HW_CTRL_TRIGGER flag for video GDSC's
clk: qcom: dispcc-sm8250: use special function for Lucid 5LPE PLL
clk: qcom: dispcc-sm8250: use CLK_SET_RATE_PARENT for branch clocks
clk: qcom: ipq5332: Use icc-clk for enabling NoC related clocks
clk: qcom: ipq5332: Register gcc_qdss_tsctr_clk_src
dt-bindings: usb: qcom,dwc3: Update ipq5332 clock details
dt-bindings: interconnect: Add Qualcomm IPQ5332 support
clk: qcom: gcc-msm8998: Add Q6 BIMC and LPASS core, ADSP SMMU clocks
dt-bindings: clock: gcc-msm8998: Add Q6 and LPASS clocks definitions
clk: qcom: Fix SM_CAMCC_8150 dependencies
clk: qcom: gcc-sm8150: De-register gcc_cpuss_ahb_clk_src
clk: qcom: gcc-sc8180x: Fix the sdcc2 and sdcc4 clocks freq table
clk: qcom: gcc-sc8180x: Add GPLL9 support
dt-bindings: clock: qcom: Add GPLL9 support on gcc-sc8180x
clk: qcom: gcc-sc8180x: Register QUPv3 RCGs for DFS on sc8180x
clk: qcom: clk-rpmh: Fix overflow in BCM vote
dt-bindings: clock: qcom: Drop required-opps in required on SM8650 camcc
dt-bindings: clock: qcom: Drop required-opps in required on sm8650 videocc
dt-bindings: clock: qcom,qcs404-turingcc: convert to dtschema
dt-bindings: clock: Add x1e80100 LPASSCC reset controller
...
Stephen Boyd [Sat, 21 Sep 2024 21:10:59 +0000 (14:10 -0700)]
Merge branches 'clk-amlogic', 'clk-microchip' and 'clk-imx' into clk-next
* clk-amlogic:
clk: meson: introduce symbol namespace for amlogic clocks
clk: meson: axg-audio: add sm1 earcrx clocks
clk: meson: axg-audio: setup regmap max_register based on the SoC
dt-bindings: clock: axg-audio: add earcrx clock ids
clk: meson: s4: pll: Constify struct regmap_config
clk: meson: s4: peripherals: Constify struct regmap_config
clk: meson: c3: pll: Constify struct regmap_config
clk: meson: c3: peripherals: Constify struct regmap_config
clk: meson: a1: pll: Constify struct regmap_config
clk: meson: a1: peripherals: Constify struct regmap_config
* clk-microchip:
clk: at91: sama7g5: Allocate only the needed amount of memory for PLLs
clk: at91: sam9x7: add sam9x7 pmc driver
dt-bindings: clock: at91: Allow PLLs to be exported and referenced in DT
clk: at91: sama7g5: move mux table macros to header file
clk: at91: sam9x7: add support for HW PLL freq dividers
clk: at91: clk-sam9x60-pll: re-factor to support individual core freq outputs
dt-bindings: clocks: atmel,at91rm9200-pmc: add sam9x7 clock controller
dt-bindings: clocks: atmel,at91sam9x5-sckc: add sam9x7
* clk-imx: (27 commits)
clk: imx6ul: fix clock parent for IMX6UL_CLK_ENETx_REF_SEL
clk: imx95: enable the clock of NETCMIX block control
dt-bindings: clock: add RMII clock selection
dt-bindings: clock: add i.MX95 NETCMIX block control
clk: imx: imx8: Use clk_hw pointer for self registered clock in clk_parent_data
clk: imx: composite-7ulp: Use NULL instead of 0
clk: imx: add missing MODULE_DESCRIPTION() macros
clk: imx: clk-imx8mp: Allow media_disp pixel clock reconfigure parent rate
clk: imx: fracn-gppll: update rate table
clk: imx: imx8qxp: Parent should be initialized earlier than the clock
clk: imx: imx8qxp: Register dc0_bypass0_clk before disp clk
clk: imx: imx8qxp: Add clock muxes for MIPI and PHY ref clocks
clk: imx: imx8qxp: Add LVDS bypass clocks
clk: imx: imx8mm: Change the 'nand_usdhc_bus' clock to non-critical one
clk: imx: imx8mn: add sai7_ipg_clk clock settings
clk: imx: add CLK_SET_RATE_PARENT for lcdif_pixel_src for i.MX7D
clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D
clk: imx: imx8mp: fix clock tree update of TF-A managed clocks
clk: imx: fracn-gppll: fix fractional part of PLL getting lost
clk: imx: composite-7ulp: Check the PCC present bit
...
Stephen Boyd [Sat, 21 Sep 2024 21:10:53 +0000 (14:10 -0700)]
Merge branches 'clk-assigned-rates', 'clk-renesas' and 'clk-scmi' into clk-next
* clk-assigned-rates:
clk: clk-conf: support assigned-clock-rates-u64
* clk-renesas: (34 commits)
clk: renesas: r9a09g057: Add clock and reset entries for GTM/RIIC/SDHI/WDT
clk: renesas: rzv2h: Add support for dynamic switching divider clocks
clk: renesas: r9a08g045: Add clocks, resets and power domains for USB
dt-bindings: clock: renesas,cpg-clocks: Add top-level constraints
clk: renesas: r8a779h0: Add CANFD clock
clk: renesas: Add RZ/V2H(P) CPG driver
clk: renesas: Add family-specific clock driver for RZ/V2H(P)
dt-bindings: clock: renesas: Document RZ/V2H(P) SoC CPG
clk: renesas: r8a779h0: Add PWM clock
dt-bindings: clock: renesas,cpg-mssr: Document RZ/G2M v3.0 (r8a774a3) clock
clk: renesas: rcar-gen4: Remove unused default PLL2/3/4/6 configs
clk: renesas: rcar-gen4: Remove unused fixed PLL clock types
clk: renesas: rcar-gen4: Remove unused variable PLL2 clock type
clk: renesas: r8a779h0: Model PLL1/2/3/4/6 as fractional PLLs
clk: renesas: r8a779g0: Model PLL1/3/4/6 as fractional PLLs
clk: renesas: r8a779f0: Model PLL1/2/3/6 as fractional PLLs
clk: renesas: r8a779a0: Use defines for PLL control registers
clk: renesas: rcar-gen4: Add support for fractional 9.24 PLLs
clk: renesas: rcar-gen4: Add support for fixed variable PLLs
clk: renesas: rcar-gen4: Add support for variable fractional PLLs
...
* clk-scmi:
clk: scmi: add is_prepared hook
Stephen Boyd [Sat, 21 Sep 2024 21:10:42 +0000 (14:10 -0700)]
Merge branches 'clk-kunit', 'clk-mediatek', 'clk-cleanup' and 'clk-bindings' into clk-next
- KUnit tests for clk registration and fixed rate basic clk type
* clk-kunit:
clk: Add KUnit tests for clks registered with struct clk_parent_data
clk: Add KUnit tests for clk fixed rate basic type
clk: Add test managed clk provider/consumer APIs
platform: Add test managed platform_device/driver APIs
of: Add a KUnit test for overlays and test managed APIs
dt-bindings: vendor-prefixes: Add "test" vendor for KUnit and friends
of: Add test managed wrappers for of_overlay_apply()/of_node_put()
of/platform: Allow overlays to create platform devices from the root node
* clk-mediatek:
dt-bindings: clock: mediatek: Convert MediaTek clock syscons to schema
dt-bindings: Move Mediatek clock controllers to "clock" directory
dt-bindings: clock: mediatek,apmixedsys: Fix "mediatek,mt6779-apmixed" compatible
clk: mediatek: reset: Remove unused mtk_register_reset_controller()
clk: mediatek: reset: Return regmap's error code
* clk-cleanup:
clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
clk: ti: dra7-atl: Fix leak of of_nodes
clk:davinci: make use of dev_err_cast_probe()
clk: bcm: bcm53573: fix OF node leak in init
clk: lmk04832: Use devm_clk_get_enabled() helpers
clk: visconti: Switch to use kmemdup_array()
clk: mmp: Switch to use kmemdup_array()
clk: hisilicon: Remove unnecessary local variable
clk: use clk_core_unlink_consumer() helper
clk: Use of_property_present()
clk: at91: Use of_property_count_u32_elems() to get property length
da8xx-cfgchip.c: replace of_node_put with __free improves cleanup
* clk-bindings:
dt-bindings: clock: st,stm32mp1-rcc: add top-level constraints
dt-bindings: clock: cirrus,lochnagar: add top-level constraints
dt-bindings: clock: baikal,bt1-ccu-div: add top-level constraints
dt-bindings: clock: nxp,lpc3220-usb-clk: Convert bindings to dtschema
dt-bindings: clock: nxp,lpc3220-clk: Convert bindings to DT schema
Stephen Boyd [Wed, 18 Sep 2024 16:44:48 +0000 (09:44 -0700)]
Merge tag 'qcom-clk-for-6.12' of https://git./linux/kernel/git/qcom/linux into clk-qcom
Pull Qualcomm clk driver updates from Bjorn Andersson:
- Add camera, display and GPU clock drivers for Qualcomm SM4450
- Add a camera clock driver for Qualcomm SM8150
- Mark a bunch of struct freq_tbl const to reduce .data usage
- Add Qualcomm MSM8226 A7PLL and Regera PLL support
- Fix the Qualcomm Lucid 5LPE PLL configuration sequence to not reuse
Trion, as they do differ
- A number of fixes to the Qualcomm SM8550 display clock driver
- Fold Qualcomm SM8650 display clock driver into SM8550 one
- Add missing clocks and GDSCs needed for audio on Qualcomm MSM8998
- Add missing USB MP resets, GPLL9, and QUPv3 DFS to Qualcomm SC8180X
- Fix sdcc clk frequency tables on Qualcomm SC8180X
- Drop the Qualcomm SM8150 gcc_cpuss_ahb_clk_src
- Mark Qualcomm PCIe GDSCs as RET_ON on sm8250 and sm8540 to avoid them
turning off during suspend
- Use the HW_CTRL mechanism on Qualcomm SM8550 video clock controller
GDSCs
* tag 'qcom-clk-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (47 commits)
clk: qcom: videocc-sm8550: Use HW_CTRL_TRIGGER flag for video GDSC's
clk: qcom: dispcc-sm8250: use special function for Lucid 5LPE PLL
clk: qcom: dispcc-sm8250: use CLK_SET_RATE_PARENT for branch clocks
clk: qcom: ipq5332: Use icc-clk for enabling NoC related clocks
clk: qcom: ipq5332: Register gcc_qdss_tsctr_clk_src
dt-bindings: usb: qcom,dwc3: Update ipq5332 clock details
dt-bindings: interconnect: Add Qualcomm IPQ5332 support
clk: qcom: gcc-msm8998: Add Q6 BIMC and LPASS core, ADSP SMMU clocks
dt-bindings: clock: gcc-msm8998: Add Q6 and LPASS clocks definitions
clk: qcom: Fix SM_CAMCC_8150 dependencies
clk: qcom: gcc-sm8150: De-register gcc_cpuss_ahb_clk_src
clk: qcom: gcc-sc8180x: Fix the sdcc2 and sdcc4 clocks freq table
clk: qcom: gcc-sc8180x: Add GPLL9 support
dt-bindings: clock: qcom: Add GPLL9 support on gcc-sc8180x
clk: qcom: gcc-sc8180x: Register QUPv3 RCGs for DFS on sc8180x
clk: qcom: clk-rpmh: Fix overflow in BCM vote
dt-bindings: clock: qcom: Drop required-opps in required on SM8650 camcc
dt-bindings: clock: qcom: Drop required-opps in required on sm8650 videocc
dt-bindings: clock: qcom,qcs404-turingcc: convert to dtschema
dt-bindings: clock: Add x1e80100 LPASSCC reset controller
...
Heiko Stuebner [Mon, 9 Sep 2024 22:31:49 +0000 (00:31 +0200)]
dt-bindings: clock, reset: fix top-comment indentation rk3576 headers
Block comments should align the * on each line, as checkpatch rightfully
pointed out, so fix that style issue on the newly added rk3576 headers.
Fixes:
49c04453db81 ("dt-bindings: clock, reset: Add support for rk3576")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20240909223149.85364-1-heiko@sntech.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Arnd Bergmann [Mon, 9 Sep 2024 12:11:05 +0000 (12:11 +0000)]
clk: rockchip: remove unused mclk_pdm0_p/pdm0_p definitions
When -Wunused-const-variable is enabled (not the default),
there is a warning about two definitions in this file:
In file included from drivers/clk/rockchip/clk-rk3576.c:14:
drivers/clk/rockchip/clk-rk3576.c:334:7: error: 'mclk_pdm0_p' defined but not used [-Werror=unused-const-variable=]
334 | PNAME(mclk_pdm0_p) = { "mclk_pdm0_src_top", "xin24m" };
| ^~~~~~~~~~~
drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
564 | #define PNAME(x) static const char *const x[] __initconst
| ^
drivers/clk/rockchip/clk-rk3576.c:333:7: error: 'pdm0_p' defined but not used [-Werror=unused-const-variable=]
333 | PNAME(pdm0_p) = { "clk_pdm0_src_top", "xin24m" };
| ^~~~~~
drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
564 | #define PNAME(x) static const char *const x[] __initconst
| ^
Remove them for the moment. If they are needed later, they can
be added back at that point.
Fixes:
cc40f5baa91b ("clk: rockchip: Add clock controller for the RK3576")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240909121116.254036-1-arnd@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Stephen Boyd [Mon, 9 Sep 2024 20:58:25 +0000 (13:58 -0700)]
Merge tag 'v6.12-rockchip-clk1' of git://git./linux/kernel/git/mmind/linux-rockchip into clk-rockchip
Pull Rockchip clk driver updates from Heiko Stübner:
- Get rid of CLK_NR_CLKS defines in Rockchip DT binding headers
- New clock controller driver for the rk3576
- Some fixes for rk3228 and rk3588
* tag 'v6.12-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
clk: rockchip: fix error for unknown clocks
clk: rockchip: rk3588: drop unused code
clk: rockchip: Add clock controller for the RK3576
clk: rockchip: Add new pll type pll_rk3588_ddr
dt-bindings: clock, reset: Add support for rk3576
dt-bindings: clock: rockchip,rk3588-cru: drop unneeded assigned-clocks
clk: rockchip: rk3588: Fix 32k clock name for pmu_24m_32k_100m_src_p
dt-bindings: clock: rockchip: remove CLK_NR_CLKS and CLKPMU_NR_CLKS
clk: rockchip: rk3399: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage
clk: rockchip: rk3368: Drop CLK_NR_CLKS usage
clk: rockchip: rk3328: Drop CLK_NR_CLKS usage
clk: rockchip: rk3308: Drop CLK_NR_CLKS usage
clk: rockchip: rk3288: Drop CLK_NR_CLKS usage
clk: rockchip: rk3228: Drop CLK_NR_CLKS usage
clk: rockchip: rk3036: Drop CLK_NR_CLKS usage
clk: rockchip: px30: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage
clk: rockchip: Set parent rate for DCLK_VOP clock on RK3228
Stephen Boyd [Fri, 6 Sep 2024 22:18:14 +0000 (15:18 -0700)]
Merge tag 'samsung-clk-6.12' of https://git./linux/kernel/git/krzk/linux into clk-samsung
Pull Samsung clk driver updates from Krzysztof Kozlowski:
- Exynos850: Add clock for Thermal Management Unit
- Exynos7885: Fix duplicated ID in the header, add missing TOP PLLs and
add clocks for USB block in the FSYS clock controller
- ExynosAutov9: Add DPUM clock controller
- ExynosAutov920: Add new (first) clock controllers: TOP and PERIC0
(and a bit more complete bindings)
* tag 'samsung-clk-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
clk: samsung: add top clock support for ExynosAuto v920 SoC
clk: samsung: clk-pll: Add support for pll_531x
dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
clk: samsung: exynos7885: Add USB related clocks to CMU_FSYS
clk: samsung: clk-pll: Add support for pll_1418x
clk: samsung: exynosautov9: add dpum clock support
dt-bindings: clock: exynosautov9: add dpum clock
clk: samsung: exynos7885: Add missing MUX clocks from PLLs in CMU_TOP
clk: samsung: exynos7885: Update CLKS_NR_FSYS after bindings fix
dt-bindings: clock: exynos7885: Add indices for USB clocks
dt-bindings: clock: exynos7885: Add CMU_TOP PLL MUX indices
dt-bindings: clock: exynos7885: Fix duplicated binding
clk: samsung: exynos850: Add TMU clock
dt-bindings: clock: exynos850: Add TMU clock
Bartosz Golaszewski [Mon, 5 Aug 2024 08:57:31 +0000 (10:57 +0200)]
clk: provide devm_clk_get_optional_enabled_with_rate()
There are clock users in the kernel that can't use
devm_clk_get_optional_enabled() as they need to set rate after getting
the clock and before enabling it. Provide a managed helper that wraps
these operations in the correct order.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240805-clk-new-helper-v2-1-e5fdd1e1d729@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Nikita Shubin [Wed, 4 Sep 2024 11:41:07 +0000 (14:41 +0300)]
clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data()
Add devm_clk_hw_register_fixed_rate_parent_data(), devres-managed helper
to register fixed-rate clock with parent_data.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Link: https://lore.kernel.org/r/20240904-devm_clk_hw_register_fixed_rate_parent_data-v1-1-7f14d6b456e5@maquefel.me
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Stephen Boyd [Thu, 5 Sep 2024 18:30:59 +0000 (11:30 -0700)]
Merge branch 'clk-imx-old' into clk-imx
* clk-imx: (22 commits)
clk: imx: composite-7ulp: Use NULL instead of 0
clk: imx: add missing MODULE_DESCRIPTION() macros
clk: imx: clk-imx8mp: Allow media_disp pixel clock reconfigure parent rate
clk: imx: fracn-gppll: update rate table
clk: imx: imx8qxp: Parent should be initialized earlier than the clock
clk: imx: imx8qxp: Register dc0_bypass0_clk before disp clk
clk: imx: imx8qxp: Add clock muxes for MIPI and PHY ref clocks
clk: imx: imx8qxp: Add LVDS bypass clocks
clk: imx: imx8mm: Change the 'nand_usdhc_bus' clock to non-critical one
clk: imx: imx8mn: add sai7_ipg_clk clock settings
clk: imx: add CLK_SET_RATE_PARENT for lcdif_pixel_src for i.MX7D
clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D
clk: imx: imx8mp: fix clock tree update of TF-A managed clocks
clk: imx: fracn-gppll: fix fractional part of PLL getting lost
clk: imx: composite-7ulp: Check the PCC present bit
clk: imx: composite-93: keep root clock on when mcore enabled
clk: imx: composite-8m: Enable gate clk with mcore_booted
clk: imx: imx6ul: fix default parent for enet*_ref_sel
clk: imx: clk-audiomix: Correct parent clock for earc_phy and audpll
clk: imx: clk-audiomix: Add CLK_SET_RATE_PARENT flags for clocks
...
Stephen Boyd [Thu, 5 Sep 2024 18:18:55 +0000 (11:18 -0700)]
Merge tag 'clk-imx-6.12' of git://git./linux/kernel/git/abelvesa/linux into clk-imx2
Pull i.MX clk driver updates from Abel Vesa:
- Use clk_hw pointer instead of fw_name for acm_aud_clk[0-1]_sel clocks
on i.MX8Q as parents in ACM provider
- Add i.MX95 NETCMIX support to the block control provider
- Fix parents for ENETx_REF_SEL clocks on i.MX6UL
* tag 'clk-imx-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux:
clk: imx6ul: fix clock parent for IMX6UL_CLK_ENETx_REF_SEL
clk: imx95: enable the clock of NETCMIX block control
dt-bindings: clock: add RMII clock selection
dt-bindings: clock: add i.MX95 NETCMIX block control
clk: imx: imx8: Use clk_hw pointer for self registered clock in clk_parent_data
Michel Alex [Mon, 2 Sep 2024 09:05:53 +0000 (09:05 +0000)]
clk: imx6ul: fix clock parent for IMX6UL_CLK_ENETx_REF_SEL
Commit
4e197ee880c24ecb63f7fe17449b3653bc64b03c ("clk: imx6ul: add
ethernet refclock mux support") sets the internal clock as default
ethernet clock.
Since IMX6UL_CLK_ENET_REF cannot be parent for IMX6UL_CLK_ENET1_REF_SEL,
the call to clk_set_parent() fails. IMX6UL_CLK_ENET1_REF_125M is the correct
parent and shall be used instead.
Same applies for IMX6UL_CLK_ENET2_REF_SEL, for which IMX6UL_CLK_ENET2_REF_125M
is the correct parent.
Cc: stable@vger.kernel.org
Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/AS1P250MB0608F9CE4009DCE65C61EEDEA9922@AS1P250MB0608.EURP250.PROD.OUTLOOK.COM
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Stephen Boyd [Tue, 3 Sep 2024 21:00:29 +0000 (14:00 -0700)]
Merge tag 'renesas-clk-for-v6.12-tag2' of git://git./linux/kernel/git/geert/renesas-drivers into clk-renesas
Pull more Renesas clk driver updates from Geert Uytterhoeven:
- Add USB clocks, resets and power domains on RZ/G3S
- Add Generic Timer (GTM), I2C Bus Interface (RIIC), SD/MMC Host
Interface (SDHI) and Watchdog Timer (WDT) clocks and resets on
RZ/V2H
- Miscellaneous fixes and improvements
* tag 'renesas-clk-for-v6.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
clk: renesas: r9a09g057: Add clock and reset entries for GTM/RIIC/SDHI/WDT
clk: renesas: rzv2h: Add support for dynamic switching divider clocks
clk: renesas: r9a08g045: Add clocks, resets and power domains for USB
dt-bindings: clock: renesas,cpg-clocks: Add top-level constraints
Stephen Boyd [Tue, 3 Sep 2024 20:03:10 +0000 (13:03 -0700)]
Merge tag 'clk-microchip-6.12' of https://git./linux/kernel/git/at91/linux into clk-microchip
Pull Microchip clk driver updates from Claudiu Beznea:
- support for the Microchip SAM9X7 SoC as follows:
- updates on the PLL drivers
- a new clock driver was added for SAM9X7
- dt-binding documentation updates (for the new clock driver and for
the slow clock controller that SAM9X7 is using)
- a fix for the Microchip SAMA7G5 clock driver to avoid allocating mode
than necessary memory
* tag 'clk-microchip-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
clk: at91: sama7g5: Allocate only the needed amount of memory for PLLs
clk: at91: sam9x7: add sam9x7 pmc driver
dt-bindings: clock: at91: Allow PLLs to be exported and referenced in DT
clk: at91: sama7g5: move mux table macros to header file
clk: at91: sam9x7: add support for HW PLL freq dividers
clk: at91: clk-sam9x60-pll: re-factor to support individual core freq outputs
dt-bindings: clocks: atmel,at91rm9200-pmc: add sam9x7 clock controller
dt-bindings: clocks: atmel,at91sam9x5-sckc: add sam9x7
Lad Prabhakar [Wed, 28 Aug 2024 09:38:22 +0000 (10:38 +0100)]
clk: renesas: r9a09g057: Add clock and reset entries for GTM/RIIC/SDHI/WDT
Add clock and reset entries for Generic Timer (GTM), I2C Bus Interface
(RIIC), SD/MMC Host Interface (SDHI) and Watchdog Timer (WDT) IP blocks.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240828093822.162855-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Lad Prabhakar [Wed, 28 Aug 2024 09:38:21 +0000 (10:38 +0100)]
clk: renesas: rzv2h: Add support for dynamic switching divider clocks
Add support for dynamic switching divider clocks.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240828093822.162855-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Claudiu Beznea [Thu, 22 Aug 2024 15:27:46 +0000 (18:27 +0300)]
clk: renesas: r9a08g045: Add clocks, resets and power domains for USB
Add clocks, resets and power domains for USB modules available on the
Renesas RZ/G3S SoC.
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240822152801.602318-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Stephen Boyd [Fri, 30 Aug 2024 19:51:45 +0000 (12:51 -0700)]
Merge tag 'clk-meson-v6.12-1' of https://github.com/BayLibre/clk-meson into clk-amlogic
Pull Amlogic clk driver changes from Jerome Brunet:
- Constify some Amlogic structs clean-up
- Add SM1 eARC clocks for Amlogic
- Introduce a symbol namespace for Amlogic clock specific symbols
* tag 'clk-meson-v6.12-1' of https://github.com/BayLibre/clk-meson:
clk: meson: introduce symbol namespace for amlogic clocks
clk: meson: axg-audio: add sm1 earcrx clocks
clk: meson: axg-audio: setup regmap max_register based on the SoC
dt-bindings: clock: axg-audio: add earcrx clock ids
clk: meson: s4: pll: Constify struct regmap_config
clk: meson: s4: peripherals: Constify struct regmap_config
clk: meson: c3: pll: Constify struct regmap_config
clk: meson: c3: peripherals: Constify struct regmap_config
clk: meson: a1: pll: Constify struct regmap_config
clk: meson: a1: peripherals: Constify struct regmap_config
Sebastian Reichel [Mon, 25 Mar 2024 19:33:36 +0000 (20:33 +0100)]
clk: rockchip: fix error for unknown clocks
There is a clk == NULL check after the switch to check for
unsupported clk types. Since clk is re-assigned in a loop,
this check is useless right now for anything but the first
round. Let's fix this up by assigning clk = NULL in the
loop before the switch statement.
Fixes:
a245fecbb806 ("clk: rockchip: add basic infrastructure for clock branches")
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
[added fixes + stable-cc]
Link: https://lore.kernel.org/r/20240325193609.237182-6-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Sebastian Reichel [Mon, 25 Mar 2024 19:33:32 +0000 (20:33 +0100)]
clk: rockchip: rk3588: drop unused code
All clocks are registered early using CLK_OF_DECLARE(), which marks
the DT node as processed. For the processed DT node the probe routine
is never called. Thus this whole code is never executed. This could
be "fixed" by using CLK_OF_DECLARE_DRIVER, which avoids marking the
DT node as processed. But then the probe routine would re-register
all the clocks by calling rk3588_clk_init() again.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240325193609.237182-2-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Elaine Zhang [Wed, 28 Aug 2024 15:42:55 +0000 (15:42 +0000)]
clk: rockchip: Add clock controller for the RK3576
Add the clock and reset tree definitions for the new RK3576
SoC.
As opposed to the other rockchip CRU drivers, the GRF node is looked up
via compatible instead of a phandle, which simplifies the device tree
bindings.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Elaine Zhang <zhangqing@rock-chips.com>
Tested-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/0102019199a7781a-888440f0-a3f7-4a7d-a831-491260cbdfe7-000000@eu-west-1.amazonses.com
[dropped additional blank line at EOF in rst-rk3576.c
dropped the whole (non-)working as module part]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Elaine Zhang [Wed, 28 Aug 2024 15:42:52 +0000 (15:42 +0000)]
clk: rockchip: Add new pll type pll_rk3588_ddr
That PLL type is similar to the other rk3588 pll types but the actual
rate is twice the configured rate.
Therefore, the returned calculated rate must be multiplied by two.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Acked-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/0102019199a76ec4-9d5846d4-d76a-4e69-a241-c88c2983d607-000000@eu-west-1.amazonses.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Detlev Casanova [Wed, 28 Aug 2024 15:42:50 +0000 (15:42 +0000)]
dt-bindings: clock, reset: Add support for rk3576
Add clock and reset ID defines for rk3576.
Compared to the downstream bindings written by Elaine, this uses
continous gapless IDs starting at 0. Thus all numbers are
different between downstream and upstream, but names are kept
exactly the same.
Also add documentation for the rk3576 CRU core.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/0102019199a76766-f3a2b53f-d063-458b-b0d1-dfbc2ea1893c-000000@eu-west-1.amazonses.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:30:13 +0000 (19:30 +0200)]
dt-bindings: clock: rockchip,rk3588-cru: drop unneeded assigned-clocks
assigned-clocks property is redundant, because core dtschema allows them
if clocks are provided.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240818173014.122073-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Alexander Shiyan [Thu, 29 Aug 2024 05:28:20 +0000 (08:28 +0300)]
clk: rockchip: rk3588: Fix 32k clock name for pmu_24m_32k_100m_src_p
The 32kHz input clock is named "xin32k" in the driver,
so the name "32k" appears to be a typo in this case. Lets fix this.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Fixes:
f1c506d152ff ("clk: rockchip: add clock controller for the RK3588")
Link: https://lore.kernel.org/r/20240829052820.3604-1-eagle.alexander923@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Wei Fang [Thu, 29 Aug 2024 01:18:48 +0000 (09:18 +0800)]
clk: imx95: enable the clock of NETCMIX block control
The NETCMIX block control consists of registers for configuration of
peripherals in the NETC domain, so enable the clock of NETCMIX to
support the configuration.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240829011849.364987-4-wei.fang@nxp.com
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Wei Fang [Thu, 29 Aug 2024 01:18:47 +0000 (09:18 +0800)]
dt-bindings: clock: add RMII clock selection
Add RMII clock selection for ENETC0 and ENETC1.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240829011849.364987-3-wei.fang@nxp.com
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Wei Fang [Thu, 29 Aug 2024 01:18:46 +0000 (09:18 +0800)]
dt-bindings: clock: add i.MX95 NETCMIX block control
Add 'nxp,imx95-netcmix-blk-ctrl' compatible string for i.MX95 platform.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240829011849.364987-2-wei.fang@nxp.com
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Shengjiu Wang [Wed, 10 Jul 2024 08:41:00 +0000 (16:41 +0800)]
clk: imx: imx8: Use clk_hw pointer for self registered clock in clk_parent_data
"acm_aud_clk0_sel" and "acm_aud_clk1_sel" are registered by this ACM
driver, but they are the parent clocks for other clocks, in order to
use assigned-clock-parents in device tree, the ".fw_name" can't be used,
need to assign the clk_hw pointer for the imx8qm_mclk_sels[],
imx8qxp_mclk_sels[], imx8dxl_mclk_sels[].
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/1720600860-18866-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Yuntao Liu [Thu, 15 Aug 2024 09:38:53 +0000 (09:38 +0000)]
clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
We need to call pm_runtime_put_noidle() when pm_runtime_get_sync()
fails, so use pm_runtime_resume_and_get() instead. this function
will handle this.
Fixes:
dae5448a327ed ("clk: starfive: Add StarFive JH7110 Video-Output clock driver")
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
Link: https://lore.kernel.org/r/20240815093853.757487-1-liuyuntao12@huawei.com
Reviewed-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
David Lechner [Mon, 26 Aug 2024 15:35:29 +0000 (10:35 -0500)]
clk: ti: dra7-atl: Fix leak of of_nodes
This fix leaking the of_node references in of_dra7_atl_clk_probe().
The docs for of_parse_phandle_with_args() say that the caller must call
of_node_put() on the returned node. This adds the missing of_node_put()
to fix the leak.
Fixes:
9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240826-clk-fix-leak-v1-1-f55418a13aa6@baylibre.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Yuesong Li [Wed, 28 Aug 2024 07:35:15 +0000 (15:35 +0800)]
clk:davinci: make use of dev_err_cast_probe()
Using dev_err_cast_probe() to simplify the code.
Signed-off-by: Yuesong Li <liyuesong@vivo.com>
Link: https://lore.kernel.org/r/20240828073515.950677-1-liyuesong@vivo.com
Reviewed-by: David Lechner <david@lechnology.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Johan Jonker [Mon, 26 Aug 2024 16:39:46 +0000 (18:39 +0200)]
dt-bindings: clock: rockchip: remove CLK_NR_CLKS and CLKPMU_NR_CLKS
CLK_NR_CLKS and CLKPMU_NR_CLKS should not be part of the binding.
Remove since the kernel code no longer uses it.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/a3292ed0-3489-4887-8567-40ea4983c592@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:39:36 +0000 (18:39 +0200)]
clk: rockchip: rk3399: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and CLKPMU_NR_CLKS
and be able to drop it from the bindings, use
rockchip_clk_find_max_clk_id helper to find the
highest clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/45f83b1f-64f8-4ea5-bc93-ebf7507a9709@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:39:25 +0000 (18:39 +0200)]
clk: rockchip: rk3368: Drop CLK_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/2a19c3cc-5f4d-4d03-90b2-e0bb13b0502f@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:39:13 +0000 (18:39 +0200)]
clk: rockchip: rk3328: Drop CLK_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/38ea6be0-3596-49ec-8de9-aef9c7f2bbb6@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:39:02 +0000 (18:39 +0200)]
clk: rockchip: rk3308: Drop CLK_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/9fbca2d8-f904-4913-ba05-8715e748a454@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:38:51 +0000 (18:38 +0200)]
clk: rockchip: rk3288: Drop CLK_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/af141286-7994-4e3f-93e2-6ee4e718ef8a@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:38:39 +0000 (18:38 +0200)]
clk: rockchip: rk3228: Drop CLK_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/2ee6f0a5-a1bb-4b62-ae6b-8f3828f8eccc@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:38:25 +0000 (18:38 +0200)]
clk: rockchip: rk3036: Drop CLK_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/c8e73847-f472-4473-ac55-068cb28b98f6@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Johan Jonker [Mon, 26 Aug 2024 16:38:12 +0000 (18:38 +0200)]
clk: rockchip: px30: Drop CLK_NR_CLKS CLKPMU_NR_CLKS usage
In order to get rid of CLK_NR_CLKS and CLKPMU_NR_CLKS
and be able to drop it from the bindings, use
rockchip_clk_find_max_clk_id helper to find the
highest clock id.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/5ad12808-61f5-4e3b-801e-85231375b6a6@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Krzysztof Kozlowski [Mon, 26 Aug 2024 06:58:01 +0000 (08:58 +0200)]
clk: bcm: bcm53573: fix OF node leak in init
Driver code is leaking OF node reference from of_get_parent() in
bcm53573_ilp_init(). Usage of of_get_parent() is not needed in the
first place, because the parent node will not be freed while we are
processing given node (triggered by CLK_OF_DECLARE()). Thus fix the
leak by accessing parent directly, instead of of_get_parent().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240826065801.17081-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:30:14 +0000 (19:30 +0200)]
dt-bindings: clock: st,stm32mp1-rcc: add top-level constraints
Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:". Add missing top-level constraints
for clocks and clock-names.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240818173014.122073-5-krzysztof.kozlowski@linaro.org
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:30:11 +0000 (19:30 +0200)]
dt-bindings: clock: cirrus,lochnagar: add top-level constraints
Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:". Add missing top-level constraints
for clocks. Drop also redundant assigned-clocks properties, because
core dtschema allows them if clocks are provided.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240818173014.122073-2-krzysztof.kozlowski@linaro.org
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:30:10 +0000 (19:30 +0200)]
dt-bindings: clock: baikal,bt1-ccu-div: add top-level constraints
Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:". Add missing top-level constraints
for clocks and clock-names.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240818173014.122073-1-krzysztof.kozlowski@linaro.org
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Huan Yang [Tue, 20 Aug 2024 10:21:19 +0000 (18:21 +0800)]
clk: lmk04832: Use devm_clk_get_enabled() helpers
The devm_clk_get_enabled() helpers:
- call devm_clk_get()
- call clk_prepare_enable() and register what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code and avoids the calls to clk_disable_unprepare().
Signed-off-by: Huan Yang <link@vivo.com>
Link: https://lore.kernel.org/r/20240820102119.130298-1-link@vivo.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Peng Fan [Tue, 6 Aug 2024 14:56:01 +0000 (22:56 +0800)]
clk: scmi: add is_prepared hook
Some clocks maybe default enabled by hardware. For clocks that don't
have users, that will be left in hardware default state, because prepare
count and enable count is zero,if there is no is_prepared hook to get
the hardware state. So add is_prepared hook to detect the hardware
state. Then when disabling the unused clocks, they can be simply
turned OFF to save power during kernel boot.
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240806145601.1184337-1-peng.fan@oss.nxp.com
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Stephen Boyd [Tue, 27 Aug 2024 17:20:46 +0000 (10:20 -0700)]
Merge tag 'renesas-clk-for-v6.12-tag1' of git://git./linux/kernel/git/geert/renesas-drivers into clk-renesas
Pull Renesas clk driver updates from Geert Uytterhoeven
- Add PCIe, PWM, and CAN-FD clocks on R-Car V4M
- Add LCD controller clocks and resets on RZ/G2UL
- Add DMA clocks and resets on RZ/G3S
- Add fractional multiplication PLL support on R-Car Gen4
- Document support for the Renesas RZ/G2M v3.0 (r8a774a3) SoC
- Add support for the RZ/V2H(P) (R9A09G057) SoC
- Miscellaneous fixes and improvements
* tag 'renesas-clk-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: (30 commits)
clk: renesas: r8a779h0: Add CANFD clock
clk: renesas: Add RZ/V2H(P) CPG driver
clk: renesas: Add family-specific clock driver for RZ/V2H(P)
dt-bindings: clock: renesas: Document RZ/V2H(P) SoC CPG
clk: renesas: r8a779h0: Add PWM clock
dt-bindings: clock: renesas,cpg-mssr: Document RZ/G2M v3.0 (r8a774a3) clock
clk: renesas: rcar-gen4: Remove unused default PLL2/3/4/6 configs
clk: renesas: rcar-gen4: Remove unused fixed PLL clock types
clk: renesas: rcar-gen4: Remove unused variable PLL2 clock type
clk: renesas: r8a779h0: Model PLL1/2/3/4/6 as fractional PLLs
clk: renesas: r8a779g0: Model PLL1/3/4/6 as fractional PLLs
clk: renesas: r8a779f0: Model PLL1/2/3/6 as fractional PLLs
clk: renesas: r8a779a0: Use defines for PLL control registers
clk: renesas: rcar-gen4: Add support for fractional 9.24 PLLs
clk: renesas: rcar-gen4: Add support for fixed variable PLLs
clk: renesas: rcar-gen4: Add support for variable fractional PLLs
clk: renesas: rcar-gen4: Add support for fractional multiplication
clk: renesas: rcar-gen4: Use defines for common CPG registers
clk: renesas: rcar-gen4: Use FIELD_GET()
clk: renesas: rcar-gen4: Clarify custom PLL clock support
...
Claudiu Beznea [Sun, 14 Jul 2024 14:13:15 +0000 (17:13 +0300)]
clk: at91: sama7g5: Allocate only the needed amount of memory for PLLs
The maximum number of PLL components on SAMA7G5 is 3 (one fractional
part and 2 dividers). Allocate the needed amount of memory for
sama7g5_plls 2d array. Previous code used to allocate 7 array entries for
each PLL. While at it, replace 3 with PLL_COMPID_MAX in the loop which
parses the sama7g5_plls 2d array.
Fixes:
cb783bbbcf54 ("clk: at91: sama7g5: add clock support for sama7g5")
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240714141315.19480-1-claudiu.beznea@tuxon.dev
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Krzysztof Kozlowski [Sun, 18 Aug 2024 17:30:12 +0000 (19:30 +0200)]
dt-bindings: clock: renesas,cpg-clocks: Add top-level constraints
Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:". Add missing top-level constraints
for clocks and clock-output-names.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240818173014.122073-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Sunyeal Hong [Wed, 21 Aug 2024 23:26:52 +0000 (08:26 +0900)]
clk: samsung: add top clock support for ExynosAuto v920 SoC
This adds support for CMU_TOP which generates clocks for all the
function blocks such as CORE, HSI0/1/2, PERIC0/1 and so on. For
CMU_TOP, PLL_SHARED0,1,2,3,4 and 5 will be the sources of this block
and they will generate bus clocks.
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
Link: https://lore.kernel.org/r/20240821232652.1077701-5-sunyeal.hong@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sunyeal Hong [Wed, 21 Aug 2024 23:26:51 +0000 (08:26 +0900)]
clk: samsung: clk-pll: Add support for pll_531x
pll531x PLL is used in Exynos Auto v920 SoC for shared pll.
pll531x: Integer/fractional PLL with mid frequency FVCO (800 to 3120 MHz)
PLL531x
FOUT = (MDIV x FIN)/(PDIV x 2^SDIV) for integer PLL
FOUT = (MDIV + F/2^32-F[31]) x FIN/(PDIV x 2^SDIV) for fractional PLL
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20240821232652.1077701-4-sunyeal.hong@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Krzysztof Kozlowski [Fri, 23 Aug 2024 07:21:10 +0000 (09:21 +0200)]
Merge branch 'for-v6.12/clk-dt-bindings' into next/clk
Sunyeal Hong [Wed, 21 Aug 2024 23:26:49 +0000 (08:26 +0900)]
dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
Add dt-schema for ExynosAuto v920 SoC clock controller.
Add device tree clock binding definitions for below CMU blocks.
- CMU_TOP
- CMU_PERIC0/1
- CMU_MISC
- CMU_HSI0/1
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
Link: https://lore.kernel.org/r/20240821232652.1077701-2-sunyeal.hong@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
David Virag [Fri, 16 Aug 2024 17:50:32 +0000 (19:50 +0200)]
clk: samsung: exynos7885: Add USB related clocks to CMU_FSYS
Exynos7885 SoC has a DWC3 USB Controller with Exynos USB PHY which in
theory supports USB3 SuperSpeed, but is only used as USB2 in all known
devices.
These clocks are needed for everything related to USB.
While at it, also remove the CLK_SET_RATE_PARENT capability of
CLK_MOUT_FSYS_USB30DRD_USER, since it's not actually needed.
Signed-off-by: David Virag <virag.david003@gmail.com>
Link: https://lore.kernel.org/r/20240816175034.769628-3-virag.david003@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
David Virag [Fri, 16 Aug 2024 17:50:31 +0000 (19:50 +0200)]
clk: samsung: clk-pll: Add support for pll_1418x
pll1418x is used in Exynos7885 SoC for USB PHY clock.
Operation-wise it is very similar to pll0822x, except that MDIV is only
9 bits wide instead of 10, and we use the CON1 register in the PLL
macro's "con" parameter instead of CON3 like this:
PLL(pll_1418x, CLK_FOUT_USB_PLL, "fout_usb_pll", "oscclk",
PLL_LOCKTIME_PLL_USB, PLL_CON0_PLL_USB,
pll_usb_rate_table),
Technically the PLL should work fine with pll0822x code if the PLL
tables are correct, but it's more "correct" to actually update the mask.
Signed-off-by: David Virag <virag.david003@gmail.com>
Link: https://lore.kernel.org/r/20240816175034.769628-2-virag.david003@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Vedang Nagar [Mon, 12 Aug 2024 13:47:52 +0000 (19:17 +0530)]
clk: qcom: videocc-sm8550: Use HW_CTRL_TRIGGER flag for video GDSC's
The video driver will be using the newly introduced
dev_pm_genpd_set_hwmode() API to switch the video GDSC
to HW/SW control modes at runtime.
Hence use HW_CTRL_TRIGGER flag instead of HW_CTRL for
video GDSC's.
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240812134752.28031-1-quic_vnagar@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Cong Dang [Thu, 1 Aug 2024 13:39:19 +0000 (15:39 +0200)]
clk: renesas: r8a779h0: Add CANFD clock
Add the CANFD module clock on the Renesas R-Car V4M (R8A779H0) SoC.
Signed-off-by: Cong Dang <cong.dang.xn@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/9bf71bfda338ee5411751174b03b9e870cc818e3.1722519424.git.geert+renesas@glider.be
Lad Prabhakar [Mon, 29 Jul 2024 20:26:45 +0000 (21:26 +0100)]
clk: renesas: Add RZ/V2H(P) CPG driver
Add RZ/V2H(P) CPG driver.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240729202645.263525-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Peng Fan [Sun, 4 Aug 2024 12:32:56 +0000 (20:32 +0800)]
clk: clk-conf: support assigned-clock-rates-u64
i.MX95 System Management Control Firmware(SCMI) manages the clock
function, it exposes PLL VCO which could support up to 5GHz rate that
exceeds UINT32_MAX. So add assigned-clock-rates-u64 support
to set rate that exceeds UINT32_MAX.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240804-clk-u64-v4-2-8e55569f39a4@nxp.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Dmitry Baryshkov [Sun, 4 Aug 2024 05:40:06 +0000 (08:40 +0300)]
clk: qcom: dispcc-sm8250: use special function for Lucid 5LPE PLL
According to msm-5.10 the lucid 5lpe PLLs have require slightly
different configuration that trion / lucid PLLs, it doesn't set
PLL_UPDATE_BYPASS bit. Add corresponding function and use it for the
display clock controller on Qualcomm SM8350 platform.
Fixes:
205737fe3345 ("clk: qcom: add support for SM8350 DISPCC")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-2-1149dd8399fe@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Dmitry Baryshkov [Sun, 4 Aug 2024 05:40:05 +0000 (08:40 +0300)]
clk: qcom: dispcc-sm8250: use CLK_SET_RATE_PARENT for branch clocks
Add CLK_SET_RATE_PARENT for several branch clocks. Such clocks don't
have a way to change the rate, so set the parent rate instead.
Fixes:
80a18f4a8567 ("clk: qcom: Add display clock controller driver for SM8150 and SM8250")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-1-1149dd8399fe@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Varadarajan Narayanan [Tue, 30 Jul 2024 05:48:16 +0000 (11:18 +0530)]
clk: qcom: ipq5332: Use icc-clk for enabling NoC related clocks
Use the icc-clk framework to enable few clocks to be able to
create paths and use the peripherals connected on those NoCs.
Remove CLK_IGNORE_UNUSED from gpll4_main as all consumers have
been identified.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20240730054817.1915652-5-quic_varada@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Varadarajan Narayanan [Tue, 30 Jul 2024 05:48:15 +0000 (11:18 +0530)]
clk: qcom: ipq5332: Register gcc_qdss_tsctr_clk_src
gcc_qdss_tsctr_clk_src (enabled in the boot loaders and dependent
on gpll4_main) was not registered as one of the ipq5332 clocks.
Hence clk_disable_unused() disabled 'gpll4_main' assuming there
were no consumers for 'gpll4_main' resulting in system freeze or
reboots.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes:
3d89d52970fd ("clk: qcom: add Global Clock controller (GCC) driver for IPQ5332 SoC")
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20240730054817.1915652-4-quic_varada@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Varadarajan Narayanan [Tue, 30 Jul 2024 05:48:14 +0000 (11:18 +0530)]
dt-bindings: usb: qcom,dwc3: Update ipq5332 clock details
Unlike MSM SoC, IPQ SoC doesn't use RPM to aggregate bandwidth
requests and scale the NoC frequency. The NoCs are turned on and
set to a specific frequency at boot time and that is used for the
lifetime of the system. Hence interconnect was not considered
previously.
The same approach was used for PCIe and at that point the
consensus was to move to interconnect. Hence implemented the ICC
driver and updating the existing USB driver to use the ICC
driver.
USB uses icc-clk framework to enable the NoC interface clock.
Hence the 'iface' clock is removed from the list of clocks.
Update the clock-names list accordingly.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20240730054817.1915652-3-quic_varada@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bjorn Andersson [Thu, 15 Aug 2024 22:05:22 +0000 (17:05 -0500)]
Merge branch '
20240730054817.
1915652-2-quic_varada@quicinc.com' into clk-for-6.12
Merge IPQ5332 interconnect binding additions through topic branchs to
allow making the constants available in DeviceTree branch as well.
Varadarajan Narayanan [Tue, 30 Jul 2024 05:48:13 +0000 (11:18 +0530)]
dt-bindings: interconnect: Add Qualcomm IPQ5332 support
Add interconnect-cells to clock provider so that it can be
used as icc provider.
Add master/slave ids for Qualcomm IPQ5332 Network-On-Chip
interfaces. This will be used by the gcc-ipq5332 driver
for providing interconnect services using the icc-clk
framework.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20240730054817.1915652-2-quic_varada@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
AngeloGioacchino Del Regno [Wed, 14 Aug 2024 16:20:23 +0000 (18:20 +0200)]
clk: qcom: gcc-msm8998: Add Q6 BIMC and LPASS core, ADSP SMMU clocks
Add the Q6 BIMC, LPASS core/adsp SMMU clocks to support audio related
functionality on MSM8998 and APQ variants.
As a final step to entirely enable the required clock tree for the
lpass iommu and audio dsp, add the lpass core/adsp GDSCs.
As a side note, it was found out that disabling the lpass core GDSC
at any time would cause a system lockup (and reboot): disabling
this GDSC will leave the lpass iommu completely unclocked, losing
its state entirely - including the secure contexts that have been
previously set-up from the bootloader/TrustZone.
Losing this IOMMU configuration will trigger a hypervisor fault,
which will reboot the system; the only workaround for this issue
is to declare the lpass core gdsc as always-on.
It should also not be forgotten that this is all about firmware and
there may be a version of it that doesn't enable this GDSC at all
before booting Linux, which is the reason why this specific declaration
wasn't simply omitted.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
Link: https://lore.kernel.org/r/20240814-lpass-v1-2-a5bb8f9dfa8b@freebox.fr
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bjorn Andersson [Thu, 15 Aug 2024 21:10:24 +0000 (16:10 -0500)]
Merge branch '
20240814-lpass-v1-1-
a5bb8f9dfa8b@freebox.fr' into clk-for-6.12
Merge updates to MSM8998 GCC binding include file through topic branch,
to make available the newly added constants to both clock and DeviceTree
branch.
AngeloGioacchino Del Regno [Wed, 14 Aug 2024 16:20:22 +0000 (18:20 +0200)]
dt-bindings: clock: gcc-msm8998: Add Q6 and LPASS clocks definitions
Add definitions for the Q6 BIMC, LPASS core and adsp smmu clocks,
required to enable audio functionality on MSM8998.
Add the GDSC definitions for the LPASS_ADSP_GDSC and LPASS_CORE_GDSC
as a final step to enable the required clock tree for the lpass iommu
and for the audio dsp itself.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240814-lpass-v1-1-a5bb8f9dfa8b@freebox.fr
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Satya Priya Kakitapalli [Tue, 13 Aug 2024 08:58:46 +0000 (14:28 +0530)]
clk: qcom: Fix SM_CAMCC_8150 dependencies
SM_CAMCC_8150 depends on SM_GCC_8150, which inturn depends on ARM64.
Hence add the dependency to avoid below kernel-bot warning.
WARNING: unmet direct dependencies detected for SM_GCC_8150
Depends on [n]: COMMON_CLK [=y] && COMMON_CLK_QCOM [=y] && (ARM64 || COMPILE_TEST [=n])
Selected by [y]:
- SM_CAMCC_8150 [=y] && COMMON_CLK [=y] && COMMON_CLK_QCOM [=y]
Fixes:
ea73b7aceff6 ("clk: qcom: Add camera clock controller driver for SM8150")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202408020234.jg9wrvhd-lkp@intel.com/
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240813085846.941855-1-quic_skakitap@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Satya Priya Kakitapalli [Mon, 12 Aug 2024 05:13:05 +0000 (10:43 +0530)]
clk: qcom: gcc-sm8150: De-register gcc_cpuss_ahb_clk_src
The branch clocks of gcc_cpuss_ahb_clk_src are marked critical
and hence these clocks vote on XO blocking the suspend.
De-register these clocks and its source as there is no rate
setting happening on them.
Fixes:
4433594bbe5d ("clk: qcom: gcc: Add global clock controller driver for SC8180x")
Cc: stable@vger.kernel.org
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240812-gcc-sc8180x-fixes-v2-5-8b3eaa5fb856@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Satya Priya Kakitapalli [Mon, 12 Aug 2024 05:13:04 +0000 (10:43 +0530)]
clk: qcom: gcc-sc8180x: Fix the sdcc2 and sdcc4 clocks freq table
Update the frequency tables of gcc_sdcc2_apps_clk and gcc_sdcc4_apps_clk
as per the latest frequency plan.
Fixes:
4433594bbe5d ("clk: qcom: gcc: Add global clock controller driver for SC8180x")
Cc: stable@vger.kernel.org
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240812-gcc-sc8180x-fixes-v2-4-8b3eaa5fb856@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Satya Priya Kakitapalli [Mon, 12 Aug 2024 05:13:03 +0000 (10:43 +0530)]
clk: qcom: gcc-sc8180x: Add GPLL9 support
Add the missing GPLL9 pll and fix the gcc_parents_7 data to use
the correct pll hw.
Fixes:
4433594bbe5d ("clk: qcom: gcc: Add global clock controller driver for SC8180x")
Cc: stable@vger.kernel.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240812-gcc-sc8180x-fixes-v2-3-8b3eaa5fb856@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Satya Priya Kakitapalli [Mon, 12 Aug 2024 05:13:02 +0000 (10:43 +0530)]
dt-bindings: clock: qcom: Add GPLL9 support on gcc-sc8180x
Add the missing GPLL9 which is required for the gcc sdcc2 clock.
Fixes:
0fadcdfdcf57 ("dt-bindings: clock: Add SC8180x GCC binding")
Cc: stable@vger.kernel.org
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240812-gcc-sc8180x-fixes-v2-2-8b3eaa5fb856@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Satya Priya Kakitapalli [Mon, 12 Aug 2024 05:13:01 +0000 (10:43 +0530)]
clk: qcom: gcc-sc8180x: Register QUPv3 RCGs for DFS on sc8180x
QUPv3 clocks support DFS on sc8180x platform but currently the code
changes for it are missing from the driver, this results in not
populating all the DFS supported frequencies and returns incorrect
frequency when the clients request for them. Hence add the DFS
registration for QUPv3 RCGs.
Fixes:
4433594bbe5d ("clk: qcom: gcc: Add global clock controller driver for SC8180x")
Cc: stable@vger.kernel.org
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240812-gcc-sc8180x-fixes-v2-1-8b3eaa5fb856@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Mike Tipton [Fri, 9 Aug 2024 05:21:29 +0000 (10:51 +0530)]
clk: qcom: clk-rpmh: Fix overflow in BCM vote
Valid frequencies may result in BCM votes that exceed the max HW value.
Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't
truncated, which can result in lower frequencies than desired.
Fixes:
04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
Link: https://lore.kernel.org/r/20240809-clk-rpmh-bcm-vote-fix-v2-1-240c584b7ef9@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Jagadeesh Kona [Thu, 1 Aug 2024 06:44:48 +0000 (12:14 +0530)]
dt-bindings: clock: qcom: Drop required-opps in required on SM8650 camcc
On SM8650, the minimum voltage corner supported on MMCX from cmd-db is
sufficient for clock controllers to operate and there is no need to specify
the required-opps. Hence remove the required-opps property from the list of
required properties for SM8650 camcc bindings.
This fixes:
arch/arm64/boot/dts/qcom/sm8650-hdk.dtb: clock-controller@
ade0000:
'required-opps' is a required property
arch/arm64/boot/dts/qcom/sm8650-mtp.dtb: clock-controller@
ade0000:
'required-opps' is a required property
arch/arm64/boot/dts/qcom/sm8650-qrd.dtb: clock-controller@
ade0000:
'required-opps' is a required property
Fixes:
1ae3f0578e0e ("dt-bindings: clock: qcom: Add SM8650 camera clock controller")
Reported-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Closes: https://lore.kernel.org/all/
0f13ab6b-dff1-4b26-9707-
704ae2e2b535@linaro.org/
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202407070147.C9c3oTqS-lkp@intel.com/
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20240801064448.29626-3-quic_jkona@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Jagadeesh Kona [Thu, 1 Aug 2024 06:44:47 +0000 (12:14 +0530)]
dt-bindings: clock: qcom: Drop required-opps in required on sm8650 videocc
On SM8650, the minimum voltage corner supported on MMCX from cmd-db is
sufficient for clock controllers to operate and there is no need to specify
the required-opps. Hence remove the required-opps property from the list of
required properties for SM8650 videocc bindings.
This fixes:
arch/arm64/boot/dts/qcom/sm8650-hdk.dtb: clock-controller@
aaf0000:
'required-opps' is a required property
arch/arm64/boot/dts/qcom/sm8650-mtp.dtb: clock-controller@
aaf0000:
'required-opps' is a required property
arch/arm64/boot/dts/qcom/sm8650-qrd.dtb: clock-controller@
aaf0000:
'required-opps' is a required property
Fixes:
a6a61b9701d1 ("dt-bindings: clock: qcom: Add SM8650 video clock controller")
Reported-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Closes: https://lore.kernel.org/all/
0f13ab6b-dff1-4b26-9707-
704ae2e2b535@linaro.org/
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202407070147.C9c3oTqS-lkp@intel.com/
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20240801064448.29626-2-quic_jkona@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Rayyan Ansari [Tue, 16 Jul 2024 08:56:20 +0000 (09:56 +0100)]
dt-bindings: clock: qcom,qcs404-turingcc: convert to dtschema
Convert the bindings for the Turing Clock Controller on QCS404 from
the old text format to yaml.
Signed-off-by: Rayyan Ansari <rayyan.ansari@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240716085622.12182-2-rayyan.ansari@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Srinivas Kandagatla [Mon, 24 Jun 2024 13:32:37 +0000 (14:32 +0100)]
dt-bindings: clock: Add x1e80100 LPASSCC reset controller
X1E80100 LPASS (Low Power Audio Subsystem) clock controller provides reset
support when it is under the control of Q6DSP.
Add x1e80100 compatible to the existing sc8280xp as these reset
controllers have same reg layout and compatible.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240624-x1e-swr-reset-v2-2-8bc677fcfa64@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Srinivas Kandagatla [Mon, 24 Jun 2024 13:32:36 +0000 (14:32 +0100)]
dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller
X1E80100 LPASS (Low Power Audio Subsystem) Audio clock controller
provides reset support when it is under the control of Q6DSP.
Add x1e80100 compatible to the existing sc8280xp as these reset
controllers have same reg layout and compatible.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240624-x1e-swr-reset-v2-1-8bc677fcfa64@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Luca Weiss [Wed, 19 Jun 2024 21:02:48 +0000 (23:02 +0200)]
clk: qcom: a53-pll: Add MSM8226 a7pll support
The MSM8226 has one PLL for its Cortex-A7 cores. The frequencies will be
specified in devicetree.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Link: https://lore.kernel.org/r/20240619-msm8226-cpufreq-v1-4-85143f5291d1@lucaweiss.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Luca Weiss [Wed, 19 Jun 2024 21:02:47 +0000 (23:02 +0200)]
dt-bindings: clock: qcom,a53pll: Add msm8226-a7pll compatible
Add the compatible for the A7PLL found in MSM8226 SoCs.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240619-msm8226-cpufreq-v1-3-85143f5291d1@lucaweiss.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Luca Weiss [Wed, 19 Jun 2024 21:02:46 +0000 (23:02 +0200)]
dt-bindings: clock: qcom,a53pll: Allow opp-table subnode
Allow placing an opp-table as a subnode that can be assigned using
operating-points-v2 to specify the frequency table for the PLL.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240619-msm8226-cpufreq-v1-2-85143f5291d1@lucaweiss.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Ajit Pandey [Tue, 11 Jun 2024 13:37:51 +0000 (19:07 +0530)]
clk: qcom: Add GPUCC driver support for SM4450
Add Graphics Clock Controller (GPUCC) support for SM4450 platform.
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-8-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Ajit Pandey [Tue, 11 Jun 2024 13:37:49 +0000 (19:07 +0530)]
clk: qcom: Add CAMCC driver support for SM4450
Add Camera Clock Controller (CAMCC) support for SM4450 platform.
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-6-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Ajit Pandey [Tue, 11 Jun 2024 13:37:47 +0000 (19:07 +0530)]
clk: qcom: Add DISPCC driver support for SM4450
Add Display Clock Controller (DISPCC) support for SM4450 platform.
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-4-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Ajit Pandey [Tue, 11 Jun 2024 13:37:45 +0000 (19:07 +0530)]
clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL
In LUCID EVO PLL CAL_L_VAL and L_VAL bitfields are part of single
PLL_L_VAL register. Update for L_VAL bitfield values in PLL_L_VAL
register using regmap_write() API in __alpha_pll_trion_set_rate
callback will override LUCID EVO PLL initial configuration related
to PLL_CAL_L_VAL bit fields in PLL_L_VAL register.
Observed random PLL lock failures during PLL enable due to such
override in PLL calibration value. Use regmap_update_bits() with
L_VAL bitfield mask instead of regmap_write() API to update only
PLL_L_VAL bitfields in __alpha_pll_trion_set_rate callback.
Fixes:
260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces")
Cc: stable@vger.kernel.org
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-2-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Bjorn Andersson [Thu, 15 Aug 2024 02:05:26 +0000 (21:05 -0500)]
Merge branch '
20240611133752.
2192401-1-quic_ajipan@quicinc.com' into clk-for-6.12
Merge the SM4450 display, camera and GPU bindings through a topic
branch, to make it possible to merge them into the DeviceTree source
branch as well.
Ajit Pandey [Tue, 11 Jun 2024 13:37:50 +0000 (19:07 +0530)]
dt-bindings: clock: qcom: add GPUCC clocks on SM4450
Add device tree bindings for the graphics clock controller on
Qualcomm SM4450 platform.
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-7-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Ajit Pandey [Tue, 11 Jun 2024 13:37:48 +0000 (19:07 +0530)]
dt-bindings: clock: qcom: add CAMCC clocks on SM4450
Add device tree bindings for the camera clock controller on
Qualcomm SM4450 platform.
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-5-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Ajit Pandey [Tue, 11 Jun 2024 13:37:46 +0000 (19:07 +0530)]
dt-bindings: clock: qcom: add DISPCC clocks on SM4450
Add device tree bindings for the display clock controller on
Qualcomm SM4450 platform.
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240611133752.2192401-3-quic_ajipan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Andy Shevchenko [Wed, 14 Aug 2024 12:54:08 +0000 (15:54 +0300)]
clk: visconti: Switch to use kmemdup_array()
Let the kmemdup_array() take care about multiplication and possible
overflows.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240814125513.2637955-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Andy Shevchenko [Wed, 14 Aug 2024 12:54:07 +0000 (15:54 +0300)]
clk: mmp: Switch to use kmemdup_array()
Let the kmemdup_array() take care about multiplication and possible
overflows.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240814125513.2637955-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Rob Herring (Arm) [Wed, 7 Aug 2024 16:58:55 +0000 (10:58 -0600)]
dt-bindings: clock: mediatek: Convert MediaTek clock syscons to schema
Convert the various MediaTek syscon bindings which are a clock provider
into DT schema format. As they are all the same other than compatible
string, combine them into a single schema file.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240807-dt-mediatek-clk-v1-3-e8d568abfd48@kernel.org
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Rob Herring (Arm) [Wed, 7 Aug 2024 16:58:54 +0000 (10:58 -0600)]
dt-bindings: Move Mediatek clock controllers to "clock" directory
The "arm" binding directory is for architecture specific and top-level
board bindings. Move all the MediaTek bindings implementing clock
providers from "arm/mediatek/" to "clock/" binding directories.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240807-dt-mediatek-clk-v1-2-e8d568abfd48@kernel.org
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>