[PATCH 1/1] riscv: dts: starfive: Milk-V Mars CM Lite broken-cd
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Wed Feb 4 08:38:54 PST 2026
On 2/4/26 11:16, Heinrich Schuchardt wrote:
> The card detect GPIO depends on support by the base board.
>
> Detecting an SD-card did not work for me with a Milk-V Mars CM Lite
> mounted on an Waveshare CM4-IO-BASE-A board.
The schematic of the Waveshare CM4-IO-BASE-A board is available at
https://files.waveshare.com/upload/a/aa/CM4-IO-BASE-A_V4_SchDoc.pdf
showing pin 76 is not connected.
In https://forums.raspberrypi.com/viewtopic.php?t=291041 the Raspberry
Foundation explicitly wrote that pin 76 should not be connected when
using a compute module socket.
E. Shattow pointed me to a board
https://github.com/NabuCasa/yellow/releases/download/v1.3c/Yellow_v1.3c_Schematic_git.8957b440adda.pdf
that actually disregarded this advice and uses pin 76 actually as
cd-gpio. This usage of GPIO 41 is a property of the specific base board
and not of the Milk-V Mars CM and should be described in a device-tree
overlay if needed.
Best regards
Heinrich
>
> According to [1] SD_SDIO0_CD_GPIO41 is connected to pin 76 reserved.
> The Raspberry Pi Compute Module 4 IO Board documentation marks that pin as
> reserved. The Raspberry Pi Compute Module 5 IO Board documentation
> marks the pin as VBAT.
>
> Remove the cd-gpios definition and add broken-cd.
>
> [1] https://github.com/milkv-mars/mars-files/blob/main/Mars-CM_Hardware_Schematices/Milk-V_Mars-CM_SCH_V1.0-2023-0905_Lite.pdf
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> arch/riscv/boot/dts/starfive/jh7110-milkv-marscm-lite.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm-lite.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm-lite.dts
> index 63aa94d65ab55..566b0bdc2800d 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm-lite.dts
> +++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm-lite.dts
> @@ -13,7 +13,7 @@ / {
>
> &mmc0 {
> bus-width = <4>;
> - cd-gpios = <&sysgpio 41 GPIO_ACTIVE_LOW>;
> + broken-cd;
> disable-wp;
> };
>
More information about the linux-riscv
mailing list