[PATCH v9 7/8] riscv: dts: spacemit: k1-bananapi-f3: add SD card support with UHS modes

Aurelien Jarno aurelien at aurel32.net
Tue May 12 10:03:10 PDT 2026


Hi Yixun,

On 2026-05-12 05:43, Yixun Lan wrote:
> Hi Iker,
> 
> Please note, once you are sending new patch series, please drop patch 1-4
> which already picked by Ulf, but keep increase the version number
> 
> 
> On 10:54 Mon 11 May     , Iker Pedrosa wrote:
> > Add complete SD card controller support with UHS high-speed modes.
> > 
> > - Enable sdhci0 controller with 4-bit bus width
> > - Configure card detect GPIO with inversion
> > - Connect vmmc-supply to buck4 for 3.3V card power
> > - Connect vqmmc-supply to aldo1 for 1.8V/3.3V I/O switching
> > - Add dual pinctrl states for voltage-dependent pin configuration
> > - Support UHS-I SDR25, SDR50, and SDR104 modes
> > 
> > This enables full SD card functionality including high-speed UHS modes
> > for improved performance.
> > 
> > Suggested-by: Anand Moon <linux.amoon at gmail.com>
> > Tested-by: Anand Moon <linux.amoon at gmail.com>
> > Tested-by: Margherita Milani <margherita.milani at amarulasolutions.com>
> > Signed-off-by: Iker Pedrosa <ikerpedrosam at gmail.com>
> > ---
> >  arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 22 ++++++++++++++++++++--
> >  1 file changed, 20 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> > index e20daa50a152..8fea6e87acec 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>;
> > @@ -242,7 +242,7 @@ buck6 {
> >  				regulator-always-on;
> >  			};
> >  
> > -			aldo1 {
> > +			aldo1: aldo1 {
> >  				regulator-min-microvolt = <500000>;
> >  				regulator-max-microvolt = <3400000>;
> >  				regulator-boot-on;
> > @@ -374,3 +374,21 @@ hub_3_0: hub at 2 {
> >  		reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
> >  	};
> >  };
> > +
> > +&sdhci0 {
> I'd suggest to add alias (to 'aliases' node), so we will have stable
> dev node regardless whichever device probe first.. something should like
> 	aliases {
> 		..
> 		mmc0 = &emmc;
> 		mmc1 = &sdhci0;
> 		..
> 	}
> 
> So, how about let's make it convention here, first device is emmc, second
> is SD card, third is sdio device (haven't added yet).. We introduced emmc
> early before this patch, so it stays unchanged which is nice for end user
> 
> Please apply this alias idea to all boards although I only comment in this
> patch..

Having a stable naming is definitely a good idea.

What about boards that have no or optional emmc, like the Milk-V Jupiter 
board? I plan to submit a patch for it, so I wonder if we still number 
the SD card as mmc1 even if there is no emmc.

Thanks
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                     http://aurel32.net



More information about the linux-riscv mailing list