Wifi: add wifi power control configration [keep_wifi_power_on].
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-tb.dts
index 17dd881c0cfe49cce340faa0ba119a9d4d65a95b..c7cd3c0b28d84d30e56f3aeb8e7236af5a2672fa 100755 (executable)
     wireless-wlan {
         compatible = "wlan-platdata";
 
-        wifi_chip_type = "";
+        /* wifi_chip_type - wifi chip define
+         * bcmwifi ==> like ap6xxx, rk90x;
+         * rtkwifi ==> like rtl8188xx, rtl8723xx;
+         * esp8089 ==> esp8089;
+         * other   ==> for other wifi;
+         */
+        wifi_chip_type = "bcmwifi";
+
         sdio_vref = <1800>; //1800mv or 3300mv
 
+        //keep_wifi_power_on;
+
         //power_ctrl_by_pmu;
-        pmu_regulator = "act_ldo3";
-        pmu_enable_level = <1>; //1->HIGH, 0->LOW
+        power_pmu_regulator = "act_ldo3";
+        power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
+
+        //vref_ctrl_enable;
+        //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
+        vref_pmu_regulator = "act_ldo3";
+        vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
 
         WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
         WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
 
 };
 
+&nandc0 {
+       status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
+};
+&nandc1 {
+       status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
+};   
+
+&nandc0reg {
+       status = "okay"; // used nand set "disabled" ,used emmc set "okay"
+};
+
 &emmc {
-               clock-frequency = <200000000>;
-               clock-freq-min-max = <400000 200000000>;
+       clock-frequency = <100000000>;
+       clock-freq-min-max = <400000 100000000>;
+
         supports-highspeed;
-               supports-emmc;
-               bootpart-no-access;
+       supports-emmc;
+        bootpart-no-access;
+       
+       //supports-tSD;
+       //supports-DDR_MODE; //you should set the two value in your project. only close in RK3288-SDK board.
+       //caps2-mmc-hs200;
+
         ignore-pm-notify;
-               keep-power-in-suspend;
-       status = "okay";
+       keep-power-in-suspend;
+       
+       //poll-hw-reset 
+       status = "okay";
 };
     
 &sdmmc {
                clock-frequency = <50000000>;
-               lock-freq-min-max = <400000 50000000>;
+               clock-freq-min-max = <400000 50000000>;
                supports-highspeed;
                supports-sd;
                broken-cd;
                card-detect-delay = <200>;
-               vmmc-supply = <&rk808_ldo5_reg>;
+
+               ignore-pm-notify;
+               keep-power-in-suspend;
+       
+               vmmc-supply = <&rk808_ldo5_reg>;
                status = "okay";
 };
                
                };
           };
        };
+       act8846: act8846@5a {
+               reg = <0x5a>;
+               status = "okay";
+       };
 
        ricoh619: ricoh619@32 {
                reg = <0x32>;
                is_dc_charge = <1>;
                is_usb_charge = <0>;
        };
+       
+       rtc@51 {
+               compatible = "rtc,hym8563";
+               reg = <0x51>;
+               irq_gpio = <&gpio0 GPIO_A4 IRQ_TYPE_EDGE_FALLING>;
+       };
+
 };
 
 &i2c1 {
               poll_delay_ms = <30>;
               layout = <1>;
        };
-       
+
+    nfc-bcm2079x@76 {
+        compatible = "nfc-bcm2079x.ap6441";
+        reg = <0x76>;
+        en_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
+        wake_gpio = <&gpio5 GPIO_C0 GPIO_ACTIVE_HIGH>;
+        irq_gpio = <&gpio5 GPIO_B7 IRQ_TYPE_EDGE_RISING>;
+        status = "disabled";
+    };
+    nfc-bcm2079x@77 {
+        compatible = "nfc-bcm2079x.ap6493";
+        reg = <0x77>;
+        en_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
+        wake_gpio = <&gpio5 GPIO_C0 GPIO_ACTIVE_HIGH>;
+        irq_gpio = <&gpio5 GPIO_B7 IRQ_TYPE_EDGE_RISING>;
+        status = "disabled";
+    };
 };
 
 &i2c2 {
 
 &fb {
        rockchip,disp-mode = <DUAL>;
+       rockchip,uboot-logo-on = <1>;
 };
 
 &rk_screen {
         display-timings = <&disp_timings>;
 };
 
-/*lcdc1 as PRMRY(LCD),lcdc0 as EXTEND(HDMI)*/
-&lcdc1 {
+/*lcdc0 as PRMRY(LCD),lcdc1 as EXTEND(HDMI)*/
+&lcdc0 {
        status = "okay";
+       rockchip,mirror = <NO_MIRROR>;
+       rockchip,cabc_mode = <0>;
        power_ctr: power_ctr {
                rockchip,debug = <0>;
-               rockchip,mirror = <NO_MIRROR>;
                lcd_en:lcd_en {
                        rockchip,power_type = <GPIO>;
                        gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
                };
                
                lcd_cs:lcd_cs {
-rockchip,power_type = <GPIO>;
+                       rockchip,power_type = <GPIO>;
                        gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
                        rockchip,delay = <10>;
                };
@@ -560,8 +626,9 @@ rockchip,power_type = <GPIO>;
        };
 };
 
-&lcdc0 {
+&lcdc1 {
        status = "okay";
+       rockchip,mirror = <NO_MIRROR>;
 };
 
 &hdmi {
@@ -649,12 +716,12 @@ rockchip,power_type = <GPIO>;
                216000 850000
                312000 850000
                408000 850000
-               600000 850000
-               696000 900000
-               816000 950000
-               1008000 1000000
-               1200000 1050000
-               1416000 1150000
+               600000 900000
+               696000 950000
+               816000 1000000
+               1008000 1050000
+               1200000 1100000
+               1416000 1200000
                >;
        status="okay";
 };
@@ -663,11 +730,10 @@ rockchip,power_type = <GPIO>;
        operating-points = <
                /* KHz    uV */
                100000 850000
-               200000 850000
-               300000 900000
-               400000 1000000
-               500000 1100000
-               600000 1250000
+               200000 900000
+               300000 950000
+               420000 1050000
+               500000 1150000
                >;
        status="okay";
 };
@@ -681,16 +747,141 @@ rockchip,power_type = <GPIO>;
                533000 1050000
                >;
 
-       freq_table = <
+       freq-table = <
                /*status                freq(KHz)*/
                SYS_STATUS_NORMAL       400000
                SYS_STATUS_SUSPEND      200000
-               SYS_STATUS_VIDEO        300000
-               SYS_STATUS_DUALVIEW     500000
+               SYS_STATUS_VIDEO_1080P  240000
+               SYS_STATUS_VIDEO_4K     400000
+               SYS_STATUS_PERFORMANCE  528000
+               SYS_STATUS_DUALVIEW     400000
+               SYS_STATUS_BOOST        324000
+               SYS_STATUS_ISP          533000
+               >;
+       auto-freq-table = <
+               240000
+               324000
+               396000
+               528000
                >;
-       auto_freq=<1>;
+       auto-freq=<1>;
        status="okay";
 };
+/include/ "act8846.dtsi"
+&act8846 {
+       gpios =<&gpio7 GPIO_A1 GPIO_ACTIVE_LOW>,<&gpio0 GPIO_B2 GPIO_ACTIVE_HIGH>;
+       act8846,system-power-controller;
+
+       regulators {
+               
+               dcdc1_reg: regulator@0{
+                       regulator-name= "act_dcdc1";
+                       regulator-min-microvolt = <1200000>;
+                       regulator-max-microvolt = <1200000>;
+                       regulator-always-on;
+                       regulator-boot-on;
+               };
+
+               dcdc2_reg: regulator@1 {
+                       regulator-name= "vccio";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-initial-state = <3>;
+                       regulator-state-mem {
+                               regulator-state-enabled;
+                               regulator-state-uv = <3300000>;
+                       };              
+               };
+
+               dcdc3_reg: regulator@2 {
+                       regulator-name= "vdd_logic";
+                       regulator-min-microvolt = <700000>;
+                       regulator-max-microvolt = <1500000>;
+                       regulator-initial-state = <3>;
+                       regulator-state-mem {
+                               regulator-state-enabled;
+                               regulator-state-uv = <1200000>;
+                       };              
+               
+               };
+
+               dcdc4_reg: regulator@3 {
+                       regulator-name= "act_dcdc4";
+                       regulator-min-microvolt = <2000000>;
+                       regulator-max-microvolt = <2000000>;
+                               regulator-initial-state = <3>;
+                       regulator-state-mem {
+                               regulator-state-enabled;
+                               regulator-state-uv = <2000000>;
+                       };
+               };
+
+               ldo1_reg: regulator@4 {
+                       regulator-name= "vccio_sd";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <3300000>;
+                       
+               };
+
+               ldo2_reg: regulator@5 {
+                       regulator-name= "act_ldo2";
+                       regulator-min-microvolt = <1000000>;
+                       regulator-max-microvolt = <1000000>;
+               
+               };
+
+               ldo3_reg: regulator@6 {
+                       regulator-name= "act_ldo3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       
+               };
+
+               ldo4_reg:regulator@7 {
+                       regulator-name= "act_ldo4";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               
+               };
+
+               ldo5_reg: regulator@8 {
+                       regulator-name= "act_ldo5";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               
+               };
+
+               ldo6_reg: regulator@9 {
+                       regulator-name= "act_ldo6";
+                       regulator-min-microvolt = <1000000>;
+                       regulator-max-microvolt = <1000000>;
+                       regulator-initial-state = <3>;
+                       regulator-state-mem {
+                               regulator-state-enabled;
+                       };
+                       
+               };
+
+               ldo7_reg: regulator@10 {
+                       regulator-name= "vcc_18";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-initial-state = <3>;
+                       regulator-state-mem {
+                               regulator-state-enabled;
+                       };
+               
+               };
+
+               ldo8_reg: regulator@11 {
+                       regulator-name= "act_ldo8";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               
+               };
+       };
+};
+
 
 /include/ "rk808.dtsi"
 &rk808 {
@@ -707,8 +898,8 @@ rockchip,power_type = <GPIO>;
 
                rk808_dcdc2_reg: regulator@1 {
                        regulator-name= "vdd_gpu";
-                       regulator-always-on;
-                       regulator-boot-on;
+                       //regulator-always-on;
+                       //regulator-boot-on;
                };
 
                rk808_dcdc3_reg: regulator@2 {
@@ -812,67 +1003,67 @@ rockchip,power_type = <GPIO>;
        
        regulators {
                ricoh619_dcdc1_reg: regulator@0 {
-                       regulator-name = "vdd_logic";
-                       regulator-min-microvolt = < 700000>;
-                       regulator-max-microvolt = <1500000>;
+                       regulator-name = "vccio";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
                        regulator-initial-mode = <0x2>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
                                regulator-state-enabled;
-                               regulator-state-uv = <900000>;
+                               regulator-state-uv = <2800000>;
                        };      
                };
                ricoh619_dcdc2_reg: regulator@1 {
                        regulator-name = "ricoh619_dcdc2";
-                       regulator-min-microvolt = <1200000>;
-                       regulator-max-microvolt = <1200000>;
+                       regulator-min-microvolt = <2000000>;
+                       regulator-max-microvolt = <2000000>;
                        regulator-initial-mode = <0x2>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
                                regulator-state-enabled;
-                               regulator-state-uv = <1200000>;
+                               regulator-state-uv = <2000000>;
                        };      
                };
                ricoh619_dcdc3_reg: regulator@2 {
-                       regulator-name = "ricoh619_dcdc3";
-                       regulator-min-microvolt = < 1200000>;
-                       regulator-max-microvolt = <1200000>;
+                       regulator-name = "vcc_lcd";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
                        regulator-initial-mode = <0x2>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
                                regulator-state-enabled;
-                               regulator-state-uv = <1200000>;
+                               regulator-state-uv = <3300000>;
                        };      
                };
                ricoh619_dcdc4_reg: regulator@3 {
-                       regulator-name = "ricoh619_dcdc4";
-                       regulator-min-microvolt = < 3300000>;
-                       regulator-max-microvolt = <3300000>;
+                       regulator-name = "vdd_logic";
+                       regulator-min-microvolt = <700000>;
+                       regulator-max-microvolt = <1500000>;
                        regulator-initial-mode = <0x2>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
                                regulator-state-enabled;
-                               regulator-state-uv = <2800000>;
+                               regulator-state-uv = <900000>;
                        };      
                };
                ricoh619_dcdc5_reg: regulator@4 {
-                       regulator-name = "ricoh619_dcdc5";
-                       regulator-min-microvolt = < 2000000>;
-                       regulator-max-microvolt = <2000000>;
+                       regulator-name = "vcc_ddr";
+                       regulator-min-microvolt = <1200000>;
+                       regulator-max-microvolt = <1200000>;
                        regulator-initial-mode = <0x2>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
                                regulator-state-enabled;
-                               regulator-state-uv = <2000000>;
+                               regulator-state-uv = <1200000>;
                        };      
                };
                ricoh619_ldo1_reg: regulator@5  {
-                       regulator-name = "ricoh619_ldo1";
+                       regulator-name = "vccio_pmu";
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;
                        regulator-initial-state = <3>;
@@ -912,13 +1103,13 @@ rockchip,power_type = <GPIO>;
                        };
                };
                ricoh619_ldo5_reg: regulator@9  {
-                       regulator-name = "ricoh619_ldo5";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
+                       regulator-name = "vcc_wl";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-enabled;
-                               regulator-state-uv = <3300000>;
+                               regulator-state-uv = <1800000>;
                        };
                };
                ricoh619_ldo6_reg: regulator@10  {
@@ -938,13 +1129,13 @@ rockchip,power_type = <GPIO>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-enabled;
-                               regulator-state-uv = <3300000>;
+                               regulator-state-uv = <1000000>;
                        };
                };
                ricoh619_ldo8_reg: regulator@12  {
                        regulator-name = "ricoh619_ldo8";
-                       regulator-min-microvolt = <1800000>;
-                       regulator-max-microvolt = <1800000>;
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-enabled;
@@ -958,17 +1149,17 @@ rockchip,power_type = <GPIO>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-enabled;
-                               regulator-state-uv = <3300000>;
+                               regulator-state-uv = <1000000>;
                        };
                };
                ricoh619_ldo10_reg: regulator@14  {
-                       regulator-name = "ricoh619_ldo10";
+                       regulator-name = "vcc_18";
                        regulator-min-microvolt = <1800000>;
                        regulator-max-microvolt = <1800000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-enabled;
-                               regulator-state-uv = <3300000>;
+                               regulator-state-uv = <1800000>;
                        };
                };
                ricoh619_ldortc1_reg: regulator@15  {
@@ -1146,6 +1337,15 @@ rockchip,power_type = <GPIO>;
                        };
                };
        };
+       battery {
+               ocv_table = <3350 3677 3693 3719 3752 3770 3775 3778 3785 3796 3812 3839 3881 3907 3933 3958 3978 4033 4087 4123 4174>;
+               design_capacity = <2100>;
+               design_qmax = <2200>;
+               max_overcharge = <100>;
+               max_charge_currentma = <1500>;
+               max_charge_voltagemv = <4260>;
+               max_bat_voltagemv = <4200>;
+        };
 };
 
 &lcdc_vdd_domain {
@@ -1178,4 +1378,13 @@ rockchip,power_type = <GPIO>;
 &sdmmc0_vdd_domain{
        regulator-name = "vcc_sd";                      
        };
-       
+
+&ion_cma {
+       reg = <0x40000000 0x28000000>; /* 640MB */
+};
+
+&dwc_control_usb {
+       usb_uart {
+               status = "disabled";
+       };
+};