wifi: esp wifi normally open for rk3128's box.
authorli bing <libing@rock-chips.com>
Wed, 20 Aug 2014 00:50:11 +0000 (08:50 +0800)
committerli bing <libing@rock-chips.com>
Wed, 20 Aug 2014 00:50:11 +0000 (08:50 +0800)
arch/arm/boot/dts/rk3128-box.dts
arch/arm/boot/dts/rk312x-sdk.dtsi
net/rfkill/rfkill-wlan.c

index 9b8eb67cc781c4c1b422ce71ed895099a34573e3..2021b860d18c4c01e248412f3039dce3c14e3de9 100755 (executable)
@@ -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;
                //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";
        status = "okay";
 };
 
+&uart0{
+       status = "okay";
+       dma-names = "!tx", "!rx";
+       pinctrl-0 = <&uart0_xfer &uart0_cts>;
+};
+
 &pwm2 {
        status = "okay";
 };
index 923f2aff6e292142e0c479702ac8d7da16194e65..87ac862b57fd12ea78c81965ba1262b95d4ff056 100755 (executable)
        ignore-pm-notify;
        keep-power-in-suspend;
        //cap-sdio-irq;
-       status = "disabled";
+       status = "okay";
 };
 
 &adc {
index 73607702fc69cfa17f74fa3fa2997afd25a12008..f91a4912ca82cfb25033952caa7bbda2b9987393 100755 (executable)
@@ -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__);