Commit Graph

7 Commits

Author SHA1 Message Date
Linus Torvalds
9f32a03e3e I've recently moved computers (among other things) so I'm sending this from a
new machine. The migration process took longer than expected and disrupted my
 workflow, but I think I'm ready to go and things should speed up from here.
 
 Luckily, this has been a semi-quiet cycle. The core framework remains unchanged
 this time around. In terms of shiny new code though, we have support for the
 SpacemiT K1 SoC, Sophgo SG2044, and T-HEAD TH1520 VO clk drivers joining the
 usual silicon players like Qualcomm, Samsung, Allwinner, and Renesas.
 Surprisingly, the Qualcomm pile was smaller than usual but that is likely
 because they put one SoC support inside a driver for a different SoC that is
 very similar. Other than all those new clk drivers there are the usual clk data
 updates to fix parents, frequency tables, and add missing clks along with some
 Kconfig changes to make compile testing simpler and even more DT binding
 conversions to boot. The exciting part is still the new SoC support like
 SpacemiT and Sophgo support though, which really dominate the diffstat because
 they introduce a whole new silicon vendor clk driver.
 
 New Drivers:
  - Camera clock controller driver for Qualcomm QCS8300
  - DE (display engine) 3.3 clocks on Allwinner H616
  - Samsung ExynosAutov920 CPU cluster CL0, CL1 and CL2 clock controllers
  - Video Output (VO) subsystem clk controller in the T-HEAD TH1520 SoC
  - Clock driver for Sophgo SG2044
  - Clock driver for SpacemiT K1 SoC
  - Renesas RZ/V2N (R9A09G056) SoC clk driver
 
 Updates:
  - Correct data in various SoC clk drivers
  - Allow clkaN to be optional in the Qualcomm RPMh clock controller
    driver if command db doesn't define it
  - Change Kconfig options to not enable by default during compile testing
  - Add missing clks in various SoC clk drivers
  - Remove some duplicate clk DT bindings and convert some more to YAML
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmg45JcUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSUvJhAAqukvBxlTu9bh1kpTL3GYRtjOIjgl
 J8RUUfpfBXdXGfysiFBx6isMpkzfSBQ3NbyYEUZG9LZYxss6PiM1da7+/DwmtxJA
 Ovwc05LVK+t7e0Svpc5UwQHTFUhgdnbuUBw1XQwL8FwzLq+3sSXZwwfapN/SuBfZ
 TG6YtMNN89vVI8/B8sAqbiGe72V6ueq+sppmCv3rhLnAsjinBvcQozsoiKyalQG8
 cd7gL+jy02R0XUgCPAxITEpXuv45UhksVJw84HBMjlIICOLo753+BY50PnUKRNSV
 VwSXGLNRLxUJAgnUFmtALWX4SgcIoHKmdshG2wUAFAcWBtosflF52MAVevsuR/Pb
 4xlKzmUio8WmO0unb20uAidM53sjr8NfLBc4PkHoVoJ0bnkefXkRuAealBcnBjJa
 LQI++mOjIirY7hC13K53C1tfgiiGVgQWogr6/nYIY+hA6S/yOcNfTsZE/cNjQJtP
 RbEDxKGgqSOHKxD9FSQGKSnvQZQ+dtw3IRXkfIczEV2NqOiVQyBTy6/wm6sx3Jcr
 IJIIdwLdcEPfVO1iTKnjXvPsKgeHY5ijaCz/t8uOM6MvaOhlfb0fOH7eq8c7drtp
 y+KW1iT28GgEAUxWdIePWDV7IOnLfS64Lf9N4ry7xRF2KrdZKJSGfHWpQozhi+NE
 bNo0PKMMadXLiZo=
 =bEFK
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "This has been a semi-quiet cycle. The core framework remains unchanged
  this time around.

  In terms of shiny new code though, we have support for the SpacemiT K1
  SoC, Sophgo SG2044, and T-HEAD TH1520 VO clk drivers joining the usual
  silicon players like Qualcomm, Samsung, Allwinner, and Renesas.

  Surprisingly, the Qualcomm pile was smaller than usual but that is
  likely because they put one SoC support inside a driver for a
  different SoC that is very similar.

  Other than all those new clk drivers there are the usual clk data
  updates to fix parents, frequency tables, and add missing clks along
  with some Kconfig changes to make compile testing simpler and even
  more DT binding conversions to boot.

  The exciting part is still the new SoC support like SpacemiT and
  Sophgo support though, which really dominate the diffstat because they
  introduce a whole new silicon vendor clk driver.

  New Drivers:
   - Camera clock controller driver for Qualcomm QCS8300
   - DE (display engine) 3.3 clocks on Allwinner H616
   - Samsung ExynosAutov920 CPU cluster CL0, CL1 and CL2 clock controllers
   - Video Output (VO) subsystem clk controller in the T-HEAD TH1520 SoC
   - Clock driver for Sophgo SG2044
   - Clock driver for SpacemiT K1 SoC
   - Renesas RZ/V2N (R9A09G056) SoC clk driver

  Updates:
   - Correct data in various SoC clk drivers
   - Allow clkaN to be optional in the Qualcomm RPMh clock controller
     driver if command db doesn't define it
   - Change Kconfig options to not enable by default during compile
     testing
   - Add missing clks in various SoC clk drivers
   - Remove some duplicate clk DT bindings and convert some more to
     YAML"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (93 commits)
  clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks
  clk: qcom: gcc: Set FORCE_MEM_CORE_ON for gcc_ufs_axi_clk for 8650/8750
  clk: qcom: rpmh: make clkaN optional
  clk: qcom: Add support for Camera Clock Controller on QCS8300
  clk: rockchip: rk3528: add slab.h header include
  clk: rockchip: rk3576: add missing slab.h include
  clk: meson: Do not enable by default during compile testing
  clk: meson-g12a: add missing fclk_div2 to spicc
  clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz
  clk: rockchip: rename gate-grf clk file
  clk: rockchip: rename branch_muxgrf to branch_grf_mux
  clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support
  dt-bindings: allwinner: add H616 DE33 clock binding
  clk: samsung: correct clock summary for hsi1 block
  dt-bindings: clock: add SM6350 QCOM video clock bindings
  clk: rockchip: Pass NULL as reg pointer when registering GRF MMC clocks
  clk: sunxi-ng: h616: Add LVDS reset for LCD TCON
  dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset
  clk: rockchip: rk3036: mark ddrphy as critical
  clk: rockchip: rk3036: fix implementation of usb480m clock mux
  ...
2025-05-30 09:15:40 -07:00
Heiko Stuebner
92da5c3cba clk: rockchip: rk3576: add missing slab.h include
The change for auxiliary GRFs introduced kzalloc usage into the rk3576 clock
driver, but missed adding the header for its prototype. Add it now.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505150941.KWKskr2c-lkp@intel.com/
Fixes: 70a114daf2 ("clk: rockchip: introduce auxiliary GRFs")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250515082652.2503063-1-heiko@sntech.de
2025-05-15 14:49:05 +02:00
Nicolas Frattaroli
9199ec29f0 clk: rockchip: add GATE_GRFs for SAI MCLKOUT to rk3576
The Rockchip RK3576 gates the SAI MCLKOUT clocks behind some IOC GRF
writes.

Add these clock branches, and add the IOC GRF to the auxiliary GRF
hashtable.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://lore.kernel.org/r/20250502-rk3576-sai-v3-4-376cef19dd7c@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2025-05-05 22:39:24 +02:00
Nicolas Frattaroli
70a114daf2 clk: rockchip: introduce auxiliary GRFs
The MUXGRF clock branch type depends on having access to some sort of
GRF as a regmap to be registered. So far, we could easily get away with
only ever having one GRF stowed away in the context.

However, newer Rockchip SoCs, such as the RK3576, have several GRFs
which are relevant for clock purposes. It already depends on the pmu0
GRF for MUXGRF reasons, but could get away with not refactoring this
because it didn't need the sysgrf at all, so could overwrite the pointer
in the clock provider to the pmu0 grf regmap handle.

In preparation for needing to finally access more than one GRF per SoC,
let's untangle this. Introduce an auxiliary GRF hashmap, and a GRF type
enum. The hashmap is keyed by the enum, and clock branches now have a
struct member to store the value of that enum, which defaults to the
system GRF.

The SoC-specific _clk_init function can then insert pointers to GRF
regmaps into the hashmap based on the grf type.

During clock branch registration, we then pick the right GRF for each
branch from the hashmap if something other than the sys GRF is
requested.

The reason for doing it with this grf type indirection in the clock
branches is so that we don't need to define the MUXGRF branches in a
separate step, just to have a direct pointer to a regmap available
already.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://lore.kernel.org/r/20250502-rk3576-sai-v3-2-376cef19dd7c@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2025-05-05 22:39:24 +02:00
Heiko Stuebner
d934a93bbc clk: rockchip: rk3576: define clk_otp_phy_g
The phy clock of the OTP block is also present, but was not defined
so far. Though its clk-id already existed, so just define its location.

Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250210224510.1194963-2-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2025-04-26 00:04:49 +02:00
Arnd Bergmann
4500f510d9 clk: rockchip: remove unused mclk_pdm0_p/pdm0_p definitions
When -Wunused-const-variable is enabled (not the default),
there is a warning about two definitions in this file:

In file included from drivers/clk/rockchip/clk-rk3576.c:14:
drivers/clk/rockchip/clk-rk3576.c:334:7: error: 'mclk_pdm0_p' defined but not used [-Werror=unused-const-variable=]
  334 | PNAME(mclk_pdm0_p)                      = { "mclk_pdm0_src_top", "xin24m" };
      |       ^~~~~~~~~~~
drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
  564 | #define PNAME(x) static const char *const x[] __initconst
      |                                           ^
drivers/clk/rockchip/clk-rk3576.c:333:7: error: 'pdm0_p' defined but not used [-Werror=unused-const-variable=]
  333 | PNAME(pdm0_p)                           = { "clk_pdm0_src_top", "xin24m" };
      |       ^~~~~~
drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
  564 | #define PNAME(x) static const char *const x[] __initconst
      |                                           ^

Remove them for the moment. If they are needed later, they can
be added back at that point.

Fixes: cc40f5baa9 ("clk: rockchip: Add clock controller for the RK3576")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240909121116.254036-1-arnd@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-09-09 14:10:32 -07:00
Elaine Zhang
cc40f5baa9 clk: rockchip: Add clock controller for the RK3576
Add the clock and reset tree definitions for the new RK3576
SoC.

As opposed to the other rockchip CRU drivers, the GRF node is looked up
via compatible instead of a phandle, which simplifies the device tree
bindings.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Elaine Zhang <zhangqing@rock-chips.com>
Tested-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/0102019199a7781a-888440f0-a3f7-4a7d-a831-491260cbdfe7-000000@eu-west-1.amazonses.com
[dropped additional blank line at EOF in rst-rk3576.c
 dropped the whole (non-)working as module part]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-08-29 11:13:33 +02:00