Skip to contentSkip to conversation

AT91RM9200 MMC, SSC and EMAC bindings

PATCH New Joachim Eastwood 1 participant 6 messages Dec 4, 2012 – Jan 13, 2013

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

cover AT91RM9200 MMC, SSC and EMAC bindings

These patches create bindings for MMC, SSC and EMAC in the AT91RM9200 devicetree. Patches are based on the pinctrl tree (at91 branch) since that's where the rest of the RM9200 devicetree patches is located.

Patch 1 is a short fix for the RM9200 pins. Forgot to change the pins when I copied the bindings from another SoC.

Patch 2 creates bindings for MMC on RM9200. I have not been able to test the bindings since my board doesn't have MMC.

Patch 3 creates SSC bindings. Clock additions are also needed but these will coming through the ASoC tree. SSC bindings seem to work. I haven't been able to test actual audio though.

Patch 4 creates EMAC bindings. These are tested and are working.

I also have bindings for I2c and SPI on RM9200. I'll send patches when Atmel SPI support hits next.

Joachim Eastwood (4):
ARM: at91: fix gpios on i2c-gpio for RM9200 DT
ARM: at91: add MMC bindings to RM9200 DT
ARM: at91: add SSC bindings to RM9200 DT
ARM: at91: add EMAC bindings to RM9200 DT

 arch/arm/boot/dts/at91rm9200.dtsi  | 162 ++++++++++++++++++++++++++++++++++++-
 arch/arm/boot/dts/at91rm9200ek.dts |   5 ++
 arch/arm/mach-at91/at91rm9200.c    |   2 +
 3 files changed, 167 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/4 ARM: at91: fix gpios on i2c-gpio for RM9200 DT

---
 arch/arm/boot/dts/at91rm9200.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91rm9200.dtsi +2 -2
index e154f24..222047f 100644
@@ -336,8 +336,8 @@
 
 	i2c at 0 {
 		compatible = "i2c-gpio";
-		gpios = <&pioA 23 0 /* sda */
-			 &pioA 24 0 /* scl */
+		gpios = <&pioA 25 0 /* sda */
+			 &pioA 26 0 /* scl */
 			>;
 		i2c-gpio,sda-open-drain;
 		i2c-gpio,scl-open-drain;
Signature · 1 line
1.8.0
#2 lore raw

PATCH 2/4 ARM: at91: add MMC bindings to RM9200 DT

In reply to Joachim Eastwood
---
 arch/arm/boot/dts/at91rm9200.dtsi | 42 +++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-at91/at91rm9200.c   |  1 +
 2 files changed, 43 insertions(+)
arch/arm/boot/dts/at91rm9200.dtsi +42 -0
index 222047f..73edf021 100644
@@ -88,6 +88,15 @@
 				interrupts = <20 4 0 21 4 0 22 4 0>;
 			};
 
+			mmc0: mmc at fffb4000 {
+				compatible = "atmel,hsmci";
+				reg = <0xfffb4000 0x4000>;
+				interrupts = <10 4 0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				status = "disabled";
+			};
+
 			pinctrl at fffff400 {
 				#address-cells = <1>;
 				#size-cells = <1>;
@@ -207,6 +216,39 @@
 					};
 				};
 
+				mmc0 {
+					pinctrl_mmc0_clk: mmc0_clk-0 {
+						atmel,pins =
+							<0 27 0x1 0x0>;	/* PA27 periph A */
+					};
+
+					pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
+						atmel,pins =
+							<0 28 0x1 0x1	/* PA28 periph A with pullup */
+							 0 29 0x1 0x1>;	/* PA29 periph A with pullup */
+					};
+
+					pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+						atmel,pins =
+							<1 3 0x2 0x1	/* PB3 periph B with pullup */
+							 1 4 0x2 0x1	/* PB4 periph B with pullup */
+							 1 5 0x2 0x1>;	/* PB5 periph B with pullup */
+					};
+
+					pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
+						atmel,pins =
+							<0 8 0x2 0x1	/* PA8 periph B with pullup */
+							 0 9 0x2 0x1>;	/* PA9 periph B with pullup */
+					};
+
+					pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
+						atmel,pins =
+							<0 10 0x2 0x1	/* PA10 periph B with pullup */
+							 0 11 0x2 0x1	/* PA11 periph B with pullup */
+							 0 12 0x2 0x1>;	/* PA12 periph B with pullup */
+					};
+				};
+
 				pioA: gpio at fffff400 {
 					compatible = "atmel,at91rm9200-gpio";
 					reg = <0xfffff400 0x200>;
arch/arm/mach-at91/at91rm9200.c +1 -0
index 6cceb42..ffb339b 100644
@@ -207,6 +207,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("t0_clk", "fffa4000.timer", &tc3_clk),
 	CLKDEV_CON_DEV_ID("t1_clk", "fffa4000.timer", &tc4_clk),
 	CLKDEV_CON_DEV_ID("t2_clk", "fffa4000.timer", &tc5_clk),
+	CLKDEV_CON_DEV_ID("mci_clk", "fffb4000.mmc", &mmc_clk),
 	CLKDEV_CON_DEV_ID("hclk", "300000.ohci", &ohci_clk),
 	CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
 	CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
Signature · 1 line
1.8.0
#3 lore raw

PATCH 3/4 ARM: at91: add SSC bindings to RM9200 DT

In reply to Joachim Eastwood
---
 arch/arm/boot/dts/at91rm9200.dtsi | 78 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
arch/arm/boot/dts/at91rm9200.dtsi +78 -0
index 73edf021..6ff27bb 100644
@@ -29,6 +29,9 @@
 		gpio3 = &pioD;
 		tcb0 = &tcb0;
 		tcb1 = &tcb1;
+		ssc0 = &ssc0;
+		ssc1 = &ssc1;
+		ssc2 = &ssc2;
 	};
 	cpus {
 		cpu at 0 {
@@ -97,6 +100,33 @@
 				status = "disabled";
 			};
 
+			ssc0: ssc at fffd0000 {
+				compatible = "atmel,at91rm9200-ssc";
+				reg = <0xfffd0000 0x4000>;
+				interrupts = <14 4 5>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+				status = "disable";
+			};
+
+			ssc1: ssc at fffd4000 {
+				compatible = "atmel,at91rm9200-ssc";
+				reg = <0xfffd4000 0x4000>;
+				interrupts = <15 4 5>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+				status = "disable";
+			};
+
+			ssc2: ssc at fffd8000 {
+				compatible = "atmel,at91rm9200-ssc";
+				reg = <0xfffd8000 0x4000>;
+				interrupts = <16 4 5>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>;
+				status = "disable";
+			};
+
 			pinctrl at fffff400 {
 				#address-cells = <1>;
 				#size-cells = <1>;
@@ -249,6 +279,54 @@
 					};
 				};
 
+				ssc0 {
+					pinctrl_ssc0_tx: ssc0_tx-0 {
+						atmel,pins =
+							<1 0 0x1 0x0	/* PB0 periph A */
+							 1 1 0x1 0x0	/* PB1 periph A */
+							 1 2 0x1 0x0>;	/* PB2 periph A */
+					};
+
+					pinctrl_ssc0_rx: ssc0_rx-0 {
+						atmel,pins =
+							<1 3 0x1 0x0	/* PB3 periph A */
+							 1 4 0x1 0x0	/* PB4 periph A */
+							 1 5 0x1 0x0>;	/* PB5 periph A */
+					};
+				};
+
+				ssc1 {
+					pinctrl_ssc1_tx: ssc1_tx-0 {
+						atmel,pins =
+							<1 6 0x1 0x0	/* PB6 periph A */
+							 1 7 0x1 0x0	/* PB7 periph A */
+							 1 8 0x1 0x0>;	/* PB8 periph A */
+					};
+
+					pinctrl_ssc1_rx: ssc1_rx-0 {
+						atmel,pins =
+							<1 9 0x1 0x0	/* PB9 periph A */
+							 1 10 0x1 0x0	/* PB10 periph A */
+							 1 11 0x1 0x0>;	/* PB11 periph A */
+					};
+				};
+
+				ssc2 {
+					pinctrl_ssc2_tx: ssc2_tx-0 {
+						atmel,pins =
+							<1 12 0x1 0x0	/* PB12 periph A */
+							 1 13 0x1 0x0	/* PB13 periph A */
+							 1 14 0x1 0x0>;	/* PB14 periph A */
+					};
+
+					pinctrl_ssc2_rx: ssc2_rx-0 {
+						atmel,pins =
+							<1 15 0x1 0x0	/* PB15 periph A */
+							 1 16 0x1 0x0	/* PB16 periph A */
+							 1 17 0x1 0x0>;	/* PB17 periph A */
+					};
+				};
+
 				pioA: gpio at fffff400 {
 					compatible = "atmel,at91rm9200-gpio";
 					reg = <0xfffff400 0x200>;
Signature · 1 line
1.8.0
#4 lore raw

PATCH 4/4 ARM: at91: add EMAC bindings to RM9200 DT

In reply to Joachim Eastwood
---
 arch/arm/boot/dts/at91rm9200.dtsi  | 38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/at91rm9200ek.dts |  5 +++++
 arch/arm/mach-at91/at91rm9200.c    |  1 +
 3 files changed, 44 insertions(+)
arch/arm/boot/dts/at91rm9200.dtsi +38 -0
index 6ff27bb..b0268a5 100644
@@ -127,6 +127,16 @@
 				status = "disable";
 			};
 
+			macb0: ethernet at fffbc000 {
+				compatible = "cdns,at91rm9200-emac", "cdns,emac";
+				reg = <0xfffbc000 0x4000>;
+				interrupts = <24 4 3>;
+				phy-mode = "rmii";
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_macb_rmii>;
+				status = "disabled";
+			};
+
 			pinctrl at fffff400 {
 				#address-cells = <1>;
 				#size-cells = <1>;
@@ -246,6 +256,34 @@
 					};
 				};
 
+				macb {
+					pinctrl_macb_rmii: macb_rmii-0 {
+						atmel,pins =
+							<0 7 0x1 0x0	/* PA7 periph A */
+							 0 8 0x1 0x0	/* PA8 periph A */
+							 0 9 0x1 0x0	/* PA9 periph A */
+							 0 10 0x1 0x0	/* PA10 periph A */
+							 0 11 0x1 0x0	/* PA11 periph A */
+							 0 12 0x1 0x0	/* PA12 periph A */
+							 0 13 0x1 0x0	/* PA13 periph A */
+							 0 14 0x1 0x0	/* PA14 periph A */
+							 0 15 0x1 0x0	/* PA15 periph A */
+							 0 16 0x1 0x0>;	/* PA16 periph A */
+					};
+
+					pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
+						atmel,pins =
+							<1 12 0x2 0x0	/* PB12 periph B */
+							 1 13 0x2 0x0	/* PB13 periph B */
+							 1 14 0x2 0x0	/* PB14 periph B */
+							 1 15 0x2 0x0	/* PB15 periph B */
+							 1 16 0x2 0x0	/* PB16 periph B */
+							 1 17 0x2 0x0	/* PB17 periph B */
+							 1 18 0x2 0x0	/* PB18 periph B */
+							 1 19 0x2 0x0>;	/* PB19 periph B */
+					};
+				};
+
 				mmc0 {
 					pinctrl_mmc0_clk: mmc0_clk-0 {
 						atmel,pins =
arch/arm/boot/dts/at91rm9200ek.dts +5 -0
index 8aa4893..e586d85 100644
@@ -44,6 +44,11 @@
 				status = "okay";
 			};
 
+			macb0: ethernet at fffbc000 {
+				phy-mode = "rmii";
+				status = "okay";
+			};
+
 			usb1: gadget at fffb0000 {
 				atmel,vbus-gpio = <&pioD 4 0>;
 				status = "okay";
arch/arm/mach-at91/at91rm9200.c +1 -0
index ffb339b..41e86e3 100644
@@ -208,6 +208,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("t1_clk", "fffa4000.timer", &tc4_clk),
 	CLKDEV_CON_DEV_ID("t2_clk", "fffa4000.timer", &tc5_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "fffb4000.mmc", &mmc_clk),
+	CLKDEV_CON_DEV_ID("emac_clk", "fffbc000.ethernet", &ether_clk),
 	CLKDEV_CON_DEV_ID("hclk", "300000.ohci", &ohci_clk),
 	CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
 	CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
Signature · 1 line
1.8.0
#5 lore raw

cover AT91RM9200 MMC, SSC and EMAC bindings

In reply to Joachim Eastwood
Quoted 4 lines · Joachim Eastwood

These patches create bindings for MMC, SSC and EMAC in the AT91RM9200 devicetree. Patches are based on the pinctrl tree (at91 branch) since that's where the rest of the RM9200 devicetree patches is located.

Patch 1 is a short fix for the RM9200 pins. Forgot to change the pins when I copied the bindings from another SoC.

Quoted 8 lines

Patch 2 creates bindings for MMC on RM9200. I have not been able to test the bindings since my board doesn't have MMC.

Patch 3 creates SSC bindings. Clock additions are also needed but these will coming through the ASoC tree. SSC bindings seem to work. I haven't been able to test actual audio though.

Patch 4 creates EMAC bindings. These are tested and are working.

I also have bindings for I2c and SPI on RM9200. I'll send patches when Atmel SPI support hits next.

Ping?

Are there any comments on any of the patches in the series?

Is there any specific tree AT91 patches should be based on now? The at91 tree on github seems a bit out dated and during the last merge window at91 stuff went via the pinctrl tree.

I have DT patches for my custom RM9200 board but they are a bit useless without a more complete at91rm9200.dtsi.

regards
Joachim Eastwood

Quoted 14 lines

Joachim Eastwood (4):
ARM: at91: fix gpios on i2c-gpio for RM9200 DT
ARM: at91: add MMC bindings to RM9200 DT
ARM: at91: add SSC bindings to RM9200 DT
ARM: at91: add EMAC bindings to RM9200 DT

 arch/arm/boot/dts/at91rm9200.dtsi  | 162 ++++++++++++++++++++++++++++++++++++-
 arch/arm/boot/dts/at91rm9200ek.dts |   5 ++
 arch/arm/mach-at91/at91rm9200.c    |   2 +
 3 files changed, 167 insertions(+), 2 deletions(-)

--
1.8.0