Re: [PATCH 0/3] arm64: dts: allwinner: add Radxa Cubie A7Z support
From: Vinicius Pedrosa
Date: Mon Nov 23 2026 - 11:54:42 EST
On Mon, Nov 23, 2026 at 1:11 PM Andre Przywara <andre.przywara@xxxxxxx> wrote:
> I wonder if this works anyway with using both the internal pull-down and
> potentially external pull-up resistors? As one would win over the other?
> Can you try how your board behaves with:
> cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
Tried it on my v1.11 and it doesn't work: card removal is detected, but
reinsertion isn't. PF6 stays low with the card in, in every attempt (two
DTBs), although it read high at boot with the card already in.
Neither one wins cleanly. The A733 datasheet gives PF6 a 15k typical
internal pull (9k to 21k), so with R59 (10k) the pull-down leaves it at
roughly 1.6 to 2.2 V, below the VIH minimum of 0.7*VCC (2.3 V). That's
my math, I didn't measure it.
I then tried GPIO_PULL_UP and GPIO_PULL_DISABLE. Both work: three
complete hotplug cycles each, plus booting without a card and inserting
it later. With no flag it also works, but only because U-Boot sets the
pull-up (sunxi_mmc.c requests the CD GPIO with GPIOD_PULL_UP in the
2026.01-rc1 tree I use). To check that Linux applies the flag itself, I
forced the pull register to pull-down in U-Boot before booti, and Linux
wrote pull-up back.
Could you try PULL_UP and PULL_DISABLE on your v1.10, card in and out?
"grep 'pin 166' /sys/kernel/debug/pinctrl/*/pinconf-pins" shows the bias
Linux applied. If PULL_UP works there too, one DT can carry it. If not,
I'd add a small v1.10 .dts that includes the v1.11 one.
Thanks,
Vinicius