]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: rockchip: Add WiFi on rk3576-evb1-v10
authorAlexey Charkov <alchark@gmail.com>
Tue, 12 Aug 2025 20:30:24 +0000 (00:30 +0400)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 24 Aug 2025 10:44:36 +0000 (12:44 +0200)
Add device tree nodes to enable the onboard Ampak AP6275P WiFi chip
connected over a PCIe link on Rockchip RK3576 EVB1.

It takes an external 32 kHz clock from the RTC chip and requires the
WIFI_REG_ON signal to be enabled before the bus is enumerated to
initialize properly.

Tested-by: Pavel Zhovner <pavel@flipperdevices.com>
Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://lore.kernel.org/r/20250813-evb1-rtcwifibt-v1-2-d13c83422971@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts

index b756aba9328b0a3010082ead61013f2e43766a1d..1adbbcc1c569a124b19d4e6a3419743eb7b5c7d8 100644 (file)
                regulator-max-microvolt = <3300000>;
                vin-supply = <&vcc_sys>;
        };
+
+       vcc_wifi_reg_on: regulator-wifi-reg-on {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&wifi_reg_on>;
+               pinctrl-names = "default";
+               regulator-name = "wifi_reg_on";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vcc_1v8_s3>;
+       };
 };
 
 &cpu_l0 {
        cpu-supply = <&vdd_cpu_big_s0>;
 };
 
+&combphy0_ps {
+       status = "okay";
+};
+
 &combphy1_psu {
        status = "okay";
 };
        };
 };
 
+&pcie0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie0_rst>;
+       reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
+       vpcie3v3-supply = <&vcc_3v3_s3>;
+       status = "okay";
+
+       pcie@0,0 {
+               reg = <0x0 0 0 0 0>;
+               bus-range = <0x0 0xf>;
+               device_type = "pci";
+               ranges;
+               #address-cells = <3>;
+               #size-cells = <2>;
+
+               wifi: wifi@0,0 {
+                       compatible = "pci14e4,449d";
+                       reg = <0x10000 0 0 0 0>;
+                       clocks = <&hym8563>;
+                       clock-names = "lpo";
+               };
+       };
+};
+
 &pcie1 {
        reset-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
        vpcie3v3-supply = <&vcc3v3_pcie1>;
                };
        };
 
+       pcie0 {
+               pcie0_rst: pcie0-rst {
+                       rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        usb {
                usb_host_pwren: usb-host-pwren {
                        rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
                        rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
+
+       wifi {
+               wifi_reg_on: wifi-reg-on {
+                       rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+
+               wifi_wake_host: wifi-wake-host {
+                       rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
 };
 
 &sdhci {