]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dts: thead: Enable wifi on the BeagleV-Ahead
authorThomas Gerner <thomas.gerner@muenchen-mail.de>
Thu, 14 May 2026 18:32:01 +0000 (20:32 +0200)
committerDrew Fustini <fustini@kernel.org>
Mon, 25 May 2026 08:36:56 +0000 (01:36 -0700)
The BeagleV-Ahead board uses an AP6203BM WiFi chip from AMPAK Technology
Inc. connected to SDIO1. The chip is compatible to the broadcom wireless
driver.

The AP6203BM is a dual-band 2.4GHz/5GHz Wi-Fi 4 (802.11a/b/g/n) and
Bluetooth 5.4 module. Bluetooth is not enabled by this patch.

Signed-off-by: Thomas Gerner <thomas.gerner@muenchen-mail.de>
Signed-off-by: Drew Fustini <fustini@kernel.org>
arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts

index 91f3f9b987bc389ba4217a74c95de377d2158bd7..e16484a476534c0217e4fa2f5155d3856554e106 100644 (file)
                        };
                };
        };
+
+       wifi_pwrseq: wifi-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;      /* WL-REG-ON */
+       };
 };
 
 &osc {
                        slew-rate = <0>;
                };
        };
+
+       wifi_pins: wifi-0 {
+               host-wake-pins {
+                       pins = "GPIO2_25";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <1>;
+                       input-enable;
+                       input-schmitt-disable;
+                       slew-rate = <0>;
+               };
+
+               reg-on-pins {
+                       pins = "GPIO2_31";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <3>;
+                       input-disable;
+                       input-schmitt-disable;
+                       slew-rate = <0>;
+               };
+       };
 };
 
 &sdio0 {
        status = "okay";
 };
 
+&sdio1 {
+       bus-width = <4>;
+       max-frequency = <198000000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&wifi_pins>;
+       #address-cells = <1>;
+       #size-cells = <0>;
+       non-removable;
+       keep-power-in-suspend;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       status = "okay";
+
+       wifi@1 {
+               compatible = "cypress,cyw43012-fmac", "brcm,bcm4329-fmac";
+               reg = <1>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "host-wake";
+       };
+};
+
 &dpu {
        status = "okay";
 };