Skip to contentSkip to conversation

dt-bindings: clock: convert rockchip,rv1108-cru.txt to YAML

PATCH Applied Johan Jonker 3 participants 5 messages Mar 30, 2022 – May 15, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dt-bindings: clock: convert rockchip,rv1108-cru.txt to YAML

Convert rockchip,rv1108-cru.txt to YAML.

Changes against original bindings:
Add clocks and clock-names because the device has to have at least one input clock.

---
 .../bindings/clock/rockchip,rv1108-cru.txt    | 59 ---------------
 .../bindings/clock/rockchip,rv1108-cru.yaml   | 75 +++++++++++++++++++
 2 files changed, 75 insertions(+), 59 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/rockchip,rv1108-cru.txt
 create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rv1108-cru.yaml
Documentation/devicetree/bindings/clock/rockchip,rv1108-cru.txt deleted +0 -59
deleted file mode 100644
index 161326a4f..000000000
@@ -1,59 +0,0 @@
-* Rockchip RV1108 Clock and Reset Unit
-
-The RV1108 clock controller generates and supplies clock to various
-controllers within the SoC and also implements a reset controller for SoC
-peripherals.
-
-Required Properties:
-
-- compatible: should be "rockchip,rv1108-cru"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- #clock-cells: should be 1.
-- #reset-cells: should be 1.
-
-Optional Properties:
-
-- rockchip,grf: phandle to the syscon managing the "general register files"
-  If missing pll rates are not changeable, due to the missing pll lock status.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/rv1108-cru.h headers and can be
-used in device tree sources. Similar macros exist for the reset sources in
-these files.
-
-External clocks:
-
-There are several clocks that are generated outside the SoC. It is expected
-that they are defined using standard clock bindings with following
-clock-output-names:
- - "xin24m" - crystal input - required,
- - "ext_vip" - external VIP clock - optional
- - "ext_i2s" - external I2S clock - optional
- - "ext_gmac" - external GMAC clock - optional
- - "hdmiphy" - external clock input derived from HDMI PHY - optional
- - "usbphy" - external clock input derived from USB PHY - optional
-
-Example: Clock controller node:
-
-	cru: cru@20200000 {
-		compatible = "rockchip,rv1108-cru";
-		reg = <0x20200000 0x1000>;
-		rockchip,grf = <&grf>;
-
-		#clock-cells = <1>;
-		#reset-cells = <1>;
-	};
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller:
-
-	uart0: serial@10230000 {
-		compatible = "rockchip,rv1108-uart", "snps,dw-apb-uart";
-		reg = <0x10230000 0x100>;
-		interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
-		reg-shift = <2>;
-		reg-io-width = <4>;
-		clocks = <&cru SCLK_UART0>;
-	};
Documentation/devicetree/bindings/clock/rockchip,rv1108-cru.yaml new file +75 -0

75 lines not on this page · raw message

Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/3 ARM: dts: rockchip: add clocks property to cru node rv1108

Add clocks and clock-names to the rv1108 cru node, because the device has to have at least one input clock.

---
 arch/arm/boot/dts/rv1108.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/rv1108.dtsi +2 -0
index 448254906..eceaa940b 100644
@@ -456,6 +456,8 @@
 	cru: clock-controller@20200000 {
 		compatible = "rockchip,rv1108-cru";
 		reg = <0x20200000 0x1000>;
+		clocks = <&xin24m>;
+		clock-names = "xin24m";
 		rockchip,grf = <&grf>;
 		#clock-cells = <1>;
 		#reset-cells = <1>;
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/3 ARM: dts: rockchip: Remove bogus "amba" bus nodes part 2

In reply to Johan Jonker

The "amba" bus nodes wrapping all the DMA-330 nodes serve no useful purpose, and certainly bear no relation at all to the actual underlying interconnect topology. They appear to be cargo-cult copying from a design misstep in the very early days of FDT adoption on ARM, which was righted with the "arm,primecell" compatible, and the last trace of the idea finally purged by commit 2ef7d5f342c1 ("ARM, ARM64: dts: drop "arm,amba-bus" in favor of "simple-bus"").

As such, they can simply be removed and the DMA-330 nodes fitted into the normal sort order.
The node names should be generic, so rename it to "dma-controller".

---
 arch/arm/boot/dts/rv1108.dtsi | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)
arch/arm/boot/dts/rv1108.dtsi +11 -18
index eceaa940b..c158a7ea8 100644
@@ -85,24 +85,6 @@
 		#clock-cells = <0>;
 	};
 
-	amba: bus {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		pdma: pdma@102a0000 {
-			compatible = "arm,pl330", "arm,primecell";
-			reg = <0x102a0000 0x4000>;
-			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
-			#dma-cells = <1>;
-			arm,pl330-broken-no-flushp;
-			arm,pl330-periph-burst;
-			clocks = <&cru ACLK_DMAC>;
-			clock-names = "apb_pclk";
-		};
-	};
-
 	bus_intmem: sram@10080000 {
 		compatible = "mmio-sram";
 		reg = <0x10080000 0x2000>;
@@ -259,6 +241,17 @@
 		status = "disabled";
 	};
 
+	pdma: dma-controller@102a0000 {
+		compatible = "arm,pl330", "arm,primecell";
+		reg = <0x102a0000 0x4000>;
+		interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+		#dma-cells = <1>;
+		arm,pl330-broken-no-flushp;
+		arm,pl330-periph-burst;
+		clocks = <&cru ACLK_DMAC>;
+		clock-names = "apb_pclk";
+	};
+
 	grf: syscon@10300000 {
 		compatible = "rockchip,rv1108-grf", "syscon", "simple-mfd";
 		reg = <0x10300000 0x1000>;
Signature · 1 line
2.20.1
Reviewed-by on v1 1/3
#3 lore raw
In reply to Johan Jonker
Quoted 6 lines · Johan Jonker

Convert rockchip,rv1108-cru.txt to YAML.

Changes against original bindings:
Add clocks and clock-names because the device has to have at least one input clock.

Quoted 8 lines
---
 .../bindings/clock/rockchip,rv1108-cru.txt    | 59 ---------------
 .../bindings/clock/rockchip,rv1108-cru.yaml   | 75 +++++++++++++++++++
 2 files changed, 75 insertions(+), 59 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/rockchip,rv1108-cru.txt
 create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rv1108-cru.yaml

Best regards,
Krzysztof

maintainer Applied
#4 lore raw
In reply to Johan Jonker
Quoted 5 lines · Johan Jonker

Convert rockchip,rv1108-cru.txt to YAML.

Changes against original bindings:
Add clocks and clock-names because the device has to have at least one input clock.

Applied, thanks!

[1/3] dt-bindings: clock: convert rockchip,rv1108-cru.txt to YAML

      commit: 5eb60b7bff3233d07e6a9e3328d2ba415209691e
[2/3] ARM: dts: rockchip: add clocks property to cru node rv1108
      commit: f36fed209444efe8ac6621900f407c6569c92dc9
[3/3] ARM: dts: rockchip: Remove bogus "amba" bus nodes part 2
      commit: 191800d40222ee920dab2e7a774ea2ae4f28c1c9

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>