]> git.hungrycats.org Git - linux/log
linux
2 months agoMerge branches 'clk-ti', 'clk-samsung', 'clk-rockchip' and 'clk-spacemit' into clk...
Stephen Boyd [Thu, 25 Jun 2026 14:55:38 +0000 (07:55 -0700)]
Merge branches 'clk-ti', 'clk-samsung', 'clk-rockchip' and 'clk-spacemit' into clk-next

* clk-ti:
  clk: keystone: sci-clk: fix application of sizeof to pointer
  clk: keystone: don't cache clock rate

* clk-samsung:
  clk: samsung: exynos990: Fix PERIC0/1 USI clock types
  clk: samsung: exynos850: mark APM I3C clocks as critical

* clk-rockchip:
  clk: rockchip: allow COMPILE_TEST builds
  clk: rockchip: rk3588: add GATE_GRF clocks for I2S MCLK output to IO
  soc: rockchip: rk3588: add SYS_GRF SOC_CON6 register offset
  clk: rockchip: add helper to register auxiliary GRFs
  clk: rockchip: allow grf_type_sys lookup in aux_grf_table
  dt-bindings: clock: rockchip,rk3588-cru: add I2S MCLK output to IO clock IDs

* clk-spacemit:
  clk: spacemit: k3: Add PCIe DBI clock
  dt-bindings: soc: spacemit: k3: Add PCIe DBI clock IDs
  clk: spacemit: k3: Fix PCIe clock register offset
  clk: spacemit: k3: Switch to pll2_d6 as parent for PCIe clock

2 months agoMerge branches 'clk-renesas', 'clk-socfpga', 'clk-amlogic' and 'clk-canaan' into...
Stephen Boyd [Thu, 25 Jun 2026 14:55:26 +0000 (07:55 -0700)]
Merge branches 'clk-renesas', 'clk-socfpga', 'clk-amlogic' and 'clk-canaan' into clk-next

* clk-renesas: (36 commits)
  clk: renesas: r9a08g045: Drop unused pm_domain header file
  clk: renesas: r8a779g0: Add DSC clock
  clk: renesas: rzg2l: Rename iterator in for_each_mod_clock() to avoid shadowing
  clk: renesas: r9a08g045: Drop unused DEF_G3S_MUX macro
  clk: renesas: rzg2l: Rename RZG3L-prefixed PLL macros to CPG-prefixed ones
  clk: renesas: rzg3s/rzg3l: Simplify PLL configuration macro
  clk: renesas: rzg2l: Simplify SAM PLL configuration macro
  clk: renesas: r8a73a4: Add ZT/ZTR trace clocks
  dt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile APE6
  clk: renesas: r9a08g046: Add RSPI clocks and resets
  clk: renesas: r9a08g046: Add SSIF-2 clocks and resets
  clk: renesas: r9a08g046: Add RSCI clocks and resets
  clk: renesas: cpg-mssr: Add number of clock cells check
  clk: renesas: rzg2l: Refactor rzg3l_cpg_pll_clk_endisable()
  clk: renesas: rzg2l: Consolidate DEF_MUX() and DEF_MUX_FLAGS()
  clk: renesas: r9a08g046: Add IA55_PCLK to critical module clocks
  clk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resets
  clk: renesas: r9a09g047: Add support for DSI clocks and resets
  clk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK
  clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks
  ...

* clk-socfpga:
  clk: socfpga: agilex: implement l3_main_free_clk

* clk-amlogic:
  dt-bindings: clock: amlogic: t7: Add missing mpll3 parent clock
  dt-bindings: clock: amlogic: Fix redundant hyphen in "amlogic,t7-gp1--pll" string.

* clk-canaan:
  clk: canaan: Add clock driver for Canaan K230
  dt-bindings: clock: Add Canaan K230 clock controller

2 months agoMerge branches 'clk-cleanup', 'clk-mediatek', 'clk-marvell' and 'clk-versal' into...
Stephen Boyd [Thu, 25 Jun 2026 14:55:16 +0000 (07:55 -0700)]
Merge branches 'clk-cleanup', 'clk-mediatek', 'clk-marvell' and 'clk-versal' into clk-next

* clk-cleanup:
  clk: hisilicon: Improve deallocation in error path
  clk-lpc18xx-ccu: kzalloc + kcalloc to kzalloc_flex
  clk: bulk: Use dev_err_probe() helper in of_clk_bulk_get()
  clk: bcm: iproc-asiu: simplify allocation
  clk: clk-max77686: kzalloc + kcalloc to kzalloc
  clk: visconti: pll: use kzalloc_flex
  clk: hisilicon: clkdivider-hi6220: use kzalloc_flex
  clk: mvebu: use kzalloc_flex

* clk-mediatek:
  clk: mediatek: mt7988: use MUX_CLR_SET for gate-less muxes
  clk: mediatek: mt8192: use MUX_CLR_SET
  clk: mediatek: add MUX_CLR_SET macro

* clk-marvell:
  clk: mmp: pxa1908-apbcp: Add reset cells
  clk: mmp: pxa1908-apbc: Add reset cells
  dt-bindings: clock: marvell,pxa1908: Add #reset-cells

* clk-versal:
  clk: clk-axi-clkgen: Add support versal timings

3 months agoMerge tag 'spacemit-clk-for-7.2-1' of ssh://github.com/spacemit-com/linux into clk...
Stephen Boyd [Sat, 13 Jun 2026 21:07:48 +0000 (14:07 -0700)]
Merge tag 'spacemit-clk-for-7.2-1' of ssh://github.com/spacemit-com/linux into clk-spacemit

Pull RISC-V SpacemiT clk driver updates from Yixun Lan:

 - Switch SpacemiT PCIe parent clock
 - Fix SpacemiT PCIe clock register offset
 - Add SpacemiT PCIe DBI clock

* tag 'spacemit-clk-for-7.2-1' of ssh://github.com/spacemit-com/linux:
  clk: spacemit: k3: Add PCIe DBI clock
  dt-bindings: soc: spacemit: k3: Add PCIe DBI clock IDs
  clk: spacemit: k3: Fix PCIe clock register offset
  clk: spacemit: k3: Switch to pll2_d6 as parent for PCIe clock

3 months agoMerge tag 'v7.2-rockchip-clk1' of https://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Boyd [Sat, 13 Jun 2026 21:04:36 +0000 (14:04 -0700)]
Merge tag 'v7.2-rockchip-clk1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip

Pull Rockchip clk driver updates from Heiko Stuebner:

 - Add gate-clocks for i2s outputs on Rockchip rk3588
 - Allow compile-tests for the whole clock driver

* tag 'v7.2-rockchip-clk1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  clk: rockchip: allow COMPILE_TEST builds
  clk: rockchip: rk3588: add GATE_GRF clocks for I2S MCLK output to IO
  soc: rockchip: rk3588: add SYS_GRF SOC_CON6 register offset
  clk: rockchip: add helper to register auxiliary GRFs
  clk: rockchip: allow grf_type_sys lookup in aux_grf_table
  dt-bindings: clock: rockchip,rk3588-cru: add I2S MCLK output to IO clock IDs

3 months agoMerge tag 'samsung-clk-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk...
Stephen Boyd [Sat, 13 Jun 2026 21:03:02 +0000 (14:03 -0700)]
Merge tag 'samsung-clk-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung

Pull Samsung SoC clk driver updates from Krzysztof Kozlowski:

 - Exynos850: Mark APM (Active Power Management) I3C clocks as
   critical, because they are necessary for communication with
   firmware but we do not have any consumer of them so far.
 - Exynos990: Correct the parents of a few muxes and propagate
   rate requests up.

* tag 'samsung-clk-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  clk: samsung: exynos990: Fix PERIC0/1 USI clock types
  clk: samsung: exynos850: mark APM I3C clocks as critical

3 months agoMerge tag 'ti-k3-sci-clk-for-v7.2' of https://git.kernel.org/pub/scm/linux/kernel...
Stephen Boyd [Sat, 13 Jun 2026 20:59:57 +0000 (13:59 -0700)]
Merge tag 'ti-k3-sci-clk-for-v7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into clk-ti

Pull TI K3 SCI clock updates from Nishanth Menon:

 - Fix incorrect application of sizeof to a pointer type in TI
   sci-clk driver
 - Disable clock rate caching in the keystone clock driver to
   ensure accurate rate reporting

* tag 'ti-k3-sci-clk-for-v7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  clk: keystone: sci-clk: fix application of sizeof to pointer
  clk: keystone: don't cache clock rate

3 months agoMerge tag 'clk-canaan-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/conor...
Stephen Boyd [Sat, 13 Jun 2026 20:57:40 +0000 (13:57 -0700)]
Merge tag 'clk-canaan-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into clk-canaan

Pull Canaan k230 clock support from Conor Dooley:

 - Driver and devicetree bindings for the Canaan k230 SoC clk
   controller

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'clk-canaan-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  clk: canaan: Add clock driver for Canaan K230
  dt-bindings: clock: Add Canaan K230 clock controller

3 months agoMerge tag 'renesas-clk-for-v7.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel...
Stephen Boyd [Sat, 13 Jun 2026 20:55:51 +0000 (13:55 -0700)]
Merge tag 'renesas-clk-for-v7.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas

Pull more Renesas clk driver updates from Geert Uytterhoeven:

 - Add the Display Stream Compression (DSC) clock on Renesas R-Car V4H

* tag 'renesas-clk-for-v7.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: r9a08g045: Drop unused pm_domain header file
  clk: renesas: r8a779g0: Add DSC clock
  clk: renesas: rzg2l: Rename iterator in for_each_mod_clock() to avoid shadowing
  clk: renesas: r9a08g045: Drop unused DEF_G3S_MUX macro
  clk: renesas: rzg2l: Rename RZG3L-prefixed PLL macros to CPG-prefixed ones
  clk: renesas: rzg3s/rzg3l: Simplify PLL configuration macro
  clk: renesas: rzg2l: Simplify SAM PLL configuration macro

3 months agoMerge tag 'clk-meson-v7.2-1' of ssh://github.com/BayLibre/clk-meson into clk-amlogic
Stephen Boyd [Sat, 13 Jun 2026 20:54:37 +0000 (13:54 -0700)]
Merge tag 'clk-meson-v7.2-1' of ssh://github.com/BayLibre/clk-meson into clk-amlogic

Pull Amlogic clk driver updates from Jerome Brunet:

 - Minor DT bindings fixes for the Amlogic T7 clock controllers

* tag 'clk-meson-v7.2-1' of ssh://github.com/BayLibre/clk-meson:
  dt-bindings: clock: amlogic: t7: Add missing mpll3 parent clock
  dt-bindings: clock: amlogic: Fix redundant hyphen in "amlogic,t7-gp1--pll" string.

3 months agoMerge tag 'socfpga_clk_update_for_v7.2' of git://git.kernel.org/pub/scm/linux/kernel...
Stephen Boyd [Sat, 13 Jun 2026 20:52:49 +0000 (13:52 -0700)]
Merge tag 'socfpga_clk_update_for_v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into clk-socfpga

Pull SoCFPGA clk driver update from Dinh Nguyen:

 - Implement the l3_main_free_clk on SoCFPGA agilex

* tag 'socfpga_clk_update_for_v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  clk: socfpga: agilex: implement l3_main_free_clk

3 months agoclk: keystone: sci-clk: fix application of sizeof to pointer
Jing Yangyang [Tue, 12 May 2026 11:00:28 +0000 (06:00 -0500)]
clk: keystone: sci-clk: fix application of sizeof to pointer

Coccinelle (scripts/coccinelle/misc/noderef.cocci) reports:

  drivers/clk/keystone/sci-clk.c:391:8-14: ERROR: application of
  sizeof to pointer

In sci_clk_get(), 'clk' is declared as 'struct sci_clk **', so
sizeof(clk) is sizeof(struct sci_clk **) which is the size of a
pointer rather than the size of an array element. provider->clocks
is an array of 'struct sci_clk *', so the canonical size argument
to bsearch() is sizeof(*clk) (i.e. sizeof(struct sci_clk *)).

The two values are equal on every supported architecture, so this
is correctness/idiom, not a runtime fix, but the new form matches
the rest of the bsearch() callers in the tree and silences the
Coccinelle warning the script flagged.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Closes: https://lore.kernel.org/all/84a6ba16686347099a3dab2e5161a930e792eb6e.1629198281.git.jing.yangyang@zte.com.cn/
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/all/202512040525.zrHSDl5h-lkp@intel.com/
Link: https://lore.kernel.org/linux-clk/20211012021931.176727-1-davidcomponentone@gmail.com/
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andrew Davis <afd@ti.com>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
[nm@ti.com: Improved commit message]
Reviewed-by: Brian Masney <bmasney@redhat.com>
Link: https://patch.msgid.link/20260512110028.2999471-1-nm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoclk: keystone: don't cache clock rate
Michael Walle [Thu, 7 May 2026 16:09:34 +0000 (11:09 -0500)]
clk: keystone: don't cache clock rate

The TISCI firmware will return 0 if the clock or consumer is not
enabled although there is a stored value in the firmware. IOW a call to
set rate will work but at get rate will always return 0 if the clock is
disabled.
The clk framework will try to cache the clock rate when it's requested
by a consumer. If the clock or consumer is not enabled at that point,
the cached value is 0, which is wrong. Thus, disable the cache
altogether.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Randolph Sapp <rs@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Antonios Christidis <a-christidis@ti.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Link: https://patch.msgid.link/20260507-clk-sci-v2-1-38f59b48777a@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoclk: spacemit: k3: Add PCIe DBI clock
Yixun Lan [Mon, 11 May 2026 02:59:12 +0000 (02:59 +0000)]
clk: spacemit: k3: Add PCIe DBI clock

Add PCIe DBI (Data Bus Interface) clock which was missing, This will
support PCIe driver to explicitly request and enable all clocks that
needed.

Link: https://patch.msgid.link/20260511-06-pci-clk-fix-v2-4-c9a5e563bab3@kernel.org
Signed-off-by: Yixun Lan <dlan@kernel.org>
3 months agodt-bindings: soc: spacemit: k3: Add PCIe DBI clock IDs
Yixun Lan [Mon, 11 May 2026 02:59:11 +0000 (02:59 +0000)]
dt-bindings: soc: spacemit: k3: Add PCIe DBI clock IDs

Add clock IDs of PCIe DBI (Data Bus Interface) clock.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260511-06-pci-clk-fix-v2-3-c9a5e563bab3@kernel.org
Signed-off-by: Yixun Lan <dlan@kernel.org>
3 months agoclk: spacemit: k3: Fix PCIe clock register offset
Yixun Lan [Mon, 11 May 2026 02:59:10 +0000 (02:59 +0000)]
clk: spacemit: k3: Fix PCIe clock register offset

The offset of PCIe Clock CTRL register for port B and C controller was
wrongly swapped, correct it here.

Fixes: 091d19cc2401 ("clk: spacemit: k3: extract common header")
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260511-06-pci-clk-fix-v2-2-c9a5e563bab3@kernel.org
Signed-off-by: Yixun Lan <dlan@kernel.org>
3 months agoclk: spacemit: k3: Switch to pll2_d6 as parent for PCIe clock
Yixun Lan [Mon, 11 May 2026 02:59:09 +0000 (02:59 +0000)]
clk: spacemit: k3: Switch to pll2_d6 as parent for PCIe clock

According to SpacemiT updated docs, the PCIe master and slave clock's
parent is the pll2_d6 clock, so fix it.

Fixes: e371a77255b8 ("clk: spacemit: k3: add the clock tree")
Link: https://patch.msgid.link/20260511-06-pci-clk-fix-v2-1-c9a5e563bab3@kernel.org
Signed-off-by: Yixun Lan <dlan@kernel.org>
3 months agoclk: samsung: exynos990: Fix PERIC0/1 USI clock types
Denzeel Oliva [Thu, 28 May 2026 20:09:01 +0000 (15:09 -0500)]
clk: samsung: exynos990: Fix PERIC0/1 USI clock types

Use nMUX() for USI and UART user muxes to allow reparenting between
OSC and CMU IP output when changing rates, and use DIV_F() with
CLK_SET_RATE_PARENT on their dividers and gates so rate requests
propagate upward.

Consolidate identical USI parent arrays into shared
mout_peric0_nonbususer_p and mout_peric1_nonbususer_p.

Signed-off-by: Denzeel Oliva <wachiturroxd150@gmail.com>
Link: https://patch.msgid.link/20260528-perics-usi-v1-1-13a6ee4d1a6f@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 months agoMerge tag 'renesas-clk-for-v7.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel...
Stephen Boyd [Fri, 29 May 2026 01:44:37 +0000 (18:44 -0700)]
Merge tag 'renesas-clk-for-v7.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas

Pull Renesas clk driver updates from Geert Uytterhoeven:

 - Add Ethernet, GPIO, CPU core, watchdog, serial, I2C, sound, and SPI
   clocks and resets on Renesas RZ/G3L
 - Add the timer (MTU3) clock on Renesas RZ/T2H and RZ/N2H
 - Add Coresight trace clocks on Renesas R-Mobile A1 and APE6
 - Add display clocks and resets on Renesas RZ/G3E

* tag 'renesas-clk-for-v7.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: (29 commits)
  clk: renesas: r8a73a4: Add ZT/ZTR trace clocks
  dt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile APE6
  clk: renesas: r9a08g046: Add RSPI clocks and resets
  clk: renesas: r9a08g046: Add SSIF-2 clocks and resets
  clk: renesas: r9a08g046: Add RSCI clocks and resets
  clk: renesas: cpg-mssr: Add number of clock cells check
  clk: renesas: rzg2l: Refactor rzg3l_cpg_pll_clk_endisable()
  clk: renesas: rzg2l: Consolidate DEF_MUX() and DEF_MUX_FLAGS()
  clk: renesas: r9a08g046: Add IA55_PCLK to critical module clocks
  clk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resets
  clk: renesas: r9a09g047: Add support for DSI clocks and resets
  clk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK
  clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks
  clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocks
  clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks
  clk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support
  clk: renesas: rzv2h: Add PLLDSI clk mux support
  clk: renesas: r8a7740: Add ZT/ZTR trace clocks
  dt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile A1
  clk: renesas: r9a09g077: Add MTU3 module clock
  ...

3 months agoclk: renesas: r9a08g045: Drop unused pm_domain header file
Biju Das [Sun, 24 May 2026 08:26:50 +0000 (09:26 +0100)]
clk: renesas: r9a08g045: Drop unused pm_domain header file

The linux/pm_domain.h header is not used in this file.  Remove it to
keep the includes clean.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260524082657.19335-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 months agoclk: renesas: r8a779g0: Add DSC clock
Marek Vasut [Fri, 15 May 2026 09:09:26 +0000 (12:09 +0300)]
clk: renesas: r8a779g0: Add DSC clock

Add the DSC module clock for Renesas R-Car V4H (R8A779G0) SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260515-rcar-du-dsc-v3-1-164157820498@ideasonboard.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 months agoclk: socfpga: agilex: implement l3_main_free_clk
Adrian Ng Ho Yin [Fri, 22 May 2026 09:02:54 +0000 (17:02 +0800)]
clk: socfpga: agilex: implement l3_main_free_clk

The AGILEX_L3_MAIN_FREE_CLK is defined in the dt-bindings header but
was never implemented in the clock driver. Per the Agilex TRM,
l3_main_free_clk has no divider or mux and is a fixed 1:1 derivative
of noc_free_clk that clocks most of the interconnect datapath.

Signed-off-by: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
3 months agoclk: renesas: rzg2l: Rename iterator in for_each_mod_clock() to avoid shadowing
Lad Prabhakar [Wed, 20 May 2026 09:29:47 +0000 (10:29 +0100)]
clk: renesas: rzg2l: Rename iterator in for_each_mod_clock() to avoid shadowing

Rename the internal loop iterator variable in the for_each_mod_clock()
macro from 'i' to '__i'.

The current naming conflicts with local loop variables named 'i' inside
code blocks that utilize the macro, triggering compiler warnings due to
variable shadowing:

  drivers/clk/renesas/rzg2l-cpg.c:1494:36: warning: declaration of `i` shadows a previous local [-Wshadow]
   1494 |                  for (unsigned int i = 0; i < clk->num_shared_mstop_clks; i++)

Using a unique identifier for the macro-internal iterator resolves the
shadowing warnings globally across all macro expansions.

Fixes: 3fd4a8bb4b63 ("clk: renesas: rzg2l: Add macro to loop through module clocks")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260520092947.70596-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 months agoclk: renesas: r9a08g045: Drop unused DEF_G3S_MUX macro
Lad Prabhakar [Wed, 20 May 2026 09:25:16 +0000 (10:25 +0100)]
clk: renesas: r9a08g045: Drop unused DEF_G3S_MUX macro

Drop the unused DEF_G3S_MUX helper macro from the r9a08g045 CPG
driver.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260520092516.69819-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: canaan: Add clock driver for Canaan K230
Xukai Wang [Sat, 25 Apr 2026 09:29:32 +0000 (17:29 +0800)]
clk: canaan: Add clock driver for Canaan K230

This patch provides basic support for the K230 clock, which covers
all clocks in K230 SoC.

The clock tree of the K230 SoC consists of a 24MHZ external crystal
oscillator, PLLs and an external pulse input for timerX, and their
derived clocks.

Co-developed-by: Troy Mitchell <TroyMitchell988@gmail.com>
Signed-off-by: Troy Mitchell <TroyMitchell988@gmail.com>
Signed-off-by: Xukai Wang <kingxukai@zohomail.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
4 months agoclk: renesas: rzg2l: Rename RZG3L-prefixed PLL macros to CPG-prefixed ones
Biju Das [Tue, 19 May 2026 14:15:15 +0000 (15:15 +0100)]
clk: renesas: rzg2l: Rename RZG3L-prefixed PLL macros to CPG-prefixed ones

Rename RZG3L_PLL_STBY_OFFSET(), RZG3L_PLL_STBY_RESETB,
RZG3L_PLL_STBY_RESETB_WEN, RZG3L_PLL_MON_OFFSET(), RZG3L_PLL_MON_RESETB,
and RZG3L_PLL_MON_LOCK to their CPG_PLL_* equivalents to reflect that
these macros are not RZG3L-specific and are shared across SoCs.

Also fold CPG_PLL_MON_OFFSET() into rzg2l-cpg.c alongside the other
CPG_PLL_*_OFFSET() helpers introduced in previous patches.

No functional changes.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20260519141518.389670-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: rzg3s/rzg3l: Simplify PLL configuration macro
Biju Das [Tue, 19 May 2026 14:15:14 +0000 (15:15 +0100)]
clk: renesas: rzg3s/rzg3l: Simplify PLL configuration macro

Replace the per-SoC G3S_PLL146_CONF() and G3L_PLL1467_CONF() macros with
a unified CPG_PLL_CONF(stby, setting) macro defined in rzg2l-cpg.h.

Drop the now-redundant GET_REG_SAMPLL_{CLK1, SETTING}() macros, replacing
the latter with CPG_PLL1_SETTING_OFFSET() using FIELD_GET() to extract the
offset value. Update RZG3L_PLL_{STBY,MON}_OFFSET() macros to derive
offsets directly from CPG_PLL_STBY_OFFSET().

No functional changes.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260519141518.389670-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: rzg2l: Simplify SAM PLL configuration macro
Biju Das [Tue, 19 May 2026 14:15:13 +0000 (15:15 +0100)]
clk: renesas: rzg2l: Simplify SAM PLL configuration macro

Replace the PLL146_CONF() macro and its associated CPG_SAMPLL_CLK{1,2}(n)
helpers with a single CPG_SAM_PLL_CONF(stby) macro that takes the PLL
standby register offset directly.

This removes the implicit coupling between PLL index n and register layout
and eliminates the now-redundant GET_REG_SAMPLL_CLK2() macro. The RZ/V2M
PLL4 definition is also updated to use the new macro with its explicit
standby offset (0x100), removing the local PLL4_CONF define.

No functional changes.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20260519141518.389670-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agodt-bindings: clock: Add Canaan K230 clock controller
Xukai Wang [Sat, 25 Apr 2026 09:29:31 +0000 (17:29 +0800)]
dt-bindings: clock: Add Canaan K230 clock controller

This patch adds the Device Tree binding for the clock controller
on Canaan k230. The binding defines the clocks and the required
properties to configure them correctly.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Xukai Wang <kingxukai@zohomail.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
4 months agoclk: renesas: r8a73a4: Add ZT/ZTR trace clocks
Marek Vasut [Sat, 2 May 2026 18:55:43 +0000 (20:55 +0200)]
clk: renesas: r8a73a4: Add ZT/ZTR trace clocks

Implement support for the ZT trace bus and ZTR trace clocks on R-Mobile
APE6.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260502185557.93061-3-marek.vasut+renesas@mailbox.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoMerge tag 'renesas-r8a73a4-dt-binding-defs-tag1' into renesas-clk-for-v7.2
Geert Uytterhoeven [Fri, 15 May 2026 09:29:41 +0000 (11:29 +0200)]
Merge tag 'renesas-r8a73a4-dt-binding-defs-tag1' into renesas-clk-for-v7.2

Renesas R-Mobile APE6 Coresight Clock DT Binding Definitions

ZT trace bus and ZTR trace clock DT binding definitions for the Renesas
R-Mobile APE6 (R8A73A4) SoC, shared by driver and DT source files.

4 months agodt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile APE6
Marek Vasut [Sat, 2 May 2026 18:55:42 +0000 (20:55 +0200)]
dt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile APE6

Document the ZT trace bus and ZTR trace clocks on R-Mobile APE6.  These
clocks supply the coresight tracing modules, PTM, TPIU, ETB and
replicator.  Without these clocks, coresight tracing can not be
operated.  While this does change the ABI, it does so by extending the
existing clock-output-names, therefore if old software is used with new
DT, the coresight tracing parts will likely fail to probe, otherwise if
new software is used with an old DT, there is no impact.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260502185557.93061-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: samsung: exynos850: mark APM I3C clocks as critical
Alexey Klimov [Thu, 30 Apr 2026 11:53:27 +0000 (12:53 +0100)]
clk: samsung: exynos850: mark APM I3C clocks as critical

The Exynos850 APM co-processor relies on the I3C bus to communicate with
the PMIC. Currently, there is no dedicated PMIC consumer driver managing
these clocks, so the clock subsystem automatically gates them during the
initialisation. Once gated, any subsequent ACPM communication with APM
results in timeouts.

As a temporary workaround (and let's hope it doesn't become permanent),
mark both `gout_i3c_pclk` and `gout_i3c_sclk` as CLK_IS_CRITICAL ones to
prevent the clock subsystem from disabling them. This makes the ACPM
communication functional. This workaround should be reverted once a
proper ACPM PMIC driver is implemented to manage these clocks.

Cc: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://patch.msgid.link/20260430-exynos850-i3c-criticalclocks-v1-1-6e1fd8dfa21b@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
4 months agoclk: rockchip: allow COMPILE_TEST builds
Rosen Penev [Sat, 9 May 2026 00:36:02 +0000 (17:36 -0700)]
clk: rockchip: allow COMPILE_TEST builds

COMMON_CLK_ROCKCHIP already gates the Rockchip clock objects inside the
Rockchip clock Makefile.  Allow selecting it for COMPILE_TEST and use it
for the parent Makefile descent instead of ARCH_ROCKCHIP.

The per-SoC Rockchip clock symbols already have COMPILE_TEST dependencies,
so this exposes the existing build coverage to other architectures without
selecting the Rockchip platform.

Tested with:
make LLVM=1 ARCH=loongarch drivers/clk/rockchip/

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Link: https://patch.msgid.link/20260509003602.956186-1-rosenp@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
4 months agoclk: renesas: r9a08g046: Add RSPI clocks and resets
Biju Das [Tue, 5 May 2026 07:15:39 +0000 (08:15 +0100)]
clk: renesas: r9a08g046: Add RSPI clocks and resets

Add clock and reset definitions for the three RSPI (Serial Peripheral
Interface) channels on the RZ/G3L (R9A08G046) SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260505071544.8965-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add SSIF-2 clocks and resets
Biju Das [Tue, 5 May 2026 07:15:38 +0000 (08:15 +0100)]
clk: renesas: r9a08g046: Add SSIF-2 clocks and resets

Add SSIF-2 clock and reset entries on the RZ/G3L SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260505071544.8965-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add RSCI clocks and resets
Biju Das [Tue, 5 May 2026 07:15:37 +0000 (08:15 +0100)]
clk: renesas: r9a08g046: Add RSCI clocks and resets

Add clock and reset entries for the Serial Communications Interfaces
(RSCI) found on the RZ/G3L SoC.  This includes various dividers and mux
clocks needed for the four RSCI channels.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260505071544.8965-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: cpg-mssr: Add number of clock cells check
Geert Uytterhoeven [Thu, 30 Apr 2026 15:20:16 +0000 (17:20 +0200)]
clk: renesas: cpg-mssr: Add number of clock cells check

The number of clock cells is not validated in the clock provider's
clk_src_get() callback.  Add the missing check.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/46e010659ffdffd5e3541369f3b65d43ebe236ec.1777562043.git.geert+renesas@glider.be
4 months agoclk: renesas: rzg2l: Refactor rzg3l_cpg_pll_clk_endisable()
Geert Uytterhoeven [Thu, 30 Apr 2026 15:20:18 +0000 (17:20 +0200)]
clk: renesas: rzg2l: Refactor rzg3l_cpg_pll_clk_endisable()

Reduce duplication by introducing mon_mask.
Eliminate an else branch by moving common parts into variable
pre-initializations.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/9cda94b9b37c562a305f4dd6091fd71246764fd2.1777562043.git.geert+renesas@glider.be
4 months agoclk: renesas: rzg2l: Consolidate DEF_MUX() and DEF_MUX_FLAGS()
Geert Uytterhoeven [Thu, 30 Apr 2026 15:20:17 +0000 (17:20 +0200)]
clk: renesas: rzg2l: Consolidate DEF_MUX() and DEF_MUX_FLAGS()

Define DEF_MUX() using DEF_MUX_FLAGS(), to reduce duplication.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/46e2713f39cc5efc4b05a65723e0781a9dd8291c.1777562043.git.geert+renesas@glider.be
4 months agoclk: renesas: r9a08g046: Add IA55_PCLK to critical module clocks
Biju Das [Thu, 30 Apr 2026 10:08:16 +0000 (11:08 +0100)]
clk: renesas: r9a08g046: Add IA55_PCLK to critical module clocks

Add R9A08G046_IA55_PCLK to the critical module clocks list to prevent
the clock from being gated during suspend, as it is required for the
interrupt controller (IA55) to function correctly.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430100838.157306-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoMerge tag 'clk-renesas-rzg3e-plldsi-tag' into renesas-clk-for-v7.2
Geert Uytterhoeven [Mon, 4 May 2026 12:09:33 +0000 (14:09 +0200)]
Merge tag 'clk-renesas-rzg3e-plldsi-tag' into renesas-clk-for-v7.2

clk: renesas: rzg3e: Add support for DSI clocks

RZ/G3E Clock Pulse Generator PLLDSI limits, shared by clock and MIPI DSI
driver source files.

4 months agoclk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resets
Tommaso Merciai [Wed, 8 Apr 2026 10:36:53 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resets

Add LCDC{0,1} clocks and resets entries to the r9a09g047 CPG driver.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/c1b5afcef8068d4d074aff97e30b4d64b7c38eaf.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g047: Add support for DSI clocks and resets
Tommaso Merciai [Wed, 8 Apr 2026 10:36:52 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add support for DSI clocks and resets

Add definitions for DSI clocks and resets on the R9A09G047 cpg driver
to enable proper initialization and control of the DSI hardware.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/21ac6da825e8fad0b0a9d37d6daa955b0d23ce07.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK
Tommaso Merciai [Wed, 8 Apr 2026 10:36:51 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK

Add support for the SMUX2_DSI0_CLK and SMUX2_DSI1_CLK clock muxes
present on the r9a09g047 SoC.

These muxes select between CDIV7_DSI{0,1}_CLK and CSDIV_2to16_PLLDSI{0,1}
using the CPG_SSEL3 register (SELCTL0 and SELCTL1 bits).

According to the hardware manual, when LVDS0 or LVDS1 outputs are used,
SELCTL0 or SELCTL1 must be set accordingly.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/9595f56ce8ab120477bfc11eaafb0f2b655d049a.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks
Tommaso Merciai [Wed, 8 Apr 2026 10:36:50 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks

Add the CLK_PLLDSI0_CSDIV and CLK_PLLDSI1_CSDIV fixed-factor clocks to
the r9a09g047 SoC clock driver.

These clocks are required to enable DSI and RGB output support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/4d5b4ddad89770447b3818381d5353f5065b72b5.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocks
Tommaso Merciai [Wed, 8 Apr 2026 10:36:49 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocks

Add the CLK_PLLDSI0_DIV7 and CLK_PLLDSI1_DIV7 fixed-factor clocks to
the r9a09g047 SoC clock driver.

These clocks are required to enable LVDS0 and LVDS1 output support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/e50c1721e1dc160e8b4518e8c5172f10cba4b58b.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks
Tommaso Merciai [Wed, 8 Apr 2026 10:36:48 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks

Add support for the PLLDSI{0,1} clocks in the r9a09g047 CPG driver.

Introduce CLK_PLLDSI{0,1} also, introduce the
rzg3e_cpg_pll_dsi{0,1}_limits structures to describe the frequency
constraints specific to the RZ/G3E SoC.

On Renesas RZ/G3E:

 - PLLDSI0 maximum output frequency: 1218 MHz
 - PLLDSI1 maximum output frequency: 609 MHz

These limits are enforced through the newly added
RZG3E_CPG_PLL_DSI{0,1}_LIMITS().

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/d26ec5349b0eb7ddb7d244fc53d1111a8530328f.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support
Tommaso Merciai [Wed, 8 Apr 2026 10:36:47 +0000 (12:36 +0200)]
clk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support

Add CLK_PLLETH_LPCLK clock support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/dcb0cab96e2ff3e23eafac061b2952c74622d1f8.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: rzv2h: Add PLLDSI clk mux support
Tommaso Merciai [Wed, 8 Apr 2026 10:36:46 +0000 (12:36 +0200)]
clk: renesas: rzv2h: Add PLLDSI clk mux support

Add PLLDSI clk mux support to select PLLDSI clock from different clock
sources.

Introduce the DEF_PLLDSI_SMUX() macro to define these muxes and register
them in the clock driver.

Extend the determine_rate callback to calculate and propagate PLL
parameters via rzv2h_get_pll_dtable_pars() when LVDS output is selected,
using a new helper function rzv2h_cpg_plldsi_smux_lvds_determine_rate().

The CLK_SMUX2_DSI{0,1}_CLK clock multiplexers select between two paths
with different duty cycles:

- CDIV7_DSIx_CLK (LVDS path, parent index 0): asymmetric H/L=4/3 duty (4/7)
- CSDIV_DSIx (DSI/RGB path, parent index 1): symmetric 50% duty (1/2)

Implement rzv2h_cpg_plldsi_smux_{get,set}_duty_cycle clock operations to
allow the DRM driver to query and configure the appropriate clock path
based on the required output duty cycle.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/24d3853ca2522df21e6a071a23e23ba4ca4b7276.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: hisilicon: Improve deallocation in error path
J. Neuschäfer [Tue, 3 Mar 2026 15:25:18 +0000 (16:25 +0100)]
clk: hisilicon: Improve deallocation in error path

Unmap 'base' if an error occurs after it has been mapped.

Reported-by: Tao Lan <taolan@huawei.com>
Closes: https://lore.kernel.org/lkml/ZNlSH+eWV8Sk3FYn@probook/
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk-lpc18xx-ccu: kzalloc + kcalloc to kzalloc_flex
Rosen Penev [Fri, 6 Mar 2026 03:25:40 +0000 (19:25 -0800)]
clk-lpc18xx-ccu: kzalloc + kcalloc to kzalloc_flex

Simplifies allocation by using a flexible array member.

Also allows using __counted_by for extra runtime analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: clk-axi-clkgen: Add support versal timings
Nuno Sá [Fri, 24 Apr 2026 17:29:04 +0000 (18:29 +0100)]
clk: clk-axi-clkgen: Add support versal timings

Add proper VCO and PFD limits for versal based platforms. For that we
need to add new Technology and Speed grade defines.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: mmp: pxa1908-apbcp: Add reset cells
Duje Mihanović [Tue, 14 Apr 2026 19:51:52 +0000 (21:51 +0200)]
clk: mmp: pxa1908-apbcp: Add reset cells

It has been concluded by comparing the gate clock masks and vendor code
between PXA1908/28 that PXA1908's APBCP, similarly to PXA1928's APBC,
has controllable reset lines. Describe these in the driver for
correctness.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: mmp: pxa1908-apbc: Add reset cells
Duje Mihanović [Tue, 14 Apr 2026 19:51:51 +0000 (21:51 +0200)]
clk: mmp: pxa1908-apbc: Add reset cells

It has been concluded by comparing the gate clock masks and vendor code
between PXA1908/28 that PXA1908's APBC, similarly to PXA1928's APBC, has
controllable reset lines. Describe these in the driver for correctness.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agodt-bindings: clock: marvell,pxa1908: Add #reset-cells
Duje Mihanović [Tue, 14 Apr 2026 19:51:50 +0000 (21:51 +0200)]
dt-bindings: clock: marvell,pxa1908: Add #reset-cells

The APBC and APBCP controllers have reset lines exposed. Give them
a #reset-cells so that they may be used as reset controllers.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: mediatek: mt7988: use MUX_CLR_SET for gate-less muxes
Daniel Golle [Thu, 26 Mar 2026 05:11:12 +0000 (05:11 +0000)]
clk: mediatek: mt7988: use MUX_CLR_SET for gate-less muxes

All 19 muxes in the infra_muxes[] array are pure mux selectors without
a clock gate or update register, yet they were defined using
MUX_GATE_CLR_SET_UPD with gate_shift = -1.

This macro assigns mtk_mux_gate_clr_set_upd_ops, whose
enable/disable/is_enabled callbacks perform BIT(gate_shift). Since
gate_shift is stored as u8, the -1 truncates to 255, causing a
shift-out-of-bounds at runtime:

UBSAN: shift-out-of-bounds in drivers/clk/mediatek/clk-mux.c:76:8
shift exponent 255 is too large for 64-bit type 'long unsigned int'

UBSAN: shift-out-of-bounds in drivers/clk/mediatek/clk-mux.c:102:4
shift exponent 255 is too large for 64-bit type 'long unsigned int'

UBSAN: shift-out-of-bounds in drivers/clk/mediatek/clk-mux.c:122:16
shift exponent 255 is too large for 64-bit type 'long unsigned int'

Switch these definitions to MUX_CLR_SET, which uses
mtk_mux_clr_set_upd_ops (no gate callbacks) and does not require
callers to pass sentinel values for unused update register fields.
The actual clock gating for these peripherals is handled by the
separate GATE_INFRA* definitions further down.

Fixes: 4b4719437d85f ("clk: mediatek: add drivers for MT7988 SoC")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: mediatek: mt8192: use MUX_CLR_SET
Daniel Golle [Thu, 26 Mar 2026 05:10:47 +0000 (05:10 +0000)]
clk: mediatek: mt8192: use MUX_CLR_SET

The mfg_pll_sel mux has neither a clock gate nor an update register,
and upd_ofs is stored as u32, so the -1 truncates to 0xFFFFFFFF.

While upd_shift being -1 (as s8) prevents the update path from
executing at runtime, the bogus upd_ofs value is still stored in the
struct.

Use MUX_CLR_SET to avoid passing sentinel values to wrongly-typed
fields.

Fixes: 710573dee31b4 ("clk: mediatek: Add MT8192 basic clocks support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: mediatek: add MUX_CLR_SET macro
Daniel Golle [Thu, 26 Mar 2026 05:09:35 +0000 (05:09 +0000)]
clk: mediatek: add MUX_CLR_SET macro

Some MediaTek SoCs (e.g. MT7988) define infra muxes that have neither
a clock gate nor an update register.

Add a MUX_CLR_SET convenience macro that takes only the mux register
offsets, bit shift, and width, hardcoding upd_ofs = 0 and
upd_shift = -1 so callers cannot accidentally pass bogus sentinel
values to wrongly-typed fields.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: bulk: Use dev_err_probe() helper in of_clk_bulk_get()
Alexander Stein [Wed, 22 Apr 2026 12:53:12 +0000 (14:53 +0200)]
clk: bulk: Use dev_err_probe() helper in of_clk_bulk_get()

pr_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER. For that the dev pointer has to be passed along.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: bcm: iproc-asiu: simplify allocation
Rosen Penev [Thu, 26 Mar 2026 04:53:24 +0000 (21:53 -0700)]
clk: bcm: iproc-asiu: simplify allocation

Use kzalloc_flex and a flexible array member to combine allocations

While at it, take clk_data out of the struct and move it into probe.
It's not used anywhere else.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: clk-max77686: kzalloc + kcalloc to kzalloc
Rosen Penev [Thu, 26 Mar 2026 05:28:47 +0000 (22:28 -0700)]
clk: clk-max77686: kzalloc + kcalloc to kzalloc

Simplify allocation by using a flexible array member to combine
allocations. Use struct_size to calculate size properly.

Use __counted_by to get extra runtime analysis. Assign counting variable
right after allocation as required by __counted_by.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: visconti: pll: use kzalloc_flex
Rosen Penev [Thu, 26 Mar 2026 04:23:17 +0000 (21:23 -0700)]
clk: visconti: pll: use kzalloc_flex

Simplify allocation by using a flexible array member and kzalloc_flex.

Add __counted_by for extra runtime analysis. Assign after allocation as
required by __counted_by.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: hisilicon: clkdivider-hi6220: use kzalloc_flex
Rosen Penev [Wed, 1 Apr 2026 02:35:51 +0000 (19:35 -0700)]
clk: hisilicon: clkdivider-hi6220: use kzalloc_flex

Combine allocations using kzalloc_flex and a flexible array member.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoclk: mvebu: use kzalloc_flex
Rosen Penev [Fri, 3 Apr 2026 19:47:01 +0000 (12:47 -0700)]
clk: mvebu: use kzalloc_flex

Use a flexible array member to combine kzalloc and kcalloc in one
allocation so they can be freed together.

Add __counted_by for extra runtime analysis. Move counting variable
assignment right after allocation as done by kzalloc_flex with GCC >=
15.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agodt-bindings: clock: amlogic: t7: Add missing mpll3 parent clock
Jian Hu [Thu, 26 Mar 2026 09:26:44 +0000 (17:26 +0800)]
dt-bindings: clock: amlogic: t7: Add missing mpll3 parent clock

The mpll3 clock is one parent clock of the sd_emmc and mipi_isp clocks
on the Amlogic T7 SoC, but was missing from t7-peripherals-clkc.yaml
bindings. Add the mpll3 clock source to the T7 peripherals clock
controller input clock list, so that sd_emmc and mipi_isp can use it.

For logical consistency, place the required mpll3 entry before the
optional entry.

This change breaks the ABI, but while the amlogic,t7-peripherals-clkc
bindings have been merged upstream, the corresponding DT has not been
merged yet. Thus, no real users or systems are affected.

Fixes: b4156204e0f5 ("dt-bindings: clock: add Amlogic T7 peripherals clock controller")
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260326092645.1053261-3-jian.hu@amlogic.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
4 months agodt-bindings: clock: amlogic: Fix redundant hyphen in "amlogic,t7-gp1--pll" string.
Jian Hu [Thu, 26 Mar 2026 09:26:43 +0000 (17:26 +0800)]
dt-bindings: clock: amlogic: Fix redundant hyphen in "amlogic,t7-gp1--pll" string.

Fix redundant hyphen in "amlogic,t7-gp1--pll" string.

Fixes: 5437753728ac ("dt-bindings: clock: add Amlogic T7 PLL clock controller")
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260326092645.1053261-2-jian.hu@amlogic.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
4 months agoclk: rockchip: rk3588: add GATE_GRF clocks for I2S MCLK output to IO
Daniele Briguglio [Sun, 19 Apr 2026 11:43:10 +0000 (13:43 +0200)]
clk: rockchip: rk3588: add GATE_GRF clocks for I2S MCLK output to IO

The I2S MCLK outputs on RK3588 are gated by bits in the SYS_GRF
register SOC_CON6 (offset 0x318). These gates control whether the
internal CRU MCLK signals reach the external IO pins connected to
audio codecs.

The kernel should explicitly manage these gates so that audio
functionality does not depend on bootloader register state. This is
analogous to what was done for RK3576 SAI MCLK outputs [1].

Register the SYS_GRF as an auxiliary GRF with grf_type_sys using
rockchip_clk_add_grf(), and add GATE_GRF entries for all four I2S
MCLK output gates:

  - I2S0_8CH_MCLKOUT_TO_IO (bit 0)
  - I2S1_8CH_MCLKOUT_TO_IO (bit 1)
  - I2S2_2CH_MCLKOUT_TO_IO (bit 2)
  - I2S3_2CH_MCLKOUT_TO_IO (bit 7)

Board DTS files that need MCLK on an IO pin can reference these
clocks, e.g.:

    clocks = <&cru I2S0_8CH_MCLKOUT_TO_IO>;

Tested on the Youyeetoo YY3588 (RK3588) with an ES8388 codec on I2S0.

[1] https://lore.kernel.org/r/20250305-rk3576-sai-v1-2-64e6cf863e9a@collabora.com/

Tested-by: Ricardo Pardini <ricardo@pardini.net>
Signed-off-by: Daniele Briguglio <hello@superkali.me>
Link: https://patch.msgid.link/20260419-rk3588-mclk-gate-grf-v4-5-513a42dd1dcc@superkali.me
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
4 months agoMerge branch 'v7.2-shared/socids' into v7.2-clk/next
Heiko Stuebner [Mon, 27 Apr 2026 11:52:28 +0000 (13:52 +0200)]
Merge branch 'v7.2-shared/socids' into v7.2-clk/next

4 months agosoc: rockchip: rk3588: add SYS_GRF SOC_CON6 register offset
Daniele Briguglio [Sun, 19 Apr 2026 11:43:09 +0000 (13:43 +0200)]
soc: rockchip: rk3588: add SYS_GRF SOC_CON6 register offset

Add the RK3588_SYSGRF_SOC_CON6 register offset to the RK3588 GRF
header. This register contains the I2S MCLK output to IO gate bits,
needed by the clock driver.

Signed-off-by: Daniele Briguglio <hello@superkali.me>
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/20260419-rk3588-mclk-gate-grf-v4-4-513a42dd1dcc@superkali.me
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
4 months agoclk: rockchip: add helper to register auxiliary GRFs
Daniele Briguglio [Sun, 19 Apr 2026 11:43:08 +0000 (13:43 +0200)]
clk: rockchip: add helper to register auxiliary GRFs

Add rockchip_clk_add_grf() as a helper to register an auxiliary GRF
into the clock provider's aux_grf_table. This encapsulates the
struct rockchip_aux_grf allocation and hashtable insertion, so SoC
clock drivers do not need to open-code it.

Suggested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Daniele Briguglio <hello@superkali.me>
Link: https://patch.msgid.link/20260419-rk3588-mclk-gate-grf-v4-3-513a42dd1dcc@superkali.me
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
4 months agoclk: rockchip: allow grf_type_sys lookup in aux_grf_table
Daniele Briguglio [Sun, 19 Apr 2026 11:43:07 +0000 (13:43 +0200)]
clk: rockchip: allow grf_type_sys lookup in aux_grf_table

Remove the grf_type_sys exclusion from the auxiliary GRF table lookup
in rockchip_clk_register_branches(). Previously, branches with
grf_type_sys always used ctx->grf directly, bypassing the aux_grf_table.

This is a problem on SoCs like RK3588 where ctx->grf points to the
PHP_GRF (set via the CRU's rockchip,grf phandle), but GATE_GRF clock
entries need to access the SYS_GRF instead.

With this change, grf_type_sys branches first check the aux_grf_table,
and fall back to ctx->grf if no entry is found. This is backwards
compatible: on SoCs that do not register grf_type_sys in the
aux_grf_table, the behavior is unchanged.

Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Daniele Briguglio <hello@superkali.me>
Tested-by: Ricardo Pardini <ricardo@pardini.net>
Link: https://patch.msgid.link/20260419-rk3588-mclk-gate-grf-v4-2-513a42dd1dcc@superkali.me
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
4 months agodt-bindings: clock: rockchip,rk3588-cru: add I2S MCLK output to IO clock IDs
Daniele Briguglio [Sun, 19 Apr 2026 11:43:06 +0000 (13:43 +0200)]
dt-bindings: clock: rockchip,rk3588-cru: add I2S MCLK output to IO clock IDs

Add clock identifiers for the four I2S MCLK output to IO gate clocks
on RK3588, needed by board DTS files where the codec requires MCLK
from the SoC on an external IO pin.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Daniele Briguglio <hello@superkali.me>
Tested-by: Ricardo Pardini <ricardo@pardini.net>
Link: https://patch.msgid.link/20260419-rk3588-mclk-gate-grf-v4-1-513a42dd1dcc@superkali.me
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
4 months agoclk: renesas: r8a7740: Add ZT/ZTR trace clocks
Marek Vasut [Wed, 22 Apr 2026 23:36:28 +0000 (01:36 +0200)]
clk: renesas: r8a7740: Add ZT/ZTR trace clocks

Implement support for the ZT trace bus and ZTR trace clocks on R-Mobile
A1.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260422233744.149872-3-marek.vasut+renesas@mailbox.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoMerge tag 'renesas-r8a7740-dt-binding-defs-tag1' into renesas-clk-for-v7.2
Geert Uytterhoeven [Mon, 27 Apr 2026 09:51:11 +0000 (11:51 +0200)]
Merge tag 'renesas-r8a7740-dt-binding-defs-tag1' into renesas-clk-for-v7.2

Renesas R-Mobile A1 Coresight Clock DT Binding Definitions

ZT trace bus and ZTR trace clock DT binding definitions for the Renesas
R-Mobile A1 (R8A7740) SoC, shared by driver and DT source files.

4 months agodt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile A1
Marek Vasut [Wed, 22 Apr 2026 23:36:27 +0000 (01:36 +0200)]
dt-bindings: clock: renesas,cpg-clocks: Document ZT/ZTR trace clock on R-Mobile A1

Document the ZT trace bus and ZTR trace clocks on R-Mobile A1.  These
clocks supply the coresight tracing modules, PTM, TPIU, ETB and
replicator.  Without these clocks, coresight tracing can not be
operated.  While this does change the ABI, it does so by extending the
existing clock-output-names, therefore if old software is used with new
DT, the coresight tracing parts will likely fail to probe, otherwise if
new software is used with an old DT, there is no impact.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260422233744.149872-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a09g077: Add MTU3 module clock
Cosmin Tanislav [Fri, 10 Apr 2026 16:35:21 +0000 (19:35 +0300)]
clk: renesas: r9a09g077: Add MTU3 module clock

The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a MTU3
block connected to the PCLKH and with a module clock controlled by
register 0x308, bit 0.

Add support for the module clock.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260410163530.383818-2-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add I2C clocks and resets
Biju Das [Mon, 30 Mar 2026 13:23:42 +0000 (14:23 +0100)]
clk: renesas: r9a08g046: Add I2C clocks and resets

Add I2C{0..3} clock and reset entries.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260330132349.149391-6-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add SCIF{1..5} clocks and resets
Biju Das [Mon, 30 Mar 2026 13:23:41 +0000 (14:23 +0100)]
clk: renesas: r9a08g046: Add SCIF{1..5} clocks and resets

Add SCIF{1..5} clock and reset entries.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260330132349.149391-5-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add WDT clocks and reset
Biju Das [Mon, 30 Mar 2026 13:23:40 +0000 (14:23 +0100)]
clk: renesas: r9a08g046: Add WDT clocks and reset

Add WDT clock and reset entries.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260330132349.149391-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add CA55 core clocks
Biju Das [Mon, 30 Mar 2026 13:23:39 +0000 (14:23 +0100)]
clk: renesas: r9a08g046: Add CA55 core clocks

Add CA55 core clock entries.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260330132349.149391-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add GPIO clocks/resets
Biju Das [Mon, 30 Mar 2026 13:23:38 +0000 (14:23 +0100)]
clk: renesas: r9a08g046: Add GPIO clocks/resets

Add GPIO clock and reset entries.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260330132349.149391-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r9a08g046: Add GBETH clocks and resets
Biju Das [Thu, 26 Mar 2026 11:06:38 +0000 (11:06 +0000)]
clk: renesas: r9a08g046: Add GBETH clocks and resets

Add clock and reset entries for the Gigabit Ethernet Interfaces (GBETH
0-1) IPs found on the RZ/G3L SoC.  This includes various dividers and
mux clocks needed by these two GBETH IPs.  Also add the tx, tx-180, rx,
rx-180, rmii, rmii-tx and rmii-rx clocks to the r9a08g046_no_pm_mod_clk
table to avoid enabling both normal and RMII clocks by the PM framework.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260326110648.29389-5-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: r8a08g046: Add support for PLL6
Biju Das [Thu, 26 Mar 2026 11:06:37 +0000 (11:06 +0000)]
clk: renesas: r8a08g046: Add support for PLL6

Add support for the PLL6 clk by registering it with rzg2l-cpg driver.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260326110648.29389-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: rzg2l: Add support for enabling PLLs
Biju Das [Thu, 26 Mar 2026 11:06:36 +0000 (11:06 +0000)]
clk: renesas: rzg2l: Add support for enabling PLLs

Add support for enabling PLL clocks in the RZ/G3L CPG driver to turn off
some PLLs, if they are not in use (e.g. PLL6, PLL7).

Introduce .is_enabled() and .enable() callbacks to handle PLL state
transitions.  With the .enable() callback, the PLL will be turned ON
only when the PLL consumer device is enabled; otherwise, it will remain
off.  Define new macros for PLL standby and monitor registers to
facilitate this process.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260326110648.29389-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoclk: renesas: rzg2l: Drop always-false check in rzg3s_cpg_pll_clk_recalc_rate()
Biju Das [Thu, 26 Mar 2026 11:06:35 +0000 (11:06 +0000)]
clk: renesas: rzg2l: Drop always-false check in rzg3s_cpg_pll_clk_recalc_rate()

Drop the unwanted check in rzg3s_cpg_pll_clk_recalc_rate() as the
function is SoC-specific.

Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260326110648.29389-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
4 months agoLinux 7.1-rc1
Linus Torvalds [Sun, 26 Apr 2026 21:19:00 +0000 (14:19 -0700)]
Linux 7.1-rc1

4 months agoMerge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Linus Torvalds [Sun, 26 Apr 2026 21:03:20 +0000 (14:03 -0700)]
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fix from Stephen Boyd:
 "One more fix for the merge window to avoid a boot hang on
  Raspberry Pi 3B by marking the VEC clk critical so that it
  doesn't get turned off and hang the bus"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: bcm: rpi: Mark VEC clock as CLK_IGNORE_UNUSED

4 months agoMerge tag 'tsm-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm
Linus Torvalds [Sun, 26 Apr 2026 16:51:29 +0000 (09:51 -0700)]
Merge tag 'tsm-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm

Pull PCIe TSP update from Dan Williams:
 "A small update for the TSM core. It is arguably a fix and coming in
  late as I have been offline the past few weeks:

   - Drop class_create() for the 'tsm' class"

* tag 'tsm-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm:
  virt: coco: change tsm_class to a const struct

4 months agoMerge tag 'kbuild-fixes-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuil...
Linus Torvalds [Sun, 26 Apr 2026 00:04:15 +0000 (17:04 -0700)]
Merge tag 'kbuild-fixes-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux

Pull Kbuild fixes from Nicolas Schier:

 - builddeb - avoid recompiles for non-cross-compiles

   Avoid triggering complete rebuilds for non-cross-compile Debian
   package builds by only triggering the rebuild of host tools for
   actual cross-compile builds

 - Never respect CONFIG_WERROR / W=e to fixdep

   Avoid spurious rebuilds of fixdep w/ and w/o -Werror during a single
   kbuild invocation by never respecting CONFIG_WERROR for fixdep

* tag 'kbuild-fixes-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux:
  kbuild: Never respect CONFIG_WERROR / W=e to fixdep
  kbuild: builddeb - avoid recompiles for non-cross-compiles

4 months agoMerge tag 'power-utilities-2026.04.25' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 25 Apr 2026 23:58:34 +0000 (16:58 -0700)]
Merge tag 'power-utilities-2026.04.25' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull power utility updates from Len Brown:
 "x86_energy_perf_policy:
   - Initial SoC Slider support

 turbostat:
   - Display HT siblings in cpu# order
   - Add Module-ID column
   - Print Core-ID and APIC-ID in hex
   - Fix misc bugs"

* tag 'power-utilities-2026.04.25' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power x86_energy_perf_policy: Version 2026.04.25
  tools/power x86_energy_perf_policy.8: Document SoC Slider Options
  tools/power x86_energy_perf_policy: Enhances SoC Slider related checks
  tools/power turbostat: v2026.04.21
  tools/power turbostat: Process HT siblings in CPU order
  tools/power turbostat: Show module_id column
  tools/power turbostat: Print core_id and apic_id in hex
  tools/power turbostat: Cleanup print helper functions
  tools/power turbostat: Fix --cpu-set 1 regression on HT systems
  tools/power turbostat: Fix --cpu-set 0 regression on HT systems
  tools/power turbostat: Fix unrecognized option '-P'
  tools/power turbostat: Fix AMD RAPL regression on big systems
  tools/power/x86: Add SOC slider and platform profile support

4 months agoMerge tag 'rtc-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Linus Torvalds [Sat, 25 Apr 2026 23:39:03 +0000 (16:39 -0700)]
Merge tag 'rtc-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "Subsystem:
   - add data_race() in rtc_dev_poll()

  Drivers:
   - remove i2c_match_id usage
   - abx80x: Disable alarm feature if no interrupt attached
   - ti-k3: support resuming from IO DDR low power mode"

* tag 'rtc-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: abx80x: Disable alarm feature if no interrupt attached
  rtc: ntxec: fix OF node reference imbalance
  rtc: pic32: allow driver to be compiled with COMPILE_TEST
  rtc: ti-k3: Add support to resume from IO DDR low power mode
  rtc: cmos: Use platform_get_irq_optional() in cmos_platform_probe()
  dt-bindings: rtc: add olpc,xo1-rtc to trivial-rtc
  dt-bindings: rtc: sc2731: Add compatible for SC2730
  rtc: add data_race() in rtc_dev_poll()
  rtc: armada38x: zalloc + calloc to single allocation
  dt-bindings: rtc: isl12026: convert to YAML schema
  dt-bindings: rtc: microcrystal,rv3028: Allow to specify vdd-supply
  rtc: max77686: convert to i2c_new_ancillary_device
  dt-bindings: rtc: mpfs-rtc: permit resets
  rtc: rx8025: Remove use of i2c_match_id()
  rtc: rv8803: Remove use of i2c_match_id()
  rtc: rs5c372: Remove use of i2c_match_id()
  rtc: pcf2127: Remove use of i2c_match_id()
  rtc: m41t80: Remove use of i2c_match_id()
  rtc: abx80x: Remove use of i2c_match_id()

4 months agoMerge tag 'for-next-tpm-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 Apr 2026 23:20:52 +0000 (16:20 -0700)]
Merge tag 'for-next-tpm-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull tpm updates from Jarkko Sakkinen:
 "Here are the accumulated fixes for 7.1-rc1 and a single structural
  change worth mentioning separately: Rafael's commit converting tpm_crb
  from ACPI driver to a platform driver"

* tag 'for-next-tpm-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  tpm: tpm_tis: stop transmit if retries are exhausted
  tpm: tpm_tis: add error logging for data transfer
  tpm: avoid -Wunused-but-set-variable
  tpm: Use kfree_sensitive() to free auth session in tpm_dev_release()
  tpm2-sessions: Fix missing tpm_buf_destroy() in tpm2_read_public()
  tpm: Fix auth session leak in tpm2_get_random() error path
  tpm: i2c: atmel: fix block comment formatting
  tpm_crb: Convert ACPI driver to a platform one
  tpm: Make tcpci_pm_ops variable static const

4 months agoMerge branches 'turbostat' and 'x86_energy_perf_policy' into power-utilities
Len Brown [Sat, 25 Apr 2026 18:26:32 +0000 (14:26 -0400)]
Merge branches 'turbostat' and 'x86_energy_perf_policy' into power-utilities

4 months agotools/power x86_energy_perf_policy: Version 2026.04.25
Len Brown [Sat, 25 Apr 2026 17:26:16 +0000 (13:26 -0400)]
tools/power x86_energy_perf_policy: Version 2026.04.25

Since v2025.11.22:
Initial SoC Slider support
SoC Slider is an SoC-wide power/performance policy setting.
On SoC Slider systems, EPP plays a diminished role.

Whitespace cleanup via: indent -npro -kr -i8 -ts8 -sob -l160 -ss -ncs -cp1

No functional changes

Signed-off-by: Len Brown <len.brown@intel.com>
4 months agotools/power x86_energy_perf_policy.8: Document SoC Slider Options
Len Brown [Sat, 25 Apr 2026 16:10:54 +0000 (12:10 -0400)]
tools/power x86_energy_perf_policy.8: Document SoC Slider Options

x86_energy_perf_policy accesses the SoC Slider via standard
user/kernel APIs to the processor_thermal_soc_slider driver.

Machines that support SoC Slider largely use it instead of EPP,
which may continue to exist in a diminished role, or vanish entirely.

Signed-off-by: Len Brown <len.brown@intel.com>
4 months agotools/power x86_energy_perf_policy: Enhances SoC Slider related checks
Len Brown [Wed, 15 Apr 2026 19:12:29 +0000 (15:12 -0400)]
tools/power x86_energy_perf_policy: Enhances SoC Slider related checks

When processor_thermal_soc_slider is loaded, its slider
and offset modparams are visible.  Check that the driver
actually registered the profile named "SoC Slider" before
reading or writing these modparams.

n.b. This utility allows writing the Slider and Offset modparams
even if the driver policy is not "balanced".  Currently the
processor_thermal_soc_slider consults those modparams
only in "balanced" mode.

Signed-off-by: Len Brown <len.brown@intel.com>
4 months agoclk: bcm: rpi: Mark VEC clock as CLK_IGNORE_UNUSED
Maíra Canal [Fri, 24 Apr 2026 15:34:52 +0000 (16:34 +0100)]
clk: bcm: rpi: Mark VEC clock as CLK_IGNORE_UNUSED

On Raspberry Pi 3B, the VEC clock is used by the VideoCore firmware
display driver, which remains active until the vc4 driver loads and
sends NOTIFY_DISPLAY_DONE. If this clock is disabled during boot, a bus
lockup happens and the firmware becomes unresponsive, causing a complete
system lockup.

Mark the VEC clock with CLK_IGNORE_UNUSED so it survives the unused
clock disablement and remains available until the vc4 driver takes over
display management.

Fixes: 672299736af6 ("clk: bcm: rpi: Manage clock rate in prepare/unprepare callbacks")
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/r/5f0bec08-f458-4fba-8bf3-06817a100c4c@sirena.org.uk
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patch.msgid.link/20260401111416.562279-2-mcanal@igalia.com
Tested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Brian Masney <bmasney@redhat.com> # Active contributor to clk
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
4 months agoMerge tag 'fbdev-for-7.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 Apr 2026 14:48:33 +0000 (07:48 -0700)]
Merge tag 'fbdev-for-7.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes from Helge Deller:

 - request memory region before use (cobalt_lcdfb, clps711x-fb, hgafb)

 - reference cleanups in failure path (offb, savage)

 - a spelling fix (atyfb)

* tag 'fbdev-for-7.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: hgafb: Request memory region before ioremap
  fbdev: clps711x-fb: Request memory region for MMIO
  fbdev: cobalt_lcdfb: Request memory region
  fbdev: atyfb: Fix spelling mistake "enfore" -> "enforce"
  fbdev: savage: fix probe-path EDID cleanup leaks
  fbdev: offb: fix PCI device reference leak on probe failure

4 months agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux
Linus Torvalds [Sat, 25 Apr 2026 14:44:26 +0000 (07:44 -0700)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux

Pull ARM updates from Russell King:

 - fix a race condition handling PG_dcache_clean

 - further cleanups for the fault handling, allowing RT to be enabled

 - fixing nzones validation in adfs filesystem driver

 - fix for module unwinding

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux:
  ARM: 9463/1: Allow to enable RT
  ARM: 9472/1: fix race condition on PG_dcache_clean in __sync_icache_dcache()
  ARM: 9471/1: module: fix unwind section relocation out of range error
  fs/adfs: validate nzones in adfs_validate_bblk()
  ARM: provide individual is_translation_fault() and is_permission_fault()
  ARM: move FSR fault status definitions before fsr_fs()
  ARM: use BIT() and GENMASK() for fault status register fields
  ARM: move is_permission_fault() and is_translation_fault() to fault.h
  ARM: move vmalloc() lazy-page table population
  ARM: ensure interrupts are enabled in __do_user_fault()