devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder.schrempf@kontron.de>
To: Marek Vasut <marex@denx.de>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org
Cc: Denys Drozdov <denys.drozdov@toradex.com>,
	Fabio Estevam <festevam@denx.de>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Li Yang <leoyang.li@nxp.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Matthias Schiffer <matthias.schiffer@tq-group.com>,
	Max Krummenacher <max.krummenacher@toradex.com>,
	NXP Linux Team <linux-imx@nxp.com>, Peng Fan <peng.fan@nxp.com>,
	Rob Herring <robh+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	Tim Harvey <tharvey@gateworks.com>,
	devicetree@vger.kernel.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH 2/2] arm64: dts: imx8mp: Add support for Data Modul i.MX8M Plus eDM SBC
Date: Mon, 16 Jan 2023 12:34:52 +0100	[thread overview]
Message-ID: <42cf3742-e33d-a1fb-205b-6ed7f07d2b91@kontron.de> (raw)
In-Reply-To: <0ef9774e-4d0a-e71e-ede1-c0252bab3170@denx.de>

On 16.01.23 12:25, Marek Vasut wrote:
> On 1/16/23 11:51, Frieder Schrempf wrote:
>> On 16.01.23 11:39, Marek Vasut wrote:
>>> On 1/11/23 08:38, Ahmad Fatoum wrote:
>>>> Hello Marek,
>>>
>>> Hi,
>>>
>>> [...]
>>>
>>>> Could you share your get_maintainers.pl invocation? I'd like to
>>>> adjust the reviewer entry in MAINTAINERS, so such patches get
>>>> into our kernel@pengutronix.de inbox as well.
>>>
>>> Plain get_maintainer -f path/to/dts
>>>
>>>> Some more comments below.
>>>>
>>>>> +    pmic: pmic@25 {
>>>>> +        compatible = "nxp,pca9450c";
>>>>> +        reg = <0x25>;
>>>>> +        pinctrl-names = "default";
>>>>> +        pinctrl-0 = <&pinctrl_pmic>;
>>>>> +        interrupt-parent = <&gpio1>;
>>>>> +        interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
>>>>> +        sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
>>>>
>>>> Here you assume GPIO1_IO04 is muxed as GPIO.
>>>>
>>>>> +    pinctrl_usdhc2: usdhc2-grp {
>>>>> +        fsl,pins = <
>>>>> +            MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT        0xc1
>>>>
>>>> Here you mux it for USDHC2_VSELECT though. Is this intended?
>>>
>>> That's a good question, other DTs do the same thing, I suspect the
>>> sd-vsel-gpios could be dropped,
>>
>> The sd-vsel-gpios is only needed when the hardware has an arbitrary GPIO
>> connected to the SD_VSEL signal of the PCA9450. IMHO, if SD_VSEL is
>> connected to the VSELECT signal it would be better to drop sd-vsel-gpios.
> 
> Current practice does not match this statement however, notice how they
> are all gpio 1 4 :
> 
> $ git grep sd-vsel-gpios
> Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml:
> sd-vsel-gpios:
> arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi: sd-vsel-gpios =
> <&gpio1 4 GPIO_ACTIVE_HIGH>;
> arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc.dts:
> sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
> arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi: sd-vsel-gpios =
> <&gpio1 4 GPIO_ACTIVE_HIGH>;
> arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi: sd-vsel-gpios =
> <&gpio1 4 GPIO_ACTIVE_HIGH>;

Yes, but these are probably all copy-pasted from somewhere. Maybe from
my original Kontron DT (before [1]) where I was actually using
sd-vsel-gpios.
But these DTs all mux the VSELECT signal to the GPIO1_IO04 pad, so
sd-vsel-gpios is useless.

> 
>>> but as long as it is not outright
>>> harmful, it can be used for backward compatibility to support less
>>> complete OSes which may not handle the eSDHC VSELECT bit , so I figured
>>> it is good to keep both options.
>>
>> Would be interesting what OSes you have in mind? The eSDHC
>> driver/hardware should always handle the VSELECT signal, no?
> 
> Not necessarily, but the ones I am aware of (U-Boot, Linux) do handle
> VSELECT.

Ok, but even if VSELECT is not handled. Setting sd-vsel-gpios doesn't
fix this as long as the GPIO1_IO04 pad is muxed to VSELECT.

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=eef2c0217e02b6c7ed5b10b82ea944127145e113

  reply	other threads:[~2023-01-16 11:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-18  5:17 [PATCH 1/2] dt-bindings: arm: Add Data Modul i.MX8M Plus eDM SBC Marek Vasut
2022-12-18  5:18 ` [PATCH 2/2] arm64: dts: imx8mp: Add support for " Marek Vasut
2023-01-01  4:00   ` Shawn Guo
2023-01-05 21:30     ` Marek Vasut
2023-01-09  3:54       ` Shawn Guo
2023-01-10 12:52         ` Marek Vasut
2023-01-11  7:38   ` Ahmad Fatoum
2023-01-16 10:39     ` Marek Vasut
2023-01-16 10:51       ` Frieder Schrempf
2023-01-16 11:25         ` Marek Vasut
2023-01-16 11:34           ` Frieder Schrempf [this message]
2023-01-16 11:47             ` Marek Vasut
2023-01-16 11:56               ` Frieder Schrempf
2023-01-16 11:28       ` Ahmad Fatoum
2022-12-19  9:10 ` [PATCH 1/2] dt-bindings: arm: Add " Krzysztof Kozlowski

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=42cf3742-e33d-a1fb-205b-6ed7f07d2b91@kontron.de \
    --to=frieder.schrempf@kontron.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=denys.drozdov@toradex.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@denx.de \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marex@denx.de \
    --cc=matthias.schiffer@tq-group.com \
    --cc=max.krummenacher@toradex.com \
    --cc=peng.fan@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tharvey@gateworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).