mmc: fix wrong mszs calculation for edmac.
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk312x-sdk.dtsi
index ec6f732bebd7ba9abd24b057c92ea45bfdb969eb..ac7b2b3bc9d728293725feb51a182d5b5d4925db 100755 (executable)
@@ -1,7 +1,8 @@
 /dts-v1/;
 
 #include "rk312x.dtsi"
-#include "lcd-b101ew05.dtsi"
+#include "rk3126-cif-sensor.dtsi"
+#include "rk3128-cif-sensor.dtsi"
 
 / {
        fiq-debugger {
        };
 
        chosen {
-               bootargs = "vmalloc=512M clk_ignore_unused";
+               bootargs = "vmalloc=496M rockchip_jtag";
        };
 
-       usb_control {
-               compatible = "rockchip,rk3126-usb-control";
-               host_drv_gpio = <&gpio2 GPIO_B4 GPIO_ACTIVE_LOW>;
-               otg_drv_gpio = <&gpio2 GPIO_B6 GPIO_ACTIVE_LOW>;
+       pwm_regulator1:pwm-regulator1 {
+               compatible = "rockchip_pwm_regulator";
+               pwms = <&pwm1 0 25000>;
+               rockchip,pwm_id= <1>;
+               rockchip,pwm_voltage_map= <950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000 1425000 1450000>;
+               rockchip,pwm_voltage= <1250000>;
+               rockchip,pwm_min_voltage= <950000>;
+               rockchip,pwm_max_voltage= <1450000>;
+               rockchip,pwm_suspend_voltage= <1250000>;
+               rockchip,pwm_coefficient= <550>;
+               status = "disabled";
+               regulators {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       pwm_reg0: regulator@0 {
+                               regulator-compatible = "pwm_dcdc1";
+                               regulator-name= "vdd_arm";
+                               regulator-min-microvolt = <950000>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+               };
+       };
 
-               rockchip,remote_wakeup;
-               rockchip,usb_irq_wakeup;
+       pwm_regulator2:pwm-regulator2 {
+               compatible = "rockchip_pwm_regulator";
+               pwms = <&pwm2 0 25000>;
+               rockchip,pwm_id= <2>;
+               rockchip,pwm_voltage_map= <950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000 1425000 1450000>;
+               rockchip,pwm_voltage= <1200000>;
+               rockchip,pwm_min_voltage= <950000>;
+               rockchip,pwm_max_voltage= <1450000>;
+               rockchip,pwm_suspend_voltage= <1250000>;
+               rockchip,pwm_coefficient= <550>;
+               status = "disabled";
+               regulators {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       pwm_reg1: regulator@1 {
+                               regulator-compatible = "pwm_dcdc2";
+                               regulator-name= "vdd_logic";
+                               regulator-min-microvolt = <950000>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+               };
        };
+
 };
 
 &nandc {
 };
 
 &emmc {
-       clock-frequency = <100000000>;
-       clock-freq-min-max = <400000 100000000>;
+       clock-frequency = <50000000>;
+       clock-freq-min-max = <400000 50000000>;
        supports-highspeed;
        supports-emmc;
        bootpart-no-access;
        supports-DDR_MODE;
-       //caps2-mmc-hs200;
        ignore-pm-notify;
        keep-power-in-suspend;
        //poll-hw-reset
 };
 
 &sdmmc {
-       clock-frequency = <50000000>;
-       clock-freq-min-max = <400000 50000000>;
+       clock-frequency = <37500000>;
+       clock-freq-min-max = <400000 37500000>;
        supports-highspeed;
        supports-sd;
        broken-cd;
        card-detect-delay = <200>;
        ignore-pm-notify;
        keep-power-in-suspend;
-       //vmmc-supply = <&rk808_ldo5_reg>;
+       vmmc-supply = <&rk818_ldo9_reg>;
        status = "disabled";
 };
 
 &sdio {
-       clock-frequency = <50000000>;
-       clock-freq-min-max = <200000 50000000>;
+       clock-frequency = <37500000>;
+       clock-freq-min-max = <200000 37500000>;
        supports-highspeed;
        supports-sdio;
        ignore-pm-notify;
        keep-power-in-suspend;
-       //cap-sdio-irq;
-       status = "disabled";
+       cap-sdio-irq;
+       status = "okay";
 };
 
 &adc {
        status = "okay";
 
-       key {
+       key: key {
                compatible = "rockchip,key";
                io-channels = <&adc 1>;
 
                vol-up-key {
                        linux,code = <115>;
                        label = "volume up";
-                       rockchip,adc_value = <1>;
+                       rockchip,adc_value = <523>;
                };
 
                vol-down-key {
                        linux,code = <114>;
                        label = "volume down";
-                       rockchip,adc_value = <170>;
+                       rockchip,adc_value = <727>;
                };
 
                power-key {
                menu-key {
                        linux,code = <59>;
                        label = "menu";
-                       rockchip,adc_value = <355>;
+                       rockchip,adc_value = <1>;
                };
 
                home-key {
                        linux,code = <102>;
                        label = "home";
-                       rockchip,adc_value = <746>;
+                       rockchip,adc_value = <318>;
                };
 
                back-key {
                        linux,code = <158>;
                        label = "back";
-                       rockchip,adc_value = <560>;
+                       rockchip,adc_value = <146>;
                };
 
                camera-key {
                reg = <0x1c>;
                status = "okay";
        };
+       act8931: act8931@5b {
+               reg = <0x5b>;
+               status = "okay";
+       };
+       rt5025: rt5025@35 {
+                       compatible = "rt,rt5025";
+                       reg = <0x35>;
+                       status = "disabled";
+       };
+       rt5036: rt5036@38 {
+                       compatible = "rt,rt5036";
+                       reg = <0x38>;
+                       status = "disabled";
+       };
 };
+
 &i2c2 {
        status = "okay";
+       ts@55 {
+               compatible = "goodix,gt8xx";
+               reg = <0x55>;
+               touch-gpio = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
+               reset-gpio = <&gpio2 GPIO_C1 GPIO_ACTIVE_LOW>;
+               //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
+               max-x = <1280>;
+               max-y = <800>;
+       };
+       /*
        ts@01 {
                compatible = "ct,vtl_ts";
                reg = <0x01>;
                irq_gpio_number = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
                rst_gpio_number = <&gpio2 GPIO_C1 GPIO_ACTIVE_HIGH>;
        };
+       */
 };
 
 &fb {
        rockchip,uboot-logo-on = <0>;
 };
 
-&rk_screen {
-       display-timings = <&disp_timings>;
+
+/include/ "rt5025.dtsi"
+&rt5025 {
+
+                       rt5025_dcdc1: regulator_0 {
+                               regulator-name = "vdd_arm";
+                               regulator-min-microvolt = < 700000>;
+                               regulator-max-microvolt = <1500000>;
+                               qcom,comsumer-supplies = "vdd_arm", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+
+                       };
+
+                       rt5025_dcdc2: regulator_1 {
+                               regulator-name = "vdd_logic";
+                               regulator-min-microvolt = < 700000>;
+                               regulator-max-microvolt = <1500000>;
+                               qcom,comsumer-supplies = "vdd_logic", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_dcdc3: regulator_2 {
+                               regulator-name = "rt5025-dcdc3";
+                               regulator-min-microvolt = < 1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "rt5025-dcdc3", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_dcdc4: regulator_3 {
+                               regulator-name = "rt5025-dcdc4";
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5000000>;
+                               qcom,comsumer-supplies = "rt5025-dcdc4", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_ldo1: regulator_4 {
+                               regulator-name = "rt5025-ldo1";
+                               regulator-min-microvolt = < 1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               qcom,comsumer-supplies = "rt5025-ldo1", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_ldo2: regulator_5 {
+                               regulator-name = "rt5025-ldo2";
+                               regulator-min-microvolt = < 1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               qcom,comsumer-supplies = "rt5025-ldo2", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_ldo3: regulator_6 {
+                               regulator-name = "rt5025-ldo3";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               qcom,comsumer-supplies = "rt5025-ldo3", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_ldo4: regulator_7 {
+                               regulator-name = "rt5025-ldo4";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "rt5025-ldo4", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_ldo5: regulator_8 {
+                               regulator-name = "rt5025-ldo5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               qcom,comsumer-supplies = "rt5025-ldo5", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       rt5025_ldo6: regulator_9 {
+                               regulator-name = "rt5025-ldo6";
+                               regulator-min-microvolt = <330000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "rt5025-ldo6", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+       rt5025-irq {
+                               compatible = "rt,rt5025-irq";
+                               rt,irq-gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;
+       };
 };
 
-&hdmi {
-       status = "okay";
+/include/ "rt5036.dtsi"
+&rt5036 {
+
+                       rt5036_dcdc1: regulator_0 {
+                               regulator-name = "vdd_arm";
+                               regulator-min-microvolt = < 800000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "vdd_arm", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <950000>; 
+                       };
+
+                       rt5036_dcdc2: regulator_1 {
+                               regulator-name = "vdd_logic";
+                               regulator-min-microvolt = < 800000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "vdd_logic", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <950000>; 
+                       };
+
+                       rt5036_dcdc3: regulator_2 {
+                               regulator-name = "rt5036-dcdc3";
+                               regulator-min-microvolt = < 800000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "rt5036-dcdc3", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <2800000>; 
+                       };
+
+                       rt5036_dcdc4: regulator_3 {
+                               regulator-name = "rt5036-dcdc4";
+                               regulator-min-microvolt = < 800000>;
+                               regulator-max-microvolt = <3300000>;
+                               qcom,comsumer-supplies = "rt5036-dcdc4", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <1200000>; 
+                       };
+
+                       rt5036_ldo1: regulator_4 {
+                               regulator-name = "rt5036-ldo1";
+                               regulator-min-microvolt = < 3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               qcom,comsumer-supplies = "rt5036-ldo1", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <3000000>; 
+                       };
+
+                       rt5036_ldo2: regulator_5 {
+                               regulator-name = "rt5036-ldo2";
+                               regulator-min-microvolt = < 1100000>;
+                               regulator-max-microvolt = <1100000>;
+                               qcom,comsumer-supplies = "rt5036-ldo2", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <1100000>; 
+                       };
+
+                       rt5036_ldo3: regulator_6 {
+                               regulator-name = "rt5036-ldo3";
+                               regulator-min-microvolt = < 1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               qcom,comsumer-supplies = "rt5036-ldo3", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <1800000>; 
+                       };
+
+                       rt5036_ldo4: regulator_7 {
+                               regulator-name = "rt5036-ldo4";
+                               regulator-min-microvolt = < 1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               qcom,comsumer-supplies = "rt5036-ldo4", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                               rt,standby_vol = <1800000>; 
+                       };
+
+                       rt5036_ldo5: regulator_8 {
+                               regulator-name = "rt5036-ldo5";
+                               qcom,comsumer-supplies = "rt5036-ldo5", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                       };
+
+                       rt5036_ldo6: regulator_9 {
+                               regulator-name = "rt5036-ldo6";
+                               qcom,comsumer-supplies = "rt5036-ldo6", "";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               rt,standby_enabled;
+                       };
+
+                       rt5036-irq {
+                               compatible = "rt,rt5036-irq";
+                               rt,irq-gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;
+                       };
+
+                       rt5036-charger {
+                               compatible = "rt,rt5036-charger";
+                               rt,te_en;
+                               rt,iprec = <0x2>;
+                               rt,ieoc = <0x3>;
+                               rt,vprec = <0xA>;
+                               rt,batlv = <0x4>;
+                               rt,vrechg = <1>;
+                               rt,chg_volt = <4200>;
+                               rt,otg_volt = <5025>;
+                               rt,acchg_icc = <2000>;
+                               rt,usbtachg_icc = <2000>;
+                               rt,usbchg_icc = <900>;
+                               /*rt,acdet_gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;*/
+                               /*rt,usbdet_gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;*/
+                       };
 };
 
 /include/ "rk818.dtsi"
 &rk818 {
        gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
        rk818,system-power-controller;
+       rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/
 
        regulators {
 
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
-                               regulator-state-enabled;
+                               regulator-state-disabled;
                                regulator-state-uv = <900000>;
                        };
                };
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <1200000>;
                        };
                };
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-mode = <0x2>;
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <2800000>;
                        };
                };
                        regulator-max-microvolt = <3300000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <3300000>;
                        };
                };
                        regulator-max-microvolt = <3000000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <3000000>;
                        };
                };
                        regulator-max-microvolt = <1100000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <1100000>;
                        };
                };
 
                rk818_ldo4_reg:regulator@7 {
                        regulator-name= "rk818_ldo4";
-                       regulator-min-microvolt = <2500000>;
-                       regulator-max-microvolt = <2500000>;
+                       regulator-min-microvolt = <2800000>;
+                       regulator-max-microvolt = <2800000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <2500000>;
                        };
                };
                        regulator-max-microvolt = <3000000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <3000000>;
                        };
                };
                        regulator-max-microvolt = <1200000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <1200000>;
                        };
                };
                        regulator-max-microvolt = <1800000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <1800000>;
                        };
                };
                        regulator-max-microvolt = <1800000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <1800000>;
                        };
                };
                        regulator-max-microvolt = <3000000>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
-                               regulator-state-disabled;
+                               regulator-state-enabled;
                                regulator-state-uv = <3000000>;
                        };
                };
         };
 
 };
-&clk_core_dvfs_table {
-       operating-points = <
-               /* KHz    uV */
-               408000 1250000
-               600000 1250000
-               696000 1250000
-               816000 1250000
-               1008000 1250000
-               >;
-       status="okay";
-};
 
-&clk_gpu_dvfs_table {
-       operating-points = <
-               /* KHz    uV */
-               200000 1250000
-               300000 1250000
-               >;
-       status="okay";
-};
+/include/ "act8931.dtsi"
+&act8931 {
+       /* gpio: 0-irq, 1-pwr_hold */
+       gpios = <&gpio2 GPIO_B1 GPIO_ACTIVE_HIGH>, <&gpio1 GPIO_A2 GPIO_ACTIVE_HIGH>;
+       act8931,system-power-controller;
+
+       regulators {
+
+               act8931_dcdc1_reg: regulator@0{
+                       regulator-name= "vccio";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-initial-mode = <0x2>;
+               };
+
+               act8931_dcdc2_reg: regulator@1 {
+                       regulator-name= "act_dcdc2";
+                       regulator-min-microvolt = <1500000>;
+                       regulator-max-microvolt = <1500000>;
+                       regulator-initial-mode = <0x2>;
+               };
+
+               act8931_dcdc3_reg: regulator@2 {
+                       regulator-name= "vdd_arm";
+                       regulator-min-microvolt = <700000>;
+                       regulator-max-microvolt = <1500000>;
+                       regulator-initial-mode = <0x2>;
+               };
+
+               act8931_ldo1_reg:regulator@3 {
+                       regulator-name= "act_ldo1";
+                       regulator-min-microvolt = <2800000>;
+                       regulator-max-microvolt = <2800000>;
+               };
+
+               act8931_ldo2_reg: regulator@4 {
+                       regulator-name= "act_ldo2";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               };
+
+               act8931_ldo3_reg: regulator@5 {
+                       regulator-name= "act_ldo3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               };
+
+               act8931_ldo4_reg: regulator@6 {
+                       regulator-name= "act_ldo4";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               };
+       };
 
-&clk_ddr_dvfs_table {
-       operating-points = <
-               /* KHz    uV */
-               200000 950000
-               300000 950000
-               400000 1000000
-               533000 1050000
-               >;
-
-       freq-table = <
-               /*status                freq(KHz)*/
-               SYS_STATUS_NORMAL       400000
-               SYS_STATUS_SUSPEND      200000
-               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=<0>;
-       status="disable";
 };
 
 &pwm0 {
         status = "okay";
 };
+