All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Christoph Niedermaier <cniedermaier@dh-electronics.com>,
	"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: Mon, 15 Mar 2021 22:18:33 +0100	[thread overview]
Message-ID: <5d4d31bc-4795-dc08-b827-61347f0651ed@denx.de> (raw)
In-Reply-To: <b7b8c64246fd4617a3d266f8a0aa7a97@dh-electronics.com>

On 3/15/21 7:58 PM, Christoph Niedermaier wrote:
[...]
>>>>>> 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.
>>>>
>>>> So I'll pose another question here to the GPIO maintainers.
>>>>
>>>> Is it OK to define gpio-line-names in SoM DTSI even for pins which will
>>>> not be used as GPIOs e.g. because they are muxed differently in the
>>>> carrier board DTS ?
>>>>
>>>> If that is OK, then the above approach is then also OK.
>>>
>>> In our case, we cannot mux the GPIO pins in the carrier board DTS
>>> to another functions, because then we break our SOM standard (DHCOM).
>>
>> You can, assume you take two of the SoM GPIO-X and GPIO-Y signals which
>> are present e.g. on the PDK2 jumper header and connect I2C EEPROM to
>> those two pins. Then you mux those two pins as I2C bus. And that happens
>> on the carrier board level (or a DTO, but that's out of scope here).
> 
> This is a very absurd example, because we have I2C on the PDK2 board
> and if you want to use I2C use our given I2C buses. We don't want that
> a costumer uses a GPIO pin as I2C, because it breaks our SOM standard
> (DHCOM) and we cannot exchange the SOM module without breaking the
> function. A GPIO is intended to be a GPIO and we don't want to have a
> carrier board upstream, that breaks your standard. So if we label the
> GPIOs on the SOM layer, it will never be wrong.

I can see how this could work on SoM level if the muxing requirement is 
constrained like this.

>>> So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I"
>>> becomes "LED1" the mux function have to be GPIO.
>>
>> In the above example, the mux function becomes i2c in the carrier board
>> DT and the gpio-line-names remains the same since its included from the
>> SoM DTSI. I would like to know whether this is OK or whether we need to
>> patch the gpio-line-names in the carrier board DT and remove the GPIO-X
>> and GPIO-Y from the gpio-line-names there.
> 
> In the carrier board the GPIO becomes an input, output, led, button, etc.,
> but the function is still GPIO. So the labeling on the SOM layer is never
> been wrong. A relabeling on the carrier board then improves it to the real
> usage, but it is not mandatory.

Right, see above.

_______________________________________________
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-15 21:20 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
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 [this message]

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=5d4d31bc-4795-dc08-b827-61347f0651ed@denx.de \
    --to=marex@denx.de \
    --cc=alexandre.torgue@st.com \
    --cc=cniedermaier@dh-electronics.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --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.