Re: [PATCH v4 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
From: Sandie Cao
Date: Mon Nov 16 2026 - 01:49:52 EST
Hi, Yixun:
> From: "Yixun Lan"<dlan@xxxxxxxxxx>
> Date: Sat, Nov 14, 2026, 15:55
> Hi Sandie,
>
> On 11:33 Mon 09 Nov , Sandie Cao wrote:
> > Add the device tree node SDHCI-0 controller for onboard Micro SD card slot.
> >
> > Signed-off-by: Sandie Cao <sandie.cao@xxxxxxxxxxxxxxxx>
> > ---
> > .../spacemit/k3-deepcomputing-fml13v05.dts | 22 +++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> > index bcd533484a73..051046fe90b2 100644
> > --- a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> > +++ b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> > @@ -177,6 +177,28 @@ &combophy {
> > status = "okay";
> > };
> >
> ..
> > +/*
> > + * Onboard SD card slot:
> > + * Please insert or remove the SD card while the device is powered off.
> > + * It works as a boot media. so set it to non-removable.
> > + */
> Is there any public schematic available for FML13V05? I guess there is
> no CD pin (Card Detect pin)? as no "cd-gpios" property seen here
>
> The above comment isn't really useful or even correct, I'd suggest
> drop it.
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 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.
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.
[1]: https://lore.kernel.org/all/20260922110231.3426011-1-sandie.cao
@deepcomputing.io/
[2]: https://lore.kernel.org/all/20261020081633.3673704-1-sandie.cao
@deepcomputing.io/
[3]: https://lore.kernel.org/all/20261102060012.100623-1-sandie.cao
@deepcomputing.io/
Best regards
Sandie
>
> > +&sdhci0 {
> > + pinctrl-names = "default","uhs";
> > + pinctrl-0 = <&mmc1_cfg>;
> > + pinctrl-1 = <&mmc1_uhs_cfg>;
> > + bus-width = <4>;
> ..
> > + non-removable;
> "no-removable" property usually used for emmc chip soldered on board,
> so there is no way it can be physically removed.. check
> Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
>
> For cases that no CD pin (or no GPIO CD pin) designed for SD card from
> hardware schematic perspective, using "broken-cd" is a more proper way,
> it will fallback to use poll mechanism to detect the card, please check
>
> > + no-mmc;
> > + no-sdio;
> > + disable-wp;
> > + cap-sd-highspeed;
> > + vqmmc-supply = <&aldo1>;
> > + sd-uhs-sdr25;
> > + sd-uhs-sdr50;
> > + sd-uhs-sdr104;
> > + status = "okay";
> > +};
> > +
> > &uart0 {
> > pinctrl-names = "default";
> > pinctrl-0 = <&uart0_0_cfg>;
> > --
> > 2.43.0
>
> --
> Yixun Lan (dlan)
>