All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: Marek Vasut <marex@denx.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Patrick Delaunay <patrick.delaunay@st.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"linux-stm32@st-md-mailman.stormreply.com"
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: RE: [PATCH] ARM: dts: stm32: Fill GPIO line names on AV96
Date: Fri, 12 Mar 2021 17:38:59 +0000	[thread overview]
Message-ID: <86beeb51e9594b14ac0f449495b46736@dh-electronics.com> (raw)
In-Reply-To: <6616e8b0-2b7d-a157-c24f-0493ce03c45b@denx.de>

From: Marek Vasut [mailto:marex@denx.de]
Sent: Friday, March 12, 2021 5:17 PM
> To: Christoph Niedermaier <cniedermaier@dh-electronics.com>; linux-arm-
> kernel@lists.infradead.org; linus.walleij@linaro.org
> Cc: Alexandre Torgue <alexandre.torgue@st.com>; Patrice Chotard
> <patrice.chotard@st.com>; Patrick Delaunay <patrick.delaunay@st.com>;
> Maxime Coquelin <mcoquelin.stm32@gmail.com>; linux-stm32@st-md-
> mailman.stormreply.com
> Subject: Re: [PATCH] ARM: dts: stm32: Fill GPIO line names on AV96
> 
> ACHTUNG: Diese E-Mail kommt aus dem Internet und nicht aus unserem
> Firmennetzwerk!
> 
> 
> 
> On 3/12/21 4:17 PM, Christoph Niedermaier wrote:
>> From: Marek Vasut [mailto:marex@denx.de]
>> Sent: Thursday, August 6, 2020 9:30 AM
>>
>>> On 8/6/20 9:09 AM, Christoph Niedermaier wrote:
>>>> From: Marek Vasut <marex@denx.de>
>>>> Sent: Friday, July 24, 2020 12:16 PM
>>>>>
>>>>> Fill in the custom GPIO line names used by DH.
>>>>>
>>>> [...]
>>>>> +&gpioa {
>>>>> +       gpio-line-names = "", "", "", "",
>>>>> +                         "", "", "", "",
>>>>> +                         "", "", "", "DH-GPIO-K",
>>>>> +                         "DH-GPIO-I", "", "DH-GPIO-A", "";
>>>>> +};
>>>>> +
>>>> [...]
>>>>
>>>> We have been using the GPIO names at DH electronics for some time and also
>>>> on other SOMs, but have not yet streamed them. We started with the naming
>>>> only with a capital letter "A-W" since then without problems. To avoid a
>>>> hard cut or patching for us and our customers it would be good if we could
>>>> use the same naming in the mainline kernel as well. Marek, we would be
>>>> happy if you would adopt our valued GPIO naming in your patch.
>>>
>>> My counter-argument to this is that the naming should be unique and
>>> provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n
>>> should rather be DHCOM-n . I can't say I'm particularly fond of the
>>> plain 'n' naming of GPIO lines, because then the GPIO label (and e.g.
>>> listing in libgpiod tools) does not give any hint what the GPIO is or
>>> where it comes from. Also, I worry a plain 'n' naming might clash with
>>> other GPIO IPs easily, while a more unique name can not.
>>
>> Hello Marek,
>>
>> after an internal discussion, we decided the following:
>>
>> Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
>>
>> Moreover for the SOM layer (stm32mp15xx-dhcom-som.dtsi) we would prefer
>> "DHCOM-n". It would be nice if you could create a patch for it.
> 
> I don't think we should have any SoM-side gpio-line-names, because once
> you plug the SoM into new carrier board, the gpio-lane-names will no
> longer make sense. So, I think all the gpio-line-names should be
> implemented in the carrier board DTS.

The idea is to define the GPIO names on the SOM layer and then
overwrite them on the carrier board DTS if needed. If there is no
naming on the carrier board, at least you have access via the DHCOM
GPIO names. The DHCOM GPIO names are standardized, so that you can
be sure that the assignment to a pin always fits.

> 
> As for the naming scheme, I was also hoping Linus might jump in and
> provide some suggestion on best practice here.
> 
> I think naming carrier board GPIOs "A", "B", "C",... is too opaque and
> can easily collide e.g. with GPIO expanders which might be on I2C or so.
> 
> A naming scheme which encodes the carrier board name is clearer and less
> likely to cause collision, so "AV96-A", "AV96-B", etc. looks good to me.
> It is obvious where the GPIO is located and unlikely to collide with any
> other GPIO name.

Regards,
Christoph

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

  reply	other threads:[~2021-03-12 17:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 10:16 [PATCH] ARM: dts: stm32: Fill GPIO line names on AV96 Marek Vasut
2020-08-06  7:09 ` Christoph Niedermaier
2020-08-06  7:29   ` Marek Vasut
2021-03-12 15:17     ` Christoph Niedermaier
2021-03-12 16:17       ` Marek Vasut
2021-03-12 17:38         ` Christoph Niedermaier [this message]
2021-03-12 21:01           ` Marek Vasut
2021-03-15 11:41             ` Christoph Niedermaier
2021-03-15 12:05               ` [Linux-stm32] " Ahmad Fatoum
2021-03-15 14:29                 ` Marek Vasut
2021-03-15 15:05                   ` Ahmad Fatoum
2021-03-15 16:08                     ` Marek Vasut
2021-03-15 14:26               ` Marek Vasut
2021-03-15 18:58                 ` Christoph Niedermaier
2021-03-15 21:18                   ` Marek Vasut

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=86beeb51e9594b14ac0f449495b46736@dh-electronics.com \
    --to=cniedermaier@dh-electronics.com \
    --cc=alexandre.torgue@st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=marex@denx.de \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=patrice.chotard@st.com \
    --cc=patrick.delaunay@st.com \
    /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.