[PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface

Nick Xie posted 1 patch 3 weeks, 1 day ago
There is a newer version of this series
.../amlogic/meson-s4-s905y4-khadas-vim1s.dts  | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
[PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface
Posted by Nick Xie 3 weeks, 1 day ago
Enable the SDIO controller interface connected to the on-board
AP6256 WiFi/BT module.

Signed-off-by: Nick Xie <nick@khadas.com>
---
 .../amlogic/meson-s4-s905y4-khadas-vim1s.dts  | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
index 4a66c1bec965e..74ef02c713207 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
@@ -220,6 +220,35 @@ &sd {
 	vqmmc-supply = <&vddio_sd>;
 };
 
+&sdio {
+	status = "okay";
+	pinctrl-0 = <&sdio_pins>;
+	pinctrl-1 = <&sdio_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	bus-width = <4>;
+	cap-sd-highspeed;
+	sd-uhs-sdr50;
+	sd-uhs-sdr104;
+	max-frequency = <50000000>;
+	non-removable;
+	disable-wp;
+
+	amlogic,dram-access-quirk;
+
+	no-sd;
+	no-mmc;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	vmmc-supply = <&vddao_3v3>;
+	vqmmc-supply = <&vddio_ao1v8>;
+
+	brcmf: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
 &spicc0 {
 	status = "okay";
 	pinctrl-names = "default";
-- 
2.34.1
Re: [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface
Posted by Martin Blumenstingl 2 weeks, 4 days ago
Hi Nick,

thanks for your patches - it's great to see Khadas VIM1S support
growing upstream :-)

On Fri, Jan 16, 2026 at 3:39 AM Nick Xie <nick@khadas.com> wrote:
[...]
> +&sdio {
> +       status = "okay";
> +       pinctrl-0 = <&sdio_pins>;
> +       pinctrl-1 = <&sdio_clk_gate_pins>;
> +       pinctrl-names = "default", "clk-gate";
> +       #address-cells = <1>;
> +       #size-cells = <0>;
> +       bus-width = <4>;
> +       cap-sd-highspeed;
> +       sd-uhs-sdr50;
> +       sd-uhs-sdr104;
> +       max-frequency = <50000000>;
> +       non-removable;
> +       disable-wp;
> +
> +       amlogic,dram-access-quirk;
Have you tried without this property? To my knowledge only early G12A
and G12B SoCs required this.
The mode enabled by this property limits the SDIO throughput. So it
should only be used if the silicon requires this.

> +       no-sd;
> +       no-mmc;
> +       mmc-pwrseq = <&sdio_pwrseq>;
> +       vmmc-supply = <&vddao_3v3>;
> +       vqmmc-supply = <&vddio_ao1v8>;
I'm missing:
  clocks = <&sdio_32k>;
  clock-names = "lpo";

> +       brcmf: wifi@1 {
> +               reg = <1>;
> +               compatible = "brcm,bcm4329-fmac";
Is AP6256 using a bcm43456 chip? If so then this should be (according
to Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml):
   compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac";


Best regards,
Martin
Re: [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface
Posted by Martin Blumenstingl 2 weeks, 4 days ago
On Mon, Jan 19, 2026 at 10:39 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
[...]
> > +       no-sd;
> > +       no-mmc;
> > +       mmc-pwrseq = <&sdio_pwrseq>;
> > +       vmmc-supply = <&vddao_3v3>;
> > +       vqmmc-supply = <&vddio_ao1v8>;
> I'm missing:
>   clocks = <&sdio_32k>;
>   clock-names = "lpo";
I've been a bit quick here: clocks and clock-names should be part of
the wifi@1 sub-node