Skip to contentSkip to conversation

ARM: dts: NSP: DT Updates

PATCH In review Jon Mason 3 participants 9 messages Feb 5, 2016 – Feb 12, 2016 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Jon Mason

author
#0 lore raw

cover ARM: dts: NSP: DT Updates

Northstar Plus device tree changes. The first 2 are bug fixes that probably should go in ASAP. The other 3 enable new hardware and can be pushed into the next merge window.

Thanks,
Jon

Jon Mason (5):
ARM: dts: NSP: Fix PCIE DT issue
ARM: dts: NSP: Fix CPU DT issue
ARM: dts: NSP: Add PMU Support to DT
ARM: dts: NSP: Add SP805 Support to DT
ARM: dts: NSP: Add SP804 Support to DT

 arch/arm/boot/dts/bcm-nsp.dtsi | 193 +++++++++++++++++++++++------------------
 1 file changed, 107 insertions(+), 86 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/5 ARM: dts: NSP: Fix PCIE DT issue

Adding the ranges value is preventing the PCI nodes from working. Pulling them out outside makes them work again (and makes it similar to the NS2 device tree).

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 144 ++++++++++++++++++++---------------------
 1 file changed, 72 insertions(+), 72 deletions(-)
arch/arm/boot/dts/bcm-nsp.dtsi +72 -72
index 10bdef5..c5b0c09c 100644
@@ -185,78 +185,6 @@
 			status = "disabled";
 		};
 
-		pcie0: pcie at 12000 {
-			compatible = "brcm,iproc-pcie";
-			reg = <0x12000 0x1000>;
-
-			#interrupt-cells = <1>;
-			interrupt-map-mask = <0 0 0 0>;
-			interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_NONE>;
-
-			linux,pci-domain = <0>;
-
-			bus-range = <0x00 0xff>;
-
-			#address-cells = <3>;
-			#size-cells = <2>;
-			device_type = "pci";
-
-			/* Note: The HW does not support I/O resources.  So,
-			 * only the memory resource range is being specified.
-			 */
-			ranges = <0x82000000 0 0x08000000 0x08000000 0 0x8000000>;
-
-			status = "disabled";
-		};
-
-		pcie1: pcie at 13000 {
-			compatible = "brcm,iproc-pcie";
-			reg = <0x13000 0x1000>;
-
-			#interrupt-cells = <1>;
-			interrupt-map-mask = <0 0 0 0>;
-			interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_NONE>;
-
-			linux,pci-domain = <1>;
-
-			bus-range = <0x00 0xff>;
-
-			#address-cells = <3>;
-			#size-cells = <2>;
-			device_type = "pci";
-
-			/* Note: The HW does not support I/O resources.  So,
-			 * only the memory resource range is being specified.
-			 */
-			ranges = <0x82000000 0 0x40000000 0x40000000 0 0x8000000>;
-
-			status = "disabled";
-		};
-
-		pcie2: pcie at 14000 {
-			compatible = "brcm,iproc-pcie";
-			reg = <0x14000 0x1000>;
-
-			#interrupt-cells = <1>;
-			interrupt-map-mask = <0 0 0 0>;
-			interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_NONE>;
-
-			linux,pci-domain = <2>;
-
-			bus-range = <0x00 0xff>;
-
-			#address-cells = <3>;
-			#size-cells = <2>;
-			device_type = "pci";
-
-			/* Note: The HW does not support I/O resources.  So,
-			 * only the memory resource range is being specified.
-			 */
-			ranges = <0x82000000 0 0x48000000 0x48000000 0 0x8000000>;
-
-			status = "disabled";
-		};
-
 		nand: nand at 26000 {
 			compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
 			reg = <0x026000 0x600>,
@@ -306,4 +234,76 @@
 			      <0x3f408 0x04>;
 		};
 	};
+
+	pcie0: pcie at 18012000 {
+		compatible = "brcm,iproc-pcie";
+		reg = <0x18012000 0x1000>;
+
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_NONE>;
+
+		linux,pci-domain = <0>;
+
+		bus-range = <0x00 0xff>;
+
+		#address-cells = <3>;
+		#size-cells = <2>;
+		device_type = "pci";
+
+		/* Note: The HW does not support I/O resources.  So,
+		 * only the memory resource range is being specified.
+		 */
+		ranges = <0x82000000 0 0x08000000 0x08000000 0 0x8000000>;
+
+		status = "disabled";
+	};
+
+	pcie1: pcie at 18013000 {
+		compatible = "brcm,iproc-pcie";
+		reg = <0x18013000 0x1000>;
+
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_NONE>;
+
+		linux,pci-domain = <1>;
+
+		bus-range = <0x00 0xff>;
+
+		#address-cells = <3>;
+		#size-cells = <2>;
+		device_type = "pci";
+
+		/* Note: The HW does not support I/O resources.  So,
+		 * only the memory resource range is being specified.
+		 */
+		ranges = <0x82000000 0 0x40000000 0x40000000 0 0x8000000>;
+
+		status = "disabled";
+	};
+
+	pcie2: pcie at 18014000 {
+		compatible = "brcm,iproc-pcie";
+		reg = <0x18014000 0x1000>;
+
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_NONE>;
+
+		linux,pci-domain = <2>;
+
+		bus-range = <0x00 0xff>;
+
+		#address-cells = <3>;
+		#size-cells = <2>;
+		device_type = "pci";
+
+		/* Note: The HW does not support I/O resources.  So,
+		 * only the memory resource range is being specified.
+		 */
+		ranges = <0x82000000 0 0x48000000 0x48000000 0 0x8000000>;
+
+		status = "disabled";
+	};
 };
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/5 ARM: dts: NSP: Fix CPU DT issue

In reply to Jon Mason

There is a double definition of the CPUs present in the device tree. Remove unnecessary cpu device tree definition.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 12 ------------
 1 file changed, 12 deletions(-)
arch/arm/boot/dts/bcm-nsp.dtsi +0 -12
index c5b0c09c..c37778e 100644
@@ -68,18 +68,6 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
-		cpus {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			cpu at 0 {
-				device_type = "cpu";
-				compatible = "arm,cortex-a9";
-				next-level-cache = <&L2>;
-				reg = <0x0>;
-			};
-		};
-
 		a9pll: arm_clk at 00000 {
 			#clock-cells = <0>;
 			compatible = "brcm,nsp-armpll";
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/5 ARM: dts: NSP: Add PMU Support to DT

In reply to Jon Mason

Add support for the ARM Performance Monitor Unit to the Northstar Plus device tree.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
arch/arm/boot/dts/bcm-nsp.dtsi +9 -2
index c37778e..415a0a6 100644
@@ -45,14 +45,14 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpu at 0 {
+		cpu0: cpu at 0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			next-level-cache = <&L2>;
 			reg = <0x0>;
 		};
 
-		cpu at 1 {
+		cpu1: cpu at 1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			next-level-cache = <&L2>;
@@ -62,6 +62,13 @@
 		};
 	};
 
+	pmu {
+		compatible = "arm,cortex-a9-pmu";
+		interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>, <&cpu1>;
+	};
+
 	mpcore {
 		compatible = "simple-bus";
 		ranges = <0x00000000 0x19000000 0x00023000>;
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH 4/5 ARM: dts: NSP: Add SP805 Support to DT

In reply to Jon Mason

Add support for the ARM SP805 Watchdog timer to the Northstar Plus device tree.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +8 -0
index 415a0a6..0e8cb6e 100644
@@ -203,6 +203,14 @@
 			clock-frequency = <100000>;
 		};
 
+		wdt at 39000 {
+			compatible = "arm,sp805", "arm,primecell";
+			reg = <0x39000 0x1000>;
+			interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&iprocslow>, <&iprocslow>;
+			clock-names = "wdogclk", "apb_pclk";
+		};
+
 		lcpll0: lcpll0 at 3f100 {
 			#clock-cells = <1>;
 			compatible = "brcm,nsp-lcpll0";
Signature · 1 line
1.9.1
author
#9 lore raw

PATCH 5/5 ARM: dts: NSP: Add SP804 Support to DT

In reply to Jon Mason

Add support for the ARM SP804 timer to the Northstar Plus device tree.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +18 -0
index 0e8cb6e..06a242e 100644
@@ -194,6 +194,24 @@
 			brcm,nand-has-wp;
 		};
 
+		ccbtimer0: timer at 34000 {
+			compatible = "arm,sp804";
+			reg = <0x34000 0x1000>;
+			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&iprocslow>;
+			clock-names = "apb_pclk";
+		};
+
+		ccbtimer1: timer at 35000 {
+			compatible = "arm,sp804";
+			reg = <0x35000 0x1000>;
+			interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&iprocslow>;
+			clock-names = "apb_pclk";
+		};
+
 		i2c0: i2c at 38000 {
 			compatible = "brcm,iproc-i2c";
 			reg = <0x38000 0x50>;
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH 4/5] ARM: dts: NSP: Add SP805 Support to DT

In reply to Jon Mason

Hello.

Quoted 13 lines · Jon Mason

Add support for the ARM SP805 Watchdog timer to the Northstar Plus device tree.

---
  arch/arm/boot/dts/bcm-nsp.dtsi | 8 ++++++++
  1 file changed, 8 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +0 -0
index 415a0a6..0e8cb6e 100644

arch/arm/boot/dts/bcm-nsp.dtsi line 206

Quoted 4 lines
arch/arm/boot/dts/bcm-nsp.dtsi +1 -0
@@ -203,6 +203,14 @@
  			clock-frequency = <100000>;
  		};
 
+		wdt at 39000 {

Should be "watchdog at 39000", according to ePAPR.

[...]

MBR, Sergei

#8 lore raw

Re: [PATCH 4/5] ARM: dts: NSP: Add SP805 Support to DT

In reply to a message not in the archive
Quoted 26 lines · Scott Branden
            Add support for the ARM SP805 Watchdog timer to the Northstar Plus
            device tree.

            Signed-off-by: Jon Mason <[email protected]
            <mailto:[email protected]>>
            ---
               arch/arm/boot/dts/bcm-nsp.dtsi | 8 ++++++++
               1 file changed, 8 insertions(+)

            diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi
            b/arch/arm/boot/dts/bcm-nsp.dtsi
            index 415a0a6..0e8cb6e 100644
            --- a/arch/arm/boot/dts/bcm-nsp.dtsi
            +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
            @@ -203,6 +203,14 @@
                                     clock-frequency = <100000>;
                             };

            +               wdt at 39000 {


            Should be "watchdog at 39000", according to ePAPR.


    Thanks, I'll fix it and send it right out.
Quoted 2 lines

I didn't know ePAPR was a requirement for a linux dtb? We haven't done this with the wtd in other dts files. Is this described somewhere?

Nobody reads the docs. Like this:

http://www.devicetree.org/Device_Tree_Usage

That page refers to the ePAPR 1.0 (not the most recent).

MBR, Sergei

#10 lore raw
In reply to Jon Mason
Quoted 3 lines · Jon Mason

Northstar Plus device tree changes. The first 2 are bug fixes that probably should go in ASAP. The other 3 enable new hardware and can be pushed into the next merge window.

Series applied to devicetree/next, with the update to the last patch based on Sergei's comment, and I took the v2 of patch 4.

Thanks everyone.

Signature · 1 line
Florian