From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, E Shattow <e@freeshell.de>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] riscv: dts: starfive: Milk-V Mars CM Lite broken-cd
Date: Wed, 4 Feb 2026 17:38:54 +0100 [thread overview]
Message-ID: <46d5d249-8cf2-46d1-a90c-1f2c5f146e15@canonical.com> (raw)
In-Reply-To: <20260204101602.30184-1-heinrich.schuchardt@canonical.com>
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@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;
> };
>
next prev parent reply other threads:[~2026-02-04 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 10:16 Heinrich Schuchardt
2026-02-04 16:38 ` Heinrich Schuchardt [this message]
2026-02-04 23:16 ` E Shattow
2026-02-05 7:50 ` Heinrich Schuchardt
2026-02-05 10:41 ` E Shattow
2026-02-26 17:58 ` Conor Dooley
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=46d5d249-8cf2-46d1-a90c-1f2c5f146e15@canonical.com \
--to=heinrich.schuchardt@canonical.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=e@freeshell.de \
--cc=kernel@esmil.dk \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®