Commit Graph

1444081 Commits

Author SHA1 Message Date
Stephen Boyd
e08f2083dd
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
2026-06-25 07:55:26 -07:00
Stephen Boyd
124e5c5ec9
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
2026-06-25 07:55:16 -07:00
Stephen Boyd
df2e28941e Canaan k230 clock support
Driver and devicetree bindings for the Canaan k230 SoC.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCah6blAAKCRB4tDGHoIJi
 0koLAQCgrED6lMf1uR6As3lbMv0Hv/nmr2ZWRIf2nkSk0VimgQD+JzyjxS6siSwl
 bJfXAzqSb9YJwPjUgsAr/rjFdZSelwQ=
 =ASF8
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmotxGsUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSXk3xAAmFQN5rPTuoVWTkBmf14hEdzJVWeM
 yvKs53ufmHWbpLP9pH0dTkRh4o4oL2LfuSIE+ncfl/hAgeC3aKc2ZF3+WMtcQkmd
 c6HhYzPvZefzDkemycwTK5k+DyhZziKokf3mD33pdm08O8EBNwDLmhgpFBOnQAzI
 j+SVEnUpqAsvrr3N6XiOgmsEmj/P49wVTS+pkrM4B4npu450MX3l5vuE4ltO3g4I
 W7xi+/FrorcN+creDAYls0W8GN0XMtADxVstPvRu/6M+id1PnZxTNOyyUjKa8i8S
 HR+7470x75OKGIIBO/WuoZW7Xsgrr4r2ZGkvjlPG3O1yQ7l57hBCnFwJGRYiurBv
 xHh+60GagaH7G7x4ND5oDTYQJ5mwY7ff55JeNQPnjGbTePlETrSNEeWFqhioTxd1
 pFeAMdlATrZKxsocELwPYNIMDuFsbv0TamQFN9tsyqwShxFOfP9O61h+jxZy9eqd
 biYXM1pX/HTVT35ZfeyP0SqkbNcF3tzSuMvnRnLI3y/dzSW4MbJFsrJFIEinulfa
 SNGyOS3FOXYHCRxTRI74oq8fca8Lw9jAeHZEMzkexiLf2XBUPF8za4CA/8/yq+uw
 3k005UIdfGM5KXfhE9n9M3aWftxugshVwm040CwfAoA/0gxqZLfCCBknR5PoGusN
 0fYtYGZmk6zzTF8=
 =4nV2
 -----END PGP SIGNATURE-----

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
2026-06-13 13:57:40 -07:00
Stephen Boyd
5c2fd8bb73 clk: renesas: Updates for v7.2 (take two)
- Add the Display Stream Compression (DSC) clock on R-Car V4H,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCah1JPwAKCRCKwlD9ZEnx
 cATIAQCd6L6ngirMqTcBN/Nm3JfQzPjhh/b3KOS2qgzfoGC8aAEA3HT3+r0+MCX5
 MD1DmEhO6HKSV9icdSl3O0Yc0hYWVQU=
 =ERtt
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmotw+8UHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSWCUQ/+IUrx+ff0j7i4tg1Pm2ltQMHH0Hkp
 Q7q2+GOmihnTmJ1OroxF8taOekceydgdeHNxgQmN17BbF3LUKinmDvq2WkVXmR3f
 O9FKYbXmZqBwAQnUo7F/puCLtR4CnSc1kaj0urUl1DVLyR9y0Kt/Vhnl05hZYZQN
 0+97Dd4uZl2n2LrZjU41WQv0fyBc7AWG6LNgiN5Qn/aeJARYOyHWX8qfjPnxk3fr
 i6+MwqZ3uhwxEs+M0UbfgoHlBX0JTPhsO27XnAUvMh51bgKowIaMkYDIGJ0iUt1h
 HAGKCIgueYC2f47isG00G42/0W+meCdqGkq1+UTjwPu6U7Xw8tyTJLnIpVmWcwFX
 VxH6cxMbFPfg93mqYHpmUKMHwNZhr4/4r7blQjsfEGOXLe9Cohh9fdVwk6D+HDGA
 5XI+MPSB5ZhruTsDQpfGykj8wkWxcC1aLdEv5kWdqtToVZni2/or47umdM1jv3a/
 onaSVP3sqwFDHpKmCJbKgCdNOYSWah2sI5JmqXMAPWP+GBmputgyIvtPd75JaEYV
 cNI3lr7mTbeIoFKCmURsWeLqyWrnGrz5KphLA/ryWk93ZqmQzQwdhIPSx38aaI0q
 WM3rPlKs8sfu7iut53UDAIthoNHgy9jkCslLKWL8WF/JjXEI7XTPGrRf0qud8/el
 puZ17BKVWCEXrpU=
 =vEv8
 -----END PGP SIGNATURE-----

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
2026-06-13 13:55:51 -07:00
Stephen Boyd
392627674a Amlogic clock changes for v7.2
* Minor DT bindings fixes for the T7 clock controllers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE9OFZrhjz9W1fG7cb5vwPHDfy2oUFAmoZmL8ACgkQ5vwPHDfy
 2oUSlxAAqqKxpK/RY8zyiwGreXz/YLzdBVSYlci/AQqOIYlJKuUKcil5Hxej9on1
 hGS3KocNLqboA+THGadW6xcO2X69bYMJSbEd95DU0loVEYBLE0d5G6Wl4mKWqlmC
 Kf81oNMhcTtlYpTEi6ruCAIXPFYukl8YuV8LrZVwC0x81WySk4VBxheSjiy+rulD
 fWatm0Rb/oKCG27F8i1RwoTpoFC6l2quoVA8fJDHMe0lYoOarlWVrhnGhsfqOqQY
 ovqc3VZ/nTA+Ux7AytrwRLugIL5R+oAKZdDSrJ6Di/P7rQb54OPZuzO3/YhrmCs5
 aYHzaIGNgXraZebWGvQvA4SjQqjV9NJHlRDkdTIHeeupsOESVFXoEjlsEq9gYCks
 mcpV9J815NU2U00LLS277OB2GG8anc0BYJs6aB8KwFLQIJqSzs5qRra5Td3bH7IJ
 W7te3CtoJyLBYlCVPNo510kDPTI088rWF3LrStlZmQugVm5v2Qw3zqmzA4Nk/fQD
 WrvBn1aKepKM985BgdXh0j7Zg2CIyChv2wRdB8OfdVDv9XA/ekPbgPveTw0z7r1I
 Oya7fFNtUDE5mJP9ET7QJPIQrN0pBXxrsRNbqQl8tmGxzBNT13oyx/YsH+4kQ1a5
 lK/8wX3LS7i3DluABrKJIUtELewXTxBFIq0dkb5oYzY/o4cFveA=
 =wWRl
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmotw6QUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSUalQ//V/63q3d2Z7oKn3e09vPTV6/v94u8
 Bf8NOQrPnyPSX7gze26BkkKlxVWYq0aLFuG9E4/jq4eSO8U7kylBYdN08qM2AcnX
 YtoZW7M5iphQfxsO7qg/WnJtpiekvWskTCQy1tHC0684WjOU3VAEyHA/mv6sYiyD
 fUYLAoqT1eauGZ7u8LEXtIgPJyT11f0LAza2QKi/gw/D5TUQuQAOyX6qmWYHvAik
 P6cE6GQo30/apLHeBi3Kn2idKijpB4by6/BGl99VA+Bo2BwlWxvazHNrlp6QyOqm
 YSsoE/YJKgILZxvZ+2UiTGfYTZ3Mjq02jAH2amrNuc/bhMhoUaO/TBDoZyc80mfh
 FCxlvr0SYMpKxkpZEElEbmDsgbOm6zUbeC/fOme12wNNbmGgYz/LnU6gnk8iCaRc
 +DNrMAfQMPNHNSnbWAgFJnr/gX0Hfk4hocFAbbBfoEn5GAMIuYyyrjUFy6mzNXr1
 MAIU8NYCw4xBFW2wt9b2IGAWgQ5AODgo24kF3wz+aSzSPkb70YAtcYtNzyccN58m
 ds6PMlXMWOGAMs9u2mKve00XCvynA1aGdA21J9K0dVwM/aC3/VcvJWAGoF2Ez9Zq
 /U+X+40o5Mjhhaev9fEmn5vY/0vywCpVI1AaofnyZ7e+Z3LjwnhCmU07JlkIVOnM
 6VrgCe9SJjLE8f8=
 =Td7n
 -----END PGP SIGNATURE-----

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.
2026-06-13 13:54:37 -07:00
Stephen Boyd
c0c0752948 SoCFPGA Clock update for v7.2
- implement the l3_main_free_clk
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAmoVkDYACgkQGZQEC4Gj
 KPTtbA/9GHPs5mH8cx+qEfhYWOOw5D2AJA7R0iAd8YTbc25AGnIKh/08TYHsVhTB
 fiKnQumJCtMxPkyihG9k0Ta/YJLiAxImIHEQ9tNMTE1SRBztJi/f7/HCQML6e4rG
 5Ecx0Ijupr5ZfTROVLvT06w6hdXEgscj/s4bUzn+T94tHe0U4llUgCoRvNFAiy9A
 4dS95X3ePOMzhxopWHRuDxJBe4f54ZiyUr21XWwbF2+4L3I7VuCMCSn1D0DE0MHh
 pGwO3bbUaSGnLMwgnrmzhd4AcDP6zigveXh66SQ+RafitwyQ/TZvuBX1kPy0B6TE
 44LwvAjkQFKbpvAFtrp77oiYZ8oRUdy+FvrqyxVlHVA1ZG0HoSKS0PqkJYl8QacH
 F27zilExqZUMS7HpMwGFLtwi0V3t2YTFeZsu8uJ9/U1XBvnzb+IAGcqS9P87rPx8
 g5sP0h7kvaH4RVfop1X1OpJfZpcb64+AZ799U92uhsJDsqH2a8HsHAszQRabVuP4
 ZH73BGdL79uBx3GGshcqLi3g3fE6elBOjb5sT3vipwiFj41eL+kF0fgS2akg+WOT
 U66QFzfrl47Us/ZCyvcdehr8e+0J7P7PoJnA3T/E2FXNH6Xt64RiJ0QQcc7ZDFZ1
 LcWVHTLKWo+pKKk19EiSiCeuHP27qaKPsPEfLQYc7BSK2FD+FpI=
 =BFAm
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmotw0sUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSW3ExAA3PBXxo9lZRlGjlYZ59gV4pD098T6
 GLgLIZYwrWtIHAO/93IiAxelKarwRLUPgc1QjTjqi2n0wQoVLGsTUZDmfSy8Rs8n
 MW7Vf5qrxWhAwmK0PSJEb6RhPu5foim+EkNV+uO0htzXRgOz8J0jYI5yLZoufhdK
 cLm96CEGwLU30ZfJt9x0k947yhUe6+hDD++I3SVcwNDbecm7Aeqo+s4M+x3I7JuX
 Zm8JM160Cn410VoVLkCLkAXDb/XnlyyYDPSOOpJDNAxoA0Qr1WGB9gTs7+uND+6F
 OggouQYtFqg8pQ420QN8L6M7DmIkabv8ntfMwzn43BBuSIikATWrxWkTgAYR1i0r
 Im/eh2dvKqFM9iHQnqd1iNOnFw69HoMJvn2hZaXQKEuJoldBKRe18kAz0w4H7rfZ
 1RofJR2mFO8TrMf2Gd0Vi6MeF7ss0DRY2csPyww9QfXbNr34vRvkaZdf9Dw9eN9V
 rwJH1tDOSSCeA5m2p/FUr7yLBmBUg5OKHvPlzX/qSIs2nhyw18T/M+VJv4PY1AWm
 37ijn8IIdS6jtPIklnzjlzTrq7bdQ5nLAGRu0qSE3th5qB1iKgNYhjno4UU+HWVB
 eBBcEVX1xQjJrnt0dS3VefqlL0PT2/n+IHL37CENcKKePCia0L+32wJmA7HA5IHt
 lRDvZPxerN/lD0Y=
 =5dI+
 -----END PGP SIGNATURE-----

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
2026-06-13 13:52:49 -07:00
Stephen Boyd
c0fb3bd3e4 clk: renesas: Updates for v7.2
- Add Ethernet, GPIO, CPU core, watchdog, serial, I2C, sound, and SPI
     clocks and resets on RZ/G3L,
   - Add the timer (MTU3) clock on RZ/T2H and RZ/N2H,
   - Add Coresight trace clocks on R-Mobile A1 and APE6,
   - Add display clocks and resets on RZ/G3E,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCagwyOAAKCRCKwlD9ZEnx
 cPfmAQCnjC9Nz3DAqJG7NknT9kv6iMyLk2dfIswuRcl1ZZafawEAqkAyjPlNvYzM
 rzIPJEIdvlNswswrMisAIyVwno39Lgk=
 =Jp12
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmoY758UHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSUDLA/+I9HW2s2zmOZhmwD/3j56JH3ZTXJu
 Xx8Gog/+RRW3Y6+Dm3MPxcvDG6tnNfkn9oflfv/Mh/XvSvAb1+gLLrtGs8YT7iOj
 gKObqUT3zT/+cnmufEci6vamqaNKkyPVHIeVrWwr8iD571X8IWTvxyfQfhrdM+Ze
 Zq1N++11TF1Sj5l2hayo2O5f/JHYrjX4Vh+6C2qzCjapOaOCRqudESo3PKZ8FJ3v
 5F4UyUWUH66KzKzDfw0FL4J1Fa7nHiZ9Kg5MLoXVmCu8dNuahHk91hK5DxiHWJcr
 e5auiNMy1J8xSGKjOSCT4tJ/PFQIXI0cESp5rmA6yiMqbQtTOl3HOF+JTsbP+BQ1
 gajcV/sEKw1gaFLMUpouIo0lsSVMKQihuWjDuqULRTxaKKA/CUicNXzHEyPyWsSU
 0hcl6weo7wqvkDzyosws9O+Uf9FzhYzY/2I3B/3GnOWnbkDuS6sbh6iJfelBJtqU
 5Hy9PIv6EKyy+DseH2pHLU6QIShnDplfw8P+9HmY8xcx0KncWJgDXl+WUvTT8Ei3
 Xg2mtnJR7aiwC/weenV2x2XDvdCJA4DtDF8R9Mw/QQbuLRuemYROvj4h9OsBBeOd
 2VyfC+O7Z2UjqthxPkl5GbRBB4mrWE2/uB3IjR/tkxbe7uWJR4StXp77p6u3v339
 8vMUYQ8PjgoddyM=
 =ki8u
 -----END PGP SIGNATURE-----

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
  ...
2026-05-28 18:44:37 -07:00
Biju Das
f5e4519602 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>
2026-05-28 15:09:54 +02:00
Marek Vasut
f59e975f2f 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>
2026-05-28 15:09:54 +02:00
Adrian Ng Ho Yin
1e7f562058 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>
2026-05-25 21:46:56 -05:00
Lad Prabhakar
1f10c45096 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: 3fd4a8bb4b ("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>
2026-05-25 11:52:48 +02:00
Lad Prabhakar
8bcf12d53b 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>
2026-05-25 11:51:38 +02:00
Xukai Wang
a7b7c7c6c0 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>
2026-05-22 17:13:10 +01:00
Biju Das
c94433be05 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>
2026-05-22 10:24:32 +02:00
Biju Das
2e3974747e 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>
2026-05-22 10:24:32 +02:00
Biju Das
6549ef9cc2 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>
2026-05-22 10:24:32 +02:00
Xukai Wang
44730eac17 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>
2026-05-21 10:55:12 +01:00
Marek Vasut
4f42053949 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>
2026-05-15 11:30:51 +02:00
Geert Uytterhoeven
fbe9822423 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.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCagbnIwAKCRCKwlD9ZEnx
 cGvdAQD/8tsnjjliydMS0pZgkTKr4ScdoLoFTmWg9HI/Txm9MgEAy8bxK5aPDS2u
 vkPu8MO7LeFmCNAEh7xS91mvIk/9vgU=
 =Jreu
 -----END PGP SIGNATURE-----

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.
2026-05-15 11:29:41 +02:00
Marek Vasut
2abdc3dcf9 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>
2026-05-15 11:26:26 +02:00
Biju Das
5fcbbc1fcc 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>
2026-05-11 10:09:27 +02:00
Biju Das
29c46057d5 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>
2026-05-11 10:09:27 +02:00
Biju Das
9bec6a9dc2 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>
2026-05-11 10:09:24 +02:00
Geert Uytterhoeven
7f0c422c7f 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
2026-05-07 10:22:20 +02:00
Geert Uytterhoeven
33cd08ac62 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
2026-05-07 10:22:20 +02:00
Geert Uytterhoeven
44c1733331 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
2026-05-07 10:22:20 +02:00
Biju Das
01a20f1c46 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>
2026-05-07 10:22:20 +02:00
Geert Uytterhoeven
6edb69b808 clk: renesas: rzg3e: Add support for DSI clocks
RZ/G3E Clock Pulse Generator PLLDSI limits, shared by clock and MIPI DSI
 driver source files.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCafiLmgAKCRCKwlD9ZEnx
 cIWWAQD+e57m9HGyHasn9GsoTyTGQqwnnpBJYluzhWbpQAk4XQD9G1EG968r0KoH
 EkmFwA2XmllNYXASJB5HKlRLHh8RAQY=
 =0942
 -----END PGP SIGNATURE-----

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.
2026-05-04 14:09:33 +02:00
Tommaso Merciai
272a6e2ad1 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
fe9a5541f0 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
8a6ccb5228 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
7a9e1c485c 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
0e1597c688 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
6913a61596 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
d394d8342d 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>
2026-05-04 14:03:08 +02:00
Tommaso Merciai
3afccee4a3 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>
2026-05-04 14:03:08 +02:00
J. Neuschäfer
7b03559044
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>
2026-04-28 20:52:43 -07:00
Rosen Penev
9a51504d7c
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>
2026-04-28 20:46:20 -07:00
Nuno Sá
0aef2f0db6
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>
2026-04-28 19:16:02 -07:00
Duje Mihanović
8267609a38
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>
2026-04-28 19:07:50 -07:00
Duje Mihanović
fcfae77b39
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>
2026-04-28 19:07:49 -07:00
Duje Mihanović
85ad455f5f
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>
2026-04-28 19:07:48 -07:00
Daniel Golle
845a025a94
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: 4b4719437d ("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>
2026-04-28 19:05:45 -07:00
Daniel Golle
aec2d3caae
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: 710573dee3 ("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>
2026-04-28 19:05:43 -07:00
Daniel Golle
820ea6936b
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>
2026-04-28 19:05:42 -07:00
Alexander Stein
2ceaa8b93b
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>
2026-04-28 18:59:22 -07:00
Rosen Penev
6f1791ca46
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>
2026-04-28 18:45:24 -07:00
Rosen Penev
4266035a40
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>
2026-04-28 18:44:39 -07:00
Rosen Penev
4758f1354f
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>
2026-04-28 18:43:37 -07:00
Rosen Penev
912b81234a
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>
2026-04-28 18:43:15 -07:00