All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Klein <michael@fossekall.de>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names
Date: Fri, 20 Nov 2020 19:27:39 +0100	[thread overview]
Message-ID: <20201120182739.GA3734181@a98shuttle.de> (raw)
In-Reply-To: <20201120155252.kfkavrn4wpqzmbyc@gilmour>

Thank you for having a look at the patch!

On Fri, Nov 20, 2020 at 04:52:52PM +0100, Maxime Ripard wrote:
>On Sun, Nov 15, 2020 at 11:24:25PM +0100, Michael Klein wrote:
>> Add gpio-line-names as documented in the Banana Pi wiki [1] and in the
>> schematics [2].
>>
>> [1]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#GPIO_PIN_define
>> [2]: https://drive.google.com/file/d/0B4PAo2nW2KfnMW5sVkxWSW9qa28/view
>>
>> Signed-off-by: Michael Klein <michael@fossekall.de>
>> ---
>>  .../dts/sun8i-h2-plus-bananapi-m2-zero.dts    | 64 +++++++++++++++++++
>>  1 file changed, 64 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
>> index 4c6704e4c57e..b4ddfaf01b45 100644
>> --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
>> +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
>> @@ -136,6 +136,70 @@ bluetooth {
>>
>>  };
>>
>> +&pio {
>> +	gpio-line-names =
>> +		/* PA */
>> +		"UART2-TX", "UART2-RX", "UART2-RTS", "UART2-CTS",
>> +			"UART0-TXD", "UART0-RXD", "PWM1", "PA7-EINT7",
>> +		"PA8-EINT8", "PA9-EINT9", "PA10-EINT10", "TWI0-SCK",
>> +			"TWI0-SDA", "UART3-TX", "UART3-RX", "UART3-RTS",
>> +		"UART3-CTS", "PA17-EINT17", "TWI1-SCK", "TWI1-SDA",
>> +			"PA20-EINT20", "PA21-EINT21", "", "",
>> +		"", "", "", "", "", "", "", "",
>
>IIRC, the point is to have the pin names that the vendor publishes.
>
>Looking at Documentation/devicetree/bindings/gpio/gpio.txt, it says:
>
>"""
>Optionally, a GPIO controller may have a "gpio-line-names" property. This is
>an array of strings defining the names of the GPIO lines going out of the
>GPIO controller. This name should be the most meaningful producer name
>for the system, such as a rail name indicating the usage. Package names
>such as pin name are discouraged: such lines have opaque names (since they
>are by definition generic purpose) and such names are usually not very
>helpful.
>"""
>
>In this case, from the link you gave above, I think having the CON*-P*
>names make more sense.

Hm, but these are the pin names (of the connector) and should thus not 
be used, right?

For e.g. the PA0 pin, the wiki link gives three candidates:

- CON2-P13 (GPIO Pin Name -> pin 13 of the 40 pin GPIO header)
- UART2-TX (Default Function)
- PA0-EINT0 (Function2 : GPIO)

IMHO, the CON*-P* name is the least helpful of the above, as it tells 
nothing about the usage. I'm not sure about the other two names, though.

Michael

WARNING: multiple messages have this Message-ID (diff)
From: Michael Klein <michael@fossekall.de>
To: Maxime Ripard <maxime@cerno.tech>
Cc: devicetree@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names
Date: Fri, 20 Nov 2020 19:27:39 +0100	[thread overview]
Message-ID: <20201120182739.GA3734181@a98shuttle.de> (raw)
In-Reply-To: <20201120155252.kfkavrn4wpqzmbyc@gilmour>

Thank you for having a look at the patch!

On Fri, Nov 20, 2020 at 04:52:52PM +0100, Maxime Ripard wrote:
>On Sun, Nov 15, 2020 at 11:24:25PM +0100, Michael Klein wrote:
>> Add gpio-line-names as documented in the Banana Pi wiki [1] and in the
>> schematics [2].
>>
>> [1]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#GPIO_PIN_define
>> [2]: https://drive.google.com/file/d/0B4PAo2nW2KfnMW5sVkxWSW9qa28/view
>>
>> Signed-off-by: Michael Klein <michael@fossekall.de>
>> ---
>>  .../dts/sun8i-h2-plus-bananapi-m2-zero.dts    | 64 +++++++++++++++++++
>>  1 file changed, 64 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
>> index 4c6704e4c57e..b4ddfaf01b45 100644
>> --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
>> +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
>> @@ -136,6 +136,70 @@ bluetooth {
>>
>>  };
>>
>> +&pio {
>> +	gpio-line-names =
>> +		/* PA */
>> +		"UART2-TX", "UART2-RX", "UART2-RTS", "UART2-CTS",
>> +			"UART0-TXD", "UART0-RXD", "PWM1", "PA7-EINT7",
>> +		"PA8-EINT8", "PA9-EINT9", "PA10-EINT10", "TWI0-SCK",
>> +			"TWI0-SDA", "UART3-TX", "UART3-RX", "UART3-RTS",
>> +		"UART3-CTS", "PA17-EINT17", "TWI1-SCK", "TWI1-SDA",
>> +			"PA20-EINT20", "PA21-EINT21", "", "",
>> +		"", "", "", "", "", "", "", "",
>
>IIRC, the point is to have the pin names that the vendor publishes.
>
>Looking at Documentation/devicetree/bindings/gpio/gpio.txt, it says:
>
>"""
>Optionally, a GPIO controller may have a "gpio-line-names" property. This is
>an array of strings defining the names of the GPIO lines going out of the
>GPIO controller. This name should be the most meaningful producer name
>for the system, such as a rail name indicating the usage. Package names
>such as pin name are discouraged: such lines have opaque names (since they
>are by definition generic purpose) and such names are usually not very
>helpful.
>"""
>
>In this case, from the link you gave above, I think having the CON*-P*
>names make more sense.

Hm, but these are the pin names (of the connector) and should thus not 
be used, right?

For e.g. the PA0 pin, the wiki link gives three candidates:

- CON2-P13 (GPIO Pin Name -> pin 13 of the 40 pin GPIO header)
- UART2-TX (Default Function)
- PA0-EINT0 (Function2 : GPIO)

IMHO, the CON*-P* name is the least helpful of the above, as it tells 
nothing about the usage. I'm not sure about the other two names, though.

Michael

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

  reply	other threads:[~2020-11-20 18:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 22:24 [PATCH] ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names Michael Klein
2020-11-15 22:24 ` Michael Klein
2020-11-20 15:52 ` Maxime Ripard
2020-11-20 15:52   ` Maxime Ripard
2020-11-20 18:27   ` Michael Klein [this message]
2020-11-20 18:27     ` Michael Klein
2020-11-23  4:39     ` Chen-Yu Tsai
2020-11-23  4:39       ` Chen-Yu Tsai
2020-11-23  9:43       ` Michael Klein
2020-11-23  9:43         ` Michael Klein
2020-11-23 11:45         ` [PATCH v2] " Michael Klein
2020-11-23 11:45           ` Michael Klein
2020-11-24 14:25           ` Maxime Ripard
2020-11-24 14:25             ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201120182739.GA3734181@a98shuttle.de \
    --to=michael@fossekall.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.