From 5d5560503f23a88c605aae37a5ab7e4502aaf7b6 Mon Sep 17 00:00:00 2001 From: li bing Date: Wed, 20 Aug 2014 08:50:11 +0800 Subject: [PATCH] wifi: esp wifi normally open for rk3128's box. --- arch/arm/boot/dts/rk3128-box.dts | 34 ++++++++++++++++++------------- arch/arm/boot/dts/rk312x-sdk.dtsi | 2 +- net/rfkill/rfkill-wlan.c | 4 ++-- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/arch/arm/boot/dts/rk3128-box.dts b/arch/arm/boot/dts/rk3128-box.dts index 9b8eb67cc781..2021b860d18c 100755 --- a/arch/arm/boot/dts/rk3128-box.dts +++ b/arch/arm/boot/dts/rk3128-box.dts @@ -6,7 +6,7 @@ wireless-wlan { compatible = "wlan-platdata"; - wifi_chip_type = ""; + wifi_chip_type = "esp8089"; sdio_vref = <0>; //1800mv or 3300mv //power_ctrl_by_pmu; @@ -23,24 +23,24 @@ //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>; status = "okay"; - }; + }; - wireless-bluetooth { - compatible = "bluetooth-platdata"; + wireless-bluetooth { + compatible = "bluetooth-platdata"; - //wifi-bt-power-toggle; + //wifi-bt-power-toggle; - uart_rts_gpios = <&gpio0 GPIO_C2 GPIO_ACTIVE_LOW>; - pinctrl-names = "default","rts_gpio"; - pinctrl-0 = <&uart0_rts>; - pinctrl-1 = <&uart0_rts_gpio>; + uart_rts_gpios = <&gpio0 GPIO_C2 GPIO_ACTIVE_LOW>; + pinctrl-names = "default","rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_rts_gpio>; - //BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>; - BT,reset_gpio = <&gpio3 GPIO_C5 GPIO_ACTIVE_HIGH>; - BT,wake_gpio = <&gpio1 GPIO_B4 GPIO_ACTIVE_HIGH>; - BT,wake_host_irq = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>; + //BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>; + BT,reset_gpio = <&gpio3 GPIO_C5 GPIO_ACTIVE_HIGH>; + BT,wake_gpio = <&gpio1 GPIO_B4 GPIO_ACTIVE_HIGH>; + BT,wake_host_irq = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>; - status = "disabled"; + status = "okay"; }; usb_control { compatible = "rockchip,rk3126-usb-control"; @@ -117,6 +117,12 @@ status = "okay"; }; +&uart0{ + status = "okay"; + dma-names = "!tx", "!rx"; + pinctrl-0 = <&uart0_xfer &uart0_cts>; +}; + &pwm2 { status = "okay"; }; diff --git a/arch/arm/boot/dts/rk312x-sdk.dtsi b/arch/arm/boot/dts/rk312x-sdk.dtsi index 923f2aff6e29..87ac862b57fd 100755 --- a/arch/arm/boot/dts/rk312x-sdk.dtsi +++ b/arch/arm/boot/dts/rk312x-sdk.dtsi @@ -107,7 +107,7 @@ ignore-pm-notify; keep-power-in-suspend; //cap-sdio-irq; - status = "disabled"; + status = "okay"; }; &adc { diff --git a/net/rfkill/rfkill-wlan.c b/net/rfkill/rfkill-wlan.c index 73607702fc69..f91a4912ca82 100755 --- a/net/rfkill/rfkill-wlan.c +++ b/net/rfkill/rfkill-wlan.c @@ -282,7 +282,7 @@ int rockchip_wifi_ref_voltage(int on) return -1; } else { if (on == level) { - if(cpu_is_rk3036()) + if(cpu_is_rk3036() || cpu_is_rk312x()) { /*regulator_set_voltage(ldo, voltage, voltage); LOG("%s: %s enabled, level = %d\n", __func__, ldostr, voltage); @@ -634,7 +634,7 @@ static int wlan_platdata_parse_dt(struct device *dev, strcpy(wifi_chip_type_string, strings); printk("%s: wifi_chip_type = %s\n", __func__, wifi_chip_type_string); - if(cpu_is_rk3036()){ + if(cpu_is_rk3036() || cpu_is_rk312x()){ /* ret = of_property_read_u32(node, "sdio_vref", &value); if (ret < 0) { LOG("%s: Can't get sdio vref.", __func__); -- 2.34.1