X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=arch%2Farm64%2Fboot%2Fdts%2Frockchip%2Frk3399-vr-android.dts;h=25e1b06924741ff6353ad12a6ab4a7e800dc5eca;hb=8ab24059e3b656c88403085494948a192e43f84b;hp=b4da36f74cdbadf71986bf75b4e336abc17b9725;hpb=45ca7dff0d2069f7226df9d21a4e591a892b5a9b;p=firefly-linux-kernel-4.4.55.git diff --git a/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts index b4da36f74cdb..25e1b0692474 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts @@ -42,6 +42,7 @@ /dts-v1/; #include +#include #include "rk3399.dtsi" #include "rk3399-android.dtsi" @@ -213,6 +214,8 @@ wireless-bluetooth { compatible = "bluetooth-platdata"; + clocks = <&rk818 1>; + clock-names = "ext_clock"; //wifi-bt-power-toggle; uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */ pinctrl-names = "default", "rts_gpio"; @@ -224,6 +227,76 @@ BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */ status = "okay"; }; + + uboot-charge { + compatible = "rockchip,uboot-charge"; + rockchip,uboot-charge-on = <0>; + rockchip,android-charge-on = <1>; + }; + + rk_vr_key: rockchip-vr-key { + compatible = "rockchip,key"; + status = "okay"; + + io-channels = <&saradc 1>; + + vol-down-key { + linux,code = <114>; + label = "volume down"; + rockchip,adc_value = <170>; + }; + + vol-up-key { + linux,code = <115>; + label = "volume up"; + rockchip,adc_value = <340>; + }; + + home-key { + linux,code = <102>; + label = "home"; + rockchip,adc_value = <420>; + }; + + camera-key { + linux,code = <212>; + label = "camera"; + rockchip,adc_value = <520>; + }; + + power-key { + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + linux,code = <116>; + label = "power"; + gpio-key,wakeup; + }; + + back-key { + linux,code = <158>; + label = "back"; + rockchip,adc_value = <620>; + }; + + n-key { + linux,code = <102>; + label = "n"; + rockchip,adc_value = <700>; + }; + + menu-key { + linux,code = <59>; + label = "menu"; + rockchip,adc_value = <780>; + }; + }; + + rk_headset { + compatible = "rockchip_headset"; + headset_gpio = <&gpio4 28 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&hp_det>; + io-channels = <&saradc 2>; + }; }; &cluster0_opp { @@ -235,26 +308,33 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; - opp-microvolt = <875000>; + opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1050000>; + opp-microvolt = <1075000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; - opp-microvolt = <1075000>; + opp-microvolt = <1100000>; + clock-latency-ns = <40000>; + status="disabled"; }; }; @@ -267,67 +347,144 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; - opp-microvolt = <875000>; + opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <950000>; + opp-microvolt = <900000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1025000>; + opp-microvolt = <1000000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <1100000>; + opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <1175000>; + opp-microvolt = <1150000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; - opp-microvolt = <1250000>; + opp-microvolt = <1225000>; + clock-latency-ns = <40000>; }; }; +&CPU_COST_A72 { + busy-cost-data = < + 210 129 /* 408MHz */ + 308 184 /* 600MHz */ + 419 246 /* 816MHz */ + 518 335 /* 1008MHz */ + 617 428 /* 1200MHz */ + 728 573 /* 1416MHz */ + 827 724 /* 1608MHz */ + 925 900 /* 1800MHz */ + 1024 1108 /* 1992MHz */ + >; + idle-cost-data = < + 15 + 15 + 0 + >; +}; + +&CPU_COST_A53 { + busy-cost-data = < + 108 46 /* 408M */ + 159 67 /* 600M */ + 216 90 /* 816M */ + 267 120 /* 1008M */ + 318 153 /* 1200M */ + 375 198 /* 1416M */ + 401 222 /* 1512M */ + >; + idle-cost-data = < + 6 + 6 + 0 + >; +}; + +&CLUSTER_COST_A72 { + busy-cost-data = < + 210 129 /* 408MHz */ + 308 184 /* 600MHz */ + 419 246 /* 816MHz */ + 518 335 /* 1008MHz */ + 617 428 /* 1200MHz */ + 728 573 /* 1416MHz */ + 827 724 /* 1608MHz */ + 925 900 /* 1800MHz */ + 1024 1108 /* 1992MHz */ + >; + idle-cost-data = < + 65 + 65 + 65 + >; +}; + +&CLUSTER_COST_A53 { + busy-cost-data = < + 108 46 /* 408M */ + 159 67 /* 600M */ + 216 90 /* 816M */ + 267 120 /* 1008M */ + 318 153 /* 1200M */ + 375 198 /* 1416M */ + 401 222 /* 1512M */ + >; + idle-cost-data = < + 56 + 56 + 56 + >; +}; + &gpu_opp_table { compatible = "operating-points-v2"; opp-shared; opp@200000000 { opp-hz = /bits/ 64 <200000000>; - opp-microvolt = <800000>; + opp-microvolt = <825000>; + status = "disabled"; }; opp@300000000 { opp-hz = /bits/ 64 <300000000>; - opp-microvolt = <800000>; + opp-microvolt = <850000>; }; opp@400000000 { opp-hz = /bits/ 64 <400000000>; - opp-microvolt = <800000>; + opp-microvolt = <875000>; }; opp@500000000 { opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <850000>; + opp-microvolt = <950000>; }; opp@600000000 { opp-hz = /bits/ 64 <600000000>; - opp-microvolt = <900000>; - }; - opp@700000000 { - opp-hz = /bits/ 64 <700000000>; - opp-microvolt = <950000>; + opp-microvolt = <1025000>; }; opp@800000000 { opp-hz = /bits/ 64 <800000000>; - opp-microvolt = <975000>; + opp-microvolt = <1125000>; }; }; @@ -366,9 +523,6 @@ }; &emmc_phy { - freq-sel = <200000000>; - dr-sel = <50>; - opdelay = <4>; status = "okay"; }; @@ -377,6 +531,7 @@ mmc-hs400-1_8v; supports-emmc; non-removable; + keep-power-in-suspend; mmc-hs400-enhanced-strobe; status = "okay"; }; @@ -409,6 +564,8 @@ reg = <0x40>; vin-supply = <&vcc_sys>; regulator-compatible = "fan53555-reg"; + pinctrl-0 = <&vsel1_gpio>; + vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; regulator-name = "vdd_cpu_b"; regulator-min-microvolt = <712500>; regulator-max-microvolt = <1500000>; @@ -426,14 +583,16 @@ reg = <0x41>; vin-supply = <&vcc_sys>; regulator-compatible = "fan53555-reg"; + pinctrl-0 = <&vsel2_gpio>; + vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; regulator-name = "vdd_gpu"; regulator-min-microvolt = <712500>; regulator-max-microvolt = <1500000>; regulator-ramp-delay = <1000>; fcs,suspend-voltage-selector = <1>; - regulator-always-on; regulator-boot-on; regulator-initial-state = <3>; + regulator-initial-mode = <1>;/*1:pwm 2: auto mode*/ regulator-state-mem { regulator-off-in-suspend; }; @@ -450,6 +609,7 @@ pinctrl-0 = <&pmic_int_l>; rockchip,system-power-controller; wakeup-source; + extcon = <&fusb0>; #clock-cells = <1>; vcc1-supply = <&vcc_sys>; @@ -482,8 +642,7 @@ regulator-max-microvolt = <1350000>; regulator-ramp-delay = <6001>; regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; + regulator-off-in-suspend; }; }; @@ -662,14 +821,36 @@ clocks = <&cru SCLK_I2S_8CH_OUT>; clock-names = "mclk"; spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; - hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>; }; }; &i2c4 { - status = "disabled"; - i2c-scl-rising-time-ns = <600>; - i2c-scl-falling-time-ns = <20>; + status = "okay"; + i2c-scl-rising-time-ns = <345>; + i2c-scl-falling-time-ns = <11>; + clock-frequency = <400000>; + + sensor@0f { + status = "okay"; + compatible = "ak8963"; + pinctrl-names = "default"; + pinctrl-0 = <&ak8963_irq_gpio>; + reg = <0x0f>; + type = ; + irq-gpio = <&gpio1 0 IRQ_TYPE_EDGE_RISING>; + irq_enable = <1>; + poll_delay_ms = <30>; + layout = <1>; + }; + + fusb0: fusb30x@22 { + compatible = "fairchild,fusb302"; + reg = <0x22>; + pinctrl-names = "default"; + pinctrl-0 = <&fusb0_int>; + int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; }; &i2c5 { @@ -689,6 +870,8 @@ &spi1 { status = "okay"; max-freq = <50000000>; + pinctrl-names = "default", "sleep"; + pinctrl-1 = <&spi1_gpio>; mpu6500@0 { status = "okay"; compatible = "inv-spi,mpu6500"; @@ -705,13 +888,27 @@ orientation-x= <1>; orientation-y= <0>; orientation-z= <1>; + support-hw-poweroff = <1>; mpu-debug = <1>; }; }; +&threshold { + temperature = <70000>; /* millicelsius */ +}; + +&target { + temperature = <85000>; /* millicelsius */ +}; + +&soc_crit { + temperature = <100000>; /* millicelsius */ +}; + &tsadc { rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-temp = <110000>; status = "okay"; }; @@ -719,45 +916,13 @@ status = "okay"; }; -&rk_key { - compatible = "rockchip,key"; +&u2phy0 { + extcon = <&fusb0>; status = "okay"; - io-channels = <&saradc 1>; - - vol-up-key { - linux,code = <115>; - label = "volume up"; - rockchip,adc_value = <340>; - }; - - vol-down-key { - linux,code = <114>; - label = "volume down"; - rockchip,adc_value = <170>; - }; - - power-key { - gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; - linux,code = <116>; - label = "power"; - gpio-key,wakeup; - }; - - back-key { - linux,code = <158>; - label = "back"; - rockchip,adc_value = <620>; - }; - brightness-key { - linux,code = <244>; - label = "brightness"; - rockchip,adc_value = <700>; + u2phy0_otg: otg-port { + status = "okay"; }; -}; - -&u2phy0 { - status = "okay"; u2phy0_host: host-port { phy-supply = <&vcc5v0_host>; @@ -768,6 +933,10 @@ &u2phy1 { status = "okay"; + u2phy1_otg: otg-port { + status = "okay"; + }; + u2phy1_host: host-port { phy-supply = <&vcc5v0_host>; status = "okay"; @@ -801,6 +970,7 @@ }; &usbdrd3_0 { + extcon = <&fusb0>; status = "okay"; }; @@ -816,6 +986,11 @@ status = "okay"; }; +&tcphy0 { + status = "okay"; + extcon = <&fusb0>; +}; + &pwm0 { status = "okay"; }; @@ -829,6 +1004,10 @@ rockchip,pwm_voltage = <900000>; }; +&rk_key { + status = "disabled"; +}; + &rk_screen { assigned-clocks = <&cru PLL_VPLL>; assigned-clock-rates = <245000000>; @@ -837,6 +1016,7 @@ &fb { rockchip,uboot-logo-on = <1>; + rockchip,disp-mode = ; }; &vopb_rk_fb { @@ -919,6 +1099,16 @@ rockchip,pins = <1 18 RK_FUNC_GPIO &pcfg_pull_down>; }; + + vsel1_gpio: vsel1-gpio { + rockchip,pins = + <1 17 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + vsel2_gpio: vsel2-gpio { + rockchip,pins = + <1 14 RK_FUNC_GPIO &pcfg_pull_down>; + }; }; mpu6500 { @@ -933,4 +1123,40 @@ <4 25 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + ak8963 { + ak8963_irq_gpio: ak8963-irq-gpio { + rockchip,pins = <1 0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + spi1 { + spi1_gpio: spi1-gpio { + rockchip,pins = + <1 7 RK_FUNC_GPIO &pcfg_output_low>, + <1 8 RK_FUNC_GPIO &pcfg_output_low>, + <1 9 RK_FUNC_GPIO &pcfg_output_low>, + <1 10 RK_FUNC_GPIO &pcfg_output_low>; + }; + }; + + fusb30x { + fusb0_int: fusb0-int { + rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + headphone { + hp_det: hp-det { + rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&pvtm { + status = "okay"; +}; + +&pmu_pvtm { + status = "okay"; };