Support clock and reset unit of Rockchip RK3528
Subsystems (4)
v3 cover Support clock and reset unit of Rockchip RK3528
Similar to previous Rockchip SoCs, reset controller on RK3528 shares MMIO region with clock controller, combined as CRU. They're represented as a single node in dt.
For the reset controller, only bindings are included in this series because it's hard to test the reset controller without support for some peripherals (e.g. pinctrl). I'd like to first make dt and basic peripherals available, then submit the driver.
This is tested on Radxa E20C board. With some out-of-tree drivers, I've successfully brouhgt up UART, pinctrl/gpio and I2C. A clock dump could be obtained from [1].
[1]: https://gist.github.com/ziyao233/032961d1eebeecb9a41fea2d690e8351
Changed from v2
- dt-bindings:
- drop redundant assigned-clocks and assigned-clock-rates properties
- improve description of input clock gmac0
- Link to v2: https://lore.kernel.org/all/[email protected]/
Changed from v1
- dt-bindings:
- relicense binding headers as GPL-2.0-only OR MIT
- use gapless integers starting from 0 for binding IDs
- make input clocks essential, add corresponding description
- rename the input clock that is generated by phy module as "gmac0"
- style fixes
- driver:
- format in the common Rockchip driver style
- drop initializing code of the reset controller, as it'll not be
supported in this series
- Link to v1: https://lore.kernel.org/linux-rockchip/[email protected]/
Yao Zi (5):
dt-bindings: clock: Document clock and reset unit of RK3528
clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE
clk: rockchip: Add clock controller driver for RK3528 SoC
arm64: dts: rockchip: Add clock generators for RK3528 SoC
arm64: dts: rockchip: Add UART clocks for RK3528 SoC
.../bindings/clock/rockchip,rk3528-cru.yaml | 64 + arch/arm64/boot/dts/rockchip/rk3528.dtsi | 68 +- drivers/clk/rockchip/Kconfig | 7 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-pll.c | 10 +- drivers/clk/rockchip/clk-rk3528.c | 1114 +++++++++++++++++ drivers/clk/rockchip/clk.h | 22 + .../dt-bindings/clock/rockchip,rk3528-cru.h | 453 +++++++ .../dt-bindings/reset/rockchip,rk3528-cru.h | 241 ++++ 9 files changed, 1975 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml create mode 100644 drivers/clk/rockchip/clk-rk3528.c create mode 100644 include/dt-bindings/clock/rockchip,rk3528-cru.h create mode 100644 include/dt-bindings/reset/rockchip,rk3528-cru.h
Signature · 1 line
2.48.1
PATCH v3 1/5 dt-bindings: clock: Document clock and reset unit of RK3528
There are two types of clocks in RK3528 SoC, CRU-managed and SCMI-managed. Independent IDs are assigned to them.
For the reset part, differing from previous Rockchip SoCs and downstream bindings which embeds register offsets into the IDs, gapless numbers starting from zero are used.
--- .../bindings/clock/rockchip,rk3528-cru.yaml | 64 +++ .../dt-bindings/clock/rockchip,rk3528-cru.h | 453 ++++++++++++++++++ .../dt-bindings/reset/rockchip,rk3528-cru.h | 241 ++++++++++ 3 files changed, 758 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml create mode 100644 include/dt-bindings/clock/rockchip,rk3528-cru.h create mode 100644 include/dt-bindings/reset/rockchip,rk3528-cru.h
Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/rockchip,rk3528-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3528 Clock and Reset Controller + +maintainers: + - Yao Zi <[email protected]> + +description: | + The RK3528 clock controller generates the clock and also implements a reset + controller for SoC peripherals. For example, it provides SCLK_UART0 and + PCLK_UART0 as well as SRST_P_UART0 and SRST_S_UART0 for the first UART + module. + Each clock is assigned an identifier, consumer nodes can use it to specify + the clock. All available clock and reset IDs are defined in dt-binding + headers. + +properties: + compatible: + const: rockchip,rk3528-cru + + reg: + maxItems: 1 + + clocks: + items: + - description: External 24MHz oscillator clock + - description: > + 50MHz clock generated by PHY module, for generating GMAC0 clocks only. + + clock-names: + items: + - const: xin24m + - const: gmac0 + + "#clock-cells": + const: 1 + + "#reset-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + - "#reset-cells" + +additionalProperties: false + +examples: + - | + clock-controller@ff4a0000 { + compatible = "rockchip,rk3528-cru"; + reg = <0xff4a0000 0x30000>; + clocks = <&xin24m>, <&gmac0_clk>; + clock-names = "xin24m", "gmac0"; + #clock-cells = <1>; + #reset-cells = <1>; + };
include/dt-bindings/clock/rockchip,rk3528-cru.h new file +453 -0
453 lines not on this page · raw message
include/dt-bindings/reset/rockchip,rk3528-cru.h new file +241 -0
241 lines not on this page · raw message
Signature · 1 line
2.48.1
Re: [PATCH v3 1/5] dt-bindings: clock: Document clock and reset unit of RK3528
Quoted 8 lines · Yao Zi
There are two types of clocks in RK3528 SoC, CRU-managed and SCMI-managed. Independent IDs are assigned to them.
For the reset part, differing from previous Rockchip SoCs and downstream bindings which embeds register offsets into the IDs, gapless numbers starting from zero are used.
Signed-off-by Yao Zi <[email protected]>
Quoted 8 lines
--- .../bindings/clock/rockchip,rk3528-cru.yaml | 64 +++ .../dt-bindings/clock/rockchip,rk3528-cru.h | 453 ++++++++++++++++++ .../dt-bindings/reset/rockchip,rk3528-cru.h | 241 ++++++++++ 3 files changed, 758 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml create mode 100644 include/dt-bindings/clock/rockchip,rk3528-cru.h create mode 100644 include/dt-bindings/reset/rockchip,rk3528-cru.h
Best regards,
Krzysztof
Heiko Stübner
maintainerRe: [PATCH v3 1/5] dt-bindings: clock: Document clock and reset unit of RK3528
In reply to Yao ZiAm Montag, 17. Februar 2025, 07:11:42 MEZ schrieb Yao Zi:
Quoted 41 lines
There are two types of clocks in RK3528 SoC, CRU-managed and SCMI-managed. Independent IDs are assigned to them.
For the reset part, differing from previous Rockchip SoCs and downstream bindings which embeds register offsets into the IDs, gapless numbers starting from zero are used.
Signed-off-by Yao Zi <[email protected]>--- .../bindings/clock/rockchip,rk3528-cru.yaml | 64 +++ .../dt-bindings/clock/rockchip,rk3528-cru.h | 453 ++++++++++++++++++ .../dt-bindings/reset/rockchip,rk3528-cru.h | 241 ++++++++++ 3 files changed, 758 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml create mode 100644 include/dt-bindings/clock/rockchip,rk3528-cru.h create mode 100644 include/dt-bindings/reset/rockchip,rk3528-cru.hDocumentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml new file +18
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/rockchip,rk3528-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3528 Clock and Reset Controller + +maintainers: + - Yao Zi <[email protected]> + +description: | + The RK3528 clock controller generates the clock and also implements a reset + controller for SoC peripherals. For example, it provides SCLK_UART0 and + PCLK_UART0 as well as SRST_P_UART0 and SRST_S_UART0 for the first UART + module. + Each clock is assigned an identifier, consumer nodes can use it to specify + the clock. All available clock and reset IDs are defined in dt-binding
Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml line 28
Quoted 10 lines
Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml new file +10
-0+ headers. + +properties: + compatible: + const: rockchip,rk3528-cru + + reg: + maxItems: 1 + + clocks:
I do think this needs a
minItems: 1
maxItems: 2
or similar.
xin24m is the main oscillator everything else is supplied from, so is absolutely required, but that gmac0 supply comes from an (probably) optional clock supply from a mac phy?
So is possibly not available on a system without ethernet hardware?
Heiko
Re: [PATCH v3 1/5] dt-bindings: clock: Document clock and reset unit of RK3528
Quoted 58 lines · Heiko Stübner
Am Montag, 17. Februar 2025, 07:11:42 MEZ schrieb Yao Zi:
Quoted 41 lines
There are two types of clocks in RK3528 SoC, CRU-managed and SCMI-managed. Independent IDs are assigned to them.
For the reset part, differing from previous Rockchip SoCs and downstream bindings which embeds register offsets into the IDs, gapless numbers starting from zero are used.
Signed-off-by Yao Zi <[email protected]>--- .../bindings/clock/rockchip,rk3528-cru.yaml | 64 +++ .../dt-bindings/clock/rockchip,rk3528-cru.h | 453 ++++++++++++++++++ .../dt-bindings/reset/rockchip,rk3528-cru.h | 241 ++++++++++ 3 files changed, 758 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml create mode 100644 include/dt-bindings/clock/rockchip,rk3528-cru.h create mode 100644 include/dt-bindings/reset/rockchip,rk3528-cru.hDocumentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml new file +18
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/rockchip,rk3528-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3528 Clock and Reset Controller + +maintainers: + - Yao Zi <[email protected]> + +description: | + The RK3528 clock controller generates the clock and also implements a reset + controller for SoC peripherals. For example, it provides SCLK_UART0 and + PCLK_UART0 as well as SRST_P_UART0 and SRST_S_UART0 for the first UART + module. + Each clock is assigned an identifier, consumer nodes can use it to specify + the clock. All available clock and reset IDs are defined in dt-bindingDocumentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml line 28
Quoted 10 lines
Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml new file +10
-0+ headers. + +properties: + compatible: + const: rockchip,rk3528-cru + + reg: + maxItems: 1 + + clocks:I do think this needs a
minItems: 1
maxItems: 2
or similar.
Quoted 5 lines
xin24m is the main oscillator everything else is supplied from, so is absolutely required, but that gmac0 supply comes from an (probably) optional clock supply from a mac phy?
So is possibly not available on a system without ethernet hardware?
I don't think so. By the CRU commit message[1] in the vendor driver, the "phy module" should mean the integrated phy for GMAC0,
The io-in clocks are module phy output clock, gating child clocks by disabling phy output but not CRU gate.
Add gmac0 clocks. They are all orphans if clk_gmac0_io_i is not registered by GMAC driver. But it's fine that GMAC driver only get it but not to set/get rate.
(gmac0 is called "clk_gmac0_io_i" in the vendor driver).
Taking that both the upstream and downstream Rockchip GMAC glue (GMAC driver) takes some care of the integrated phy, if the clock is an out-of-SoC supply, the second paragraph sounds less sensible: the clock should be registered by the external PHY instead of the GMAC driver in this case.
And there cannot be a case that an integrated clocksource is missing.
Quoted 5 lines
Heiko
Thanks,
Yao Zi
[1]: https://github.com/rockchip-linux/kernel/commit/16f512f1e10375dc48aa6c26cedeb7079aba01de
PATCH v3 2/5 clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE
In reply to Yao ZiRK3528 comes with a new PLL variant: its "PPLL", which mainly generates clocks for the PCIe controller, operates in normal mode only. Let's describe it with flag ROCKCHIP_PLL_FIXED_MODE and handle it in code.
--- drivers/clk/rockchip/clk-pll.c | 10 ++++++---- drivers/clk/rockchip/clk.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/clk/rockchip/clk-pll.c +6 -4
@@ -204,10 +204,12 @@ static int rockchip_rk3036_pll_set_params(struct rockchip_clk_pll *pll,rockchip_rk3036_pll_get_params (pll, &cur); cur.rate =0 ; - cur_parent = pll_mux_ops->get_parent (&pll_mux->hw); -if (cur_parent ==PLL_MODE_NORM ) { - pll_mux_ops->set_parent (&pll_mux->hw,PLL_MODE_SLOW ); - rate_change_remuxed =1 ; +if (!(pll->flags &ROCKCHIP_PLL_FIXED_MODE )) { + cur_parent = pll_mux_ops->get_parent (&pll_mux->hw); +if (cur_parent ==PLL_MODE_NORM ) { + pll_mux_ops->set_parent (&pll_mux->hw,PLL_MODE_SLOW ); + rate_change_remuxed =1 ; + } }/* update pll values */
drivers/clk/rockchip/clk.h +2 -0
@@ -444,6 +444,7 @@ struct rockchip_pll_rate_table {* Flags: * ROCKCHIP_PLL_SYNC_RATE - check rate parameters to match against the * rate_table parameters and ajust them if necessary. +* ROCKCHIP_PLL_FIXED_MODE - the pll operates in normal mode only */ struct rockchip_pll_clock {unsigned int id;
@@ -461,6 +462,7 @@ struct rockchip_pll_clock { };#define ROCKCHIP_PLL_SYNC_RATE BIT(0) +#define ROCKCHIP_PLL_FIXED_MODE BIT(1)#define PLL (_type, _id, _name, _pnames, _flags, _con, _mode, _mshift, \ _lshift, _pflags, _rtable) \
Signature · 1 line
2.48.1
PATCH v3 3/5 clk: rockchip: Add clock controller driver for RK3528 SoC
In reply to Yao ZiAdd clock tree definition for RK3528. Similar to previous Rockchip SoCs, clock controller of RK3528 is combined with the reset controller. We omit the reset part for now since it's hard to test it without support for other basic peripherals.
--- drivers/clk/rockchip/Kconfig | 7 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3528.c | 1114 +++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 20 + 4 files changed, 1142 insertions(+) create mode 100644 drivers/clk/rockchip/clk-rk3528.c
drivers/clk/rockchip/Kconfig +7 -0
@@ -93,6 +93,13 @@ config CLK_RK3399 help Build the driver for RK3399 Clock Driver. +config CLK_RK3528 + bool "Rockchip RK3528 clock controller support" + depends on ARM64 || COMPILE_TEST + default y + help + Build the driver for RK3528 Clock Controller. + config CLK_RK3568 bool "Rockchip RK3568 clock controller support" depends on ARM64 || COMPILE_TEST
drivers/clk/rockchip/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_CLK_RK3308) += clk-rk3308.o obj-$(CONFIG_CLK_RK3328) += clk-rk3328.o obj-$(CONFIG_CLK_RK3368) += clk-rk3368.o obj-$(CONFIG_CLK_RK3399) += clk-rk3399.o +obj-$(CONFIG_CLK_RK3528) += clk-rk3528.o obj-$(CONFIG_CLK_RK3568) += clk-rk3568.o obj-$(CONFIG_CLK_RK3576) += clk-rk3576.o rst-rk3576.o obj-$(CONFIG_CLK_RK3588) += clk-rk3588.o rst-rk3588.o
drivers/clk/rockchip/clk-rk3528.c new file +1114 -0
1,114 lines not on this page · raw message
drivers/clk/rockchip/clk.h +20 -0
@@ -207,6 +207,26 @@ struct clk;#define RK3399_PMU_CLKGATE_CON (x) ((x) * 0x4 + 0x100)#define RK3399_PMU_SOFTRST_CON (x) ((x) * 0x4 + 0x110) +#define RK3528_PMU_CRU_BASE 0x10000 +#define RK3528_PCIE_CRU_BASE 0x20000 +#define RK3528_DDRPHY_CRU_BASE 0x28000 +#define RK3528_PLL_CON (x) RK2928_PLL_CON(x) +#define RK3528_PCIE_PLL_CON (x) ((x) * 0x4 + RK3528_PCIE_CRU_BASE) +#define RK3528_DDRPHY_PLL_CON (x) ((x) * 0x4 + RK3528_DDRPHY_CRU_BASE) +#define RK3528_MODE_CON 0x280 +#define RK3528_CLKSEL_CON (x) ((x) * 0x4 + 0x300) +#define RK3528_CLKGATE_CON (x) ((x) * 0x4 + 0x800) +#define RK3528_SOFTRST_CON (x) ((x) * 0x4 + 0xa00) +#define RK3528_PMU_CLKSEL_CON (x) ((x) * 0x4 + 0x300 + RK3528_PMU_CRU_BASE) +#define RK3528_PMU_CLKGATE_CON (x) ((x) * 0x4 + 0x800 + RK3528_PMU_CRU_BASE) +#define RK3528_PCIE_CLKSEL_CON (x) ((x) * 0x4 + 0x300 + RK3528_PCIE_CRU_BASE) +#define RK3528_PCIE_CLKGATE_CON (x) ((x) * 0x4 + 0x800 + RK3528_PCIE_CRU_BASE) +#define RK3528_DDRPHY_CLKGATE_CON (x) ((x) * 0x4 + 0x800 + RK3528_DDRPHY_CRU_BASE) +#define RK3528_DDRPHY_MODE_CON (0x280 + RK3528_DDRPHY_CRU_BASE) +#define RK3528_GLB_CNT_TH 0xc00 +#define RK3528_GLB_SRST_FST 0xc08 +#define RK3528_GLB_SRST_SND 0xc0c +#define RK3568_PLL_CON (x) RK2928_PLL_CON(x)#define RK3568_MODE_CON0 0xc0#define RK3568_MISC_CON0 0xc4
Signature · 1 line
2.48.1
PATCH v3 4/5 arm64: dts: rockchip: Add clock generators for RK3528 SoC
In reply to Yao ZiAdd dt node for RK3528 clock and reset unit. Clock "gmac0_clk" is generated by internal Ethernet phy, a fixed clock node is added as a placeholder to avoid orphans.
--- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
arch/arm64/boot/dts/rockchip/rk3528.dtsi +51 -0
@@ -6,6 +6,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/clock/rockchip,rk3528-cru.h> / { compatible = "rockchip,rk3528";
@@ -95,6 +96,13 @@ xin24m: clock-xin24m { #clock-cells = <0>; }; + gmac0_clk: clock-gmac50m { + compatible = "fixed-clock"; + clock-frequency = <50000000>; + clock-output-names = "gmac0"; + #clock-cells = <0>; + }; + soc { compatible = "simple-bus"; ranges = <0x0 0xfe000000 0x0 0xfe000000 0x0 0x2000000>;
@@ -114,6 +122,49 @@ gic: interrupt-controller@fed01000 { #interrupt-cells = <3>; }; + cru: clock-controller@ff4a0000 { + compatible = "rockchip,rk3528-cru"; + reg = <0x0 0xff4a0000 0x0 0x30000>; + assigned-clocks = + <&cru XIN_OSC0_DIV>, <&cru PLL_GPLL>, + <&cru PLL_PPLL>, <&cru PLL_CPLL>, + <&cru ARMCLK>, <&cru CLK_MATRIX_250M_SRC>, + <&cru CLK_MATRIX_500M_SRC>, + <&cru CLK_MATRIX_50M_SRC>, + <&cru CLK_MATRIX_100M_SRC>, + <&cru CLK_MATRIX_150M_SRC>, + <&cru CLK_MATRIX_200M_SRC>, + <&cru CLK_MATRIX_300M_SRC>, + <&cru CLK_MATRIX_339M_SRC>, + <&cru CLK_MATRIX_400M_SRC>, + <&cru CLK_MATRIX_600M_SRC>, + <&cru CLK_PPLL_50M_MATRIX>, + <&cru CLK_PPLL_100M_MATRIX>, + <&cru CLK_PPLL_125M_MATRIX>, + <&cru ACLK_BUS_VOPGL_ROOT>; + assigned-clock-rates = + <32768>, <1188000000>, + <1000000000>, <996000000>, + <408000000>, <250000000>, + <500000000>, + <50000000>, + <100000000>, + <150000000>, + <200000000>, + <300000000>, + <340000000>, + <400000000>, + <600000000>, + <50000000>, + <100000000>, + <125000000>, + <500000000>; + clocks = <&xin24m>, <&gmac0_clk>; + clock-names = "xin24m", "gmac0"; + #clock-cells = <1>; + #reset-cells = <1>; + }; + uart0: serial@ff9f0000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xff9f0000 0x0 0x100>;
Signature · 1 line
2.48.1
PATCH v3 5/5 arm64: dts: rockchip: Add UART clocks for RK3528 SoC
In reply to Yao ZiAdd missing clocks in UART nodes for RK3528 SoC.
--- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3528.dtsi +16 -1
@@ -168,7 +168,8 @@ cru: clock-controller@ff4a0000 { uart0: serial@ff9f0000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xff9f0000 0x0 0x100>; - clock-frequency = <24000000>; + clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
@@ -178,6 +179,8 @@ uart0: serial@ff9f0000 { uart1: serial@ff9f8000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xff9f8000 0x0 0x100>; + clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
@@ -187,6 +190,8 @@ uart1: serial@ff9f8000 { uart2: serial@ffa00000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xffa00000 0x0 0x100>; + clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
@@ -195,6 +200,8 @@ uart2: serial@ffa00000 { uart3: serial@ffa08000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; + clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>; + clock-names = "baudclk", "apb_pclk"; reg = <0x0 0xffa08000 0x0 0x100>; reg-io-width = <4>; reg-shift = <2>;
@@ -204,6 +211,8 @@ uart3: serial@ffa08000 { uart4: serial@ffa10000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xffa10000 0x0 0x100>; + clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
@@ -213,6 +222,8 @@ uart4: serial@ffa10000 { uart5: serial@ffa18000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xffa18000 0x0 0x100>; + clocks = <&cru SCLK_UART5>, <&cru PCLK_UART5>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
@@ -222,6 +233,8 @@ uart5: serial@ffa18000 { uart6: serial@ffa20000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xffa20000 0x0 0x100>; + clocks = <&cru SCLK_UART6>, <&cru PCLK_UART6>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
@@ -231,6 +244,8 @@ uart6: serial@ffa20000 { uart7: serial@ffa28000 { compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart"; reg = <0x0 0xffa28000 0x0 0x100>; + clocks = <&cru SCLK_UART7>, <&cru PCLK_UART7>; + clock-names = "baudclk", "apb_pclk"; interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <4>; reg-shift = <2>;
Signature · 1 line
2.48.1
Quoted 10 lines · Yao Zi
Similar to previous Rockchip SoCs, reset controller on RK3528 shares MMIO region with clock controller, combined as CRU. They're represented as a single node in dt.
For the reset controller, only bindings are included in this series because it's hard to test the reset controller without support for some peripherals (e.g. pinctrl). I'd like to first make dt and basic peripherals available, then submit the driver.
[...]
Applied, thanks!
[1/5] dt-bindings: clock: Document clock and reset unit of RK3528
commit: e0c0a97bc308f71b0934e3637ac545ce65195df0
[2/5] clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE
commit: 651aabc9fb0f354ad2ba5fd06a6011e652447489
[3/5] clk: rockchip: Add clock controller driver for RK3528 SoC
commit: 5d0eb375e6857d270f6376d161ef02a1b7183fa2
[4/5] arm64: dts: rockchip: Add clock generators for RK3528 SoC
commit: 858cdcdd11cf9913756297d3869e4de0f01329ea
[5/5] arm64: dts: rockchip: Add UART clocks for RK3528 SoC
commit: b9454434d0349223418f74fbfa7b902104da9bc5Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>