Skip to contentSkip to conversation

arm64: zynqmp: DT sync with Linux kernel

PATCH In review Michal Simek 1 participant 7 messages Dec 9, 2022 – Dec 15, 2022

Subsystems (2)
lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

cover arm64: zynqmp: DT sync with Linux kernel

Hi,

I found some differences between kernel and u-boot that's why do small sync up.

Thanks,
Michal

Michal Simek (5):
arm64: zynqmp: Sync #dma-cells property location
arm64: zynqmp: Added GEM reset definitions
arm64: zynqmp: Fix AMS device tree node
arm64: zynqmp: Align gpio-key node names with dtschema
arm64: zynqmp: Remove id from usb node name

 arch/arm/dts/zynqmp-sm-k26-revA.dts |  2 +-
 arch/arm/dts/zynqmp-zcu100-revC.dts |  2 +-
 arch/arm/dts/zynqmp-zcu102-revA.dts |  2 +-
 arch/arm/dts/zynqmp-zcu106-revA.dts |  2 +-
 arch/arm/dts/zynqmp-zcu111-revA.dts |  2 +-
 arch/arm/dts/zynqmp.dtsi            | 56 ++++++++++++++++-------------
 6 files changed, 36 insertions(+), 30 deletions(-)
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH 1/5 arm64: zynqmp: Sync #dma-cells property location

Sync property location with Linux kernel done by Linux commit (1ff2d58e60c8093e9be935b1f191341c0cda957a).

---

---
 arch/arm/dts/zynqmp.dtsi | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
arch/arm/dts/zynqmp.dtsi +16 -16
index b210bc4b87ec..9434c48e4f59 100644
@@ -280,10 +280,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 124 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14e8>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan2: dma-controller@fd510000 {
@@ -293,10 +293,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 125 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14e9>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan3: dma-controller@fd520000 {
@@ -306,10 +306,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 126 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14ea>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan4: dma-controller@fd530000 {
@@ -319,10 +319,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 127 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14eb>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan5: dma-controller@fd540000 {
@@ -332,10 +332,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 128 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14ec>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan6: dma-controller@fd550000 {
@@ -345,10 +345,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 129 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14ed>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan7: dma-controller@fd560000 {
@@ -358,10 +358,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 130 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14ee>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		fpd_dma_chan8: dma-controller@fd570000 {
@@ -371,10 +371,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 131 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <128>;
 			iommus = <&smmu 0x14ef>;
 			power-domains = <&zynqmp_firmware PD_GDMA>;
-			#dma-cells = <1>;
 		};
 
 		gic: interrupt-controller@f9010000 {
@@ -411,10 +411,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 77 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x868>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan2: dma-controller@ffa90000 {
@@ -424,10 +424,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 78 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x869>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan3: dma-controller@ffaa0000 {
@@ -437,10 +437,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 79 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x86a>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan4: dma-controller@ffab0000 {
@@ -450,10 +450,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 80 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x86b>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan5: dma-controller@ffac0000 {
@@ -463,10 +463,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 81 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x86c>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan6: dma-controller@ffad0000 {
@@ -476,10 +476,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 82 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x86d>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan7: dma-controller@ffae0000 {
@@ -489,10 +489,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 83 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x86e>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		lpd_dma_chan8: dma-controller@ffaf0000 {
@@ -502,10 +502,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 84 4>;
 			clock-names = "clk_main", "clk_apb";
+			#dma-cells = <1>;
 			xlnx,bus-width = <64>;
 			iommus = <&smmu 0x86f>;
 			power-domains = <&zynqmp_firmware PD_ADMA>;
-			#dma-cells = <1>;
 		};
 
 		mc: memory-controller@fd070000 {
Signature · 1 line
2.36.1
author maintainer
#2 lore raw

PATCH 2/5 arm64: zynqmp: Added GEM reset definitions

In reply to Michal Simek

The Cadence GEM/MACB driver now utilizes the platform-level reset on the ZynqMP platform. Add reset definitions to the ZynqMP platform device tree to allow this to be used.
Linux upstream commit (e461bd6f43f4e568f7436a8b6bc21c4ce6914c36).

---

https://lore.kernel.org/netdev/[email protected]/

---
 arch/arm/dts/zynqmp.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/zynqmp.dtsi +4 -0
index 9434c48e4f59..e2eb27b3151e 100644
@@ -540,6 +540,7 @@
 			iommus = <&smmu 0x874>;
 			power-domains = <&zynqmp_firmware PD_ETH_0>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM0>;
+			reset-names = "gem0_rst";
 		};
 
 		gem1: ethernet@ff0c0000 {
@@ -554,6 +555,7 @@
 			iommus = <&smmu 0x875>;
 			power-domains = <&zynqmp_firmware PD_ETH_1>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
+			reset-names = "gem1_rst";
 		};
 
 		gem2: ethernet@ff0d0000 {
@@ -568,6 +570,7 @@
 			iommus = <&smmu 0x876>;
 			power-domains = <&zynqmp_firmware PD_ETH_2>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM2>;
+			reset-names = "gem2_rst";
 		};
 
 		gem3: ethernet@ff0e0000 {
@@ -582,6 +585,7 @@
 			iommus = <&smmu 0x877>;
 			power-domains = <&zynqmp_firmware PD_ETH_3>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM3>;
+			reset-names = "gem3_rst";
 		};
 
 		gpio: gpio@ff0a0000 {
Signature · 1 line
2.36.1
author maintainer
#3 lore raw

PATCH 3/5 arm64: zynqmp: Fix AMS device tree node

In reply to Michal Simek

Aligned node description with the Linux kernel. Node has been added by kernel commit (271c1fa01c2307cf74f4656390d6299991119c3e).

---

---
 arch/arm/dts/zynqmp.dtsi | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
arch/arm/dts/zynqmp.dtsi +9 -7
index e2eb27b3151e..4e1113db1a7e 100644
@@ -938,21 +938,23 @@
 			interrupt-names = "ams-irq";
 			reg = <0x0 0xffa50000 0x0 0x800>;
 			reg-names = "ams-base";
-			#address-cells = <2>;
-			#size-cells = <2>;
+			#address-cells = <1>;
+			#size-cells = <1>;
 			#io-channel-cells = <1>;
-			ranges;
+			ranges = <0 0 0xffa50800 0x800>;
 
-			ams_ps: ams_ps@ffa50800 {
+			ams_ps: ams_ps@0 {
 				compatible = "xlnx,zynqmp-ams-ps";
 				status = "disabled";
-				reg = <0x0 0xffa50800 0x0 0x400>;
+				reg = <0x0 0x400>;
 			};
 
-			ams_pl: ams_pl@ffa50c00 {
+			ams_pl: ams_pl@400 {
 				compatible = "xlnx,zynqmp-ams-pl";
 				status = "disabled";
-				reg = <0x0 0xffa50c00 0x0 0x400>;
+				reg = <0x400 0x400>;
+				#address-cells = <1>;
+				#size-cells = <0>;
 			};
 		};
 
Signature · 1 line
2.36.1
author maintainer
#5 lore raw

PATCH 5/5 arm64: zynqmp: Remove id from usb node name

In reply to Michal Simek

There is no reason to have number in usb node name. This is also sync up patch with upstream kernel.

---

 arch/arm/dts/zynqmp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/zynqmp.dtsi +2 -2
index 4e1113db1a7e..34504a8cbb92 100644
@@ -846,7 +846,7 @@
 			power-domains = <&zynqmp_firmware PD_UART_1>;
 		};
 
-		usb0: usb0@ff9d0000 {
+		usb0: usb@ff9d0000 {
 			#address-cells = <2>;
 			#size-cells = <2>;
 			status = "disabled";
@@ -879,7 +879,7 @@
 			};
 		};
 
-		usb1: usb1@ff9e0000 {
+		usb1: usb@ff9e0000 {
 			#address-cells = <2>;
 			#size-cells = <2>;
 			status = "disabled";
Signature · 1 line
2.36.1
author maintainer
#4 lore raw

PATCH 4/5 arm64: zynqmp: Align gpio-key node names with dtschema

In reply to Michal Simek

The node names should be generic and DT schema expects certain pattern (e.g. with key/button/switch).
It is based on kernel commit (228e8a88b1915a2b467c83d8d0976605f1272fae).

---

---
 arch/arm/dts/zynqmp-sm-k26-revA.dts | 2 +-
 arch/arm/dts/zynqmp-zcu100-revC.dts | 2 +-
 arch/arm/dts/zynqmp-zcu102-revA.dts | 2 +-
 arch/arm/dts/zynqmp-zcu106-revA.dts | 2 +-
 arch/arm/dts/zynqmp-zcu111-revA.dts | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/zynqmp-sm-k26-revA.dts +1 -1
index bae24aabdbd1..aafaaec3f1c4 100644
@@ -53,7 +53,7 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
-		fwuen {
+		key-fwuen {
 			label = "fwuen";
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			linux,code = <BTN_MISC>;
arch/arm/dts/zynqmp-zcu100-revC.dts +1 -1
index 5e7bc7384fce..eea703ab67ea 100644
@@ -49,7 +49,7 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
-		sw4 {
+		switch-4 {
 			label = "sw4";
 			gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_POWER>;
arch/arm/dts/zynqmp-zcu102-revA.dts +1 -1
index 9d8e551ed277..d78bfb8987fc 100644
@@ -47,7 +47,7 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
-		sw19 {
+		switch-19 {
 			label = "sw19";
 			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
 			linux,code = <KEY_DOWN>;
arch/arm/dts/zynqmp-zcu106-revA.dts +1 -1
index 4858b4d1f5e9..266c24e41259 100644
@@ -47,7 +47,7 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
-		sw19 {
+		switch-19 {
 			label = "sw19";
 			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
 			linux,code = <KEY_DOWN>;
arch/arm/dts/zynqmp-zcu111-revA.dts +1 -1
index 2e95f22c3f08..8535cc089132 100644
@@ -47,7 +47,7 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
-		sw19 {
+		switch-19 {
 			label = "sw19";
 			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
 			linux,code = <KEY_DOWN>;
Signature · 1 line
2.36.1
author maintainer
#6 lore raw
In reply to Michal Simek
Quoted 16 lines · Michal Simek

Hi,

I found some differences between kernel and u-boot that's why do small sync up.

Thanks,
Michal

Michal Simek (5):
arm64: zynqmp: Sync #dma-cells property location
arm64: zynqmp: Added GEM reset definitions
arm64: zynqmp: Fix AMS device tree node
arm64: zynqmp: Align gpio-key node names with dtschema
arm64: zynqmp: Remove id from usb node name

Quoted 8 lines
  arch/arm/dts/zynqmp-sm-k26-revA.dts |  2 +-
  arch/arm/dts/zynqmp-zcu100-revC.dts |  2 +-
  arch/arm/dts/zynqmp-zcu102-revA.dts |  2 +-
  arch/arm/dts/zynqmp-zcu106-revA.dts |  2 +-
  arch/arm/dts/zynqmp-zcu111-revA.dts |  2 +-
  arch/arm/dts/zynqmp.dtsi            | 56 ++++++++++++++++-------------
  6 files changed, 36 insertions(+), 30 deletions(-)

Queue for next.

M