From c818b92a4c00b7540cb24b696c38ac405b896998 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 29 Jul 2023 22:09:14 +0200 Subject: [PATCH 401/464] arm64: dts: rk3566-pinetab2: Fixup wifi DT description - To enable power, 3 regulators need to be enabled in sequence. - Add wakeup gpios. - Reset signal is not connected on board, no need to use it. Signed-of-by: Ondrej Jirman --- .../dts/rockchip/rk3566-pinetab2-v0.1.dts | 2 +- .../dts/rockchip/rk3566-pinetab2-v2.0.dts | 2 +- .../boot/dts/rockchip/rk3566-pinetab2.dtsi | 48 +++++++++++++++---- 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts index ba244545ba26..7dc17a241b2e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v0.1.dts @@ -21,6 +21,6 @@ lcd0_rst_l: lcd0-rst-l { }; }; -&vcc_wl { +&w_vbat { gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts index 79f672123b7f..44f5f2812a7f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2-v2.0.dts @@ -41,6 +41,6 @@ hall_int_l: hall-int-l { }; }; -&vcc_wl { +&w_vbat { gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi index 1ba6e610767a..349071581962 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi @@ -13,6 +13,7 @@ / { chassis-type = "tablet"; aliases { + ethernet0 = &bes2600; mmc0 = &sdmmc0; mmc1 = &sdhci; }; @@ -152,9 +153,6 @@ sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rk817 1>; clock-names = "ext_clock"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_reset>; - reset-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>; post-power-on-delay-ms = <200>; }; @@ -259,18 +257,37 @@ vcc_sys: vcc_sys { vin-supply = <&vcc_bat>; }; - vcc_wl: vcc_wl { + w_vbat: w-vbat-regulator { compatible = "regulator-fixed"; + enable-active-high; pinctrl-names = "default"; pinctrl-0 = <&wifi_pwren>; - regulator-name = "vcc_wl"; + regulator-name = "w_vbat"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - vin-supply = <&vcc3v3_sys>; + vin-supply = <&vcc_sys>; + }; - regulator-state-mem { - regulator-off-in-suspend; - }; + wl_reg: wl-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_reg_on_h>; + regulator-name = "wl_reg"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&w_vbat>; + }; + + wl_reg2: wl2-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; + regulator-name = "wl_reg2"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&wl_reg>; }; vdd1v2_dvp: vdd1v2_dvp { @@ -854,6 +871,10 @@ wifi_reset: wifi-reset { rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; }; + wifi_pwrkey: wifi-pwrkey { + rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + wifi_wake_host_h: wifi-wake-host-h { rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>; }; @@ -928,9 +949,16 @@ &sdmmc1 { &sdmmc1_cmd &sdmmc1_clk>; sd-uhs-sdr104; - vmmc-supply = <&vcc_wl>; + vmmc-supply = <&wl_reg2>; vqmmc-supply = <&vcca1v8_pmu>; status = "okay"; + + bes2600: wifi { + compatible = "bestechnic,bes2600"; + + device-wakeup-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; // wifi chip wakeup + host-wakeup-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; // host wakeup + }; }; &sfc { -- 2.34.1