All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings
@ 2012-12-04 18:10 Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 1/4] ARM: at91: fix gpios on i2c-gpio for RM9200 DT Joachim Eastwood
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Joachim Eastwood @ 2012-12-04 18:10 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
1.8.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] ARM: at91: fix gpios on i2c-gpio for RM9200 DT
  2012-12-04 18:10 [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
@ 2012-12-04 18:10 ` Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 2/4] ARM: at91: add MMC bindings to " Joachim Eastwood
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2012-12-04 18:10 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/boot/dts/at91rm9200.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index e154f24..222047f 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -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;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ARM: at91: add MMC bindings to RM9200 DT
  2012-12-04 18:10 [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 1/4] ARM: at91: fix gpios on i2c-gpio for RM9200 DT Joachim Eastwood
@ 2012-12-04 18:10 ` Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 3/4] ARM: at91: add SSC " Joachim Eastwood
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2012-12-04 18:10 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/boot/dts/at91rm9200.dtsi | 42 +++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-at91/at91rm9200.c   |  1 +
 2 files changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index 222047f..73edf021 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -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>;
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 6cceb42..ffb339b 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -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),
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ARM: at91: add SSC bindings to RM9200 DT
  2012-12-04 18:10 [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 1/4] ARM: at91: fix gpios on i2c-gpio for RM9200 DT Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 2/4] ARM: at91: add MMC bindings to " Joachim Eastwood
@ 2012-12-04 18:10 ` Joachim Eastwood
  2012-12-04 18:10 ` [PATCH 4/4] ARM: at91: add EMAC " Joachim Eastwood
  2013-01-13 16:05 ` [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
  4 siblings, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2012-12-04 18:10 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/boot/dts/at91rm9200.dtsi | 78 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index 73edf021..6ff27bb 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -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>;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] ARM: at91: add EMAC bindings to RM9200 DT
  2012-12-04 18:10 [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
                   ` (2 preceding siblings ...)
  2012-12-04 18:10 ` [PATCH 3/4] ARM: at91: add SSC " Joachim Eastwood
@ 2012-12-04 18:10 ` Joachim Eastwood
  2013-01-13 16:05 ` [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
  4 siblings, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2012-12-04 18:10 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 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(+)

diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index 6ff27bb..b0268a5 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -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 =
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 8aa4893..e586d85 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -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";
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index ffb339b..41e86e3 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -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),
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings
  2012-12-04 18:10 [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
                   ` (3 preceding siblings ...)
  2012-12-04 18:10 ` [PATCH 4/4] ARM: at91: add EMAC " Joachim Eastwood
@ 2013-01-13 16:05 ` Joachim Eastwood
  4 siblings, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2013-01-13 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On 4 December 2012 19:10, Joachim Eastwood <manabian@gmail.com> wrote:
> 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.

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


> 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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-13 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04 18:10 [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood
2012-12-04 18:10 ` [PATCH 1/4] ARM: at91: fix gpios on i2c-gpio for RM9200 DT Joachim Eastwood
2012-12-04 18:10 ` [PATCH 2/4] ARM: at91: add MMC bindings to " Joachim Eastwood
2012-12-04 18:10 ` [PATCH 3/4] ARM: at91: add SSC " Joachim Eastwood
2012-12-04 18:10 ` [PATCH 4/4] ARM: at91: add EMAC " Joachim Eastwood
2013-01-13 16:05 ` [PATCH 0/4] AT91RM9200 MMC, SSC and EMAC bindings Joachim Eastwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.