Re: [PATCH v4 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support

From: Sandie Cao

Date: Mon Nov 16 2026 - 04:52:31 EST


Hi, Yixun:

> From: "Yixun Lan"<dlan@xxxxxxxxxx>
> Date:  Mon, Nov 16, 2026, 16:24

> > 
> > In version 1 [1],  the patch is cd-gpios = <&gpio K3_GPIO(88) GPIO_ACTIVE_LOW>;
> > but K3_GPIO(88) is fake cd-gpio, it's tied low on board.
> So, there is gpio cd pin, but didn't work? it's hard to say without
> the schematic, but can you check with hardware people, if it
> can be fixed with SoC's internal GPIO BIAS pullup or pulldown?
> So, gpio pin is able to reflect card insert status
> 
> 

I did check with our hardware team, and the answer is: 
there is a CD net on the slot, routed to K3_GPIO(88), but it is hard-tied
 to GND on the board. (v1 of this series used 
cd-gpios = <&gpio K3_GPIO(88) GPIO_ACTIVE_LOW>, which of course
always reports "card present".) It is a direct connection to GND, not a
strap resistor, so the SoC's internal bias cannot pull it up.

> > So In version2 [2], the patch changes to non-removable.
> > And In version3 [3], add comment. 
> > 
> > The options: cd-gpio, non-removable, broken-cd  all work on this board.
> > 
> it works, but does not reflect the hardware status
> 
> > We just need to detect the SD card when bootup, don't need the driver 
> > to detect hot-plug event , non-removable should be suitable and faster, 
> > we recomment to use non-removable.
> > 
> No, this isn't a valid reason, it's use case should have nothing to do
> with the property.
> 
> My point is: if the gpio cd pin still doesn't work, and the SD card is
> actually physical plugable, then should use "broken-cd".

The SD card slot is onboard [1],  put the board into casing, there is no
way to plugin/ plugout the card. So there is no card-detect event that can
ever happen at runtime.

If you still prefer broken-cd,  I will follow in next version. 

[1]: https://deepcomputing.io/dc-roma-risc-v-mainboard-iii-unveiled-at-fosdem-powered-by-spacemit-k3-for-framework-laptop-13/

Best regards
Sandie