All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-07-14 11:47 ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2016-07-14 11:47 UTC (permalink / raw)
  To: fixed-term.Oleksij.Rempel
  Cc: devicetree, Linus Walleij, Chen-Yu Tsai, linux-arm-kernel,
	Oleksij Rempel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Ps: most of the text was taken from Linux Wallej patch.

Cc: devicetree@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 60 ++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 67c8a76..7529be1 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,66 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 *         LSEC = Low Speed External Connector
+	 *         HSEC = High Speed External Connector
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "SCL", "SDA", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
+		"", "", "[SD0-DET]", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
+		"[LED1]", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin@0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
-- 
2.7.4

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-07-14 11:47 ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2016-07-14 11:47 UTC (permalink / raw)
  To: linux-arm-kernel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Ps: most of the text was taken from Linux Wallej patch.

Cc: devicetree at vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 60 ++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 67c8a76..7529be1 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,66 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 *         LSEC = Low Speed External Connector
+	 *         HSEC = High Speed External Connector
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "SCL", "SDA", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
+		"", "", "[SD0-DET]", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
+		"[LED1]", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
-- 
2.7.4

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

* Re: [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-07-14 11:47 ` Oleksij Rempel
@ 2016-07-22 14:55     ` Linus Walleij
  -1 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2016-07-22 14:55 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: Oleksij Rempel, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai

On Thu, Jul 14, 2016 at 1:47 PM, Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org> wrote:

> This names the GPIO lines on the Banana Pi board in accordance with
> the A20_Banana_Pi v1.4 Specification.
>
> This will make these line names reflect through to userspace
> so that they can easily be identified and used with the new
> character device ABI.
>
> Some care has been taken to name all lines, not just those used
> by the external connectors, also lines that are muxed into some
> other function than GPIO: these are named "[FOO]" so that users
> can see with lsgpio what all lines are used for.
>
> Ps: most of the text was taken from Linux Wallej patch.

LinuS

>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> Signed-off-by: Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>

Nice usecase!

> +       /*
> +        * Legend: proper name = the GPIO line is used as GPIO
> +        *         NC = not connected (not routed from the SoC)
> +        *         "[PER]" = pin is muxed for peripheral (not GPIO)
> +        *         "" = no idea, schematic doesn't say, could be
> +        *              unrouted (not connected to any external pin)
> +        *         LSEC = Low Speed External Connector
> +        *         HSEC = High Speed External Connector
> +        */

So maybe we should make this naming convention a suggested
standard. People seem to like it.

> +       gpio-line-names =
> +               /* PA */
> +               "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
> +                       "[ETXD2]", "[ETXD1]", "[ETXD0]",
> +               "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
> +                       "[ETXEN]", "[ETXCK]", "[ECRS]",
> +               "[ECOL]", "[ETXERR]", "", "", "", "", "", "",
> +               "", "", "", "", "", "", "", "",
> +               /* PB */
> +               "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
> +               "NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
> +               "", "", "", "", "SCL", "SDA", "", "",

Are these bit-banged SCL and SDA for doing I2C with
GPIO? Otherwise you probably want to name them "[SCL]" and "[SDA]"

> +               "TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",

Same here. You probably want "[TXD0]" etc unless you're bit-banging
the serial port. "IO-1" sounds like a real GPIO though and should
probably be named like that without [] and "PH3" what is that really?
A device-muxed pin or some kind of GPIO?

> +               "", "", "[SD0-DET]", "", "", "", "", "",
> +               "NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",

So these seem correct too.

> +               "[LED1]", "NC", "NC", "NC", "", "", "", "",

"LED1" seems like the right name, if this is a GPIO used to drive
a LED.

> +               "", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",

WHat is IO-GCLK? A real GPIO line used for toggling a clock?
Or a hardware clock signal? In the first case it it correctly named,
in the other case it should be "[IO-GCLK]".

> +               "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
> +                       "[SPI-MISO]", "[SPI-CE1]", "NC",
> +               "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",

Looks right.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-07-22 14:55     ` Linus Walleij
  0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2016-07-22 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jul 14, 2016 at 1:47 PM, Oleksij Rempel <linux@rempel-privat.de> wrote:

> This names the GPIO lines on the Banana Pi board in accordance with
> the A20_Banana_Pi v1.4 Specification.
>
> This will make these line names reflect through to userspace
> so that they can easily be identified and used with the new
> character device ABI.
>
> Some care has been taken to name all lines, not just those used
> by the external connectors, also lines that are muxed into some
> other function than GPIO: these are named "[FOO]" so that users
> can see with lsgpio what all lines are used for.
>
> Ps: most of the text was taken from Linux Wallej patch.

LinuS

>
> Cc: devicetree at vger.kernel.org
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>

Nice usecase!

> +       /*
> +        * Legend: proper name = the GPIO line is used as GPIO
> +        *         NC = not connected (not routed from the SoC)
> +        *         "[PER]" = pin is muxed for peripheral (not GPIO)
> +        *         "" = no idea, schematic doesn't say, could be
> +        *              unrouted (not connected to any external pin)
> +        *         LSEC = Low Speed External Connector
> +        *         HSEC = High Speed External Connector
> +        */

So maybe we should make this naming convention a suggested
standard. People seem to like it.

> +       gpio-line-names =
> +               /* PA */
> +               "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
> +                       "[ETXD2]", "[ETXD1]", "[ETXD0]",
> +               "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
> +                       "[ETXEN]", "[ETXCK]", "[ECRS]",
> +               "[ECOL]", "[ETXERR]", "", "", "", "", "", "",
> +               "", "", "", "", "", "", "", "",
> +               /* PB */
> +               "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
> +               "NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
> +               "", "", "", "", "SCL", "SDA", "", "",

Are these bit-banged SCL and SDA for doing I2C with
GPIO? Otherwise you probably want to name them "[SCL]" and "[SDA]"

> +               "TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",

Same here. You probably want "[TXD0]" etc unless you're bit-banging
the serial port. "IO-1" sounds like a real GPIO though and should
probably be named like that without [] and "PH3" what is that really?
A device-muxed pin or some kind of GPIO?

> +               "", "", "[SD0-DET]", "", "", "", "", "",
> +               "NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",

So these seem correct too.

> +               "[LED1]", "NC", "NC", "NC", "", "", "", "",

"LED1" seems like the right name, if this is a GPIO used to drive
a LED.

> +               "", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",

WHat is IO-GCLK? A real GPIO line used for toggling a clock?
Or a hardware clock signal? In the first case it it correctly named,
in the other case it should be "[IO-GCLK]".

> +               "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
> +                       "[SPI-MISO]", "[SPI-CE1]", "NC",
> +               "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",

Looks right.

Yours,
Linus Walleij

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

* Re: [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-07-22 14:55     ` Linus Walleij
@ 2016-07-22 15:47         ` Chen-Yu Tsai
  -1 siblings, 0 replies; 26+ messages in thread
From: Chen-Yu Tsai @ 2016-07-22 15:47 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Oleksij Rempel, Oleksij Rempel,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai

On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> On Thu, Jul 14, 2016 at 1:47 PM, Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org> wrote:
>
>> This names the GPIO lines on the Banana Pi board in accordance with
>> the A20_Banana_Pi v1.4 Specification.
>>
>> This will make these line names reflect through to userspace
>> so that they can easily be identified and used with the new
>> character device ABI.
>>
>> Some care has been taken to name all lines, not just those used
>> by the external connectors, also lines that are muxed into some
>> other function than GPIO: these are named "[FOO]" so that users
>> can see with lsgpio what all lines are used for.
>>
>> Ps: most of the text was taken from Linux Wallej patch.
>
> LinuS
>
>>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
>> Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
>> Signed-off-by: Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
>
> Nice usecase!
>
>> +       /*
>> +        * Legend: proper name = the GPIO line is used as GPIO
>> +        *         NC = not connected (not routed from the SoC)
>> +        *         "[PER]" = pin is muxed for peripheral (not GPIO)
>> +        *         "" = no idea, schematic doesn't say, could be
>> +        *              unrouted (not connected to any external pin)
>> +        *         LSEC = Low Speed External Connector
>> +        *         HSEC = High Speed External Connector

I don't see LSEC/HSEC used anywhere?

>> +        */
>
> So maybe we should make this naming convention a suggested
> standard. People seem to like it.

One question about this whole thing: how extensively should we add
the names? Only for exposed pins? Or every pin that's routed/used?

>> +       gpio-line-names =
>> +               /* PA */
>> +               "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
>> +                       "[ETXD2]", "[ETXD1]", "[ETXD0]",
>> +               "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
>> +                       "[ETXEN]", "[ETXCK]", "[ECRS]",
>> +               "[ECOL]", "[ETXERR]", "", "", "", "", "", "",
>> +               "", "", "", "", "", "", "", "",
>> +               /* PB */
>> +               "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
>> +               "NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
>> +               "", "", "", "", "SCL", "SDA", "", "",
>
> Are these bit-banged SCL and SDA for doing I2C with
> GPIO? Otherwise you probably want to name them "[SCL]" and "[SDA]"

There's an actual I2C controller backing them.

>
>> +               "TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
>
> Same here. You probably want "[TXD0]" etc unless you're bit-banging
> the serial port. "IO-1" sounds like a real GPIO though and should
> probably be named like that without [] and "PH3" what is that really?
> A device-muxed pin or some kind of GPIO?

PH3 is actually the pin name. The vendor uses "IO-7" and "IO-8" as function
names for PH3 and PH5, but actually names them "NC":

    http://www.bananapi.org/p/product.html

>
>> +               "", "", "[SD0-DET]", "", "", "", "", "",
>> +               "NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
>
> So these seem correct too.
>
>> +               "[LED1]", "NC", "NC", "NC", "", "", "", "",
>
> "LED1" seems like the right name, if this is a GPIO used to drive
> a LED.

This is GPIO based.

>
>> +               "", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
>
> WHat is IO-GCLK? A real GPIO line used for toggling a clock?
> Or a hardware clock signal? In the first case it it correctly named,
> in the other case it should be "[IO-GCLK]".

According to the schematics this is a PWM output.

Regards
ChenYu

>
>> +               "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
>> +                       "[SPI-MISO]", "[SPI-CE1]", "NC",
>> +               "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
>
> Looks right.
>
> Yours,
> Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-07-22 15:47         ` Chen-Yu Tsai
  0 siblings, 0 replies; 26+ messages in thread
From: Chen-Yu Tsai @ 2016-07-22 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Thu, Jul 14, 2016 at 1:47 PM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>
>> This names the GPIO lines on the Banana Pi board in accordance with
>> the A20_Banana_Pi v1.4 Specification.
>>
>> This will make these line names reflect through to userspace
>> so that they can easily be identified and used with the new
>> character device ABI.
>>
>> Some care has been taken to name all lines, not just those used
>> by the external connectors, also lines that are muxed into some
>> other function than GPIO: these are named "[FOO]" so that users
>> can see with lsgpio what all lines are used for.
>>
>> Ps: most of the text was taken from Linux Wallej patch.
>
> LinuS
>
>>
>> Cc: devicetree at vger.kernel.org
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Cc: Chen-Yu Tsai <wens@csie.org>
>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>
> Nice usecase!
>
>> +       /*
>> +        * Legend: proper name = the GPIO line is used as GPIO
>> +        *         NC = not connected (not routed from the SoC)
>> +        *         "[PER]" = pin is muxed for peripheral (not GPIO)
>> +        *         "" = no idea, schematic doesn't say, could be
>> +        *              unrouted (not connected to any external pin)
>> +        *         LSEC = Low Speed External Connector
>> +        *         HSEC = High Speed External Connector

I don't see LSEC/HSEC used anywhere?

>> +        */
>
> So maybe we should make this naming convention a suggested
> standard. People seem to like it.

One question about this whole thing: how extensively should we add
the names? Only for exposed pins? Or every pin that's routed/used?

>> +       gpio-line-names =
>> +               /* PA */
>> +               "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
>> +                       "[ETXD2]", "[ETXD1]", "[ETXD0]",
>> +               "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
>> +                       "[ETXEN]", "[ETXCK]", "[ECRS]",
>> +               "[ECOL]", "[ETXERR]", "", "", "", "", "", "",
>> +               "", "", "", "", "", "", "", "",
>> +               /* PB */
>> +               "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
>> +               "NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
>> +               "", "", "", "", "SCL", "SDA", "", "",
>
> Are these bit-banged SCL and SDA for doing I2C with
> GPIO? Otherwise you probably want to name them "[SCL]" and "[SDA]"

There's an actual I2C controller backing them.

>
>> +               "TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
>
> Same here. You probably want "[TXD0]" etc unless you're bit-banging
> the serial port. "IO-1" sounds like a real GPIO though and should
> probably be named like that without [] and "PH3" what is that really?
> A device-muxed pin or some kind of GPIO?

PH3 is actually the pin name. The vendor uses "IO-7" and "IO-8" as function
names for PH3 and PH5, but actually names them "NC":

    http://www.bananapi.org/p/product.html

>
>> +               "", "", "[SD0-DET]", "", "", "", "", "",
>> +               "NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
>
> So these seem correct too.
>
>> +               "[LED1]", "NC", "NC", "NC", "", "", "", "",
>
> "LED1" seems like the right name, if this is a GPIO used to drive
> a LED.

This is GPIO based.

>
>> +               "", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
>
> WHat is IO-GCLK? A real GPIO line used for toggling a clock?
> Or a hardware clock signal? In the first case it it correctly named,
> in the other case it should be "[IO-GCLK]".

According to the schematics this is a PWM output.

Regards
ChenYu

>
>> +               "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
>> +                       "[SPI-MISO]", "[SPI-CE1]", "NC",
>> +               "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
>
> Looks right.
>
> Yours,
> Linus Walleij

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

* Re: [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-07-22 15:47         ` Chen-Yu Tsai
@ 2016-07-25  5:27           ` fixed-term.Oleksij.Rempel
  -1 siblings, 0 replies; 26+ messages in thread
From: fixed-term.Oleksij.Rempel @ 2016-07-25  5:27 UTC (permalink / raw)
  To: Chen-Yu Tsai, Linus Walleij; +Cc: devicetree, linux-arm-kernel, Oleksij Rempel



On 22.07.2016 17:47, Chen-Yu Tsai wrote:
> On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
> <linus.walleij@linaro.org> wrote:
>> On Thu, Jul 14, 2016 at 1:47 PM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>
>>> This names the GPIO lines on the Banana Pi board in accordance with
>>> the A20_Banana_Pi v1.4 Specification.
>>>
>>> This will make these line names reflect through to userspace
>>> so that they can easily be identified and used with the new
>>> character device ABI.
>>>
>>> Some care has been taken to name all lines, not just those used
>>> by the external connectors, also lines that are muxed into some
>>> other function than GPIO: these are named "[FOO]" so that users
>>> can see with lsgpio what all lines are used for.
>>>
>>> Ps: most of the text was taken from Linux Wallej patch.
>>
>> LinuS

oops... :)

>>>
>>> Cc: devicetree@vger.kernel.org
>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>> Cc: linux-arm-kernel@lists.infradead.org
>>> Cc: Chen-Yu Tsai <wens@csie.org>
>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>
>> Nice usecase!
>>
>>> +       /*
>>> +        * Legend: proper name = the GPIO line is used as GPIO
>>> +        *         NC = not connected (not routed from the SoC)
>>> +        *         "[PER]" = pin is muxed for peripheral (not GPIO)
>>> +        *         "" = no idea, schematic doesn't say, could be
>>> +        *              unrouted (not connected to any external pin)
>>> +        *         LSEC = Low Speed External Connector
>>> +        *         HSEC = High Speed External Connector
> 
> I don't see LSEC/HSEC used anywhere?

ok, will remove it. Probably it will be better to have it in common
place some where by the Docs?


>>> +        */
>>
>> So maybe we should make this naming convention a suggested
>> standard. People seem to like it.

Why should i invent some thing new, some Docs with suggested names will
be good.

> One question about this whole thing: how extensively should we add
> the names? Only for exposed pins? Or every pin that's routed/used?

Depends on HW. Even on production system i had cases where i need to
jump in and use some random pin for debugging. So, hawing it in
devicetree can help to reduce time later.

But i would prefer to have some kind of merged names: Names provided by
SoC descriptor (real pin names or locations) and names provided by board
design.

>>> +       gpio-line-names =
>>> +               /* PA */
>>> +               "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
>>> +                       "[ETXD2]", "[ETXD1]", "[ETXD0]",
>>> +               "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
>>> +                       "[ETXEN]", "[ETXCK]", "[ECRS]",
>>> +               "[ECOL]", "[ETXERR]", "", "", "", "", "", "",
>>> +               "", "", "", "", "", "", "", "",
>>> +               /* PB */
>>> +               "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
>>> +               "NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
>>> +               "", "", "", "", "SCL", "SDA", "", "",
>>
>> Are these bit-banged SCL and SDA for doing I2C with
>> GPIO? Otherwise you probably want to name them "[SCL]" and "[SDA]"
> 
> There's an actual I2C controller backing them.

Ok, i will fix it.

>>
>>> +               "TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
>>
>> Same here. You probably want "[TXD0]" etc unless you're bit-banging
>> the serial port. "IO-1" sounds like a real GPIO though and should
>> probably be named like that without [] and "PH3" what is that really?
>> A device-muxed pin or some kind of GPIO?
> 
> PH3 is actually the pin name. The vendor uses "IO-7" and "IO-8" as function
> names for PH3 and PH5, but actually names them "NC":

Not in:
https://linux-sunxi.org/images/9/9d/A20_Bananapi_Schematic.pdf

which was used for this patch.

>     http://www.bananapi.org/p/product.html
> 
>>
>>> +               "", "", "[SD0-DET]", "", "", "", "", "",
>>> +               "NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
>>
>> So these seem correct too.
>>
>>> +               "[LED1]", "NC", "NC", "NC", "", "", "", "",
>>
>> "LED1" seems like the right name, if this is a GPIO used to drive
>> a LED.
> 
> This is GPIO based.

This was not clear to me, marking GPIO pin as peripheral, at moment of
writing and testing it was a allocated by led driver. Bit for example
IO-GCLK was free to use for GPIO :).. so do [] actually make sense?

>>
>>> +               "", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
>>
>> WHat is IO-GCLK? A real GPIO line used for toggling a clock?
>> Or a hardware clock signal? In the first case it it correctly named,
>> in the other case it should be "[IO-GCLK]".
> 
> According to the schematics this is a PWM output.

there are two names:
SoC name: PWM1
Connector name: IO-GCLK

Which should be used. IMO it was user friendly to use connector name.

> Regards
> ChenYu
> 
>>
>>> +               "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
>>> +                       "[SPI-MISO]", "[SPI-CE1]", "NC",
>>> +               "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
>>
>> Looks right.
>>
>> Yours,
>> Linus Walleij

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-07-25  5:27           ` fixed-term.Oleksij.Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: fixed-term.Oleksij.Rempel @ 2016-07-25  5:27 UTC (permalink / raw)
  To: linux-arm-kernel



On 22.07.2016 17:47, Chen-Yu Tsai wrote:
> On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
> <linus.walleij@linaro.org> wrote:
>> On Thu, Jul 14, 2016 at 1:47 PM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>
>>> This names the GPIO lines on the Banana Pi board in accordance with
>>> the A20_Banana_Pi v1.4 Specification.
>>>
>>> This will make these line names reflect through to userspace
>>> so that they can easily be identified and used with the new
>>> character device ABI.
>>>
>>> Some care has been taken to name all lines, not just those used
>>> by the external connectors, also lines that are muxed into some
>>> other function than GPIO: these are named "[FOO]" so that users
>>> can see with lsgpio what all lines are used for.
>>>
>>> Ps: most of the text was taken from Linux Wallej patch.
>>
>> LinuS

oops... :)

>>>
>>> Cc: devicetree at vger.kernel.org
>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>> Cc: linux-arm-kernel at lists.infradead.org
>>> Cc: Chen-Yu Tsai <wens@csie.org>
>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>
>> Nice usecase!
>>
>>> +       /*
>>> +        * Legend: proper name = the GPIO line is used as GPIO
>>> +        *         NC = not connected (not routed from the SoC)
>>> +        *         "[PER]" = pin is muxed for peripheral (not GPIO)
>>> +        *         "" = no idea, schematic doesn't say, could be
>>> +        *              unrouted (not connected to any external pin)
>>> +        *         LSEC = Low Speed External Connector
>>> +        *         HSEC = High Speed External Connector
> 
> I don't see LSEC/HSEC used anywhere?

ok, will remove it. Probably it will be better to have it in common
place some where by the Docs?


>>> +        */
>>
>> So maybe we should make this naming convention a suggested
>> standard. People seem to like it.

Why should i invent some thing new, some Docs with suggested names will
be good.

> One question about this whole thing: how extensively should we add
> the names? Only for exposed pins? Or every pin that's routed/used?

Depends on HW. Even on production system i had cases where i need to
jump in and use some random pin for debugging. So, hawing it in
devicetree can help to reduce time later.

But i would prefer to have some kind of merged names: Names provided by
SoC descriptor (real pin names or locations) and names provided by board
design.

>>> +       gpio-line-names =
>>> +               /* PA */
>>> +               "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
>>> +                       "[ETXD2]", "[ETXD1]", "[ETXD0]",
>>> +               "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
>>> +                       "[ETXEN]", "[ETXCK]", "[ECRS]",
>>> +               "[ECOL]", "[ETXERR]", "", "", "", "", "", "",
>>> +               "", "", "", "", "", "", "", "",
>>> +               /* PB */
>>> +               "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
>>> +               "NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
>>> +               "", "", "", "", "SCL", "SDA", "", "",
>>
>> Are these bit-banged SCL and SDA for doing I2C with
>> GPIO? Otherwise you probably want to name them "[SCL]" and "[SDA]"
> 
> There's an actual I2C controller backing them.

Ok, i will fix it.

>>
>>> +               "TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
>>
>> Same here. You probably want "[TXD0]" etc unless you're bit-banging
>> the serial port. "IO-1" sounds like a real GPIO though and should
>> probably be named like that without [] and "PH3" what is that really?
>> A device-muxed pin or some kind of GPIO?
> 
> PH3 is actually the pin name. The vendor uses "IO-7" and "IO-8" as function
> names for PH3 and PH5, but actually names them "NC":

Not in:
https://linux-sunxi.org/images/9/9d/A20_Bananapi_Schematic.pdf

which was used for this patch.

>     http://www.bananapi.org/p/product.html
> 
>>
>>> +               "", "", "[SD0-DET]", "", "", "", "", "",
>>> +               "NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
>>
>> So these seem correct too.
>>
>>> +               "[LED1]", "NC", "NC", "NC", "", "", "", "",
>>
>> "LED1" seems like the right name, if this is a GPIO used to drive
>> a LED.
> 
> This is GPIO based.

This was not clear to me, marking GPIO pin as peripheral, at moment of
writing and testing it was a allocated by led driver. Bit for example
IO-GCLK was free to use for GPIO :).. so do [] actually make sense?

>>
>>> +               "", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
>>
>> WHat is IO-GCLK? A real GPIO line used for toggling a clock?
>> Or a hardware clock signal? In the first case it it correctly named,
>> in the other case it should be "[IO-GCLK]".
> 
> According to the schematics this is a PWM output.

there are two names:
SoC name: PWM1
Connector name: IO-GCLK

Which should be used. IMO it was user friendly to use connector name.

> Regards
> ChenYu
> 
>>
>>> +               "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
>>> +                       "[SPI-MISO]", "[SPI-CE1]", "NC",
>>> +               "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
>>
>> Looks right.
>>
>> Yours,
>> Linus Walleij

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

* Re: [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-07-25  5:27           ` fixed-term.Oleksij.Rempel
@ 2016-07-25 13:27               ` Linus Walleij
  -1 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2016-07-25 13:27 UTC (permalink / raw)
  To: fixed-term.Oleksij.Rempel
  Cc: Chen-Yu Tsai, Oleksij Rempel, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Jul 25, 2016 at 7:27 AM, fixed-term.Oleksij.Rempel
<fixed-term.Oleksij.Rempel-V5te9oGctAVWk0Htik3J/w@public.gmane.org> wrote:
> On 22.07.2016 17:47, Chen-Yu Tsai wrote:
>> On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
>> <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:

>>> "LED1" seems like the right name, if this is a GPIO used to drive
>>> a LED.
>>
>> This is GPIO based.
>
> This was not clear to me, marking GPIO pin as peripheral, at moment of
> writing and testing it was a allocated by led driver. Bit for example
> IO-GCLK was free to use for GPIO :).. so do [] actually make sense?

I would say if the hardware is used in GPIO mode, i.e. if the hardware
registers of the GPIO block is written to activate the LED, then it
is "LED1".

If there would be a specific LED driver block that disables the GPIO
block to be used for the same lines and have its registers elsewhere,
it would be "[LED1]".

So proper names "FOO" is for the case where the GPIO output is
used as GPIO.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-07-25 13:27               ` Linus Walleij
  0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2016-07-25 13:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 25, 2016 at 7:27 AM, fixed-term.Oleksij.Rempel
<fixed-term.Oleksij.Rempel@de.bosch.com> wrote:
> On 22.07.2016 17:47, Chen-Yu Tsai wrote:
>> On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
>> <linus.walleij@linaro.org> wrote:

>>> "LED1" seems like the right name, if this is a GPIO used to drive
>>> a LED.
>>
>> This is GPIO based.
>
> This was not clear to me, marking GPIO pin as peripheral, at moment of
> writing and testing it was a allocated by led driver. Bit for example
> IO-GCLK was free to use for GPIO :).. so do [] actually make sense?

I would say if the hardware is used in GPIO mode, i.e. if the hardware
registers of the GPIO block is written to activate the LED, then it
is "LED1".

If there would be a specific LED driver block that disables the GPIO
block to be used for the same lines and have its registers elsewhere,
it would be "[LED1]".

So proper names "FOO" is for the case where the GPIO output is
used as GPIO.

Yours,
Linus Walleij

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-07-25 13:27               ` Linus Walleij
@ 2016-08-05  8:05                   ` Oleksij Rempel
  -1 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2016-08-05  8:05 UTC (permalink / raw)
  To: fixed-term.Oleksij.Rempel-V5te9oGctAVWk0Htik3J/w
  Cc: Oleksij Rempel, devicetree-u79uwXL29TY76Z2rM5mHXA, Linus Walleij,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Ps: most of the text was taken from Linux Wallej patch.

Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Signed-off-by: Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 67c8a76..81ecb89 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,64 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "USB0-DRV", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "[SCL]", "[SDA]", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "IO-8", "USB0-IDDET", "IO-7", "", "",
+		"", "", "SD0-DET", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "EMAC-PWR-EN",
+		"LED1", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "[IO-GCLK]", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin@0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-08-05  8:05                   ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2016-08-05  8:05 UTC (permalink / raw)
  To: linux-arm-kernel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Ps: most of the text was taken from Linux Wallej patch.

Cc: devicetree at vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 67c8a76..81ecb89 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,64 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "USB0-DRV", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "[SCL]", "[SDA]", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "IO-8", "USB0-IDDET", "IO-7", "", "",
+		"", "", "SD0-DET", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "EMAC-PWR-EN",
+		"LED1", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "[IO-GCLK]", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
-- 
2.7.4

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

* [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-07-25 13:27               ` Linus Walleij
@ 2016-08-05  8:06                 ` Oleksij Rempel
  -1 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2016-08-05  8:06 UTC (permalink / raw)
  To: fixed-term.Oleksij.Rempel
  Cc: devicetree, Linus Walleij, Chen-Yu Tsai, linux-arm-kernel,
	Oleksij Rempel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Ps: most of the text was taken from Linus Wallej patch.

Cc: devicetree@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 67c8a76..81ecb89 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,64 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "USB0-DRV", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "[SCL]", "[SDA]", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "IO-8", "USB0-IDDET", "IO-7", "", "",
+		"", "", "SD0-DET", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "EMAC-PWR-EN",
+		"LED1", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "[IO-GCLK]", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin@0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
-- 
2.7.4

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

* [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-08-05  8:06                 ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2016-08-05  8:06 UTC (permalink / raw)
  To: linux-arm-kernel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Ps: most of the text was taken from Linus Wallej patch.

Cc: devicetree at vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 67c8a76..81ecb89 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,64 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "USB0-DRV", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "[SCL]", "[SDA]", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "IO-8", "USB0-IDDET", "IO-7", "", "",
+		"", "", "SD0-DET", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "EMAC-PWR-EN",
+		"LED1", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "[IO-GCLK]", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
 		allwinner,pins = "PH4";
 		allwinner,function = "gpio_in";
-- 
2.7.4

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

* Re: [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-08-05  8:06                 ` Oleksij Rempel
@ 2016-08-08 17:51                     ` Linus Walleij
  -1 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2016-08-08 17:51 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: Oleksij Rempel, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai

On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org> wrote:

> This names the GPIO lines on the Banana Pi board in accordance with
> the A20_Banana_Pi v1.4 Specification.
>
> This will make these line names reflect through to userspace
> so that they can easily be identified and used with the new
> character device ABI.
>
> Some care has been taken to name all lines, not just those used
> by the external connectors, also lines that are muxed into some
> other function than GPIO: these are named "[FOO]" so that users
> can see with lsgpio what all lines are used for.
>
> Ps: most of the text was taken from Linus Wallej patch.
>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> Signed-off-by: Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>

Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2016-08-08 17:51                     ` Linus Walleij
  0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2016-08-08 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:

> This names the GPIO lines on the Banana Pi board in accordance with
> the A20_Banana_Pi v1.4 Specification.
>
> This will make these line names reflect through to userspace
> so that they can easily be identified and used with the new
> character device ABI.
>
> Some care has been taken to name all lines, not just those used
> by the external connectors, also lines that are muxed into some
> other function than GPIO: these are named "[FOO]" so that users
> can see with lsgpio what all lines are used for.
>
> Ps: most of the text was taken from Linus Wallej patch.
>
> Cc: devicetree at vger.kernel.org
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2016-08-08 17:51                     ` Linus Walleij
@ 2017-04-28  5:11                       ` Oleksij Rempel
  -1 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2017-04-28  5:11 UTC (permalink / raw)
  To: Linus Walleij; +Cc: devicetree, Chen-Yu Tsai, Oleksij Rempel, linux-arm-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 1137 bytes --]

Am 08.08.2016 um 19:51 schrieb Linus Walleij:
> On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
> 
>> This names the GPIO lines on the Banana Pi board in accordance with
>> the A20_Banana_Pi v1.4 Specification.
>>
>> This will make these line names reflect through to userspace
>> so that they can easily be identified and used with the new
>> character device ABI.
>>
>> Some care has been taken to name all lines, not just those used
>> by the external connectors, also lines that are muxed into some
>> other function than GPIO: these are named "[FOO]" so that users
>> can see with lsgpio what all lines are used for.
>>
>> Ps: most of the text was taken from Linus Wallej patch.
>>
>> Cc: devicetree@vger.kernel.org
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: Chen-Yu Tsai <wens@csie.org>
>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Yours,
> Linus Walleij

Hm... i assume this patch was lost. Should i resend it?

-- 
Regards,
Oleksij


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

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

* [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2017-04-28  5:11                       ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2017-04-28  5:11 UTC (permalink / raw)
  To: linux-arm-kernel

Am 08.08.2016 um 19:51 schrieb Linus Walleij:
> On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
> 
>> This names the GPIO lines on the Banana Pi board in accordance with
>> the A20_Banana_Pi v1.4 Specification.
>>
>> This will make these line names reflect through to userspace
>> so that they can easily be identified and used with the new
>> character device ABI.
>>
>> Some care has been taken to name all lines, not just those used
>> by the external connectors, also lines that are muxed into some
>> other function than GPIO: these are named "[FOO]" so that users
>> can see with lsgpio what all lines are used for.
>>
>> Ps: most of the text was taken from Linus Wallej patch.
>>
>> Cc: devicetree at vger.kernel.org
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Cc: Chen-Yu Tsai <wens@csie.org>
>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Yours,
> Linus Walleij

Hm... i assume this patch was lost. Should i resend it?

-- 
Regards,
Oleksij

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170428/8543b817/attachment.sig>

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

* Re: [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2017-04-28  5:11                       ` Oleksij Rempel
@ 2017-04-28  8:45                         ` Linus Walleij
  -1 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2017-04-28  8:45 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: devicetree, Chen-Yu Tsai, Oleksij Rempel, linux-arm-kernel

On Fri, Apr 28, 2017 at 7:11 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
> Am 08.08.2016 um 19:51 schrieb Linus Walleij:
>> On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>
>>> This names the GPIO lines on the Banana Pi board in accordance with
>>> the A20_Banana_Pi v1.4 Specification.
>>>
>>> This will make these line names reflect through to userspace
>>> so that they can easily be identified and used with the new
>>> character device ABI.
>>>
>>> Some care has been taken to name all lines, not just those used
>>> by the external connectors, also lines that are muxed into some
>>> other function than GPIO: these are named "[FOO]" so that users
>>> can see with lsgpio what all lines are used for.
>>>
>>> Ps: most of the text was taken from Linus Wallej patch.
>>>
>>> Cc: devicetree@vger.kernel.org
>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>> Cc: linux-arm-kernel@lists.infradead.org
>>> Cc: Chen-Yu Tsai <wens@csie.org>
>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> Yours,
>> Linus Walleij
>
> Hm... i assume this patch was lost. Should i resend it?

Yes, but I'm not applying DTS patches. Make sure that the
sunxi maintainers get it and merge it.

Yours,
Linus Walleij

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

* [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2017-04-28  8:45                         ` Linus Walleij
  0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2017-04-28  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 28, 2017 at 7:11 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
> Am 08.08.2016 um 19:51 schrieb Linus Walleij:
>> On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>
>>> This names the GPIO lines on the Banana Pi board in accordance with
>>> the A20_Banana_Pi v1.4 Specification.
>>>
>>> This will make these line names reflect through to userspace
>>> so that they can easily be identified and used with the new
>>> character device ABI.
>>>
>>> Some care has been taken to name all lines, not just those used
>>> by the external connectors, also lines that are muxed into some
>>> other function than GPIO: these are named "[FOO]" so that users
>>> can see with lsgpio what all lines are used for.
>>>
>>> Ps: most of the text was taken from Linus Wallej patch.
>>>
>>> Cc: devicetree at vger.kernel.org
>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>> Cc: linux-arm-kernel at lists.infradead.org
>>> Cc: Chen-Yu Tsai <wens@csie.org>
>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> Yours,
>> Linus Walleij
>
> Hm... i assume this patch was lost. Should i resend it?

Yes, but I'm not applying DTS patches. Make sure that the
sunxi maintainers get it and merge it.

Yours,
Linus Walleij

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

* Re: [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2017-04-28  8:45                         ` Linus Walleij
@ 2017-04-28  9:03                           ` Oleksij Rempel
  -1 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2017-04-28  9:03 UTC (permalink / raw)
  To: Linus Walleij; +Cc: devicetree, Chen-Yu Tsai, linux-arm-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 1419 bytes --]

Am 28.04.2017 um 10:45 schrieb Linus Walleij:
> On Fri, Apr 28, 2017 at 7:11 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>> Am 08.08.2016 um 19:51 schrieb Linus Walleij:
>>> On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>>
>>>> This names the GPIO lines on the Banana Pi board in accordance with
>>>> the A20_Banana_Pi v1.4 Specification.
>>>>
>>>> This will make these line names reflect through to userspace
>>>> so that they can easily be identified and used with the new
>>>> character device ABI.
>>>>
>>>> Some care has been taken to name all lines, not just those used
>>>> by the external connectors, also lines that are muxed into some
>>>> other function than GPIO: these are named "[FOO]" so that users
>>>> can see with lsgpio what all lines are used for.
>>>>
>>>> Ps: most of the text was taken from Linus Wallej patch.
>>>>
>>>> Cc: devicetree@vger.kernel.org
>>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>> Cc: Chen-Yu Tsai <wens@csie.org>
>>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>>
>>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> Hm... i assume this patch was lost. Should i resend it?
> 
> Yes, but I'm not applying DTS patches. Make sure that the
> sunxi maintainers get it and merge it.

Chen-Yu Tsai - ping.

-- 
Regards,
Oleksij


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

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

* [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2017-04-28  9:03                           ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2017-04-28  9:03 UTC (permalink / raw)
  To: linux-arm-kernel

Am 28.04.2017 um 10:45 schrieb Linus Walleij:
> On Fri, Apr 28, 2017 at 7:11 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>> Am 08.08.2016 um 19:51 schrieb Linus Walleij:
>>> On Fri, Aug 5, 2016 at 10:06 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>>>
>>>> This names the GPIO lines on the Banana Pi board in accordance with
>>>> the A20_Banana_Pi v1.4 Specification.
>>>>
>>>> This will make these line names reflect through to userspace
>>>> so that they can easily be identified and used with the new
>>>> character device ABI.
>>>>
>>>> Some care has been taken to name all lines, not just those used
>>>> by the external connectors, also lines that are muxed into some
>>>> other function than GPIO: these are named "[FOO]" so that users
>>>> can see with lsgpio what all lines are used for.
>>>>
>>>> Ps: most of the text was taken from Linus Wallej patch.
>>>>
>>>> Cc: devicetree at vger.kernel.org
>>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>>> Cc: linux-arm-kernel at lists.infradead.org
>>>> Cc: Chen-Yu Tsai <wens@csie.org>
>>>> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
>>>
>>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> Hm... i assume this patch was lost. Should i resend it?
> 
> Yes, but I'm not applying DTS patches. Make sure that the
> sunxi maintainers get it and merge it.

Chen-Yu Tsai - ping.

-- 
Regards,
Oleksij

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170428/8788475c/attachment.sig>

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

* [PATCH v2 resend] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2017-04-28  8:45                         ` Linus Walleij
@ 2017-05-03  7:09                           ` Oleksij Rempel
  -1 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2017-05-03  7:09 UTC (permalink / raw)
  To: ore
  Cc: devicetree, Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel,
	Oleksij Rempel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 60 ++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 91f2e5f..5b3e0ee 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,66 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 *         LSEC = Low Speed External Connector
+	 *         HSEC = High Speed External Connector
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "SCL", "SDA", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
+		"", "", "[SD0-DET]", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
+		"[LED1]", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin@0 {
 		pins = "PH4";
 		function = "gpio_in";
-- 
2.7.4

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

* [PATCH v2 resend] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2017-05-03  7:09                           ` Oleksij Rempel
  0 siblings, 0 replies; 26+ messages in thread
From: Oleksij Rempel @ 2017-05-03  7:09 UTC (permalink / raw)
  To: linux-arm-kernel

This names the GPIO lines on the Banana Pi board in accordance with
the A20_Banana_Pi v1.4 Specification.

This will make these line names reflect through to userspace
so that they can easily be identified and used with the new
character device ABI.

Some care has been taken to name all lines, not just those used
by the external connectors, also lines that are muxed into some
other function than GPIO: these are named "[FOO]" so that users
can see with lsgpio what all lines are used for.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 60 ++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 91f2e5f..5b3e0ee 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -178,6 +178,66 @@
 };
 
 &pio {
+	/*
+	 * Legend: proper name = the GPIO line is used as GPIO
+	 *         NC = not connected (not routed from the SoC)
+	 *         "[PER]" = pin is muxed for peripheral (not GPIO)
+	 *         "" = no idea, schematic doesn't say, could be
+	 *              unrouted (not connected to any external pin)
+	 *         LSEC = Low Speed External Connector
+	 *         HSEC = High Speed External Connector
+	 */
+	gpio-line-names =
+		/* PA */
+		"[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]",
+			"[ETXD2]", "[ETXD1]", "[ETXD0]",
+		"[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]",
+			"[ETXEN]", "[ETXCK]", "[ECRS]",
+		"[ECOL]", "[ETXERR]", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PB */
+		"[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC",
+		"NC", "[USB0-DRV]", "NC", "NC", "NC", "NC", "", "",
+		"", "", "", "", "SCL", "SDA", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PC */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PD */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PE */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PF */
+		"[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]",
+			"[SD0-D2]", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PG */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* PH */
+		"TXD0", "RXD0", "IO-1", "PH3", "[USB0-IDDET]", "PH5", "", "",
+		"", "", "[SD0-DET]", "", "", "", "", "",
+		"NC", "", "", "", "IO-4", "IO-5", "NC", "[EMAC-PWR-EN]",
+		"[LED1]", "NC", "NC", "NC", "", "", "", "",
+		/* PI */
+		"", "", "", "IO-GCLK", "NC", "NC", "NC", "NC",
+		"NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]",
+			"[SPI-MISO]", "[SPI-CE1]", "NC",
+		"IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "",
+		"", "", "", "", "", "", "", "";
+
 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
 		pins = "PH4";
 		function = "gpio_in";
-- 
2.7.4

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

* Re: [PATCH v2 resend] arm: dts: sun7i-a20-bananapi: name the GPIO lines
  2017-05-03  7:09                           ` Oleksij Rempel
@ 2017-05-04 14:56                               ` Maxime Ripard
  -1 siblings, 0 replies; 26+ messages in thread
From: Maxime Ripard @ 2017-05-04 14:56 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: ore-bIcnvbaLZ9MEGnE8C9+IrQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Chen-Yu Tsai

[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]

On Wed, May 03, 2017 at 09:09:20AM +0200, Oleksij Rempel wrote:
> This names the GPIO lines on the Banana Pi board in accordance with
> the A20_Banana_Pi v1.4 Specification.
> 
> This will make these line names reflect through to userspace
> so that they can easily be identified and used with the new
> character device ABI.
> 
> Some care has been taken to name all lines, not just those used
> by the external connectors, also lines that are muxed into some
> other function than GPIO: these are named "[FOO]" so that users
> can see with lsgpio what all lines are used for.
> 
> Signed-off-by: Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
> Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> Cc: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun7i-a20-bananapi.dts | 60 ++++++++++++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> index 91f2e5f..5b3e0ee 100644
> --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> @@ -178,6 +178,66 @@
>  };
>  
>  &pio {
> +	/*
> +	 * Legend: proper name = the GPIO line is used as GPIO

I'm not convinced that a legend here is helpful in any way. No end
user is going to even search for it here.

> +	 *         NC = not connected (not routed from the SoC)

Judging from the binding documentation, this should be the same than
"".

> +	 *         "[PER]" = pin is muxed for peripheral (not GPIO)

We don't need the brackets. You have no guarantee that it is actually
muxed, and will need to get that info from somewhere else either
way. This is also not a syntax that is in the generic binding
definition.

> +	 *         "" = no idea, schematic doesn't say, could be
> +	 *              unrouted (not connected to any external pin)
> +	 *         LSEC = Low Speed External Connector
> +	 *         HSEC = High Speed External Connector

And both of those are not used.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH v2 resend] arm: dts: sun7i-a20-bananapi: name the GPIO lines
@ 2017-05-04 14:56                               ` Maxime Ripard
  0 siblings, 0 replies; 26+ messages in thread
From: Maxime Ripard @ 2017-05-04 14:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 03, 2017 at 09:09:20AM +0200, Oleksij Rempel wrote:
> This names the GPIO lines on the Banana Pi board in accordance with
> the A20_Banana_Pi v1.4 Specification.
> 
> This will make these line names reflect through to userspace
> so that they can easily be identified and used with the new
> character device ABI.
> 
> Some care has been taken to name all lines, not just those used
> by the external connectors, also lines that are muxed into some
> other function than GPIO: these are named "[FOO]" so that users
> can see with lsgpio what all lines are used for.
> 
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Cc: devicetree at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/boot/dts/sun7i-a20-bananapi.dts | 60 ++++++++++++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> index 91f2e5f..5b3e0ee 100644
> --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
> @@ -178,6 +178,66 @@
>  };
>  
>  &pio {
> +	/*
> +	 * Legend: proper name = the GPIO line is used as GPIO

I'm not convinced that a legend here is helpful in any way. No end
user is going to even search for it here.

> +	 *         NC = not connected (not routed from the SoC)

Judging from the binding documentation, this should be the same than
"".

> +	 *         "[PER]" = pin is muxed for peripheral (not GPIO)

We don't need the brackets. You have no guarantee that it is actually
muxed, and will need to get that info from somewhere else either
way. This is also not a syntax that is in the generic binding
definition.

> +	 *         "" = no idea, schematic doesn't say, could be
> +	 *              unrouted (not connected to any external pin)
> +	 *         LSEC = Low Speed External Connector
> +	 *         HSEC = High Speed External Connector

And both of those are not used.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170504/86a6ce79/attachment.sig>

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

end of thread, other threads:[~2017-05-04 14:56 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 11:47 [PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines Oleksij Rempel
2016-07-14 11:47 ` Oleksij Rempel
     [not found] ` <1468496825-4896-1-git-send-email-linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
2016-07-22 14:55   ` Linus Walleij
2016-07-22 14:55     ` Linus Walleij
     [not found]     ` <CACRpkdZLG1Ffdiw3xkP4G0XBr=WDXg2Vbh2Xmgno1PTNhfZHfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-22 15:47       ` Chen-Yu Tsai
2016-07-22 15:47         ` Chen-Yu Tsai
2016-07-25  5:27         ` fixed-term.Oleksij.Rempel
2016-07-25  5:27           ` fixed-term.Oleksij.Rempel
     [not found]           ` <5795A334.3000701-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
2016-07-25 13:27             ` Linus Walleij
2016-07-25 13:27               ` Linus Walleij
     [not found]               ` <CACRpkdYnK=7C=F5hZUo-nYv6Z+Pb+eT7vm1e4hL8N-QgJnuLfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-05  8:05                 ` Oleksij Rempel
2016-08-05  8:05                   ` Oleksij Rempel
2016-08-05  8:06               ` [PATCH v2] " Oleksij Rempel
2016-08-05  8:06                 ` Oleksij Rempel
     [not found]                 ` <1470384404-6796-1-git-send-email-linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
2016-08-08 17:51                   ` Linus Walleij
2016-08-08 17:51                     ` Linus Walleij
2017-04-28  5:11                     ` Oleksij Rempel
2017-04-28  5:11                       ` Oleksij Rempel
2017-04-28  8:45                       ` Linus Walleij
2017-04-28  8:45                         ` Linus Walleij
2017-04-28  9:03                         ` Oleksij Rempel
2017-04-28  9:03                           ` Oleksij Rempel
2017-05-03  7:09                         ` [PATCH v2 resend] " Oleksij Rempel
2017-05-03  7:09                           ` Oleksij Rempel
     [not found]                           ` <1493795360-18629-1-git-send-email-linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>
2017-05-04 14:56                             ` Maxime Ripard
2017-05-04 14:56                               ` Maxime Ripard

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.