Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Iker Pedrosa" <ikerpedrosam@gmail.com>
Cc: conor+dt@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v9 7/8] riscv: dts: spacemit: k1-bananapi-f3: add SD card support with UHS modes
Date: Tue, 12 May 2026 03:32:48 +0000	[thread overview]
Message-ID: <20260512033249.187C5C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260511-orangepi-sd-card-uhs-v9-7-ae48c0b2b2cf@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Enabling UHS-I modes with an `always-on` VMMC regulator prevents proper SD card resets, breaking soft reboots and driver rebinds.
--

commit da601a14dc433b25fd35c0c4098f9e5dcb5faea3
Author: Iker Pedrosa <ikerpedrosam@gmail.com>

riscv: dts: spacemit: k1-bananapi-f3: add SD card support with UHS modes

This commit enables the sdhci0 controller on the Banana Pi BPI-F3 with
high-speed UHS modes, wiring up the vmmc and vqmmc supplies.

> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> index e20daa50a152f..8fea6e87acec8 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> @@ -221,7 +221,7 @@ buck3_1v8: buck3 {
>  				regulator-always-on;
>  			};
>  
> -			buck4 {
> +			buck4: buck4 {
>  				regulator-min-microvolt = <500000>;
>  				regulator-max-microvolt = <3300000>;
>  				regulator-ramp-delay = <5000>;

[ ... ]

> @@ -374,3 +374,21 @@ hub_3_0: hub@2 {
>  		reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
>  	};
>  };
> +
> +&sdhci0 {
> +	pinctrl-names = "default", "uhs";
> +	pinctrl-0 = <&mmc1_cfg>;
> +	pinctrl-1 = <&mmc1_uhs_cfg>;
> +	bus-width = <4>;
> +	cd-gpios = <&gpio K1_GPIO(80) (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
> +	no-mmc;
> +	no-sdio;
> +	disable-wp;
> +	cap-sd-highspeed;
> +	vmmc-supply = <&buck4>;
> +	vqmmc-supply = <&aldo1>;
> +	sd-uhs-sdr25;
> +	sd-uhs-sdr50;
> +	sd-uhs-sdr104;

Could enabling UHS-I modes here introduce a regression during soft reboots
or driver unbind and rebind cycles if buck4 is an always-on regulator?

When UHS-I is negotiated, the SD card switches to 1.8V signaling. The SD
physical layer specification dictates that resetting an SD card from 1.8V
mode back to the default 3.3V mode requires dropping the main VDD supply
(vmmc) to 0V.

Since buck4 is configured with regulator-always-on, the regulator framework
will not physically disable the supply when mmc_power_off() requests it.
This could leave the SD card stuck in 1.8V mode during a soft reboot,
preventing the host from communicating during the initial 3.3V sequence
and causing initialization to fail.

Should regulator-always-on be removed from buck4 if it isn't shared with
other always-on components, or should UHS modes be omitted if the regulator
must remain on?

> +	status = "okay";
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260511-orangepi-sd-card-uhs-v9-0-ae48c0b2b2cf@gmail.com?part=7

  parent reply	other threads:[~2026-05-12  3:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11  8:53 [PATCH v9 0/8] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2 Iker Pedrosa
2026-05-11  8:53 ` [PATCH v9 1/8] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching Iker Pedrosa
2026-05-12  1:01   ` sashiko-bot
2026-05-11  8:53 ` [PATCH v9 2/8] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation Iker Pedrosa
2026-05-12  1:13   ` sashiko-bot
2026-05-11  8:53 ` [PATCH v9 3/8] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support Iker Pedrosa
2026-05-12  2:01   ` sashiko-bot
2026-05-11  8:53 ` [PATCH v9 4/8] mmc: sdhci-of-k1: add comprehensive SDR tuning support Iker Pedrosa
2026-05-11  8:54 ` [PATCH v9 5/8] riscv: dts: spacemit: k1: add SD card controller and pinctrl support Iker Pedrosa
2026-05-12  2:47   ` sashiko-bot
2026-05-11  8:54 ` [PATCH v9 6/8] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes Iker Pedrosa
2026-05-12  3:20   ` sashiko-bot
2026-05-11  8:54 ` [PATCH v9 7/8] riscv: dts: spacemit: k1-bananapi-f3: " Iker Pedrosa
2026-05-11 16:55   ` Aurelien Jarno
2026-05-12  3:32   ` sashiko-bot [this message]
2026-05-12  5:43   ` Yixun Lan
2026-05-12 17:03     ` Aurelien Jarno
2026-05-11  8:54 ` [PATCH v9 8/8] riscv: dts: spacemit: k1-musepi-pro: " Iker Pedrosa
2026-05-11 11:43   ` Andre Heider
2026-05-12  3:48   ` sashiko-bot
2026-05-12  5:20   ` Yixun Lan
2026-05-11 15:40 ` [PATCH v9 0/8] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2 Ulf Hansson

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=20260512033249.187C5C2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ikerpedrosam@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox