[PATCH 0/9] ARM: at91/dt: add missing devices to rm9200ek board

STALE4630d

30 messages, 4 authors, 2013-11-26 · open the first message on its own page

[PATCH 0/9] ARM: at91/dt: add missing devices to rm9200ek board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:13:12

Hello,

This patch series adds support for the remaining devices (or device options)
not yet supported in dt.

AFAICT there is no more infos/devices not converted to dt for this board,
and we should be able to remove board-at91rm9200ek.c (when we decide to
do it).

This series was not tested (the dt compilation passed), could someone
owning this board test it ?

In order to test it, you need to apply these series first:
https://lkml.org/lkml/2013/8/27/58
pinctrl: at91: add support for OUTPUT config

Best Regards,

Boris

Boris BREZILLON (9):
  ARM: at91/dt: rm9200: add spi0 chip select pins definitions
  ARM: at91/dt: add ethernet phy to at91rm9200ek board
  ARM: at91/dt: add usb1 vbus and pullup pins
  ARM: at91/dt: add atmel,pullup-gpio to at91rm9200ek usb1 definition
  ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board
  ARM: at91/dt: add spi0 support to at91rm9200ek board
  ARM: at91/dt: add i2c devices connected to at91rm9200ek board
  ARM: at91/dt: add new at91rm9200ek_mmc board
  ARM: at91/dt: add new at91rm9200ek_dataflash board

 arch/arm/boot/dts/at91rm9200.dtsi            |   20 ++++++
 arch/arm/boot/dts/at91rm9200ek.dts           |   88 ++++++++++++++++++++++++++
 arch/arm/boot/dts/at91rm9200ek_dataflash.dts |   33 ++++++++++
 arch/arm/boot/dts/at91rm9200ek_mmc.dts       |   23 +++++++
 4 files changed, 164 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91rm9200ek_dataflash.dts
 create mode 100644 arch/arm/boot/dts/at91rm9200ek_mmc.dts

-- 
1.7.9.5

[PATCH 1/9] ARM: at91/dt: add rm9200 spi0 chip select pins definitions

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:03:10

Add spi0 cs pinctrl pins definitions.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200.dtsi |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index f770655..69b76c7 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -486,6 +486,26 @@
 							 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA1 periph A SPI0_MOSI pin */
 							 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA2 periph A SPI0_SPCK pin */
 					};
+
+					pinctrl_spi0_cs0: spi0_cs0-0 {
+						atmel,pins =
+							<AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA3 periph A SPI0_NPCS0 pin */
+					};
+
+					pinctrl_spi0_cs1: spi0_cs1-0 {
+						atmel,pins =
+							<AT91_PIOA 4 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA4 GPIO SPI0_NPCS1 pin */
+					};
+
+					pinctrl_spi0_cs2: spi0_cs2-0 {
+						atmel,pins =
+							<AT91_PIOA 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA5 GPIO SPI0_NPCS2 pin */
+					};
+
+					pinctrl_spi0_cs3: spi0_cs3-0 {
+						atmel,pins =
+							<AT91_PIOA 6 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA6 GPIO SPI0_NPCS3 pin */
+					};
 				};
 
 				pioA: gpio at fffff400 {
-- 
1.7.9.5

Re: [PATCH 1/9] ARM: at91/dt: add rm9200 spi0 chip select pins definitions

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 15:04:39

On 13:02 Wed 28 Aug     , Boris BREZILLON wrote:
quoted hunk
Add spi0 cs pinctrl pins definitions.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200.dtsi |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index f770655..69b76c7 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -486,6 +486,26 @@
 							 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA1 periph A SPI0_MOSI pin */
 							 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA2 periph A SPI0_SPCK pin */
 					};
+
+					pinctrl_spi0_cs0: spi0_cs0-0 {
+						atmel,pins =
+							<AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA3 periph A SPI0_NPCS0 pin */
+					};
+
+					pinctrl_spi0_cs1: spi0_cs1-0 {
+						atmel,pins =
+							<AT91_PIOA 4 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA4 GPIO SPI0_NPCS1 pin */
+					};
+
+					pinctrl_spi0_cs2: spi0_cs2-0 {
+						atmel,pins =
+							<AT91_PIOA 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA5 GPIO SPI0_NPCS2 pin */
+					};
+
+					pinctrl_spi0_cs3: spi0_cs3-0 {
+						atmel,pins =
+							<AT91_PIOA 6 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA6 GPIO SPI0_NPCS3 pin */
+					};
nack the pin are not multidrive there is only one master

Best Regards,
J.
 				};
 
 				pioA: gpio at fffff400 {
-- 
1.7.9.5

Re: [PATCH 1/9] ARM: at91/dt: add rm9200 spi0 chip select pins definitions

From: boris brezillon <hidden>
Date: 2013-11-20 16:00:26

On 20/11/2013 15:56, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 13:02 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add spi0 cs pinctrl pins definitions.

Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200.dtsi |   20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index f770655..69b76c7 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -486,6 +486,26 @@
  							 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA1 periph A SPI0_MOSI pin */
  							 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA2 periph A SPI0_SPCK pin */
  					};
+
+					pinctrl_spi0_cs0: spi0_cs0-0 {
+						atmel,pins =
+							<AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA3 periph A SPI0_NPCS0 pin */
+					};
+
+					pinctrl_spi0_cs1: spi0_cs1-0 {
+						atmel,pins =
+							<AT91_PIOA 4 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA4 GPIO SPI0_NPCS1 pin */
+					};
+
+					pinctrl_spi0_cs2: spi0_cs2-0 {
+						atmel,pins =
+							<AT91_PIOA 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA5 GPIO SPI0_NPCS2 pin */
+					};
+
+					pinctrl_spi0_cs3: spi0_cs3-0 {
+						atmel,pins =
+							<AT91_PIOA 6 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;	/* PA6 GPIO SPI0_NPCS3 pin */
+					};
nack the pin are not multidrive there is only one master
Right, this is a mistake.

But the pins should be configured as OUTPUT with HIGH level
(see 
http://lxr.free-electrons.com/source/arch/arm/mach-at91/at91rm9200_devices.c#L589).
Best Regards,
J.
quoted
  				};
  
  				pioA: gpio at fffff400 {
-- 
1.7.9.5

Re: [PATCH 1/9] ARM: at91/dt: add rm9200 spi0 chip select pins definitions

From: boris brezillon <hidden>
Date: 2013-11-20 17:14:40

On 20/11/2013 16:59, boris brezillon wrote:
On 20/11/2013 15:56, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 13:02 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add spi0 cs pinctrl pins definitions.

Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200.dtsi |   20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi
b/arch/arm/boot/dts/at91rm9200.dtsi
index f770655..69b76c7 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -486,6 +486,26 @@
                               AT91_PIOA 1 AT91_PERIPH_A
AT91_PINCTRL_NONE    /* PA1 periph A SPI0_MOSI pin */
                               AT91_PIOA 2 AT91_PERIPH_A
AT91_PINCTRL_NONE>;    /* PA2 periph A SPI0_SPCK pin */
                      };
+
+                    pinctrl_spi0_cs0: spi0_cs0-0 {
+                        atmel,pins =
+                            <AT91_PIOA 3 AT91_PERIPH_A
AT91_PINCTRL_NONE>;    /* PA3 periph A SPI0_NPCS0 pin */
+                    };
+
+                    pinctrl_spi0_cs1: spi0_cs1-0 {
+                        atmel,pins =
+                            <AT91_PIOA 4 AT91_PERIPH_GPIO
AT91_PINCTRL_MULTI_DRIVE>;    /* PA4 GPIO SPI0_NPCS1 pin */
+                    };
+
+                    pinctrl_spi0_cs2: spi0_cs2-0 {
+                        atmel,pins =
+                            <AT91_PIOA 5 AT91_PERIPH_GPIO
AT91_PINCTRL_MULTI_DRIVE>;    /* PA5 GPIO SPI0_NPCS2 pin */
+                    };
+
+                    pinctrl_spi0_cs3: spi0_cs3-0 {
+                        atmel,pins =
+                            <AT91_PIOA 6 AT91_PERIPH_GPIO
AT91_PINCTRL_MULTI_DRIVE>;    /* PA6 GPIO SPI0_NPCS3 pin */
+                    };
nack the pin are not multidrive there is only one master
Right, this is a mistake.

But the pins should be configured as OUTPUT with HIGH level
(see
http://lxr.free-electrons.com/source/arch/arm/mach-at91/at91rm9200_devices.c#L589).
Okay, my mistake again, declaring "cs-gpios" property should suffice 
(the atmel spi driver will configure it accordingly when probing the spi 
device).
quoted
Best Regards,
J.
quoted
                  };
                  pioA: gpio at fffff400 {
--
1.7.9.5

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 2/9] ARM: at91/dt: add ethernet phy to at91rm9200ek board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:04:23

Add ethernet phy node in at91rm9200ek.dts.
The reg register is not specified, as it may differ depending on the init
process of the board:
ADDR0/1 phy pins are connected to PA13/14 rm9200 pins. Which means the phy
will take its address from these pins during the reset process.

The macb driver will launch a full scan on the mdio bus to discover the phy
address.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |    5 +++++
 1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index d2d72c3..37b0880 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -47,6 +47,11 @@
 			macb0: ethernet at fffbc000 {
 				phy-mode = "rmii";
 				status = "okay";
+
+				phy0: ethernet-phy {
+					interrupt-parent = <&pioC>;
+					interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+				};
 			};
 
 			usb1: gadget at fffb0000 {
-- 
1.7.9.5

Re: [PATCH 2/9] ARM: at91/dt: add ethernet phy to at91rm9200ek board

From: boris brezillon <hidden>
Date: 2013-11-18 08:40:11

On 28/08/2013 13:03, Boris BREZILLON wrote:
quoted hunk
Add ethernet phy node in at91rm9200ek.dts.
The reg register is not specified, as it may differ depending on the init
process of the board:
ADDR0/1 phy pins are connected to PA13/14 rm9200 pins. Which means the phy
will take its address from these pins during the reset process.

The macb driver will launch a full scan on the mdio bus to discover the phy
address.

Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200ek.dts |    5 +++++
  1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index d2d72c3..37b0880 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -47,6 +47,11 @@
  			macb0: ethernet at fffbc000 {
  				phy-mode = "rmii";
  				status = "okay";
+
+				phy0: ethernet-phy {
+					interrupt-parent = <&pioC>;
+					interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
rm9200 pio controller does not support specific edge detection.
The line above should be replaced with:
				interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
or
				interrupts = <4 0>;

Nicolas, I know you were planning to push this patch for 3.14.
If you haven't done it yet (or if you changed your mind), I can send a 
new version including this fix.

+				};
  			};

  			usb1: gadget at fffb0000 {

[PATCH 3/9] ARM: at91/dt: add usb1 vbus and pullup pins

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:05:29

Add vbus and pullup pinctrl definitions.
Request the vbus and pullup pins in usb1 node.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 37b0880..76f3e87 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -29,6 +29,18 @@
 
 	ahb {
 		apb {
+			pinctrl at fffff400 {
+				usb1 {
+					pinctrl_usb1_vbus: usb1_vbus-0 {
+						atmel,pins = <AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+
+					pinctrl_usb1_pullup: usb1_pullup-0 {
+						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
+					};
+				};
+			};
+
 			dbgu: serial at fffff200 {
 				status = "okay";
 			};
@@ -56,6 +68,9 @@
 
 			usb1: gadget at fffb0000 {
 				atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_usb1_vbus
+					     &pinctrl_usb1_pullup>;
 				status = "okay";
 			};
 
-- 
1.7.9.5

Re: [PATCH 3/9] ARM: at91/dt: add usb1 vbus and pullup pins

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 15:19:39

On 13:04 Wed 28 Aug     , Boris BREZILLON wrote:
quoted hunk
Add vbus and pullup pinctrl definitions.
Request the vbus and pullup pins in usb1 node.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 37b0880..76f3e87 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -29,6 +29,18 @@
 
 	ahb {
 		apb {
+			pinctrl at fffff400 {
+				usb1 {
+					pinctrl_usb1_vbus: usb1_vbus-0 {
+						atmel,pins = <AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
it's a gpio no-need
+
+					pinctrl_usb1_pullup: usb1_pullup-0 {
+						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
+					};
no-need multidrive
quoted hunk
+				};
+			};
+
 			dbgu: serial at fffff200 {
 				status = "okay";
 			};
@@ -56,6 +68,9 @@
 
 			usb1: gadget at fffb0000 {
 				atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_usb1_vbus
+					     &pinctrl_usb1_pullup>;
 				status = "okay";
 			};
 
-- 
1.7.9.5

Re: [PATCH 3/9] ARM: at91/dt: add usb1 vbus and pullup pins

From: boris brezillon <hidden>
Date: 2013-11-20 15:59:40

On 20/11/2013 15:57, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 13:04 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add vbus and pullup pinctrl definitions.
Request the vbus and pullup pins in usb1 node.

Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200ek.dts |   15 +++++++++++++++
  1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 37b0880..76f3e87 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -29,6 +29,18 @@
  
  	ahb {
  		apb {
+			pinctrl at fffff400 {
+				usb1 {
+					pinctrl_usb1_vbus: usb1_vbus-0 {
+						atmel,pins = <AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
it's a gpio no-need
Okay, noted.

I thought I had to declare gpio configured pins in order to detect pin 
conflicts.
But after taking a closer look at the pinctrl core and at91 pinctrl 
driver, it seems this is automatically done
by means of the pinctrl_request_gpio function.

quoted
+
+					pinctrl_usb1_pullup: usb1_pullup-0 {
+						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
+					};
no-need multidrive
Then why is it configured with multi-drive option in the board file
( 
http://lxr.free-electrons.com/source/arch/arm/mach-at91/board-rm9200ek.c#L166) 
?
quoted
+				};
+			};
+
  			dbgu: serial at fffff200 {
  				status = "okay";
  			};
@@ -56,6 +68,9 @@
  
  			usb1: gadget at fffb0000 {
  				atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_usb1_vbus
+					     &pinctrl_usb1_pullup>;
  				status = "okay";
  			};
  
-- 
1.7.9.5

[PATCH 4/9] ARM: at91/dt: add atmel,pullup-gpio to at91rm9200ek usb1 definition

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:06:17

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |    1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 76f3e87..f2d6d79 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -68,6 +68,7 @@
 
 			usb1: gadget at fffb0000 {
 				atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
+				atmel,pullup-gpio = <&pioD 5 GPIO_ACTIVE_HIGH>;
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_usb1_vbus
 					     &pinctrl_usb1_pullup>;
-- 
1.7.9.5

[PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:07:22

Add slot0 of mmc0 pinctrl pins definitions:
 - detect pin
 - write protect pin
 - enable slot0 pin: this pin is connected to an external switch which
   enable mmc0 slot0 or spi dataflash connected to cs3

The mmc0 device is not enabled, as it depends on the choosen functionnality
(spi cs3 or mmc0 slot0).

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index f2d6d79..2bad423 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -39,6 +39,23 @@
 						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
 					};
 				};
+
+				mmc0 {
+					pinctrl_mmc0_slot0_detect: mmc0_slot0_detect-0 {
+						atmel,pins =
+							<AT91_PIOB 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+					};
+
+					pinctrl_mmc0_slot0_write_protect: mmc0_slot0_write_protect-0 {
+						atmel,pins =
+							<AT91_PIOA 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+					};
+
+					pinctrl_mmc0_slot0_switch: mmc0_slot0_switch-0 {
+						atmel,pins =
+							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+					};
+				};
 			};
 
 			dbgu: serial at fffff200 {
@@ -84,6 +101,24 @@
 					reg = <0>;
 				};
 			};
+
+			mmc0: mmc at fffb4000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				pinctrl-0 = <&pinctrl_mmc0_clk
+					     &pinctrl_mmc0_slot0_cmd_dat0
+					     &pinctrl_mmc0_slot0_dat1_3
+					     &pinctrl_mmc0_slot0_detect
+					     &pinctrl_mmc0_slot0_write_protect
+					     &pinctrl_mmc0_slot0_switch>;
+
+				slot0: slot at 0 {
+					reg = <0>;
+					bus-width = <4>;
+					cd-gpios = <&pioB 27 GPIO_ACTIVE_HIGH>;
+					wp-gpios = <&pioA 17 GPIO_ACTIVE_HIGH>;
+				};
+			};
 		};
 
 		usb0: ohci at 00300000 {
-- 
1.7.9.5

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 15:04:42

On 13:06 Wed 28 Aug     , Boris BREZILLON wrote:
quoted hunk
Add slot0 of mmc0 pinctrl pins definitions:
 - detect pin
 - write protect pin
 - enable slot0 pin: this pin is connected to an external switch which
   enable mmc0 slot0 or spi dataflash connected to cs3

The mmc0 device is not enabled, as it depends on the choosen functionnality
(spi cs3 or mmc0 slot0).

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index f2d6d79..2bad423 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -39,6 +39,23 @@
 						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
 					};
 				};
+
+				mmc0 {
+					pinctrl_mmc0_slot0_detect: mmc0_slot0_detect-0 {
+						atmel,pins =
+							<AT91_PIOB 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+					};
+
+					pinctrl_mmc0_slot0_write_protect: mmc0_slot0_write_protect-0 {
+						atmel,pins =
+							<AT91_PIOA 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+					};
+
+					pinctrl_mmc0_slot0_switch: mmc0_slot0_switch-0 {
+						atmel,pins =
+							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+					};
nack this is a regulator the pinctrl API is not done for gpio default value
quoted hunk
+				};
 			};
 
 			dbgu: serial at fffff200 {
@@ -84,6 +101,24 @@
 					reg = <0>;
 				};
 			};
+
+			mmc0: mmc at fffb4000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				pinctrl-0 = <&pinctrl_mmc0_clk
+					     &pinctrl_mmc0_slot0_cmd_dat0
+					     &pinctrl_mmc0_slot0_dat1_3
+					     &pinctrl_mmc0_slot0_detect
+					     &pinctrl_mmc0_slot0_write_protect
+					     &pinctrl_mmc0_slot0_switch>;
+
+				slot0: slot at 0 {
+					reg = <0>;
+					bus-width = <4>;
+					cd-gpios = <&pioB 27 GPIO_ACTIVE_HIGH>;
+					wp-gpios = <&pioA 17 GPIO_ACTIVE_HIGH>;
+				};
+			};
 		};
 
 		usb0: ohci at 00300000 {
-- 
1.7.9.5

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: boris brezillon <hidden>
Date: 2013-11-20 16:15:43

On 20/11/2013 15:59, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 13:06 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add slot0 of mmc0 pinctrl pins definitions:
  - detect pin
  - write protect pin
  - enable slot0 pin: this pin is connected to an external switch which
    enable mmc0 slot0 or spi dataflash connected to cs3

The mmc0 device is not enabled, as it depends on the choosen functionnality
(spi cs3 or mmc0 slot0).

Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200ek.dts |   35 +++++++++++++++++++++++++++++++++++
  1 file changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index f2d6d79..2bad423 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -39,6 +39,23 @@
  						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
  					};
  				};
+
+				mmc0 {
+					pinctrl_mmc0_slot0_detect: mmc0_slot0_detect-0 {
+						atmel,pins =
+							<AT91_PIOB 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+					};
+
+					pinctrl_mmc0_slot0_write_protect: mmc0_slot0_write_protect-0 {
+						atmel,pins =
+							<AT91_PIOA 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+					};
+
+					pinctrl_mmc0_slot0_switch: mmc0_slot0_switch-0 {
+						atmel,pins =
+							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+					};
nack this is a regulator the pinctrl API is not done for gpio default value
I know this can be represented as a regulator, but looking at the 
datasheet, this looks more
like a switch than a regulator.

Anyway, why didn't you told me that when I proposed the OUTPUT support 
for at91 pinctrl driver ?
And BTW pinctrl OUTPUT config is already supported by some pinctrl drivers
( 
http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt#L159).
quoted
+				};
  			};
  
  			dbgu: serial at fffff200 {
@@ -84,6 +101,24 @@
  					reg = <0>;
  				};
  			};
+
+			mmc0: mmc at fffb4000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				pinctrl-0 = <&pinctrl_mmc0_clk
+					     &pinctrl_mmc0_slot0_cmd_dat0
+					     &pinctrl_mmc0_slot0_dat1_3
+					     &pinctrl_mmc0_slot0_detect
+					     &pinctrl_mmc0_slot0_write_protect
+					     &pinctrl_mmc0_slot0_switch>;
+
+				slot0: slot at 0 {
+					reg = <0>;
+					bus-width = <4>;
+					cd-gpios = <&pioB 27 GPIO_ACTIVE_HIGH>;
+					wp-gpios = <&pioA 17 GPIO_ACTIVE_HIGH>;
+				};
+			};
  		};
  
  		usb0: ohci at 00300000 {
-- 
1.7.9.5

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 17:19:07

On 17:14 Wed 20 Nov     , boris brezillon wrote:
On 20/11/2013 15:59, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 13:06 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add slot0 of mmc0 pinctrl pins definitions:
 - detect pin
 - write protect pin
 - enable slot0 pin: this pin is connected to an external switch which
   enable mmc0 slot0 or spi dataflash connected to cs3

The mmc0 device is not enabled, as it depends on the choosen functionnality
(spi cs3 or mmc0 slot0).

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index f2d6d79..2bad423 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -39,6 +39,23 @@
 						atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
 					};
 				};
+
+				mmc0 {
+					pinctrl_mmc0_slot0_detect: mmc0_slot0_detect-0 {
+						atmel,pins =
+							<AT91_PIOB 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+					};
+
+					pinctrl_mmc0_slot0_write_protect: mmc0_slot0_write_protect-0 {
+						atmel,pins =
+							<AT91_PIOA 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+					};
+
+					pinctrl_mmc0_slot0_switch: mmc0_slot0_switch-0 {
+						atmel,pins =
+							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+					};
nack this is a regulator the pinctrl API is not done for gpio default value
I know this can be represented as a regulator, but looking at the
datasheet, this looks more
like a switch than a regulator.
so you load the dt via user space and use the regulator NOT the pinctrl

I do not want to see gpio control via pinctrl as we have no tracability of it
in gpio lib what so ever
Anyway, why didn't you told me that when I proposed the OUTPUT
support for at91 pinctrl driver ?
you never get my Ack for this and I'm the pinctrl-at91 maintainer

so NACK

Best Regards,
J.

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: Linus Walleij <hidden>
Date: 2013-11-21 09:48:42

On Wed, Nov 20, 2013 at 5:14 PM, boris brezillon
[off-list ref] wrote:
On 20/11/2013 15:59, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 13:06 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
quoted
mmc0_slot0_switch-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 22
AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+                                       };
nack this is a regulator the pinctrl API is not done for gpio default
value
I know this can be represented as a regulator, but looking at the datasheet,
this looks more like a switch than a regulator.
No matter whether it's a switch or a GPIO regulator it seems we
are in violent agreement that it should not be controlled by the
pin control states at least.

Start with making it a GPIO then you can figure out whether
a GPIO regulator or drivers/extcon/extcon-gpio.c should be
used.

Yours,
Linus Walleij

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: boris brezillon <hidden>
Date: 2013-11-21 10:35:32

Hi Linus,

On 21/11/2013 10:48, Linus Walleij wrote:
On Wed, Nov 20, 2013 at 5:14 PM, boris brezillon
[off-list ref] wrote:
quoted
On 20/11/2013 15:59, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 13:06 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
mmc0_slot0_switch-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 22
AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+                                       };
nack this is a regulator the pinctrl API is not done for gpio default
value
I know this can be represented as a regulator, but looking at the datasheet,
this looks more like a switch than a regulator.
No matter whether it's a switch or a GPIO regulator it seems we
are in violent agreement that it should not be controlled by the
pin control states at least.

Start with making it a GPIO then you can figure out whether
a GPIO regulator or drivers/extcon/extcon-gpio.c should be
used.
Thanks for pointing this out. I wasn't aware of the extcon subsystem.

Actually, I think it's a little bit more tricky.

The switch connected to gpio PB22 is used to enable one device or the other:
  - PB22 set to high level enables slot0 of mmc0 (connect mmc signals to 
the mmc
    connector)
  - PB22 set to low level enables the dataflash (connect to the SPI0 
signals to the
    dataflash device)

I can declare a regulator for the mmc device and attach it to the mmc 
(AFAIK, the
mmc core will request the mmc regulator for us, and configure it 
accordingly).

But AFAICT (tell me if I'm wrong), there's no such things for spi devices.

The pinctrl approach has the benefit of providing a transparent way (no 
existing
drivers modifications) to enable one device or the other.

But if you think this is better done (or cleaner) with an extcon or a 
regulator device,
I'll try to find a way to do it this way.

Best Regards,

Boris
Yours,
Linus Walleij

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: Linus Walleij <hidden>
Date: 2013-11-26 13:46:11

On Thu, Nov 21, 2013 at 11:34 AM, boris brezillon
[off-list ref] wrote:
On 21/11/2013 10:48, Linus Walleij wrote:
quoted
No matter whether it's a switch or a GPIO regulator it seems we
are in violent agreement that it should not be controlled by the
pin control states at least.

Start with making it a GPIO then you can figure out whether
a GPIO regulator or drivers/extcon/extcon-gpio.c should be
used.
Thanks for pointing this out. I wasn't aware of the extcon subsystem.

Actually, I think it's a little bit more tricky.
Hm, yeah extcon is for things like audio jacks on phones that
userspace need to detect.

drivers/input/keyboard/gpio_keys* is for things that actually
input characters to userspace stuff.

None of it is applicable here it seems ...
The switch connected to gpio PB22 is used to enable one device or the other:
 - PB22 set to high level enables slot0 of mmc0 (connect mmc signals to the
mmc
   connector)
 - PB22 set to low level enables the dataflash (connect to the SPI0 signals
to the
   dataflash device)
So this is something like a "jumper" of the old type, configuring
the entire system?

Something like that:
http://www.mignonette-game.com/images/v2/21-arduino-com-jumper.jpg

But in this case it is a mechanical switch rather than a jumper?

This is not much different from the GPIOs people use to e.g. encode
the board type, just that it can change.

Do people switch this thing at runtime?
The pinctrl approach has the benefit of providing a transparent way (no
existing
drivers modifications) to enable one device or the other.

But if you think this is better done (or cleaner) with an extcon or a
regulator device,
I'll try to find a way to do it this way.
I'm uncertain. If this is something that changes at runtime, the
input from the switch should be read through GPIO and used
to select the "default" state of one device and something like
"sleep" on the other (I suspect more things than pin control
may be affected by that!)

If this is a switch that you want to take the simple shortcut
of just reading at boot, the approach would still be similar, just
less code.

So use gpio_get() to read the value, and then select which
*entire device* goes active depending on the setting would
be the right approach I guess?

Yours,
Linus Walleij

Re: [PATCH 5/9] ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

From: boris brezillon <hidden>
Date: 2013-11-26 18:04:00

Hello Linus,

Sorry for the noise, my mail was filtered by several ML because of some 
HTML contents.

Le 26/11/2013 14:46, Linus Walleij a ?crit :
On Thu, Nov 21, 2013 at 11:34 AM, boris brezillon
[off-list ref]  wrote:
quoted
On 21/11/2013 10:48, Linus Walleij wrote:
quoted
No matter whether it's a switch or a GPIO regulator it seems we
are in violent agreement that it should not be controlled by the
pin control states at least.

Start with making it a GPIO then you can figure out whether
a GPIO regulator or drivers/extcon/extcon-gpio.c should be
used.
Thanks for pointing this out. I wasn't aware of the extcon subsystem.

Actually, I think it's a little bit more tricky.
Hm, yeah extcon is for things like audio jacks on phones that
userspace need to detect.

drivers/input/keyboard/gpio_keys* is for things that actually
input characters to userspace stuff.

None of it is applicable here it seems ...
quoted
The switch connected to gpio PB22 is used to enable one device or the other:
  - PB22 set to high level enables slot0 of mmc0 (connect mmc signals to the
mmc
    connector)
  - PB22 set to low level enables the dataflash (connect to the SPI0 signals
to the
    dataflash device)
So this is something like a "jumper" of the old type, configuring
the entire system?

Something like that:
http://www.mignonette-game.com/images/v2/21-arduino-com-jumper.jpg

But in this case it is a mechanical switch rather than a jumper?
Not exactly.
The functionnaly selection (spi device or mmc slot) is done by the 
software using to the
PB22 pin:
  - set PB22 pin to 1 if you want to enable the mmc slot
  - set PB22 pin to 0 if you want to enable the spi device

This is the rm9200ek board datasheet 
http://www.alliedelec.com/images/products/datasheets/bm/ATMEL/70123901.pdf, 
and you'll find the switch schematic at page 26.
Here is the switch datasheet : 
http://pdf1.alldatasheet.fr/datasheet-pdf/view/90971/PERICOM/PI5A100Q.html

If I understand correctly, you're suggesting to retrieve the PB22 pin 
value to decide
wether the mmc slot or the spi device is enabled. Is that right ?

In this case the bootstrap and/or bootloader would have to properly 
configure the P22 pin
before executing the linux kernel, and I'm pretty sure this is not the case.
This is not much different from the GPIOs people use to e.g. encode
the board type, just that it can change.

Do people switch this thing at runtime?
In the board version this was configured in the init_machine function 
(or board init
function) depending on the MTD_AT91_DATAFLASH_CARD
( 
http://lxr.free-electrons.com/source/arch/arm/mach-at91/board-rm9200ek.c#L173).
As a result it was not reconfigurable at runtime.

But Jean-Christophe suggested to make it configurable at runtime (using 
dt fragments).
quoted
The pinctrl approach has the benefit of providing a transparent way (no
existing
drivers modifications) to enable one device or the other.

But if you think this is better done (or cleaner) with an extcon or a
regulator device,
I'll try to find a way to do it this way.
I'm uncertain. If this is something that changes at runtime, the
input from the switch should be read through GPIO and used
to select the "default" state of one device and something like
"sleep" on the other (I suspect more things than pin control
may be affected by that!)

If this is a switch that you want to take the simple shortcut
of just reading at boot, the approach would still be similar, just
less code.

So use gpio_get() to read the value, and then select which
*entire device* goes active depending on the setting would
be the right approach I guess?
I'm not sure these suggestions apply according to my previous answers,
but tell me if I'm wrong.

Thanks for your time and suggestions.

Best Regards,

Boris
Yours,
Linus Walleij

[PATCH 6/9] ARM: at91/dt: add spi0 support to at91rm9200ek board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:08:19

Add spi0 cs3 switch pinctrl pin definitions: this pin is used to select
between mmc0 slot0 and spi dataflash connected to cs3.

Enable spi0 controller and define the mtd_dataflash connected to cs0.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 2bad423..b3e7425 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -56,6 +56,13 @@
 							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
 					};
 				};
+
+				spi0 {
+					pinctrl_spi0_cs3_switch: spi0_cs3_switch-0 {
+						atmel,pins =
+							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
+					};
+				};
 			};
 
 			dbgu: serial at fffff200 {
@@ -119,6 +126,19 @@
 					wp-gpios = <&pioA 17 GPIO_ACTIVE_HIGH>;
 				};
 			};
+
+			spi0: spi at fffe0000 {
+				pinctrl-0 = <&pinctrl_spi0 &pinctrl_spi0_cs0>;
+				cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>, <0>,
+					   <0>, <0>;
+				status = "okay";
+
+				mtd_dataflash at 0 {
+					compatible = "atmel,at45", "atmel,dataflash";
+					spi-max-frequency = <15000000>;
+					reg = <0>;
+				};
+			};
 		};
 
 		usb0: ohci at 00300000 {
-- 
1.7.9.5

Re: [PATCH 6/9] ARM: at91/dt: add spi0 support to at91rm9200ek board

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 14:58:52

On 13:07 Wed 28 Aug     , Boris BREZILLON wrote:
quoted hunk
Add spi0 cs3 switch pinctrl pin definitions: this pin is used to select
between mmc0 slot0 and spi dataflash connected to cs3.

Enable spi0 controller and define the mtd_dataflash connected to cs0.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 2bad423..b3e7425 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -56,6 +56,13 @@
 							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
 					};
 				};
+
+				spi0 {
+					pinctrl_spi0_cs3_switch: spi0_cs3_switch-0 {
+						atmel,pins =
+							<AT91_PIOB 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
+					};
same as mmc nack pinctrl is not for gpio default value

this is regulator
quoted hunk
+				};
 			};
 
 			dbgu: serial at fffff200 {
@@ -119,6 +126,19 @@
 					wp-gpios = <&pioA 17 GPIO_ACTIVE_HIGH>;
 				};
 			};
+
+			spi0: spi at fffe0000 {
+				pinctrl-0 = <&pinctrl_spi0 &pinctrl_spi0_cs0>;
+				cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>, <0>,
+					   <0>, <0>;
+				status = "okay";
+
+				mtd_dataflash at 0 {
+					compatible = "atmel,at45", "atmel,dataflash";
+					spi-max-frequency = <15000000>;
+					reg = <0>;
+				};
+			};
 		};
 
 		usb0: ohci at 00300000 {
-- 
1.7.9.5

[PATCH 7/9] ARM: at91/dt: add i2c devices connected to at91rm9200ek board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 11:09:14

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index b3e7425..fd2601a 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -147,6 +147,18 @@
 		};
 	};
 
+	i2c at 0 {
+		status = "okay";
+
+		ics1523 at 26 {
+			reg = <0x26>;
+		};
+
+		dac3550 at 4d {
+			reg = <0x4d>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
-- 
1.7.9.5

Re: [PATCH 7/9] ARM: at91/dt: add i2c devices connected to at91rm9200ek board

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 14:59:46

On 13:08 Wed 28 Aug     , Boris BREZILLON wrote:
quoted hunk
Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index b3e7425..fd2601a 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -147,6 +147,18 @@
 		};
 	};
 
+	i2c at 0 {
+		status = "okay";
+
+		ics1523 at 26 {
+			reg = <0x26>;
+		};
+
+		dac3550 at 4d {
+			reg = <0x4d>;
missing compatible
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
-- 
1.7.9.5

Re: [PATCH 7/9] ARM: at91/dt: add i2c devices connected to at91rm9200ek board

From: boris brezillon <hidden>
Date: 2013-11-20 16:17:43

On 20/11/2013 16:01, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 13:08 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200ek.dts |   12 ++++++++++++
  1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index b3e7425..fd2601a 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -147,6 +147,18 @@
  		};
  	};
  
+	i2c at 0 {
+		status = "okay";
+
+		ics1523 at 26 {
+			reg = <0x26>;
+		};
+
+		dac3550 at 4d {
+			reg = <0x4d>;
missing compatible
I can't find any matching compatible for these devices.
Do you know what should be used ?
quoted
+		};
+	};
+
  	leds {
  		compatible = "gpio-leds";
  
-- 
1.7.9.5

[PATCH 8/9] ARM: at91/dt: add new at91rm9200ek_mmc board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 12:38:22

Add a new at91rm9200ek_mmc board (based on at91rm9200ek board) which enables
mmc0/slot0.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek_mmc.dts |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91rm9200ek_mmc.dts
diff --git a/arch/arm/boot/dts/at91rm9200ek_mmc.dts b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
new file mode 100644
index 0000000..c87a861
--- /dev/null
+++ b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
@@ -0,0 +1,23 @@
+/*
+ * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit with
+ *                    an MMC slot
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91rm9200ek.dts"
+
+/ {
+	model = "Atmel AT91RM9200 evaluation kit with MMC slot";
+	compatible = "atmel,at91rm9200ek-mmc", "atmel,at91rm9200ek", "atmel,at91rm9200";
+
+	ahb {
+		apb {
+			mmc0: mmc at fffb4000 {
+				status = "okay";
+			};
+		};
+	};
+};
-- 
1.7.9.5

Re: [PATCH 8/9] ARM: at91/dt: add new at91rm9200ek_mmc board

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 15:49:36

On 14:37 Wed 28 Aug     , Boris BREZILLON wrote:
Add a new at91rm9200ek_mmc board (based on at91rm9200ek board) which enables
mmc0/slot0.
no for multiple dts

this need to handle at user space level

Best Regards,
J.
quoted hunk
Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek_mmc.dts |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91rm9200ek_mmc.dts
diff --git a/arch/arm/boot/dts/at91rm9200ek_mmc.dts b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
new file mode 100644
index 0000000..c87a861
--- /dev/null
+++ b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
@@ -0,0 +1,23 @@
+/*
+ * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit with
+ *                    an MMC slot
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91rm9200ek.dts"
+
+/ {
+	model = "Atmel AT91RM9200 evaluation kit with MMC slot";
+	compatible = "atmel,at91rm9200ek-mmc", "atmel,at91rm9200ek", "atmel,at91rm9200";
+
+	ahb {
+		apb {
+			mmc0: mmc at fffb4000 {
+				status = "okay";
+			};
+		};
+	};
+};
-- 
1.7.9.5

Re: [PATCH 8/9] ARM: at91/dt: add new at91rm9200ek_mmc board

From: boris brezillon <hidden>
Date: 2013-11-20 18:59:38

On 20/11/2013 16:02, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 14:37 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add a new at91rm9200ek_mmc board (based on at91rm9200ek board) which enables
mmc0/slot0.
no for multiple dts

this need to handle at user space level
You mean, by controlling the regulator using the sysfs interface, or by 
loading
only the appropriate driver ?

What if both drivers are loaded (or not compiled as modules) ?
This will lead to one device being unusable (and maybe even worst)...

Please explain what you had in mind ?
Best Regards,
J.
quoted
Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200ek_mmc.dts |   23 +++++++++++++++++++++++
  1 file changed, 23 insertions(+)
  create mode 100644 arch/arm/boot/dts/at91rm9200ek_mmc.dts
diff --git a/arch/arm/boot/dts/at91rm9200ek_mmc.dts b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
new file mode 100644
index 0000000..c87a861
--- /dev/null
+++ b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
@@ -0,0 +1,23 @@
+/*
+ * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit with
+ *                    an MMC slot
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91rm9200ek.dts"
+
+/ {
+	model = "Atmel AT91RM9200 evaluation kit with MMC slot";
+	compatible = "atmel,at91rm9200ek-mmc", "atmel,at91rm9200ek", "atmel,at91rm9200";
+
+	ahb {
+		apb {
+			mmc0: mmc at fffb4000 {
+				status = "okay";
+			};
+		};
+	};
+};
-- 
1.7.9.5

Re: [PATCH 8/9] ARM: at91/dt: add new at91rm9200ek_mmc board

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2013-11-20 17:43:47

On 17:31 Wed 20 Nov     , boris brezillon wrote:
On 20/11/2013 16:02, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 14:37 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add a new at91rm9200ek_mmc board (based on at91rm9200ek board) which enables
mmc0/slot0.
no for multiple dts

this need to handle at user space level
You mean, by controlling the regulator using the sysfs interface, or
by loading
only the appropriate driver ?
load the partial dts via userspace
What if both drivers are loaded (or not compiled as modules) ?
This will lead to one device being unusable (and maybe even worst)...
this will never be the case

Best Regards,
J.
Please explain what you had in mind ?
quoted
Best Regards,
J.
quoted
Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek_mmc.dts |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91rm9200ek_mmc.dts
diff --git a/arch/arm/boot/dts/at91rm9200ek_mmc.dts b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
new file mode 100644
index 0000000..c87a861
--- /dev/null
+++ b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
@@ -0,0 +1,23 @@
+/*
+ * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit with
+ *                    an MMC slot
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91rm9200ek.dts"
+
+/ {
+	model = "Atmel AT91RM9200 evaluation kit with MMC slot";
+	compatible = "atmel,at91rm9200ek-mmc", "atmel,at91rm9200ek", "atmel,at91rm9200";
+
+	ahb {
+		apb {
+			mmc0: mmc at fffb4000 {
+				status = "okay";
+			};
+		};
+	};
+};
-- 
1.7.9.5

Re: [PATCH 8/9] ARM: at91/dt: add new at91rm9200ek_mmc board

From: Nicolas Ferre <hidden>
Date: 2013-11-21 08:44:16

On 20/11/2013 18:27, Jean-Christophe PLAGNIOL-VILLARD :
On 17:31 Wed 20 Nov     , boris brezillon wrote:
quoted
On 20/11/2013 16:02, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 14:37 Wed 28 Aug     , Boris BREZILLON wrote:
quoted
Add a new at91rm9200ek_mmc board (based on at91rm9200ek board) which enables
mmc0/slot0.
no for multiple dts

this need to handle at user space level
You mean, by controlling the regulator using the sysfs interface, or
by loading
only the appropriate driver ?
load the partial dts via userspace
Right, but Jean-Christophe, we know that DT fragments are not available 
in mainline yet (even if the effort is ongoing). So what should we do in 
the meantime?
quoted
What if both drivers are loaded (or not compiled as modules) ?
This will lead to one device being unusable (and maybe even worst)...
this will never be the case
Can you please elaborate? It is a bit frustrating to have to ask you 
again and again to explain more your thoughts...

Bye,
Best Regards,
J.
quoted
Please explain what you had in mind ?
quoted
Best Regards,
J.
quoted
Signed-off-by: Boris BREZILLON <redacted>
---
  arch/arm/boot/dts/at91rm9200ek_mmc.dts |   23 +++++++++++++++++++++++
  1 file changed, 23 insertions(+)
  create mode 100644 arch/arm/boot/dts/at91rm9200ek_mmc.dts
diff --git a/arch/arm/boot/dts/at91rm9200ek_mmc.dts b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
new file mode 100644
index 0000000..c87a861
--- /dev/null
+++ b/arch/arm/boot/dts/at91rm9200ek_mmc.dts
@@ -0,0 +1,23 @@
+/*
+ * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit with
+ *                    an MMC slot
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91rm9200ek.dts"
+
+/ {
+	model = "Atmel AT91RM9200 evaluation kit with MMC slot";
+	compatible = "atmel,at91rm9200ek-mmc", "atmel,at91rm9200ek", "atmel,at91rm9200";
+
+	ahb {
+		apb {
+			mmc0: mmc at fffb4000 {
+				status = "okay";
+			};
+		};
+	};
+};
--
1.7.9.5

-- 
Nicolas Ferre

[PATCH 9/9] ARM: at91/dt: add new at91rm9200ek_dataflash board

From: Boris BREZILLON <hidden>
Date: 2013-08-28 12:39:40

Add a new at91rm9200ek_dataflash board (based on at91rm9200ek board) which
enables dataflash connected to cs3 of spi0.

Signed-off-by: Boris BREZILLON <redacted>
---
 arch/arm/boot/dts/at91rm9200ek_dataflash.dts |   33 ++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91rm9200ek_dataflash.dts
diff --git a/arch/arm/boot/dts/at91rm9200ek_dataflash.dts b/arch/arm/boot/dts/at91rm9200ek_dataflash.dts
new file mode 100644
index 0000000..a43412e
--- /dev/null
+++ b/arch/arm/boot/dts/at91rm9200ek_dataflash.dts
@@ -0,0 +1,33 @@
+/*
+ * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit with
+ *                    2 SPI dataflash
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91rm9200ek.dts"
+
+/ {
+	model = "Atmel AT91RM9200 evaluation kit with 2 SPI dataflash";
+	compatible = "atmel,at91rm9200ek-dataflash", "atmel,at91rm9200ek", "atmel,at91rm9200";
+
+	ahb {
+		apb {
+			spi0: spi at fffe0000 {
+				pinctrl-0 = <&pinctrl_spi0 &pinctrl_spi0_cs0
+					     &pinctrl_spi0_cs3
+					     &pinctrl_spi0_cs3_switch>;
+				cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>, <0>,
+					   <0>, <&pioA 6 GPIO_ACTIVE_HIGH>;
+
+				mtd_dataflash at 3 {
+					compatible = "atmel,at45", "atmel,dataflash";
+					spi-max-frequency = <15000000>;
+					reg = <3>;
+				};
+			};
+		};
+	};
+};
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help