* [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface @ 2026-01-16 2:39 Nick Xie 2026-01-19 21:39 ` Martin Blumenstingl 0 siblings, 1 reply; 5+ messages in thread From: Nick Xie @ 2026-01-16 2:39 UTC (permalink / raw) To: neil.armstrong, khilman, jbrunet, martin.blumenstingl, devicetree, linux-kernel, linux-arm-kernel, linux-amlogic Cc: krzk+dt, robh, conor+dt, xieqinick, Nick Xie 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface 2026-01-16 2:39 [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface Nick Xie @ 2026-01-19 21:39 ` Martin Blumenstingl 2026-01-19 21:41 ` Martin Blumenstingl 2026-01-20 1:34 ` 回复: " Nick Xie 0 siblings, 2 replies; 5+ messages in thread From: Martin Blumenstingl @ 2026-01-19 21:39 UTC (permalink / raw) To: Nick Xie Cc: neil.armstrong, khilman, jbrunet, devicetree, linux-kernel, linux-arm-kernel, linux-amlogic, krzk+dt, robh, conor+dt, xieqinick 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface 2026-01-19 21:39 ` Martin Blumenstingl @ 2026-01-19 21:41 ` Martin Blumenstingl 2026-01-20 1:34 ` 回复: " Nick Xie 1 sibling, 0 replies; 5+ messages in thread From: Martin Blumenstingl @ 2026-01-19 21:41 UTC (permalink / raw) To: Nick Xie Cc: neil.armstrong, khilman, jbrunet, devicetree, linux-kernel, linux-arm-kernel, linux-amlogic, krzk+dt, robh, conor+dt, xieqinick 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface 2026-01-19 21:39 ` Martin Blumenstingl 2026-01-19 21:41 ` Martin Blumenstingl @ 2026-01-20 1:34 ` Nick Xie 2026-01-20 8:27 ` neil.armstrong 1 sibling, 1 reply; 5+ messages in thread From: Nick Xie @ 2026-01-20 1:34 UTC (permalink / raw) To: Martin Blumenstingl Cc: neil.armstrong@linaro.org, khilman@baylibre.com, jbrunet@baylibre.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org, xieqinick@gmail.com [...] > > +&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. Without this property it will get an warning: meson-gx-mmc fe088000.mmc: unaligned sg len 96 blksize 512, disabling descriptor DMA for transfer > > + 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"; Maybe it is not needed? This clock property looks for the bluetooth not for the Wi-Fi ? > > + 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"; OK, I will fix it in next version. With this SDIO patch, the SDIO card detected well, but when try to connect the wifi, it still failed. So maybe extra patches are needed to make Wi-Fi working. [ 5.909858] meson-gx-mmc fe088000.mmc: allocated mmc-pwrseq [ 6.113160] mmc2: new UHS-I speed SDR104 SDIO card at address 0001 [ 19.206019] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9 [ 19.208638] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.khadas,vim1s.bin failed with error -2 [ 19.218170] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.clm_blob failed with error -2 [ 19.332091] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 19.332113] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) [ 19.332327] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/9 wl0: Jun 25 2021 17:13:38 version 7.45.96.94 (7bb6b14@SYNA) (r745790) FWID 01-2bdfb64c es7.c5.n4.a3 [ 19.332731] brcmfmac: brcmf_sdio_read_control: read 232 control bytes failed: -84 [ 19.332988] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK [ 21.939090] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout [ 35.587422] meson-gx-mmc fe088000.mmc: unaligned sg len 96 blksize 512, disabling descriptor DMA for transfer [ 44.412677] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) [ 45.696901] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) [ 47.491768] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) [ 53.292090] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) [ 59.866328] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) Best regards, Nick ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 回复: [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface 2026-01-20 1:34 ` 回复: " Nick Xie @ 2026-01-20 8:27 ` neil.armstrong 0 siblings, 0 replies; 5+ messages in thread From: neil.armstrong @ 2026-01-20 8:27 UTC (permalink / raw) To: Nick Xie, Martin Blumenstingl Cc: khilman@baylibre.com, jbrunet@baylibre.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org, xieqinick@gmail.com On 1/20/26 02:34, Nick Xie 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. > > Without this property it will get an warning: > > meson-gx-mmc fe088000.mmc: unaligned sg len 96 blksize 512, disabling descriptor DMA for transfer > >>> + 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"; > > Maybe it is not needed? This clock property looks for the bluetooth not for the Wi-Fi ? > >>> + 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"; > > OK, I will fix it in next version. > > With this SDIO patch, the SDIO card detected well, but when try to connect the wifi, it still failed. > So maybe extra patches are needed to make Wi-Fi working. > > [ 5.909858] meson-gx-mmc fe088000.mmc: allocated mmc-pwrseq > [ 6.113160] mmc2: new UHS-I speed SDR104 SDIO card at address 0001 > [ 19.206019] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9 > [ 19.208638] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.khadas,vim1s.bin failed with error -2 > [ 19.218170] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.clm_blob failed with error -2 > [ 19.332091] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available > [ 19.332113] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) > [ 19.332327] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/9 wl0: Jun 25 2021 17:13:38 version 7.45.96.94 (7bb6b14@SYNA) (r745790) FWID 01-2bdfb64c es7.c5.n4.a3 > [ 19.332731] brcmfmac: brcmf_sdio_read_control: read 232 control bytes failed: -84 > [ 19.332988] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK > [ 21.939090] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout > [ 35.587422] meson-gx-mmc fe088000.mmc: unaligned sg len 96 blksize 512, disabling descriptor DMA for transfer This is an issue with the driver, it's unrelated with the amlogic,dram-access-quirk, which fixes this because we use a bounce buffer. > [ 44.412677] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) > [ 45.696901] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) > [ 47.491768] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) > [ 53.292090] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) > [ 59.866328] ieee80211 phy0: brcmf_cfg80211_connect: BRCMF_C_SET_SSID failed (-52) > > > Best regards, > Nick > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-20 8:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-16 2:39 [PATCH v1] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface Nick Xie 2026-01-19 21:39 ` Martin Blumenstingl 2026-01-19 21:41 ` Martin Blumenstingl 2026-01-20 1:34 ` 回复: " Nick Xie 2026-01-20 8:27 ` neil.armstrong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox