Skip to contentSkip to conversation

arm: orion5x: devicetree fixups and additions

PATCH Superseded Alexander Clouter 3 participants 10 messages Mar 23, 2013 – Mar 26, 2013 Device tree bindings

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm: orion5x: devicetree fixups and additions

Fixups and additional DT bindings for orion5x.

Changelog:
v2 - included descriptions to patches
- added 'correct IRQ used in dtsi for mv_cesa' patch

Alexander Clouter (4):
arm: orion5x: fix orion5x.dtsi gpio parameters
arm: orion5x: add ehci bindings to dtsi
arm: orion5x: enable xor for orion5x platform
arm: orion5x: correct IRQ used in dtsi for mv_cesa

 arch/arm/boot/dts/orion5x.dtsi |   40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/4 arm: orion5x: fix orion5x.dtsi gpio parameters

orion5x.dtsi is missing the gpio alias as well as including a typo ('ngpio' instead of 'ngpios') that prevented the orion-gpio driver from loading. This patches resolves this.

---
 arch/arm/boot/dts/orion5x.dtsi |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/boot/dts/orion5x.dtsi +4 -1
index 8aad00f..9bde027 100644
@@ -13,6 +13,9 @@
 	compatible = "marvell,orion5x";
 	interrupt-parent = <&intc>;
 
+	aliases {
+		gpio0 = &gpio0;
+	};
 	intc: interrupt-controller {
 		compatible = "marvell,orion-intc", "marvell,intc";
 		interrupt-controller;
@@ -32,7 +35,7 @@
 			#gpio-cells = <2>;
 			gpio-controller;
 			reg = <0x10100 0x40>;
-			ngpio = <32>;
+			ngpios = <32>;
 			interrupts = <6>, <7>, <8>, <9>;
 		};
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 1/4 arm: orion5x: fix orion5x.dtsi gpio parameters

Quoted 24 lines · Alexander Clouter

orion5x.dtsi is missing the gpio alias as well as including a typo ('ngpio' instead of 'ngpios') that prevented the orion-gpio driver from loading. This patches resolves this.

---
 arch/arm/boot/dts/orion5x.dtsi |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/boot/dts/orion5x.dtsi +3 -0
index 8aad00f..9bde027 100644
@@ -13,6 +13,9 @@
 	compatible = "marvell,orion5x";
 	interrupt-parent = <&intc>;
 
+	aliases {
+		gpio0 = &gpio0;
+	};
 	intc: interrupt-controller {
 		compatible = "marvell,orion-intc", "marvell,intc";
 		interrupt-controller;

arch/arm/boot/dts/orion5x.dtsi line 40

Quoted 7 lines
arch/arm/boot/dts/orion5x.dtsi +1 -1
@@ -32,7 +35,7 @@
 			#gpio-cells = <2>;
 			gpio-controller;
 			reg = <0x10100 0x40>;
-			ngpio = <32>;
+			ngpios = <32>;
 			interrupts = <6>, <7>, <8>, <9>;
 		};

Hi Alex

If you look at Dove, Kirkwood, etc, you see:

                gpio0: gpio at d0400 {
                        compatible = "marvell,orion-gpio";
                        #gpio-cells = <2>;
                        gpio-controller;
                        reg = <0xd0400 0x20>;
                        ngpios = <32>;
                        interrupt-controller;
                        #interrupt-cells = <2>;
                        interrupts = <12>, <13>, <14>, <60>;
                };

I think you also need to add

                        interrupt-controller;
                        #interrupt-cells = <2>;


	Andrew
#3 lore raw

PATCH v2 1/4 arm: orion5x: fix orion5x.dtsi gpio parameters

Hi,

Quoted 13 lines · Andrew Lunn

If you look at Dove, Kirkwood, etc, you see:

               gpio0: gpio at d0400 {
                       compatible = "marvell,orion-gpio";
                       #gpio-cells = <2>;
                       gpio-controller;
                       reg = <0xd0400 0x20>;
                       ngpios = <32>;
                       interrupt-controller;
                       #interrupt-cells = <2>;
                       interrupts = <12>, <13>, <14>, <60>;
               };
Quoted 5 lines

I think you also need to add

                       interrupt-controller;
                       #interrupt-cells = <2>;

Darn, I had noticed this and pondered, then thought to wait for someone brighter to point it out authoritively :)

Wanging out an update to this patch too.

Cheers

Signature · 2 lines
Alexander Clouter
.sigmonster says: I'd like some JUNK FOOD ... and then I want to be ALONE --
#4 lore raw

PATCH v2 2/4 arm: orion5x: add ehci bindings to dtsi

In reply to Alexander Clouter

The orion5x SoC also includes a USB EHCI componment so lets add that to the dtsi (disable by default incase the pins are not broken out).

---
 arch/arm/boot/dts/orion5x.dtsi |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/orion5x.dtsi +14 -0
index 9bde027..e304f11 100644
@@ -72,6 +72,20 @@
 			status = "okay";
 		};
 
+		ehci at 50000 {
+			compatible = "marvell,orion-ehci";
+			reg = <0x50000 0x1000>;
+			interrupts = <17>;
+			status = "disabled";
+		};
+
+		ehci at a0000 {
+			compatible = "marvell,orion-ehci";
+			reg = <0xa0000 0x1000>;
+			interrupts = <12>;
+			status = "disabled";
+		};
+
 		sata at 80000 {
 			compatible = "marvell,orion-sata";
 			reg = <0x80000 0x5000>;
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v2 3/4 arm: orion5x: enable xor for orion5x platform

In reply to Alexander Clouter

The orion5x SoC includes DMA functionality, so lets enable that and turn it on by default.

---
 arch/arm/boot/dts/orion5x.dtsi |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/orion5x.dtsi +19 -0
index e304f11..3944b9b 100644
@@ -103,6 +103,25 @@
 			status = "disabled";
 		};
 
+		xor at 60900 {
+			compatible = "marvell,orion-xor";
+			reg = <0x60900 0x100
+			       0x60b00 0x100>;
+			status = "okay";
+
+			xor00 {
+			      interrupts = <30>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			};
+			xor01 {
+			      interrupts = <31>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			      dmacap,memset;
+			};
+		};
+
 		crypto at 90000 {
 			compatible = "marvell,orion-crypto";
 			reg = <0x90000 0x10000>,
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v2 4/4 arm: orion5x: correct IRQ used in dtsi for mv_cesa

In reply to Alexander Clouter

The crypto functionality hook in the orion5x dtsi uses an IRQ that clashes with the Ethernet controller, so lets move it to use the IRQ that the non-DT code utilises.

---
 arch/arm/boot/dts/orion5x.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/orion5x.dtsi +1 -1
index 3944b9b..f4be4c5 100644
@@ -127,7 +127,7 @@
 			reg = <0x90000 0x10000>,
 			      <0xf2200000 0x800>;
 			reg-names = "regs", "sram";
-			interrupts = <22>;
+			interrupts = <28>;
 			status = "okay";
 		};
 	};
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH v2 4/4 arm: orion5x: correct IRQ used in dtsi for mv_cesa

Quoted 3 lines · Alexander Clouter

The crypto functionality hook in the orion5x dtsi uses an IRQ that clashes with the Ethernet controller, so lets move it to use the IRQ that the non-DT code utilises.

Hi Alex

Move is the wrong word here. The IRQ are hardware assigned, you cannot pick and choose. I would write a comment like:

Fix the IRQ number for crypto, which should be 28, not 22 which is actually Ethernet.

Andrew

Quoted 22 lines
---
 arch/arm/boot/dts/orion5x.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/orion5x.dtsi +1 -1
index 3944b9b..f4be4c5 100644
@@ -127,7 +127,7 @@
 			reg = <0x90000 0x10000>,
 			      <0xf2200000 0x800>;
 			reg-names = "regs", "sram";
-			interrupts = <22>;
+			interrupts = <28>;
 			status = "okay";
 		};
 	};
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH v2 4/4 arm: orion5x: correct IRQ used in dtsi for mv_cesa

Hi,

Quoted 11 lines · Andrew Lunn
Quoted 3 lines · Alexander Clouter

The crypto functionality hook in the orion5x dtsi uses an IRQ that clashes with the Ethernet controller, so lets move it to use the IRQ that the non-DT code utilises.

Move is the wrong word here. The IRQ are hardware assigned, you cannot pick and choose. I would write a comment like:

Fix the IRQ number for crypto, which should be 28, not 22 which is actually Ethernet.

No problem, wanging an updated patch out.

Cheers

Signature · 3 lines
Alexander Clouter
.sigmonster says: BOFH excuse #125:
                   we just switched to Sprint.