From: sashiko-bot@kernel.org
To: "Sandie Cao" <sandie.cao@deepcomputing.io>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
Date: Tue, 20 Oct 2026 08:58:29 +0000 [thread overview]
Message-ID: <sashiko-outbox-178663@kernel.org> (raw)
In-Reply-To: <20261020082015.3673761-1-sandie.cao@deepcomputing.io>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] riscv: dts: spacemit: Micro SD slot sdhci0 marked non-removable
- [Low] riscv: dts: spacemit: unused dt-bindings/gpio/gpio.h include
--
commit 05afaddc88a27a23eeffb218991ebf7aa2ae92f1
Author: Sandie Cao <sandie.cao@deepcomputing.io>
riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
This commit enables the sdhci0 controller node in the DeepComputing
FML13V05 board device tree to support the Micro SD card slot.
> diff --git a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> index 84f66dd8f962e..09e3d46a2ea3e 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> +++ b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> @@ -2,6 +2,7 @@
> /*
> * Copyright (C) 2026 DeepComputing (HK) Limited
> */
> +#include <dt-bindings/gpio/gpio.h>
[Severity: Low]
Is this dt-bindings/gpio/gpio.h include needed here? Neither the new
sdhci0 node nor the rest of k3-deepcomputing-fml13v05.dts references any
GPIO macros (and k3-pinctrl.dtsi already includes this header), unless a
cd-gpios property was intended to be added to sdhci0.
>
> #include "k3.dtsi"
> #include "k3-pinctrl.dtsi"
> @@ -184,6 +185,23 @@ &combophy {
> status = "okay";
> };
>
> +&sdhci0 {
> + pinctrl-names = "default","uhs";
> + pinctrl-0 = <&mmc1_cfg>;
> + pinctrl-1 = <&mmc1_uhs_cfg>;
> + bus-width = <4>;
> + non-removable;
[Severity: Medium]
Should a Micro SD card slot be marked non-removable?
In mmc_of_parse(), non-removable sets MMC_CAP_NONREMOVABLE, which makes
mmc_card_is_removable(host) return false.
Although the SpacemiT K3 SDHCI driver sets SDHCI_QUIRK_BROKEN_CARD_DETECTION
in spacemit_sdhci_k3_pdata, __sdhci_add_host() only enables polling when
the card is removable:
drivers/mmc/host/sdhci.c:__sdhci_add_host() {
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
mmc_card_is_removable(mmc) &&
mmc_gpio_get_cd(mmc) < 0)
mmc->caps |= MMC_CAP_NEEDS_POLL;
}
Additionally, mmc_rescan() only scans a non-removable host once at boot,
and mmc_detect_card_removed() immediately returns 0:
drivers/mmc/core/core.c:mmc_rescan() {
/* If there is a non-removable card registered, only scan once */
if (!mmc_card_is_removable(host) && host->rescan_entered)
return;
host->rescan_entered = 1;
}
If the board boots without a Micro SD card inserted, cards inserted later
will not be detected, and runtime card removal or swapping will not be
handled. Should this use cd-gpios (if a card-detect GPIO is wired) or
broken-cd instead of non-removable?
> + 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>;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261020081633.3673704-1-sandie.cao@deepcomputing.io?part=3
prev parent reply other threads:[~2026-10-20 8:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 8:16 [PATCH v2 0/3] Enable USB and SD for Deepcomputing FML13V05 board Sandie Cao
2026-10-20 8:16 ` Sandie Cao
2026-10-20 8:18 ` [PATCH v2 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree Sandie Cao
2026-10-20 8:18 ` Sandie Cao
2026-10-20 8:19 ` [PATCH v2 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support Sandie Cao
2026-10-20 8:19 ` Sandie Cao
2026-10-20 8:20 ` [PATCH v2 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support Sandie Cao
2026-10-20 8:20 ` Sandie Cao
2026-10-20 8:58 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-178663@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sandie.cao@deepcomputing.io \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.