[PATCH v8 8/9] riscv: dts: spacemit: k1-bananapi-f3: add SD card support with UHS modes
Yixun Lan
dlan at kernel.org
Fri May 8 15:53:41 PDT 2026
Hi Iker, Troy,
On 18:45 Thu 07 May , Troy Mitchell wrote:
> On Thu May 7, 2026 at 5:53 PM CST, Iker Pedrosa wrote:
> > Hi,
> >
> > El jue, 7 may 2026 a las 10:20, Margherita Milani
> > (<margherita.milani at amarulasolutions.com>) escribió:
> >>
> >> Good morning Iker,
> >>
> >> > 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
> >>
> >>
> >> Tested-by: Margherita Milani <margherita.milani at amarulasolutions.com>
> >>
> >> However I noticed it only works when CONFIG_I2C_K1 is enabled.
> >> Michael Opdenacker told me it's necessary to enable the regulators
> >> used by the mmc controller.
> >> Should we add the dependency between CONFIG_MMC_SDHCI_OF_K1 and
> >> CONFIG_I2C_K1? (Unless some boards don't have these dependency?)
> >> Thank you for your patchset which was really nice!
> >
> > Thank you for catching this! You're absolutely right about the dependency.
> >
> > From what I can see, all current SpacemiT K1 boards follow this design
> > pattern where the SD card power is provided by an I2C-controlled PMIC.
> > However, before adding a hard dependency, I'd like to get input from
> > the community, does anyone know of K1-based boards that provide SD
> > card power through fixed regulators or other means that don't require
> > I2C?
I would object to add CONFIG_I2C_K1 as hard dependency, the reason is
that the spacemit sdhci driver (sdhci-of-k1.c) has no used i2c
api/function, it's just need I2C function via an indirect requirement,
which sdhci -> regulator(p1) -> i2c, besides, from the hardware design
perspective, it just happens that K1 use P1(via I2C) as PMIC, it's
totally possible(even in theory) to use other PMIC as power supply
control which may not be I2C interface (maybe use SPI, for example)
If we want to solve this more gracefully, I'm in favor to add explict
option enabled in defconfig..
> if K1 needs to switch between standard and high-speed (UHS) modes,
> I believe the I2C-controlled PMIC is mandatory to handle the voltage
> switching (typically 3.3V to 1.8V).
>
> I don't think any board would want to be stuck in standard mode permanently.
> If high-speed mode is an option, why not use it? I think adding this
> dependency is a good idea, but keep in mind it also needs to depend on P1.
>
No, as above
> - Troy
>
--
Yixun Lan (dlan)
More information about the linux-riscv
mailing list