[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:27:14 PDT 2026
Hi Iker, Aurelien
On 20:28 Thu 07 May , Aurelien Jarno wrote:
> Hi,
..
> > +&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_HIGH>;
> > + cd-inverted;
> > + broken-cd;
>
> Card detect is marked as broken as a proper definition requires pull-up
> support in pinctrl. Support for that went into 7.1, so I guess it's not
> safe to use the proper definition. That means using the following
> changes on to of this patch:
>
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> @@ -406,9 +406,7 @@ &sdhci0 {
> pinctrl-0 = <&mmc1_cfg>;
> pinctrl-1 = <&mmc1_uhs_cfg>;
> bus-width = <4>;
> - cd-gpios = <&gpio K1_GPIO(80) GPIO_ACTIVE_HIGH>;
> - cd-inverted;
> - broken-cd;
> + cd-gpios = <&gpio K1_GPIO(80) (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
I agree, please see this patch which was merged
https://lore.kernel.org/all/20260312-k1-gpio-set-config-v1-0-8c3541da16b1@pigmoral.tech/
--
Yixun Lan (dlan)
More information about the linux-riscv
mailing list