Skip to contentSkip to conversation

arm64: zynqmp: dtsi changes

PATCH In review Michal Simek 3 participants 14 messages Jul 20, 2017 – Aug 3, 2017

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

cover arm64: zynqmp: dtsi changes

Hi,

I have cherry-picked all patches from xilinx soc vendor tree which are ready for submission.
This patchset targets only zynqmp.dtsi which is shared with all zynqmp families.

Thanks,
Michal

Bharat Kumar Gogada (1):
arm64: zynqmp: Adding prefetchable memory space to pcie node

Edgar E. Iglesias (1):
arm64: zynqmp: Correct IRQ nr for the SMMU

Michal Simek (5):
arm64: zynqmp: Add references to cpu nodes
arm64: zynqmp: Add dcc console for zynqmp
arm64: zynqmp: Add CCI-400 node
arm64: zynqmp: Add support for RTC
arm64: zynqmp: Add new uartps compatible string

Naga Sureshkumar Relli (1):
arm64: zynqmp: Set status disabled in dtsi

Shubhrajyoti Datta (1):
arm64: zynqmp: Add operating points

Stefan Krsmanovic (1):
arm64: zynqmp: Add idle state for ZynqMP

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 111 ++++++++++++++++++++++++++++-----
 1 file changed, 94 insertions(+), 17 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/10 arm64: zynqmp: Add references to cpu nodes

Add missing references to all cpu nodes.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +4 -4
index 1a3f5e928bb9..4f7d9905e235 100644
@@ -20,28 +20,28 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu at 0 {
+		cpu0: cpu at 0 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x0>;
 		};
 
-		cpu at 1 {
+		cpu1: cpu at 1 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x1>;
 		};
 
-		cpu at 2 {
+		cpu2: cpu at 2 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x2>;
 		};
 
-		cpu at 3 {
+		cpu3: cpu at 3 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/10 arm64: zynqmp: Add idle state for ZynqMP

In reply to Michal Simek

From: Stefan Krsmanovic <[email protected]>

Added the idle-states node to describe zynqmp idle states. Only cpu-sleep-0 idle state is added in this patch. References to the idle-states node are added in all CPU nodes. Time values: entry/exit latencies and min-residency, needs to be tuned. arm,psci-suspend-param is selected to comply with PSCIv1.0 and Extended StateID format.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +17 -0
index 4f7d9905e235..8e6cf0cf3a69 100644
@@ -25,6 +25,7 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x0>;
+			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
 
 		cpu1: cpu at 1 {
@@ -32,6 +33,7 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x1>;
+			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
 
 		cpu2: cpu at 2 {
@@ -39,6 +41,7 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x2>;
+			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
 
 		cpu3: cpu at 3 {
@@ -46,6 +49,20 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x3>;
+			cpu-idle-states = <&CPU_SLEEP_0>;
+		};
+
+		idle-states {
+			entry-method = "arm,psci";
+
+			CPU_SLEEP_0: cpu-sleep-0 {
+				compatible = "arm,idle-state";
+				arm,psci-suspend-param = <0x40000000>;
+				local-timer-stop;
+				entry-latency-us = <300>;
+				exit-latency-us = <600>;
+				min-residency-us = <10000>;
+			};
 		};
 	};
 
Signature · 1 line
1.9.1
#4 lore raw

PATCH 3/10 arm64: zynqmp: Add operating points

In reply to Michal Simek

From: Shubhrajyoti Datta <[email protected]>

Adding operating-points-v2 for zynqmp.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +29 -0
index 8e6cf0cf3a69..50636e098724 100644
@@ -24,6 +24,7 @@
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
+			operating-points-v2 = <&cpu_opp_table>;
 			reg = <0x0>;
 			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
@@ -33,6 +34,7 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x1>;
+			operating-points-v2 = <&cpu_opp_table>;
 			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
 
@@ -41,6 +43,7 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x2>;
+			operating-points-v2 = <&cpu_opp_table>;
 			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
 
@@ -49,6 +52,7 @@
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x3>;
+			operating-points-v2 = <&cpu_opp_table>;
 			cpu-idle-states = <&CPU_SLEEP_0>;
 		};
 
@@ -66,6 +70,31 @@
 		};
 	};
 
+	cpu_opp_table: cpu_opp_table {
+		compatible = "operating-points-v2";
+		opp-shared;
+		opp00 {
+			opp-hz = /bits/ 64 <1199999988>;
+			opp-microvolt = <1000000>;
+			clock-latency-ns = <500000>;
+		};
+		opp01 {
+			opp-hz = /bits/ 64 <599999994>;
+			opp-microvolt = <1000000>;
+			clock-latency-ns = <500000>;
+		};
+		opp02 {
+			opp-hz = /bits/ 64 <399999996>;
+			opp-microvolt = <1000000>;
+			clock-latency-ns = <500000>;
+		};
+		opp03 {
+			opp-hz = /bits/ 64 <299999997>;
+			opp-microvolt = <1000000>;
+			clock-latency-ns = <500000>;
+		};
+	};
+
 	pmu {
 		compatible = "arm,armv8-pmuv3";
 		interrupt-parent = <&gic>;
Signature · 1 line
1.9.1
#5 lore raw

PATCH 4/10 arm64: zynqmp: Add dcc console for zynqmp

In reply to Michal Simek

Add debug console to dtsi to be able to enable it in
board dts file.
Keep in your mind that every core has separate dcc port in case you want to run SMP kernel.
DCC is very helpful communication channel for debugging.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +5 -0
index 50636e098724..3657fdbdb552 100644
@@ -95,6 +95,11 @@
 		};
 	};
 
+	dcc: dcc {
+		compatible = "arm,dcc";
+		status = "disabled";
+	};
+
 	pmu {
 		compatible = "arm,armv8-pmuv3";
 		interrupt-parent = <&gic>;
Signature · 1 line
1.9.1
#6 lore raw

PATCH 5/10 arm64: zynqmp: Add CCI-400 node

In reply to Michal Simek

Add CCI-400 node to DTSI.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +19 -0
index 3657fdbdb552..f3968737e613 100644
@@ -170,6 +170,25 @@
 			rx-fifo-depth = <0x40>;
 		};
 
+		cci: cci at fd6e0000 {
+			compatible = "arm,cci-400";
+			reg = <0x0 0xfd6e0000 0x0 0x9000>;
+			ranges = <0x0 0x0 0xfd6e0000 0x10000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			pmu at 9000 {
+				compatible = "arm,cci-400-pmu,r1";
+				reg = <0x9000 0x5000>;
+				interrupt-parent = <&gic>;
+				interrupts = <0 123 4>,
+					     <0 123 4>,
+					     <0 123 4>,
+					     <0 123 4>,
+					     <0 123 4>;
+			};
+		};
+
 		gem0: ethernet at ff0b0000 {
 			compatible = "cdns,gem";
 			status = "disabled";
Signature · 1 line
1.9.1
#7 lore raw

PATCH 6/10 arm64: zynqmp: Adding prefetchable memory space to pcie node

In reply to Michal Simek

From: Bharat Kumar Gogada <[email protected]>

Adding prefetchable memory space to pcie device tree node. Shifting configuration space to 64-bit address space. Removing pcie device tree node from amba as it requires size-cells=<2> in order to access 64-bit address space.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -6
index f3968737e613..e7d1815c114b 100644
@@ -285,12 +285,8 @@
 			      <0x0 0xfd480000 0x0 0x1000>,
 			      <0x80 0x00000000 0x0 0x1000000>;
 			reg-names = "breg", "pcireg", "cfg";
-			ranges = <0x02000000 0x00000000 0xe0000000 0x00000000
-				  0xe0000000 0x00000000 0x10000000
-				  /* non-prefetchable memory */
-				  0x43000000 0x00000006 0x00000000 0x00000006
-				  0x00000000 0x00000002 0x00000000>;
-				  /* prefetchable memory */
+			ranges = <0x02000000 0x00000000 0xe0000000 0x00000000 0xe0000000 0x00000000 0x10000000	/* non-prefetchable memory */
+				  0x43000000 0x00000006 0x00000000 0x00000006 0x00000000 0x00000002 0x00000000>;/* prefetchable memory */
 			bus-range = <0x00 0xff>;
 			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 			interrupt-map = <0x0 0x0 0x0 0x1 &pcie_intc 0x1>,
Signature · 1 line
1.9.1
#8 lore raw

PATCH 7/10 arm64: zynqmp: Add support for RTC

In reply to Michal Simek

Add support for RTC.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +10 -0
index e7d1815c114b..1272fa6d4f99 100644
@@ -300,6 +300,16 @@
 			};
 		};
 
+		rtc: rtc at ffa60000 {
+			compatible = "xlnx,zynqmp-rtc";
+			status = "disabled";
+			reg = <0x0 0xffa60000 0x0 0x100>;
+			interrupt-parent = <&gic>;
+			interrupts = <0 26 4>, <0 27 4>;
+			interrupt-names = "alarm", "sec";
+			calibration = <0x8000>;
+		};
+
 		sata: ahci at fd0c0000 {
 			compatible = "ceva,ahci-1v84";
 			status = "disabled";
Signature · 1 line
1.9.1
#9 lore raw

PATCH 8/10 arm64: zynqmp: Correct IRQ nr for the SMMU

In reply to Michal Simek

From: "Edgar E. Iglesias" <[email protected]>

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +5 -5
index 1272fa6d4f99..4adf5285f56d 100644
@@ -341,11 +341,11 @@
 			reg = <0x0 0xfd800000 0x0 0x20000>;
 			#global-interrupts = <1>;
 			interrupt-parent = <&gic>;
-			interrupts = <0 157 4>,
-				<0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>,
-				<0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>,
-				<0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>,
-				<0 157 4>, <0 157 4>, <0 157 4>, <0 157 4>;
+			interrupts = <0 155 4>,
+				<0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
+				<0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
+				<0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
+				<0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>;
 		};
 
 		spi0: spi at ff040000 {
Signature · 1 line
1.9.1
#10 lore raw

PATCH 9/10 arm64: zynqmp: Add new uartps compatible string

In reply to Michal Simek

Mainline kernel has r1p12 compatible string now. Use this new compatible string and also append generic compatible string.
Keep in your mind that using this generic compatible string not all uart features will be available.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
index 4adf5285f56d..9304249a23ed 100644
@@ -407,7 +407,7 @@
 		};
 
 		uart0: serial at ff000000 {
-			compatible = "cdns,uart-r1p8";
+			compatible = "cdns,uart-r1p12", "xlnx,xuartps";
 			status = "disabled";
 			interrupt-parent = <&gic>;
 			interrupts = <0 21 4>;
@@ -416,7 +416,7 @@
 		};
 
 		uart1: serial at ff010000 {
-			compatible = "cdns,uart-r1p8";
+			compatible = "cdns,uart-r1p12", "xlnx,xuartps";
 			status = "disabled";
 			interrupt-parent = <&gic>;
 			interrupts = <0 22 4>;
Signature · 1 line
1.9.1
#12 lore raw

PATCH 10/10 arm64: zynqmp: Set status disabled in dtsi

In reply to Michal Simek

From: Naga Sureshkumar Relli <[email protected]>

Do not enable smmu via dtsi. Enable it in board file when needed.

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +1 -0
index 9304249a23ed..787463796348 100644
@@ -339,6 +339,7 @@
 		smmu: smmu at fd800000 {
 			compatible = "arm,mmu-500";
 			reg = <0x0 0xfd800000 0x0 0x20000>;
+			status = "disabled";
 			#global-interrupts = <1>;
 			interrupt-parent = <&gic>;
 			interrupts = <0 155 4>,
Signature · 1 line
1.9.1
Reviewed-by on v1 1/10
#2 lore raw

Re: [PATCH 01/10] arm64: zynqmp: Add references to cpu nodes

In reply to Michal Simek
Quoted 3 lines · Michal Simek

Add missing references to all cpu nodes.

Quoted 45 lines

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +4 -4
index 1a3f5e928bb9..4f7d9905e235 100644
@@ -20,28 +20,28 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu at 0 {
+		cpu0: cpu at 0 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x0>;
 		};
 
-		cpu at 1 {
+		cpu1: cpu at 1 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x1>;
 		};
 
-		cpu at 2 {
+		cpu2: cpu at 2 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
 			reg = <0x2>;
 		};
 
-		cpu at 3 {
+		cpu3: cpu at 3 {
 			compatible = "arm,cortex-a53", "arm,armv8";
 			device_type = "cpu";
 			enable-method = "psci";
Signature · 1 line
1.9.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170725/16e6bc08/attachment.sig>

Reviewed-by on v1 9/10
#11 lore raw

Re: [PATCH 09/10] arm64: zynqmp: Add new uartps compatible string

In reply to Michal Simek
Quoted 6 lines · Michal Simek

Mainline kernel has r1p12 compatible string now. Use this new compatible string and also append generic compatible string.
Keep in your mind that using this generic compatible string not all uart features will be available.

Quoted 30 lines

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
index 4adf5285f56d..9304249a23ed 100644
@@ -407,7 +407,7 @@
 		};
 
 		uart0: serial at ff000000 {
-			compatible = "cdns,uart-r1p8";
+			compatible = "cdns,uart-r1p12", "xlnx,xuartps";
 			status = "disabled";
 			interrupt-parent = <&gic>;
 			interrupts = <0 21 4>;
@@ -416,7 +416,7 @@
 		};
 
 		uart1: serial at ff010000 {
-			compatible = "cdns,uart-r1p8";
+			compatible = "cdns,uart-r1p12", "xlnx,xuartps";
 			status = "disabled";
 			interrupt-parent = <&gic>;
 			interrupts = <0 22 4>;
Signature · 1 line
1.9.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170725/57e69434/attachment.sig>

#13 lore raw
In reply to Michal Simek

Hi,

2017-07-20 14:16 GMT+02:00 Michal Simek <[email protected]>:

Quoted 30 lines

Hi,

I have cherry-picked all patches from xilinx soc vendor tree which are ready for submission.
This patchset targets only zynqmp.dtsi which is shared with all zynqmp families.

Thanks,
Michal

Bharat Kumar Gogada (1):
arm64: zynqmp: Adding prefetchable memory space to pcie node

Edgar E. Iglesias (1):
arm64: zynqmp: Correct IRQ nr for the SMMU

Michal Simek (5):
arm64: zynqmp: Add references to cpu nodes
arm64: zynqmp: Add dcc console for zynqmp
arm64: zynqmp: Add CCI-400 node
arm64: zynqmp: Add support for RTC
arm64: zynqmp: Add new uartps compatible string

Naga Sureshkumar Relli (1):
arm64: zynqmp: Set status disabled in dtsi

Shubhrajyoti Datta (1):
arm64: zynqmp: Add operating points

Quoted 9 lines

Stefan Krsmanovic (1):
arm64: zynqmp: Add idle state for ZynqMP

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 111
++++++++++++++++++++++++++++-----
 1 file changed, 94 insertions(+), 17 deletions(-)

Applied all.

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform