Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: rockchip: rk3506: Add the SAI MCLK output gate clocks
@ 2026-11-22 16:24 Xiangyu Zhu
  0 siblings, 0 replies; only message in thread
From: Xiangyu Zhu @ 2026-11-22 16:24 UTC (permalink / raw)
  To: Heiko Stuebner, Stephen Boyd
  Cc: Xiangyu Zhu, Michael Turquette, Krzysztof Kozlowski, Conor Dooley,
	linux-clk, linux-rockchip, linux-arm-kernel, devicetree,
	linux-kernel

The RK3506 has four SAI MCLK output gates: SAI0 and SAI1 are controlled
by bits in the PMU GRF, SAI2 and SAI3 by bits in the system GRF.  Model
them as GRF gate clocks so the SAI MCLK pin direction can be controlled
through the clock framework.

This is a v2 of the earlier "[PATCH] dt-bindings: clock: add
rockchip,clk-out" submission.  That one introduced a generic
"rockchip,clk-out" compatible plus a standalone driver, which is not
acceptable: upstream already has generic GRF gate support
(branch_grf_gate together with rockchip_clk_add_grf()), and RK3576 and
RK3588 register their SAI/I2S MCLK output gates with it.  The new
binding and the driver are therefore dropped entirely, and this series
only adds the four gates to clk-rk3506.c plus their clock IDs.  No
device tree changes are included.

Tested on a RK3506B board: the SAI0 MCLK output runs at 12.288 MHz and
drives the ES8388 codec, audio playback works, and the GRF gate bits
were read back from the registers to confirm that they get set.

Changes since v1:
 - drop the rockchip,clk-out binding and driver
 - use the existing GATE_GRF support like RK3576 and RK3588 do
 - limit the series to the clock driver and the dt-bindings IDs

Xiangyu Zhu (2):
  dt-bindings: clock: rockchip,rk3506-cru: Add SAI MCLK output gate IDs
  clk: rockchip: rk3506: Register the SAI MCLK output gates

 drivers/clk/rockchip/clk-rk3506.c             | 23 +++++++++++++++++++
 .../dt-bindings/clock/rockchip,rk3506-cru.h   |  4 ++++
 2 files changed, 27 insertions(+)

-- 
2.47.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-22 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 16:24 [PATCH v2 0/2] clk: rockchip: rk3506: Add the SAI MCLK output gate clocks Xiangyu Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox