/dts-v1/;
#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/sensor-dev.h>
#include "rk3399.dtsi"
#include "rk3399-android.dtsi"
+#include "rk3399-opp.dtsi"
/ {
model = "Rockchip RK3399 VR Board";
regulator-max-microvolt = <3300000>;
};
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&host_vbus_drv>;
+ regulator-name = "vcc5v0_host";
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm0 0 25000 0>;
regulator-boot-on;
};
- io-domains {
- compatible = "rockchip,rk3399-io-voltage-domain";
- rockchip,grf = <&grf>;
-
- bt656-supply = <&vcc1v8_dvp>;
- audio-supply = <&vcca1v8_codec>;
- sdmmc-supply = <&vcc_sd>;
- gpio1830-supply = <&vcc_3v0>;
- };
-
- pmu-io-domains {
- compatible = "rockchip,rk3399-pmu-io-voltage-domain";
- rockchip,grf = <&pmugrf>;
-
- pmu1830-supply = <&vcc_1v8>;
- };
-
es8316-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
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";
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>;
+ };
};
&sdmmc {
};
&emmc_phy {
- freq-sel = <200000000>;
- dr-sel = <50>;
- opdelay = <4>;
status = "okay";
};
mmc-hs400-1_8v;
supports-emmc;
non-removable;
+ keep-power-in-suspend;
mmc-hs400-enhanced-strobe;
status = "okay";
};
#sound-dai-cells = <0>;
};
+&io_domains {
+ status = "okay";
+
+ bt656-supply = <&vcc1v8_dvp>;
+ audio-supply = <&vcca1v8_codec>;
+ sdmmc-supply = <&vcc_sd>;
+ gpio1830-supply = <&vcc_3v0>;
+};
+
&spdif {
status = "okay";
#sound-dai-cells = <0>;
i2c-scl-falling-time-ns = <15>;
clock-frequency = <400000>;
- vdd_cpu_b: syr828@41 {
- compatible = "silergy,syr828";
- reg = <0x41>;
+ vdd_cpu_b: syr827@40 {
+ compatible = "silergy,syr827";
+ 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>;
regulator-ramp-delay = <1000>;
fcs,suspend-voltage-selector = <1>;
regulator-always-on;
- regulator-boot-on;
regulator-initial-state = <3>;
- regulator-state-mem {
+ regulator-state-mem {
regulator-off-in-suspend;
};
};
- lp8752: lp8752@60 {
- compatible = "ti,lp8752";
- reg = <0x60>;
- vin0-supply = <&vcc_sys>;
- regulators {
- vdd_gpu: lp8752_buck0 {
- regulator-name = "vdd_gpu";
- regulator-min-microvolt = <735000>;
- regulator-max-microvolt = <1400000>;
- regulator-always-on;
- regulator-boot-on;
- };
+ vdd_gpu: syr828@41 {
+ compatible = "silergy,syr828";
+ 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-boot-on;
+ regulator-initial-state = <3>;
+ regulator-initial-mode = <1>;/*1:pwm 2: auto mode*/
+ regulator-state-mem {
+ regulator-off-in-suspend;
};
};
pinctrl-0 = <&pmic_int_l>;
rockchip,system-power-controller;
wakeup-source;
+ extcon = <&fusb0>;
#clock-cells = <1>;
vcc1-supply = <&vcc_sys>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
- regulator-on-in-suspend;
- regulator-suspend-microvolt = <1000000>;
+ regulator-off-in-suspend;
};
};
};
};
};
+
+ battery {
+ compatible = "rk818-battery";
+ ocv_table = <
+ 3400 3599 3671 3701 3728 3746 3762
+ 3772 3781 3792 3816 3836 3866 3910
+ 3942 3971 4002 4050 4088 4132 4183>;
+ design_capacity = <4000>;
+ design_qmax = <4100>;
+ bat_res = <100>;
+ max_input_current = <2000>;
+ max_chrg_current = <1800>;
+ max_chrg_voltage = <4200>;
+ sleep_enter_current = <300>;
+ sleep_exit_current = <300>;
+ power_off_thresd = <3400>;
+ zero_algorithm_vol = <3850>;
+ fb_temperature = <115>;
+ sample_res = <10>;
+ max_soc_offset = <60>;
+ energy_mode = <0>;
+ monitor_sec = <5>;
+ virtual_power = <0>;
+ power_dc2otg = <0>;
+ };
};
};
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>;
- mpu6500@68 {
- status = "disabled";
- compatible = "invensense,mpu6500";
+ sensor@0f {
+ status = "okay";
+ compatible = "ak8963";
pinctrl-names = "default";
- pinctrl-0 = <&mpu6500_irq_gpio>;
- reg = <0x68>;
- irq-gpio = <&gpio1 4 IRQ_TYPE_EDGE_RISING>;
- mpu-int_config = <0x10>;
- mpu-level_shifter = <0>;
- mpu-orientation = <0 1 0 1 0 0 0 0 1>;
- orientation-x= <1>;
- orientation-y= <1>;
- orientation-z= <1>;
- mpu-debug = <1>;
+ pinctrl-0 = <&ak8963_irq_gpio>;
+ reg = <0x0f>;
+ type = <SENSOR_TYPE_COMPASS>;
+ 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 {
+ status = "okay";
+
+ touch@40 {
+ compatible = "gslX680";
+ reg = <0x40>;
+ touch-gpio = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpio = <&gpio4 22 GPIO_ACTIVE_LOW>;
+ max-x = <1280>;
+ max-y = <600>;
+ status = "okay";
};
};
&spi1 {
status = "okay";
max-freq = <50000000>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-1 = <&spi1_gpio>;
mpu6500@0 {
status = "okay";
compatible = "inv-spi,mpu6500";
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";
+};
+
+&saradc {
status = "okay";
};
+&u2phy0 {
+ extcon = <&fusb0>;
+ status = "okay";
+
+ u2phy0_otg: otg-port {
+ status = "okay";
+ };
+
+ u2phy0_host: host-port {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+ };
+};
+
+&u2phy1 {
+ status = "okay";
+
+ u2phy1_otg: otg-port {
+ status = "okay";
+ };
+
+ u2phy1_host: host-port {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer &uart0_cts>;
status = "okay";
};
-&usb2phy {
- vbus_drv-gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
-};
-
&usb_host0_ehci {
status = "okay";
};
};
&usbdrd3_0 {
+ extcon = <&fusb0>;
status = "okay";
};
status = "okay";
};
+&tcphy0 {
+ status = "okay";
+ extcon = <&fusb0>;
+};
+
&pwm0 {
status = "okay";
};
rockchip,pwm_voltage = <900000>;
};
+&rk_key {
+ status = "disabled";
+};
+
&rk_screen {
+ assigned-clocks = <&cru PLL_VPLL>;
+ assigned-clock-rates = <245000000>;
#include <dt-bindings/display/screen-timing/lcd-ls055r1sx04-mipi.dtsi>
};
+&fb {
+ rockchip,uboot-logo-on = <1>;
+ rockchip,disp-mode = <NO_DUAL>;
+};
+
&vopb_rk_fb {
status = "okay";
power_ctr: power_ctr {
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 {
rockchip,pins = <1 4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ usb2 {
+ host_vbus_drv: host-vbus-drv {
+ rockchip,pins =
+ <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";
+};
+
+&pmu_io_domains {
+ status = "okay";
+ pmu1830-supply = <&vcc_1v8>;
+};
+