* [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor
@ 2025-04-25 0:34 Andre Przywara
2025-04-25 3:53 ` Chen-Yu Tsai
0 siblings, 1 reply; 5+ messages in thread
From: Andre Przywara @ 2025-04-25 0:34 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi
Trying to use the SD card on the Radxa board revealed that the card
detect wouldn't work as expected (insert not detected). Looking at the
schematic shows that the pull-up resistor is actually not populated
("NC"), and the transistor just pulls the GPIO pin to GND, but it's
floating otherwise.
So using the pull-down flag is definitely wrong, we need the internal
pull up to get a reliable signal. The same is true for the Avaota board
(there is no transistor there, but it's floating in the same way). There
is no schematic for the X96QPro+ board, but experiments show it's the
same behaviour.
So change the GPIO flag for the card detect GPIO property to activate
the pull-up resistor for that pin.
Fixes: 80e0fb4e491b ("arm64: dts: allwinner: a523: add Radxa A5E support")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Hi,
please let me know if I should split this up into 3 patches, with proper
Fixes: tags, or if you can maybe squash this into the original commits
still?
Cheers,
Andre
arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts | 2 +-
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 2 +-
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
index 03c9a9ef5adc2..2d2f3af91d05e 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
@@ -56,7 +56,7 @@ &ehci1 {
&mmc0 {
vmmc-supply = <®_cldo3>;
- cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
+ cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
bus-width = <4>;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
index c0bce3f4fa925..59db103546f65 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
@@ -56,7 +56,7 @@ &ehci1 {
&mmc0 {
vmmc-supply = <®_vcc3v3>;
- cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
+ cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
bus-width = <4>;
disable-wp;
status = "okay";
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
index 85a546aecdbe1..dea2acc1849bb 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
@@ -66,7 +66,7 @@ &ehci1 {
&mmc0 {
vmmc-supply = <®_cldo3>;
- cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
+ cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
bus-width = <4>;
status = "okay";
};
base-commit: 1e5a69d67d1b3c55c9b0cd3933af1436b5d52aa1
--
2.46.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor
2025-04-25 0:34 [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor Andre Przywara
@ 2025-04-25 3:53 ` Chen-Yu Tsai
2025-04-27 4:34 ` Chen-Yu Tsai
0 siblings, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-04-25 3:53 UTC (permalink / raw)
To: Andre Przywara
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi
On Fri, Apr 25, 2025 at 8:35 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> Trying to use the SD card on the Radxa board revealed that the card
> detect wouldn't work as expected (insert not detected). Looking at the
> schematic shows that the pull-up resistor is actually not populated
> ("NC"), and the transistor just pulls the GPIO pin to GND, but it's
> floating otherwise.
> So using the pull-down flag is definitely wrong, we need the internal
> pull up to get a reliable signal. The same is true for the Avaota board
> (there is no transistor there, but it's floating in the same way). There
> is no schematic for the X96QPro+ board, but experiments show it's the
> same behaviour.
>
> So change the GPIO flag for the card detect GPIO property to activate
> the pull-up resistor for that pin.
>
> Fixes: 80e0fb4e491b ("arm64: dts: allwinner: a523: add Radxa A5E support")
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Hi,
>
> please let me know if I should split this up into 3 patches, with proper
> Fixes: tags, or if you can maybe squash this into the original commits
> still?
I can squash them in if you prefer.
ChenYu
> Cheers,
> Andre
>
> arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts | 2 +-
> arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 2 +-
> arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
> index 03c9a9ef5adc2..2d2f3af91d05e 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
> @@ -56,7 +56,7 @@ &ehci1 {
>
> &mmc0 {
> vmmc-supply = <®_cldo3>;
> - cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
> + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
> bus-width = <4>;
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
> index c0bce3f4fa925..59db103546f65 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
> @@ -56,7 +56,7 @@ &ehci1 {
>
> &mmc0 {
> vmmc-supply = <®_vcc3v3>;
> - cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
> + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
> bus-width = <4>;
> disable-wp;
> status = "okay";
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
> index 85a546aecdbe1..dea2acc1849bb 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
> @@ -66,7 +66,7 @@ &ehci1 {
>
> &mmc0 {
> vmmc-supply = <®_cldo3>;
> - cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
> + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
> bus-width = <4>;
> status = "okay";
> };
>
> base-commit: 1e5a69d67d1b3c55c9b0cd3933af1436b5d52aa1
> --
> 2.46.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor
2025-04-25 3:53 ` Chen-Yu Tsai
@ 2025-04-27 4:34 ` Chen-Yu Tsai
2025-04-28 3:00 ` Chukun Pan
0 siblings, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-04-27 4:34 UTC (permalink / raw)
To: Andre Przywara
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi
On Fri, Apr 25, 2025 at 11:53 AM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Fri, Apr 25, 2025 at 8:35 AM Andre Przywara <andre.przywara@arm.com> wrote:
> >
> > Trying to use the SD card on the Radxa board revealed that the card
> > detect wouldn't work as expected (insert not detected). Looking at the
> > schematic shows that the pull-up resistor is actually not populated
> > ("NC"), and the transistor just pulls the GPIO pin to GND, but it's
> > floating otherwise.
> > So using the pull-down flag is definitely wrong, we need the internal
> > pull up to get a reliable signal. The same is true for the Avaota board
> > (there is no transistor there, but it's floating in the same way). There
> > is no schematic for the X96QPro+ board, but experiments show it's the
> > same behaviour.
> >
> > So change the GPIO flag for the card detect GPIO property to activate
> > the pull-up resistor for that pin.
> >
> > Fixes: 80e0fb4e491b ("arm64: dts: allwinner: a523: add Radxa A5E support")
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> > Hi,
> >
> > please let me know if I should split this up into 3 patches, with proper
> > Fixes: tags, or if you can maybe squash this into the original commits
> > still?
>
> I can squash them in if you prefer.
Fixes separated and squashed into the original patches.
ChenYu
> ChenYu
>
> > Cheers,
> > Andre
> >
> > arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts | 2 +-
> > arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 2 +-
> > arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
> > index 03c9a9ef5adc2..2d2f3af91d05e 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
> > @@ -56,7 +56,7 @@ &ehci1 {
> >
> > &mmc0 {
> > vmmc-supply = <®_cldo3>;
> > - cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
> > + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
> > bus-width = <4>;
> > status = "okay";
> > };
> > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
> > index c0bce3f4fa925..59db103546f65 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
> > @@ -56,7 +56,7 @@ &ehci1 {
> >
> > &mmc0 {
> > vmmc-supply = <®_vcc3v3>;
> > - cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
> > + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
> > bus-width = <4>;
> > disable-wp;
> > status = "okay";
> > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
> > index 85a546aecdbe1..dea2acc1849bb 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
> > @@ -66,7 +66,7 @@ &ehci1 {
> >
> > &mmc0 {
> > vmmc-supply = <®_cldo3>;
> > - cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
> > + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
> > bus-width = <4>;
> > status = "okay";
> > };
> >
> > base-commit: 1e5a69d67d1b3c55c9b0cd3933af1436b5d52aa1
> > --
> > 2.46.3
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor
2025-04-27 4:34 ` Chen-Yu Tsai
@ 2025-04-28 3:00 ` Chukun Pan
2025-04-28 3:43 ` Chen-Yu Tsai
0 siblings, 1 reply; 5+ messages in thread
From: Chukun Pan @ 2025-04-28 3:00 UTC (permalink / raw)
To: wens
Cc: andre.przywara, conor+dt, devicetree, jernej.skrabec, krzk+dt,
linux-arm-kernel, linux-sunxi, robh, samuel, Chukun Pan
Hi,
> Fixes separated and squashed into the original patches.
https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/commit/?h=sunxi/dt-for-6.16&id=dd97ddc4da0af02139b0e97e98c210219631e161
In the above commit, dts was renamed but Makefile was not changed.
> +dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-radxa-a5e.dtb
Do you want a patch or will you rebase again?
Thanks,
Chukun
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor
2025-04-28 3:00 ` Chukun Pan
@ 2025-04-28 3:43 ` Chen-Yu Tsai
0 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-04-28 3:43 UTC (permalink / raw)
To: Chukun Pan
Cc: andre.przywara, conor+dt, devicetree, jernej.skrabec, krzk+dt,
linux-arm-kernel, linux-sunxi, robh, samuel
On Mon, Apr 28, 2025 at 11:00 AM Chukun Pan <amadeus@jmu.edu.cn> wrote:
>
> Hi,
>
> > Fixes separated and squashed into the original patches.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/commit/?h=sunxi/dt-for-6.16&id=dd97ddc4da0af02139b0e97e98c210219631e161
>
> In the above commit, dts was renamed but Makefile was not changed.
>
> > +dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-radxa-a5e.dtb
>
> Do you want a patch or will you rebase again?
Fixed now, though today's linux-next might be broken. Sorry for the mess.
ChenYu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-28 3:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 0:34 [PATCH] arm64: dts: allwinner: a523: fix SD card detect pull resistor Andre Przywara
2025-04-25 3:53 ` Chen-Yu Tsai
2025-04-27 4:34 ` Chen-Yu Tsai
2025-04-28 3:00 ` Chukun Pan
2025-04-28 3:43 ` Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox