public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Marco Felsch <m.felsch@pengutronix.de>,
	Frieder Schrempf <frieder@fris.de>
Cc: devicetree@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Heiko Thiery <heiko.thiery@gmail.com>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH 6/6] arm64: dts: imx8mm-kontron: Add support for reading SD_VSEL signal
Date: Mon, 13 Feb 2023 19:12:23 +0100	[thread overview]
Message-ID: <eef49a1c-4dc3-7517-c760-ecc20704f943@denx.de> (raw)
In-Reply-To: <20230213161548.ucaqpza65byyqvfo@pengutronix.de>

On 2/13/23 17:15, Marco Felsch wrote:

[...]

>> @@ -347,7 +347,7 @@ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1		0x1d6
>>   			MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2		0x1d6
>>   			MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3		0x1d6
>>   			MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12		0x019
>> -			MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT		0x1d0
>> +			MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT		0x400001d0
> 
> The VSELECT pin should be driven by the (u)sdhc core...
> 
>>   		>;
>>   	};
>>   };
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi
>> index 5172883717d1..90daaf54e704 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi
>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi
>> @@ -196,6 +196,7 @@ reg_nvcc_sd: LDO5 {
>>   				regulator-name = "NVCC_SD (LDO5)";
>>   				regulator-min-microvolt = <1800000>;
>>   				regulator-max-microvolt = <3300000>;
>> +				sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
> 
> and by using the sd-vsel-gpios property the IOMUXC_GPIO1_IO04 have to be
> muxed as GPIO, which is not the case. So I think that u-boot have a bug
> within the (u)sdhc core.

The trick here is that the VSELECT is operated by the usdhc block as a 
function pin, but the PMIC driver can read the current state of the 
VSELECT pin by reading out the GPIO block SR register. Since the IOMUX 
SION bit is set on the VSELECT pin, the state of the pin is reflected in 
the GPIO block SR register even if the pin is muxed as function pin.

  parent reply	other threads:[~2023-02-13 18:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 15:58 [PATCH 0/6] Use correct LDO5 control registers for PCA9450 Frieder Schrempf
2023-02-13 15:58 ` [PATCH 1/6] dt-bindings: regulator: pca9450: Document new usage of sd-vsel-gpios Frieder Schrempf
2023-02-15 20:02   ` Rob Herring
2023-02-16  1:27     ` Marek Vasut
2023-02-16  2:30       ` Rob Herring
2023-02-16 10:15         ` Frieder Schrempf
2023-02-13 15:58 ` [PATCH 2/6] regulator: pca9450: Fix enable register for LDO5 Frieder Schrempf
2023-02-13 16:12   ` Marek Vasut
2023-02-13 15:58 ` [PATCH 3/6] Revert "regulator: pca9450: Add SD_VSEL GPIO for LDO5" Frieder Schrempf
2023-02-13 16:16   ` Marek Vasut
2023-02-13 16:23     ` Frieder Schrempf
2023-02-13 18:10       ` Marek Vasut
2023-02-13 15:58 ` [PATCH 4/6] regulator: Add operation to let drivers select vsel register Frieder Schrempf
2023-02-14  1:40   ` kernel test robot
2023-02-14  9:19   ` kernel test robot
2023-02-14 21:06   ` Mark Brown
2023-02-16  9:05     ` Frieder Schrempf
2023-02-16 14:31       ` Mark Brown
2023-02-13 15:58 ` [PATCH 5/6] regulator: pca9450: Fix control register for LDO5 Frieder Schrempf
2023-02-13 15:58 ` [PATCH 6/6] arm64: dts: imx8mm-kontron: Add support for reading SD_VSEL signal Frieder Schrempf
2023-02-13 16:08   ` Marek Vasut
2023-02-13 16:15     ` Frieder Schrempf
2023-02-13 16:15   ` Marco Felsch
2023-02-13 16:18     ` Frieder Schrempf
2023-02-13 21:02       ` Fabio Estevam
2023-02-13 18:12     ` Marek Vasut [this message]
2023-02-13 19:56       ` Marco Felsch
2023-02-13 20:59         ` Marek Vasut
2023-02-14  8:10           ` Marco Felsch
2023-02-14  8:26             ` Frieder Schrempf
2023-02-14 11:46               ` Marco Felsch

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=eef49a1c-4dc3-7517-c760-ecc20704f943@denx.de \
    --to=marex@denx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=frieder@fris.de \
    --cc=heiko.thiery@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=m.felsch@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox