diff --git a/arch/riscv/boot/dts/zhihe/a210-dev.dts b/arch/riscv/boot/dts/zhihe/a210-dev.dts index 4e8add8e2..d167d53a9 100755 --- a/arch/riscv/boot/dts/zhihe/a210-dev.dts +++ b/arch/riscv/boot/dts/zhihe/a210-dev.dts @@ -145,22 +145,6 @@ SOUND_CARD_LINK(1, i2s, i2s1, 0, es7210_adc1, 0); }; - wcn_wifi: wireless-wlan { - compatible = "wlan-platdata"; - WIFI,vcc1-gpios = <&aw9535_1 11 GPIO_ACTIVE_HIGH>; - WIFI,vcc2-gpios = <&aw9535_1 12 GPIO_ACTIVE_HIGH>; - WIFI,poweren-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; - power_on_after_init; - power_on_when_resume; - status = "okay"; - }; - - wcn_bt: wireless-bluetooth { - compatible = "bluetooth-platdata"; - BT,power-gpios = <&ao_gpio1 4 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; - lcd0_backlight: pwm-backlight@0 { compatible = "pwm-backlight"; status = "okay"; @@ -232,6 +216,32 @@ status = "okay"; }; + wifi_vdd_3v3: wifi-3v3-regulator { + compatible = "regulator-fixed"; + regulator-name = "wifi_vdd_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&aw9535_1 11 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <1000>; + }; + + wifi_vdd_1v8: wifi-1v8-regulator { + compatible = "regulator-fixed"; + regulator-name = "wifi_vdd_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&aw9535_1 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <1000>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + post-power-on-delay-ms = <200>; + }; + gpio-keys { compatible = "gpio-keys"; key-sleep { @@ -455,6 +465,26 @@ slew-rate = <0>; }; }; + bt_aogpios { + bt_reset: bt-reset { + pins = "AOGPIO1_4"; /* enable-gpios */ + function = "aogpio0"; + bias-pull-up; + drive-strength = <7>; + input-disable; + input-schmitt-enable; + slew-rate = <0>; + }; + bt_wake_host: bt-wake-host { + pins = "AOGPIO0_30"; /* host-wake-gpios */ + function = "aogpio0"; + bias-pull-up; + drive-strength = <7>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; }; &peri1_padctrl { @@ -595,6 +625,17 @@ slew-rate = <0>; }; }; + bt_gpios { + bt_wake_dev: bt-wake-dev { + pins = "GPIO0_17"; /* device-wake-gpios */ + function = "gpio0"; + bias-pull-up; + drive-strength = <7>; + input-disable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; }; &peri2_padctrl { @@ -965,33 +1006,33 @@ clock-frequency = <400000>; status = "okay"; - aw9535_0: gpio@20 { - compatible = "awinic,aw9535"; - reg = <0x20>; - gpio-controller; - #gpio-cells = <2>; - ngpios = <16>; - interrupt-parent = <&ao_gpio1>; - interrupts = <2 IRQ_TYPE_LEVEL_LOW>; - gpio-line-names = - "CSI1_PWDN_IO0", "CSI1_RST_IO1", "CSI1_FSIN_IO2", "CSI0_PWDN_IO3", // index 0..3 - "CSI0_RST_IO4", "CSI0_FSIN_IO5", "MINPCIE_1V5POWER_EN_I06", "MINPCIE_3V3_PWREN_I07",// index 4..7 - "NULL_I08", "M2_SATA_EN_IO9", "AUDIO_ADC0_INT_IO10", "HP_CTL_H_IO11", // index 8..11 - "PI6C557_EN_IO12","DISP_RST_IO13","M2_SATA_3V3_PWREN_IO14","MINPCIE_PERST_IO15"; // index 12..15 - }; + aw9535_0: gpio@20 { + compatible = "awinic,aw9535"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <16>; + interrupt-parent = <&ao_gpio1>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + gpio-line-names = + "CSI1_PWDN_IO0", "CSI1_RST_IO1", "CSI1_FSIN_IO2", "CSI0_PWDN_IO3", // index 0..3 + "CSI0_RST_IO4", "CSI0_FSIN_IO5", "MINPCIE_1V5POWER_EN_I06", "MINPCIE_3V3_PWREN_I07",// index 4..7 + "NULL_I08", "M2_SATA_EN_IO9", "AUDIO_ADC0_INT_IO10", "HP_CTL_H_IO11", // index 8..11 + "PI6C557_EN_IO12","DISP_RST_IO13","M2_SATA_3V3_PWREN_IO14","MINPCIE_PERST_IO15"; // index 12..15 + }; - aw9535_1: gpio@21 { - compatible = "awinic,aw9535"; - reg = <0x21>; - gpio-controller; - #gpio-cells = <2>; - ngpios = <16>; - gpio-line-names = - "PCIE_ETH_PERSTB_IO0", "AUDIO_3V3_PWREN_IO1", "AUDIO_1V8_PWREN_IO2", "MIPI_CSI0_PWREN_IO3", // index 0..3 - "MIPI_CSI1_PWREN_IO4", "MIPI_TP_PWREN_IO5", "PCIE_ETH_3V3_PWREN_IO6", "NULL_IO7", // index 4..7 - "USBCON_PWREN_IO8", "USBCON1_PWREN_IO9", "NULL_IO10", "SDIO_3V3_PWREN_IO11", // index 8..11 - "SDIO_1V8_PWREN_IO12","PI6C557_PWREN_IO13","MIPI_DSI_PWREN_IO14","BL_EN_IO15"; // index 12..15 - }; + aw9535_1: gpio@21 { + compatible = "awinic,aw9535"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <16>; + gpio-line-names = + "PCIE_ETH_PERSTB_IO0", "AUDIO_3V3_PWREN_IO1", "AUDIO_1V8_PWREN_IO2", "MIPI_CSI0_PWREN_IO3", // index 0..3 + "MIPI_CSI1_PWREN_IO4", "MIPI_TP_PWREN_IO5", "PCIE_ETH_3V3_PWREN_IO6", "NULL_IO7", // index 4..7 + "USBCON_PWREN_IO8", "USBCON1_PWREN_IO9", "NULL_IO10", "SDIO_3V3_PWREN_IO11", // index 8..11 + "SDIO_1V8_PWREN_IO12","PI6C557_PWREN_IO13","MIPI_DSI_PWREN_IO14","BL_EN_IO15"; // index 12..15 + }; fusb302: typec-portc@22 { compatible = "fcs,fusb302"; @@ -1061,6 +1102,16 @@ &uart5 { pinctrl-names = "default"; pinctrl-0 = <&uart5_pins>; +/* + bluetooth { + compatible = "realtek,rtl8822cs-bt"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_reset>, <&bt_wake_host>, <&bt_wake_dev>; + enable-gpios = <&ao_gpio1 4 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&ao_gpio0 30 GPIO_ACTIVE_HIGH>; + device-wake-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + }; +*/ }; &uart8 { @@ -1139,6 +1190,16 @@ post-power-on-delay-ms = <200>; wprtn_ignore; wakeup-source; + + vmmc-supply = <&wifi_vdd_3v3>; + vqmmc-supply = <&wifi_vdd_1v8>; + mmc-pwrseq = <&wifi_pwrseq>; + + rtl8822cs: wifi@1 { + interrupt-parent = <&ao_gpio1>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; }; &usb20phy0 {