devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
@ 2019-11-16 15:16 Jarkko Nikula
  2019-11-20 17:38 ` Tony Lindgren
       [not found] ` <20191125111125.AF5D720836@mail.kernel.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Jarkko Nikula @ 2019-11-16 15:16 UTC (permalink / raw)
  To: devicetree
  Cc: linux-omap, Benoît Cousson, Tony Lindgren, Rob Herring,
	Mark Rutland, Stefan Roese, Jarkko Nikula, linux-stable

The MMC card detection GPIO polarity is active low on TAO3530, like in many
other similar boards. Now the card is not detected and it is unable to
mount rootfs from an SD card.

Fix this by using the correct polarity.

This incorrect polarity was defined already in the commit 30d95c6d7092
("ARM: dts: omap3: Add Technexion TAO3530 SOM omap3-tao3530.dtsi") in v3.18
kernel and later changed to use defined GPIO constants in v4.4 kernel by
the commit 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags
cell for OMAP2+ boards").

While the latter commit did not introduce the issue I'm marking it with
Fixes tag due the v4.4 kernels still being maintained.

Fixes: 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags cell for OMAP2+ boards")
Cc: linux-stable <stable@vger.kernel.org> # 4.4+
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
---
 arch/arm/boot/dts/omap3-tao3530.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap3-tao3530.dtsi b/arch/arm/boot/dts/omap3-tao3530.dtsi
index a7a04d78deeb..f24e2326cfa7 100644
--- a/arch/arm/boot/dts/omap3-tao3530.dtsi
+++ b/arch/arm/boot/dts/omap3-tao3530.dtsi
@@ -222,7 +222,7 @@
 	pinctrl-0 = <&mmc1_pins>;
 	vmmc-supply = <&vmmc1>;
 	vqmmc-supply = <&vsim>;
-	cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_HIGH>;
+	cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
 	bus-width = <8>;
 };
 
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
  2019-11-16 15:16 [PATCH] ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity Jarkko Nikula
@ 2019-11-20 17:38 ` Tony Lindgren
       [not found] ` <20191125111125.AF5D720836@mail.kernel.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2019-11-20 17:38 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: devicetree, linux-omap, Benoît Cousson, Rob Herring,
	Mark Rutland, Stefan Roese

* Jarkko Nikula <jarkko.nikula@bitmer.com> [191116 07:59]:
> The MMC card detection GPIO polarity is active low on TAO3530, like in many
> other similar boards. Now the card is not detected and it is unable to
> mount rootfs from an SD card.
> 
> Fix this by using the correct polarity.
> 
> This incorrect polarity was defined already in the commit 30d95c6d7092
> ("ARM: dts: omap3: Add Technexion TAO3530 SOM omap3-tao3530.dtsi") in v3.18
> kernel and later changed to use defined GPIO constants in v4.4 kernel by
> the commit 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags
> cell for OMAP2+ boards").
> 
> While the latter commit did not introduce the issue I'm marking it with
> Fixes tag due the v4.4 kernels still being maintained.

Thanks applying into omap-for-v5.5/dt.

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
       [not found] ` <20191125111125.AF5D720836@mail.kernel.org>
@ 2019-11-25 18:27   ` Jarkko Nikula
  2019-12-15 11:12     ` Jarkko Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Nikula @ 2019-11-25 18:27 UTC (permalink / raw)
  To: Sasha Levin, devicetree; +Cc: linux-omap, stable

On 11/25/19 1:11 PM, Sasha Levin wrote:
> Hi,
> 
> [This is an automated email]
> 
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags cell for OMAP2+ boards").
> 
> The bot has tested the following trees: v5.3.12, v4.19.85, v4.14.155, v4.9.202, v4.4.202.
> 
> v5.3.12: Build OK!
> v4.19.85: Build OK!
> v4.14.155: Build OK!
> v4.9.202: Failed to apply! Possible dependencies:
>     1a177cf72b3a ("ARM: dts: dra72-evm-tps65917: Add voltage supplies to usb_phy, mmc, dss")
>     45ea75eb92a4 ("ARM: dts: omap*: Replace deprecated "vmmc_aux" with "vqmmc"")
>     5d080aa30681 ("ARM: dts: dra72: Add separate dtsi for tps65917")
>     6eebfeb9cf0d ("ARM: dts: Add support for dra718-evm")
>     e9a05fbd21de ("ARM: dts: dra72-evm: Fix modelling of regulators")
> 
> v4.4.202: Failed to apply! Possible dependencies:
>     12ca468306a2 ("ARM: dts: am57xx: cl-som-am57x: add dual EMAC support")
>     1a472e14ba08 ("ARM: dts: am57xx: cl-som-am57x: dts: add RTC support")
>     27ddd846cb25 ("ARM: dts: am57xx: cl-som-am57x: add USB support")
>     2c7cf1f48f36 ("ARM: dts: am57xx: cl-som-am57x: add EEPROM support")
>     2d47fc3b9801 ("ARM: dts: am57xx: cl-som-am57x: add touchscreen support")
>     317d15679a5e ("ARM: dts: dra72-evm: Mark uart1 rxd as wakeup capable")
>     387450fc882e ("ARM: dts: am57xx: cl-som-am57x: add basic module support")
>     3a1de8082405 ("ARM: dts: dra7xx: Fix compatible string for PCF8575 chip")
>     4424cd009648 ("ARM: dts: am57xx: cl-som-am57x: add analog audio support")
>     45ea75eb92a4 ("ARM: dts: omap*: Replace deprecated "vmmc_aux" with "vqmmc"")
>     488f270d90e1 ("ARM: dts: dra7: Fix NAND device nodes")
>     4e8603eff519 ("ARM: dts: omap: remove unneeded unit name for sound nodes")
>     6686f744df70 ("ARM: dts: DRA72-EVM: Add regulator-allow-bypass property for ldo1 and ldo2")
>     6cfec12f2545 ("ARM: dts: dra72-evm: Enable AFIFO use for McASP3")
>     6eebfeb9cf0d ("ARM: dts: Add support for dra718-evm")
>     8deb60f535fa ("ARM: dts: am57xx: cl-som-am57x: add eMMC support")
>     9255ea8472d2 ("ARM: dts: dra72-evm: Use DRA7XX_CORE_IOPAD pinmux macro")
>     a23fc1558487 ("ARM: dts: dra7x-evm: Provide NAND ready pin")
>     a4240d3af677 ("ARM: dts: Add support for dra72-evm rev C (SR2.0)")
>     a7cac713f90a ("ARM: dts: AM572x-IDK Initial Support")
>     cc2d681420d0 ("ARM: dts: am57xx: cl-som-am57x: add spi-flash support")
>     e1fdd060f08d ("ARM: dts: am57xx: sbc-am57x: add basic board support")
>     e9a05fbd21de ("ARM: dts: dra72-evm: Fix modelling of regulators")
> 
> 
> NOTE: The patch will not be queued to stable trees until it is upstream.
> 
> How should we proceed with this patch?
> 
Ah, it doesn't apply to v4.4 and v4.9 due the commit 45ea75eb92a4 ("ARM:
dts: omap*: Replace deprecated "vmmc_aux" with "vqmmc"") but that commit
doesn't apply either stable and probably even should not even if it would.

I believe best is me to submit a separate version for v4.4/v4.9.

-- 
Jarkko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity
  2019-11-25 18:27   ` Jarkko Nikula
@ 2019-12-15 11:12     ` Jarkko Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jarkko Nikula @ 2019-12-15 11:12 UTC (permalink / raw)
  To: Sasha Levin, devicetree; +Cc: linux-omap, stable

On 11/25/19 8:27 PM, Jarkko Nikula wrote:
> On 11/25/19 1:11 PM, Sasha Levin wrote:
>> Hi,
>>
>> [This is an automated email]
>>
>> This commit has been processed because it contains a "Fixes:" tag,
>> fixing commit: 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags cell for OMAP2+ boards").
>>
>> The bot has tested the following trees: v5.3.12, v4.19.85, v4.14.155, v4.9.202, v4.4.202.
>>
>> v5.3.12: Build OK!
>> v4.19.85: Build OK!
>> v4.14.155: Build OK!
>> v4.9.202: Failed to apply! Possible dependencies:
>>     1a177cf72b3a ("ARM: dts: dra72-evm-tps65917: Add voltage supplies to usb_phy, mmc, dss")
>>     45ea75eb92a4 ("ARM: dts: omap*: Replace deprecated "vmmc_aux" with "vqmmc"")
>>     5d080aa30681 ("ARM: dts: dra72: Add separate dtsi for tps65917")
>>     6eebfeb9cf0d ("ARM: dts: Add support for dra718-evm")
>>     e9a05fbd21de ("ARM: dts: dra72-evm: Fix modelling of regulators")
>>
>> v4.4.202: Failed to apply! Possible dependencies:
>>     12ca468306a2 ("ARM: dts: am57xx: cl-som-am57x: add dual EMAC support")
>>     1a472e14ba08 ("ARM: dts: am57xx: cl-som-am57x: dts: add RTC support")
>>     27ddd846cb25 ("ARM: dts: am57xx: cl-som-am57x: add USB support")
>>     2c7cf1f48f36 ("ARM: dts: am57xx: cl-som-am57x: add EEPROM support")
>>     2d47fc3b9801 ("ARM: dts: am57xx: cl-som-am57x: add touchscreen support")
>>     317d15679a5e ("ARM: dts: dra72-evm: Mark uart1 rxd as wakeup capable")
>>     387450fc882e ("ARM: dts: am57xx: cl-som-am57x: add basic module support")
>>     3a1de8082405 ("ARM: dts: dra7xx: Fix compatible string for PCF8575 chip")
>>     4424cd009648 ("ARM: dts: am57xx: cl-som-am57x: add analog audio support")
>>     45ea75eb92a4 ("ARM: dts: omap*: Replace deprecated "vmmc_aux" with "vqmmc"")
>>     488f270d90e1 ("ARM: dts: dra7: Fix NAND device nodes")
>>     4e8603eff519 ("ARM: dts: omap: remove unneeded unit name for sound nodes")
>>     6686f744df70 ("ARM: dts: DRA72-EVM: Add regulator-allow-bypass property for ldo1 and ldo2")
>>     6cfec12f2545 ("ARM: dts: dra72-evm: Enable AFIFO use for McASP3")
>>     6eebfeb9cf0d ("ARM: dts: Add support for dra718-evm")
>>     8deb60f535fa ("ARM: dts: am57xx: cl-som-am57x: add eMMC support")
>>     9255ea8472d2 ("ARM: dts: dra72-evm: Use DRA7XX_CORE_IOPAD pinmux macro")
>>     a23fc1558487 ("ARM: dts: dra7x-evm: Provide NAND ready pin")
>>     a4240d3af677 ("ARM: dts: Add support for dra72-evm rev C (SR2.0)")
>>     a7cac713f90a ("ARM: dts: AM572x-IDK Initial Support")
>>     cc2d681420d0 ("ARM: dts: am57xx: cl-som-am57x: add spi-flash support")
>>     e1fdd060f08d ("ARM: dts: am57xx: sbc-am57x: add basic board support")
>>     e9a05fbd21de ("ARM: dts: dra72-evm: Fix modelling of regulators")
>>
>>
>> NOTE: The patch will not be queued to stable trees until it is upstream.
>>
>> How should we proceed with this patch?
>>
> Ah, it doesn't apply to v4.4 and v4.9 due the commit 45ea75eb92a4 ("ARM:
> dts: omap*: Replace deprecated "vmmc_aux" with "vqmmc"") but that commit
> doesn't apply either stable and probably even should not even if it would.
> 
> I believe best is me to submit a separate version for v4.4/v4.9.
> 
Interesting, went checking this again today. Actually both v4.4.202 and
v4.9.206 work ok and independently of card detect polarity. So both -
and + lines below work:

diff --git a/arch/arm/boot/dts/omap3-tao3530.dtsi
b/arch/arm/boot/dts/omap3-tao3530.dtsi
index dc80886b5329..e3dfba8b3efe 100644
--- a/arch/arm/boot/dts/omap3-tao3530.dtsi
+++ b/arch/arm/boot/dts/omap3-tao3530.dtsi
@@ -225,7 +225,7 @@
        pinctrl-0 = <&mmc1_pins>;
        vmmc-supply = <&vmmc1>;
        vmmc_aux-supply = <&vsim>;
-       cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_HIGH>;
+       cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
        bus-width = <8>;
 };

Unfortunately I don't have time to dig deeper at the moment was there
regression somewhere else like in TWL GPIO or MMC why card detection is
always active in MMC point of view.

So it looks for now on there is no need to have separate version for
v4.4/v4.9 from my patch.

-- 
Jarkko

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-15 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-16 15:16 [PATCH] ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity Jarkko Nikula
2019-11-20 17:38 ` Tony Lindgren
     [not found] ` <20191125111125.AF5D720836@mail.kernel.org>
2019-11-25 18:27   ` Jarkko Nikula
2019-12-15 11:12     ` Jarkko Nikula

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).