Skip to contentSkip to conversation

powerpc/4xx: Add GPIO, SPI and MMC suport to the Arches

PATCH In review Stefan Roese 2 participants 3 messages Oct 31, 2008

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

PATCH 1/1 powerpc/4xx: Add GPIO, SPI and MMC suport to the Arches

This patch adds GPIO, SPI & MMC (for onboard uSD) support to the Arches dts

---
 arch/powerpc/boot/dts/arches.dts |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/arches.dts +32 -0
index d9113b1..c568095 100644
@@ -195,6 +195,38 @@
 				interrupts = <0x3 0x4>;
 			};
 
+			SPI0: spi@ef600900 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				device_type = "spi";
+				compatible = "ibm,spi-460gt", "ibm,ppc4xx-spi";
+				reg = <0xef600900 7>;
+				interrupt-parent = <&UIC1>;
+				interrupts = <2 4>;
+
+				/* gpio(s) representing chip select(s) */
+				gpios = <&GPIO1 11 0>;
+
+				mmc-slot@0 {
+					compatible = "linux,mmc-spi", "mmc-spi";
+					reg = <0>;
+					spi-max-frequency = <10000000>;
+					voltage-range = <3300 3300>;
+				};
+			};
+
+			GPIO0: gpio@ef600b00 {
+				#gpio-cells = <2>;
+				compatible = "ibm,460gt-gpio","ibm,ppc4xx-gpio";
+				reg = <0xef600b00 38>;
+			};
+
+			GPIO1: gpio@ef600c00 {
+				#gpio-cells = <2>;
+				compatible = "ibm,460gt-gpio","ibm,ppc4xx-gpio";
+				reg = <0xef600c00 38>;
+			};
+
 			TAH0: emac-tah@ef601350 {
 				compatible = "ibm,tah-460gt", "ibm,tah";
 				reg = <0xef601350 0x00000030>;
Signature · 1 line
1.6.0.3
#1 lore raw

Hi Stefan,

Quoted 13 lines · Stefan Roese

This patch adds GPIO, SPI & MMC (for onboard uSD) support to the Arches dts

---
 arch/powerpc/boot/dts/arches.dts |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/arches.dts +0 -0
index d9113b1..c568095 100644

arch/powerpc/boot/dts/arches.dts line 201

Quoted 7 lines
arch/powerpc/boot/dts/arches.dts +4 -0
@@ -195,6 +195,38 @@
 				interrupts = <0x3 0x4>;
 			};
 
+			SPI0: spi@ef600900 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				device_type = "spi";

device_type isn't needed.

arch/powerpc/boot/dts/arches.dts line 211

Quoted 10 lines
arch/powerpc/boot/dts/arches.dts +10 -0
+				compatible = "ibm,spi-460gt", "ibm,ppc4xx-spi";
+				reg = <0xef600900 7>;
+				interrupt-parent = <&UIC1>;
+				interrupts = <2 4>;
+
+				/* gpio(s) representing chip select(s) */
+				gpios = <&GPIO1 11 0>;
+
+				mmc-slot@0 {
+					compatible = "linux,mmc-spi", "mmc-spi";

According to new (though still not approved) bindings, this should be "<board-specific>-mmc-slot", "mmc-spi-slot".

arch/powerpc/boot/dts/arches.dts line 214

Quoted 3 lines
arch/powerpc/boot/dts/arches.dts +3 -0
+					reg = <0>;
+					spi-max-frequency = <10000000>;
+					voltage-range = <3300 3300>;

For new bindings I changed this to "voltage-ranges", so that we could specify discontinuous range.

Quoted 20 lines
arch/powerpc/boot/dts/arches.dts +15 -0
+				};
+			};
+
+			GPIO0: gpio@ef600b00 {
+				#gpio-cells = <2>;
+				compatible = "ibm,460gt-gpio","ibm,ppc4xx-gpio";
+				reg = <0xef600b00 38>;
+			};
+
+			GPIO1: gpio@ef600c00 {
+				#gpio-cells = <2>;
+				compatible = "ibm,460gt-gpio","ibm,ppc4xx-gpio";
+				reg = <0xef600c00 38>;
+			};
+
 			TAH0: emac-tah@ef601350 {
 				compatible = "ibm,tah-460gt", "ibm,tah";
 				reg = <0xef601350 0x00000030>;
Signature · 1 line
1.6.0.3
Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#2 lore raw

Hi Anton,

thanks for your comments.

Quoted 8 lines · Anton Vorontsov
Quoted 8 lines
(quoted diff) +0 -0

b/arch/powerpc/boot/dts/arches.dts index d9113b1..c568095 100644

arch/powerpc/boot/dts/arches.dts +0 -0
@@ -195,6 +195,38 @@
 				interrupts = <0x3 0x4>;
 			};
 
Quoted 6 lines

arch/powerpc/boot/dts/arches.dts line 201

Quoted 4 lines
arch/powerpc/boot/dts/arches.dts +4 -0
+			SPI0: spi@ef600900 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				device_type = "spi";

device_type isn't needed.

OK, will remove.

Quoted 5 lines
Quoted 5 lines
arch/powerpc/boot/dts/arches.dts +5 -0
+				compatible = "ibm,spi-460gt", "ibm,ppc4xx-spi";
+				reg = <0xef600900 7>;
+				interrupt-parent = <&UIC1>;
+				interrupts = <2 4>;
+
Quoted 8 lines

arch/powerpc/boot/dts/arches.dts line 211

Quoted 5 lines
arch/powerpc/boot/dts/arches.dts +5 -0
+				/* gpio(s) representing chip select(s) */
+				gpios = <&GPIO1 11 0>;
+
+				mmc-slot@0 {
+					compatible = "linux,mmc-spi", "mmc-spi";

According to new (though still not approved) bindings, this should be "<board-specific>-mmc-slot", "mmc-spi-slot".

So I will wait a while with re-sending until this is "approved".

Quoted 6 lines

arch/powerpc/boot/dts/arches.dts line 214

Quoted 3 lines
arch/powerpc/boot/dts/arches.dts +3 -0
+					reg = <0>;
+					spi-max-frequency = <10000000>;
+					voltage-range = <3300 3300>;

For new bindings I changed this to "voltage-ranges", so that we could specify discontinuous range.

OK, will change in next version.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================