regulator-always-on;
regulator-boot-on;
//gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
- gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_drv>;
regulator-name = "vcc3v3_pcie";
pinctrl-names = "default";
pinctrl-0 = <&pcie_3g_drv>;
regulator-name = "vcc3v3_3g";
- };
+ };
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
label = "firefly:blue:power";
linux,default-trigger = "ir-power-click";
default-state = "on";
- gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
+ gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&led_power>;
};
label = "firefly:yellow:user";
linux,default-trigger = "ir-user-click";
default-state = "off";
- gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&led_user>;
};
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
pinctrl-0 = <&rt5640_hpcon>;
hp-con-gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
//hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>;
- aux-det-gpio = <&gpio2 0 GPIO_ACTIVE_LOW>;
- io-channels = <&saradc 4>;
+ aux-det-adc-value = <1000>;
+ io-channels = <&saradc 4>, <&saradc 2>;
+ io-channel-names = "hp-det", "aux-det";
hp-det-adc-value = <500>;
};
};
revert_y = <0>;
touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- };
+ };
- mpu6050:mpu@68{
+ mpu6050: mpu@68 {
status = "disabled";
compatible = "invensense,mpu6050";
reg = <0x68>;
};
&i2s2 {
- status = "okay";
#sound-dai-cells = <0>;
+ status = "okay";
};
&io_domains {
&pinctrl {
buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
pcie {
pcie_drv: pcie-drv {
rockchip,pins =
- <2 2 RK_FUNC_GPIO &pcfg_pull_none>;
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
pcie_3g_drv: pcie-3g-drv {
- rockchip,pins =
- <2 6 RK_FUNC_GPIO &pcfg_pull_up>;
- };
-
- };
-
- pmic {
- vsel1_gpio: vsel1-gpio {
rockchip,pins =
- <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
- };
-
- vsel2_gpio: vsel2-gpio {
- rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <2 6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
led_power: led-power {
rockchip,pins =
- <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ <2 7 RK_FUNC_GPIO &pcfg_pull_none>;
};
led_user: led-user {
rockchip,pins =
- <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ <2 2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
vsel1_gpio: vsel1-gpio {
rockchip,pins =
- <1 18 0 &pcfg_pull_down>;
+ <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 0 &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
fusb30x {
fusb0_int: fusb0-int {
- rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
vbus {
vbus_5v_drv: vbus-5v-drv {
rockchip,pins =
};
&pwm1 {
- status = "okay";
+ status = "okay";
};
&pwm2 {
};
&cdn_dp {
- status = "disabled";
- extcon = <&fusb0>;
- phys = <&tcphy0_dp>;
+ status = "disabled";
+ extcon = <&fusb0>;
+ phys = <&tcphy0_dp>;
};
-&hdmi_in_vopl {
+&dp_in_vopb {
status = "disabled";
};
-&dsi_in_vopb {
+&hdmi_in_vopb {
status = "okay";
};
-&dsi_in_vopl {
+&hdmi_in_vopl {
+ status = "disabled";
+};
+
+/*
+&dsi_in_vopb {
status = "okay";
};
-&dp_in_vopb {
- status = "disabled";
+&dsi_in_vopl {
+ status = "disabled";
};
+*/
&saradc {
status = "okay";
disable-wp;
num-slots = <1>;
vqmmc-supply = <&vcc_sd>;
- pwrseq-gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
+ pwrseq-gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
status = "okay";
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
};
&uart4 {
- status = "disabled";
current-speed = <9600>;
no-loopback-test;
+ status = "okay";
};
&usbdrd3_0 {
};
edp_panel: edp-panel {
+ status = "okay";
compatible = "sharp,lcd-f402", "panel-simple";
backlight = <&backlight>;
power-supply = <&vcc_lcd>;
regulator-name = "vcc3v3_pcie";
};
+ vcc3v3_3g: vcc3v3-3g-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_3g_drv>;
+ regulator-name = "vcc3v3_3g";
+ };
+
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
pwms = <&pwm2 0 25000 1>;
regulator-name = "vdd_log";
regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1400000>;
+ regulator-max-microvolt = <1100000>;
regulator-always-on;
regulator-boot-on;
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
tx_delay = <0x28>;
- rx_delay = <0x11>;
+ rx_delay = <0x1B>;
status = "okay";
};
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
- ddc-i2c-bus = <&i2c3>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
reg = <0x1b>;
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ pmic,stby-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
+ pmic,hold-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
+ pinctrl-0 = <&pmic_int_l &pmic_dvs2 &pmic_stby &pmic_hold>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
status = "okay";
};
- gsl3680: gsl3680@41 {
- status = "okay";
- compatible = "gslX680-pad";
- reg = <0x41>;
- screen_max_x = <1536>;
- screen_max_y = <2048>;
- touch-gpio = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
- reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- };
-
- mpu6050:mpu@68{
- compatible = "invensense,mpu6050";
- reg = <0x68>;
- 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>;
- irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
- mpu-debug = <1>;
- };
+ gsl3680: gsl3680@41 {
+ status = "okay";
+ compatible = "gslX680";
+ reg = <0x41>;
+ screen_max_x = <1536>;
+ screen_max_y = <2048>;
+ revert_xy = <0>;
+ revert_x = <0>;
+ revert_y = <0>;
+ touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ mpu6050: mpu@68 {
+ status = "disabled";
+ compatible = "invensense,mpu6050";
+ reg = <0x68>;
+ 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>;
+ irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
+ mpu-debug = <1>;
+ };
};
&i2s0 {
&pinctrl {
buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
pcie_drv: pcie-drv {
rockchip,pins =
<1 17 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- pcie_3g_drv: pcie-3g-drv {
+ };
+ pcie_3g_drv: pcie-3g-drv {
rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
};
pmic {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ pmic_stby: pmic-stby {
+ rockchip,pins =
+ <1 24 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ pmic_hold: pmic-hold{
+ rockchip,pins =
+ <1 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
led_power: led-power {
- rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
-
led_user: led-user {
- rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
logo,mode = "center";
};
+&cdn_dp {
+ status = "disabled";
+ extcon = <&fusb0>;
+ phys = <&tcphy0_dp>;
+};
+
+&dp_in_vopb {
+ status = "disabled";
+};
+
+&hdmi_in_vopb {
+ status = "disabled";
+};
+
+&hdmi_in_vopl {
+ status = "okay";
+};
+
+&edp_in_vopb {
+ status = "okay";
+};
+
+&edp_in_vopl {
+ status = "disabled";
+};
+
&saradc {
status = "okay";
vref-supply = <&vccadc_ref>;
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
status = "okay";
};
+&uart4 {
+ current-speed = <9600>;
+ no-loopback-test;
+ status = "okay";
+};
+
&usbdrd3_0 {
status = "okay";
extcon = <&fusb0>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_3g_drv>;
regulator-name = "vcc3v3_3g";
- };
+ };
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
reg = <0x1b>;
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ pmic,stby-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
+ pmic,hold-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
+ pinctrl-0 = <&pmic_int_l &pmic_dvs2 &pmic_stby &pmic_hold>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
reg = <0x40>;
screen_max_x = <1536>;
screen_max_y = <2048>;
+ revert_xy = <0>;
+ revert_x = <0>;
+ revert_y = <0>;
touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- };
+ };
- mpu6050:mpu@68{
- status = "disabled";
- compatible = "invensense,mpu6050";
- reg = <0x68>;
- 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>;
- irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
- mpu-debug = <1>;
+ mpu6050: mpu@68 {
+ status = "disabled";
+ compatible = "invensense,mpu6050";
+ reg = <0x68>;
+ 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>;
+ irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
+ mpu-debug = <1>;
};
};
&pinctrl {
buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
pcie {
pcie_drv: pcie-drv {
rockchip,pins =
<1 17 RK_FUNC_GPIO &pcfg_pull_none>;
};
pcie_3g_drv: pcie-3g-drv {
- rockchip,pins =
+ rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
};
pmic {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ pmic_stby: pmic-stby {
+ rockchip,pins =
+ <1 24 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ pmic_hold: pmic-hold{
+ rockchip,pins =
+ <1 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
led_power: led-power {
- rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
-
led_user: led-user {
- rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
&cdn_dp {
- status = "disabled";
- extcon = <&fusb0>;
- phys = <&tcphy0_dp>;
+ status = "disabled";
+ extcon = <&fusb0>;
+ phys = <&tcphy0_dp>;
};
-&hdmi_in_vopl {
+&dp_in_vopb {
status = "disabled";
};
-&dsi_in_vopb {
+&hdmi_in_vopb {
+ status = "disabled";
+};
+
+&hdmi_in_vopl {
status = "okay";
};
-&dsi_in_vopl {
+&dsi_in_vopb {
status = "okay";
};
-&dp_in_vopb {
- status = "disabled";
+&dsi_in_vopl {
+ status = "disabled";
};
&saradc {
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
pinctrl-names = "default";
pinctrl-0 = <&pcie_3g_drv>;
regulator-name = "vcc3v3_3g";
- };
+ };
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
status = "okay";
};
- gsl3680: gsl3680@41 {
- status = "disabled";
- compatible = "gslX680-pad";
- reg = <0x41>;
- screen_max_x = <1536>;
- screen_max_y = <2048>;
- touch-gpio = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
- reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- };
-
- mpu6050:mpu@68{
- status = "disabled";
- compatible = "invensense,mpu6050";
- reg = <0x68>;
- 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>;
- irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
- mpu-debug = <1>;
- };
+ gsl3680: gsl3680@40 {
+ status = "disabled";
+ compatible = "gslX680";
+ reg = <0x40>;
+ screen_max_x = <1536>;
+ screen_max_y = <2048>;
+ revert_xy = <0>;
+ revert_x = <0>;
+ revert_y = <0>;
+ touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ mpu6050: mpu@68 {
+ status = "disabled";
+ compatible = "invensense,mpu6050";
+ reg = <0x68>;
+ 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>;
+ irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
+ mpu-debug = <1>;
+ };
};
&i2s0 {
&pinctrl {
buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
<1 17 RK_FUNC_GPIO &pcfg_pull_none>;
};
pcie_3g_drv: pcie-3g-drv {
- rockchip,pins =
+ rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
};
pmic {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
};
pmic_stby: pmic-stby {
rockchip,pins =
<1 24 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_hold: pmic-hold{
rockchip,pins =
<1 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
};
sdio-pwrseq {
leds {
led_power: led-power {
- rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
-
led_user: led-user {
- rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
&cdn_dp {
- status = "disabled";
- extcon = <&fusb0>;
- phys = <&tcphy0_dp>;
+ status = "disabled";
+ extcon = <&fusb0>;
+ phys = <&tcphy0_dp>;
};
&dp_in_vopb {
- status = "disabled";
+ status = "disabled";
+};
+
+&hdmi_in_vopb {
+ status = "okay";
+};
+
+&hdmi_in_vopl {
+ status = "disabled";
};
&saradc {
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
#sound-dai-cells = <0>;
};
- edp_panel: edp-panel {
+ edp_panel: edp-panel {
status = "okay";
compatible = "sharp,lcd-f402", "panel-simple";
backlight = <&backlight>;
};
};
- fiq_debugger: fiq-debugger {
+ fiq_debugger: fiq-debugger {
compatible = "rockchip,fiq-debugger";
rockchip,serial-id = <2>;
rockchip,signal-irq = <182>;
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,es8323-codec";
simple-audio-card,mclk-fs = <256>;
- simple-audio-card,widgets =
+ simple-audio-card,widgets =
"Microphone","Mic Jack",
"Headphone","Headphone Jack";
- simple-audio-card,routing =
+ simple-audio-card,routing =
"Mic Jack","MICBIAS1",
"IN1P","Mic Jack",
"Headphone Jack","HPOL",
"Headphone Jack","HPOR";
simple-audio-card,cpu {
- sound-dai = <&i2c1>;
+ sound-dai = <&i2s1>;
};
simple-audio-card,codec {
sound-dai = <&es8323>;
};
-
};
hdmi_sound: hdmi-sound {
simple-audio-card,cpu {
sound-dai = <&i2s2>;
};
-
simple-audio-card,codec {
sound-dai = <&hdmi>;
};
regulator-always-on;
};
+ vbus_5v: vbus-5v-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vbus_5v_drv>;
+ regulator-name = "vbus_5v";
+ };
+
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
compatible = "bluetooth-platdata";
//wifi-bt-power-toggle;
clocks = <&rk808 1>;
- clock-names = "ext_clock";
+ clock-names = "ext_clock";
uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart0_rts>;
};
leds {
- status = "disabled";
compatible = "gpio-leds";
power {
label = "firefly:blue:power";
status = "okay";
};
-&edp {
+&edp {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
reg = <0x1b>;
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ pmic,stby-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
+ pmic,hold-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
+ pinctrl-0 = <&pmic_int_l &pmic_dvs2 &pmic_stby &pmic_hold>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
i2c-scl-rising-time-ns = <300>;
i2c-scl-falling-time-ns = <15>;
- es8323: es8323@10{
+ es8323: es8323@10 {
compatible = "everest,es8323";
reg = <0x10>;
ear-con-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&es8323_earcon &es8323_hpdet>;
};
+
rt5640: rt5640@1c {
status = "disabled";
#sound-dai-cells = <0>;
};
};
-&i2c3 {
+&i2c3 {
status = "okay";
i2c-scl-rising-time-ns = <450>;
i2c-scl-falling-time-ns = <15>;
pinctrl-0 = <&fusb0_int>;
int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+
+ gsl3680: gsl3680@41 {
status = "okay";
+ compatible = "gslX680";
+ reg = <0x41>;
+ screen_max_x = <1536>;
+ screen_max_y = <2048>;
+ revert_xy = <0>;
+ revert_x = <0>;
+ revert_y = <0>;
+ touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
- gsl3680: gsl3680@41 {
- status = "okay";
- compatible = "gslX680-pad";
- reg = <0x41>;
- screen_max_x = <1536>;
- screen_max_y = <2048>;
- touch-gpio = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
- reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- };
-
- mpu6050:mpu@68{
- status = "disabled";
- compatible = "invensense,mpu6050";
- reg = <0x68>;
- 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>;
- irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
- mpu-debug = <1>;
- };
+ mpu6050: mpu@68 {
+ status = "disabled";
+ compatible = "invensense,mpu6050";
+ reg = <0x68>;
+ 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>;
+ irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
+ mpu-debug = <1>;
+ };
};
&i2s0 {
rockchip,playback-channels = <2>;
rockchip,capture-channels = <2>;
#sound-dai-cells = <0>;
+ assigned-clocks = <&cru SCLK_I2S1_DIV>, <&cru SCLK_I2S_8CH>;
+ assigned-clock-parents = <&cru PLL_GPLL>, <&cru SCLK_I2S1_8CH>;
};
&i2s2 {
-
#sound-dai-cells = <0>;
status = "okay";
};
};
&pinctrl {
- buttons {
+ buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
- pcie {
+ pcie {
pcie_drv: pcie-drv {
rockchip,pins =
<1 17 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- pcie_3g_drv: pcie-3g-drv {
+ };
+ pcie_3g_drv: pcie-3g-drv {
rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
};
pmic {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ pmic_stby: pmic-stby {
+ rockchip,pins =
+ <1 24 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ pmic_hold: pmic-hold{
+ rockchip,pins =
+ <1 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
led_power: led-power {
- rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
-
led_user: led-user {
- rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
es8223 {
es8323_hpdet: es8323-hpdet {
- rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
};
es8323_earcon: es8323-earcon {
- rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
};
usb2 {
};
};
-
fusb30x {
fusb0_int: fusb0-int {
- rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ vbus {
+ vbus_5v_drv: vbus-5v-drv {
+ rockchip,pins =
+ <1 3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
status = "okay";
};
-&rockchip_suspend {
+&rockchip_suspend {
rockchip,power-ctrl =
<&gpio1 18 GPIO_ACTIVE_LOW>,
<&gpio1 14 GPIO_ACTIVE_HIGH>;
};
&cdn_dp {
- status = "disabled";
- extcon = <&fusb0>;
- phys = <&tcphy0_dp>;
+ status = "disabled";
+ extcon = <&fusb0>;
+ phys = <&tcphy0_dp>;
};
&dp_in_vopb {
- status = "disabled";
+ status = "disabled";
+};
+
+&hdmi_in_vopb {
+ status = "disabled";
+};
+
+&hdmi_in_vopl {
+ status = "okay";
+};
+
+&edp_in_vopb {
+ status = "okay";
+};
+
+&edp_in_vopl {
+ status = "disabled";
};
&saradc {
};
&tcphy0 {
- extcon = <&fusb0>;
+ //extcon = <&fusb0>;
status = "okay";
};
-&tcphy1 {
+&tcphy1 {
status = "okay";
};
status = "okay";
};
-&u2phy0 {
+&u2phy0 {
status = "okay";
- extcon = <&fusb0>;
+ //extcon = <&fusb0>;
u2phy0_otg: otg-port {
status = "okay";
};
};
-&pwm3 {
+&pwm3 {
status = "okay";
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
compatible = "rockchip,remotectl-pwm";
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
status = "okay";
};
-&uart2 {
+&uart2 {
status = "okay";
};
-&usbdrd3_0 {
+&uart4 {
+ current-speed = <9600>;
+ no-loopback-test;
status = "okay";
- extcon = <&fusb0>;
};
-&usbdrd3_1 {
+&usbdrd3_0 {
+ status = "okay";
+ //extcon = <&fusb0>;
+};
+
+&usbdrd3_1 {
status = "okay";
};
&usbdrd_dwc3_0 {
status = "okay";
+ //dr_mode = "peripheral";
+ dr_mode = "host";
};
-&usbdrd_dwc3_1 {
+&usbdrd_dwc3_1 {
status = "okay";
dr_mode = "host";
};
-
-&usb_host0_ehci {
+
+&usb_host0_ehci {
status = "okay";
};
-&usb_host0_ohci {
+&usb_host0_ohci {
status = "okay";
};
-&usb_host1_ehci {
+&usb_host1_ehci {
status = "okay";
};
-&usb_host1_ohci {
+&usb_host1_ohci {
status = "okay";
};
-&vopb {
+&vopb {
status = "okay";
};
-&vopb_mmu {
+&vopb_mmu {
status = "okay";
};
compatible = "bluetooth-platdata";
//wifi-bt-power-toggle;
clocks = <&rk808 1>;
- clock-names = "ext_clock";
+ clock-names = "ext_clock";
uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart0_rts>;
status = "okay";
};
- leds {
- compatible = "gpio-leds";
- power {
- label = "firefly:blue:power";
- linux,default-trigger = "ir-power-click";
- default-state = "on";
- gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&led_power>;
- };
- user {
- label = "firefly:yellow:user";
- linux,default-trigger = "ir-user-click";
- default-state = "off";
- gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&led_user>;
+ leds {
+ compatible = "gpio-leds";
+ power {
+ label = "firefly:blue:power";
+ linux,default-trigger = "ir-power-click";
+ default-state = "on";
+ gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_power>;
+ };
+ user {
+ label = "firefly:yellow:user";
+ linux,default-trigger = "ir-user-click";
+ default-state = "off";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_user>;
};
};
};
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
tx_delay = <0x28>;
- rx_delay = <0x11>;
+ rx_delay = <0x1B>;
status = "okay";
};
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
reg = <0x1b>;
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ pmic,stby-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
+ pmic,hold-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
+ pinctrl-0 = <&pmic_int_l &pmic_dvs2 &pmic_stby &pmic_hold>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
i2c-scl-rising-time-ns = <300>;
i2c-scl-falling-time-ns = <15>;
- es8323: es8323@10{
+ es8323: es8323@10 {
compatible = "everest,es8323";
reg = <0x10>;
ear-con-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&es8323_earcon &es8323_hpdet>;
};
+
rt5640: rt5640@1c {
status = "disabled";
#sound-dai-cells = <0>;
reg = <0x40>;
screen_max_x = <1536>;
screen_max_y = <2048>;
+ revert_xy = <0>;
+ revert_x = <0>;
+ revert_y = <0>;
touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
reset-gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
};
&pinctrl {
buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
pcie_drv: pcie-drv {
rockchip,pins =
<1 17 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- pcie_3g_drv: pcie-3g-drv {
+ };
+ pcie_3g_drv: pcie-3g-drv {
rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ pmic_stby: pmic-stby {
+ rockchip,pins =
+ <1 24 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ pmic_hold: pmic-hold{
+ rockchip,pins =
+ <1 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
led_power: led-power {
- rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
-
led_user: led-user {
- rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
es8223 {
es8323_hpdet: es8323-hpdet {
- rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
};
es8323_earcon: es8323-earcon {
- rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
fusb30x {
fusb0_int: fusb0-int {
- rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
vbus {
vbus_5v_drv: vbus-5v-drv {
- rockchip,pins = <1 3 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
status = "disabled";
};
+&hdmi_in_vopb {
+ status = "disabled";
+};
+
+&hdmi_in_vopl {
+ status = "okay";
+};
+
+&dsi_in_vopb {
+ status = "okay";
+};
+
+&dsi_in_vopl {
+ status = "disabled";
+};
+
&saradc {
status = "okay";
vref-supply = <&vccadc_ref>;
status = "okay";
};
-&tcphy0 {
+&tcphy0 {
//extcon = <&fusb0>;
status = "okay";
};
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
status = "okay";
};
+&uart4 {
+ current-speed = <9600>;
+ no-loopback-test;
+ status = "okay";
+};
+
&usbdrd3_0 {
status = "okay";
//extcon = <&fusb0>;
&vpu {
status = "okay";
+ /* 0 means ion, 1 means drm */
+ //allocator = <0>;
};
#sound-dai-cells = <0>;
};
- edp_panel: edp-panel {
+ edp_panel: edp-panel {
status = "disabled";
compatible = "sharp,lcd-f402", "panel-simple";
backlight = <&backlight>;
};
};
- fiq_debugger: fiq-debugger {
+ fiq_debugger: fiq-debugger {
compatible = "rockchip,fiq-debugger";
rockchip,serial-id = <2>;
rockchip,signal-irq = <182>;
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,es8323-codec";
simple-audio-card,mclk-fs = <256>;
- simple-audio-card,widgets =
+ simple-audio-card,widgets =
"Microphone","Mic Jack",
"Headphone","Headphone Jack";
- simple-audio-card,routing =
+ simple-audio-card,routing =
"Mic Jack","MICBIAS1",
"IN1P","Mic Jack",
"Headphone Jack","HPOL",
simple-audio-card,codec {
sound-dai = <&es8323>;
};
-
};
hdmi_sound: hdmi-sound {
simple-audio-card,cpu {
sound-dai = <&i2s2>;
};
-
simple-audio-card,codec {
sound-dai = <&hdmi>;
};
compatible = "bluetooth-platdata";
//wifi-bt-power-toggle;
clocks = <&rk808 1>;
- clock-names = "ext_clock";
+ clock-names = "ext_clock";
uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart0_rts>;
status = "okay";
};
-&edp {
+&edp {
status = "disabled";
ports {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
tx_delay = <0x28>;
- rx_delay = <0x11>;
+ rx_delay = <0x1B>;
status = "okay";
};
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells = <0>;
+ //ddc-i2c-bus = <&i2c3>;
status = "okay";
};
reg = <0x1b>;
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ pmic,stby-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
+ pmic,hold-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
+ pinctrl-0 = <&pmic_int_l &pmic_dvs2 &pmic_stby &pmic_hold>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
i2c-scl-rising-time-ns = <300>;
i2c-scl-falling-time-ns = <15>;
- es8323: es8323@10{
+ es8323: es8323@10 {
compatible = "everest,es8323";
reg = <0x10>;
ear-con-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&es8323_earcon &es8323_hpdet>;
};
+
rt5640: rt5640@1c {
status = "disabled";
#sound-dai-cells = <0>;
};
};
-&i2c3 {
+&i2c3 {
status = "okay";
i2c-scl-rising-time-ns = <450>;
i2c-scl-falling-time-ns = <15>;
status = "disabled";
};
- gsl3680: gsl3680@41 {
- status = "disabled";
- compatible = "gslX680-pad";
- reg = <0x41>;
- screen_max_x = <1536>;
- screen_max_y = <2048>;
- touch-gpio = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
- reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- };
-
- mpu6050:mpu@68{
- status = "disabled";
- compatible = "invensense,mpu6050";
- reg = <0x68>;
- 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>;
- irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
- mpu-debug = <1>;
- };
+ gsl3680: gsl3680@40 {
+ status = "disabled";
+ compatible = "gslX680";
+ reg = <0x40>;
+ screen_max_x = <1536>;
+ screen_max_y = <2048>;
+ revert_xy = <0>;
+ revert_x = <0>;
+ revert_y = <0>;
+ touch-gpio = <&gpio4 28 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ mpu6050: mpu@68 {
+ status = "disabled";
+ compatible = "invensense,mpu6050";
+ reg = <0x68>;
+ 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>;
+ irq-gpio = <&gpio1 4 IRQ_TYPE_LEVEL_LOW>;
+ mpu-debug = <1>;
+ };
};
&i2s0 {
};
&i2s2 {
-
#sound-dai-cells = <0>;
status = "okay";
};
};
&pinctrl {
- buttons {
+ buttons {
pwrbtn: pwrbtn {
- rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <4 29 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
lcd_en: lcd-en {
- rockchip,pins = <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
- pcie {
+ pcie {
pcie_drv: pcie-drv {
rockchip,pins =
<1 17 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- pcie_3g_drv: pcie-3g-drv {
+ };
+ pcie_3g_drv: pcie-3g-drv {
rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
};
pmic {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
vsel2_gpio: vsel2-gpio {
rockchip,pins =
- <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ pmic_stby: pmic-stby {
+ rockchip,pins =
+ <1 24 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ pmic_hold: pmic-hold{
+ rockchip,pins =
+ <1 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
led_power: led-power {
- rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
-
led_user: led-user {
- rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
- rockchip,pins = <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <4 21 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
es8223 {
es8323_hpdet: es8323-hpdet {
- rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
};
es8323_earcon: es8323-earcon {
- rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins =
+ <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rockchip,pins =
<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
};
-
pmic_dvs2: pmic-dvs2 {
rockchip,pins =
<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};
-
};
usb2 {
};
};
-
fusb30x {
fusb0_int: fusb0-int {
- rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
vbus {
vbus_5v_drv: vbus-5v-drv {
- rockchip,pins = <1 3 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins =
+ <1 3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
status = "okay";
};
-&rockchip_suspend {
+&rockchip_suspend {
rockchip,power-ctrl =
<&gpio1 18 GPIO_ACTIVE_LOW>,
<&gpio1 14 GPIO_ACTIVE_HIGH>;
};
&cdn_dp {
- status = "disabled";
- extcon = <&fusb0>;
- phys = <&tcphy0_dp>;
+ status = "disabled";
+ extcon = <&fusb0>;
+ phys = <&tcphy0_dp>;
};
&dp_in_vopb {
- status = "disabled";
+ status = "disabled";
+};
+
+&hdmi_in_vopb {
+ status = "okay";
+};
+
+&hdmi_in_vopl {
+ status = "disabled";
};
&saradc {
status = "okay";
};
-&tcphy1 {
+&tcphy1 {
status = "okay";
};
status = "okay";
};
-&u2phy0 {
+&u2phy0 {
status = "okay";
//extcon = <&fusb0>;
};
};
-&pwm3 {
+&pwm3 {
status = "okay";
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
compatible = "rockchip,remotectl-pwm";
remote_pwm_id = <3>;
handle_cpu_id = <0>;
- ir_key1{
+ ir_key1 {
rockchip,usercode = <0xff00>;
rockchip,key_table =
<0xeb KEY_POWER>,
status = "okay";
};
-&uart2 {
+&uart2 {
status = "okay";
};
&uart4 {
- current-speed = <9600>;
- no-loopback-test;
- status = "okay";
+ current-speed = <9600>;
+ no-loopback-test;
+ status = "okay";
};
-&usbdrd3_0 {
+&usbdrd3_0 {
status = "okay";
//extcon = <&fusb0>;
};
-&usbdrd3_1 {
+&usbdrd3_1 {
status = "okay";
};
dr_mode = "host";
};
-&usbdrd_dwc3_1 {
+&usbdrd_dwc3_1 {
status = "okay";
dr_mode = "host";
};
-
-&usb_host0_ehci {
+
+&usb_host0_ehci {
status = "okay";
};
-&usb_host0_ohci {
+&usb_host0_ohci {
status = "okay";
};
-&usb_host1_ehci {
+&usb_host1_ehci {
status = "okay";
};
-&usb_host1_ohci {
+&usb_host1_ohci {
status = "okay";
};
-&vopb {
+&vopb {
status = "okay";
};
-&vopb_mmu {
+&vopb_mmu {
status = "okay";
};
#define LINE_IN_OKAY 1
#define LINE_IN_NO 0
static int line_in_status = 0;
-static bool aux_irq_flag = true; /*true:enable false:disable*/
static const struct regmap_range_cfg rt5640_ranges[] = {
{ .name = "PR", .range_min = RT5640_PR_BASE,
rt5640_hp_gpio_ctrl(rt5640, 1);
}
-static void aux_det_work_func(struct work_struct *work)
+static int rt5640_aux_adc_iio_read(struct rt5640_priv *rt5640)
{
- struct rt5640_priv *rt5640 = container_of(work, struct rt5640_priv, aux_det_work.work);
- line_in_status = gpio_get_value(rt5640->aux_det_gpio);
- printk("%s", __func__);
-
- if (line_in_status == LINE_IN_OKAY){
- printk(" [on] \n");
- rt5640_set_linein(rt5640);
- }
- else if (line_in_status == LINE_IN_NO)
- {
- printk(" [off]\n");
- }
-
- if(!aux_irq_flag) {
- enable_irq(rt5640->aux_det_irq);
- aux_irq_flag = true;
- }
-}
-
-static irqreturn_t aux_det_isr(int irq, void *data)
-{
- struct rt5640_priv *rt5640 = data;
-
- printk("%s\n", __func__);
-
- line_in_status = gpio_get_value(rt5640->aux_det_gpio);
- if(aux_irq_flag) {
- disable_irq_nosync(rt5640->aux_det_irq);
- aux_irq_flag = false;
- }
+ struct iio_channel *channel = rt5640->aux_chan;
+ int val, ret;
- if (line_in_status == LINE_IN_OKAY) {
- //set line in on
- printk(" line_in: [on] \n");
- line_in_status = LINE_IN_OKAY;
- schedule_delayed_work(&rt5640->aux_det_work, msecs_to_jiffies(0));
- //rt5640_set_linein(rt5640);
- }
- else if (line_in_status == LINE_IN_NO) {
- //set line in off
- printk(" line_in: [off] \n");
- if (!aux_irq_flag) {
- enable_irq(rt5640->aux_det_irq);
- aux_irq_flag = true;
- }
- line_in_status = LINE_IN_NO;
+ if (!channel)
+ return RT5640_ADC_INVALID_ADVALUE;
+ ret = iio_read_channel_raw(channel, &val);
+ if (ret < 0) {
+ dev_err(rt5640->codec->dev, "read aux_det channel() error: %d\n", ret);
+ return ret;
}
-
- return IRQ_HANDLED;
+ return val;
}
-static void rt5640_delay_workq(struct work_struct *work)
+static void rt5640_aux_adc_poll(struct work_struct *work)
{
- int ret;
- struct rt5640_priv *rt5640 = container_of(work, struct rt5640_priv, init_delayed_work.work);
- printk("%s\n", __func__);
+ struct rt5640_priv *rt5640;
+ int result = -1;
- rt5640->aux_det_irq = gpio_to_irq(rt5640->aux_det_gpio);
- if (rt5640->aux_det_irq < 0) {
- gpio_free(rt5640->aux_det_gpio);
- printk("aux_det_irq req fail\n");
- }
- else {
- ret = request_irq(rt5640->aux_det_irq, aux_det_isr, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "irq_aux_det", rt5640);
- if (ret)
- printk(KERN_ALERT "Cannot allocate linein INT!ERRNO:%d\n", ret);
- else {
- if (aux_irq_flag) {
- disable_irq(rt5640->aux_det_irq);
- aux_irq_flag = false;
- }
+ rt5640 = container_of(work, struct rt5640_priv, adc_aux_work.work);
+ if (1/*!rt5640->in_suspend*/) {
+ result = rt5640_aux_adc_iio_read(rt5640);
+ if (result > RT5640_ADC_INVALID_ADVALUE && result < 1023)
+ {
+ //dev_dbg(rt5640->codec->dev, "scan: headphone insert=%d, adc=%d\n", rt5640->hp_insert, result);
+ if (result < rt5640->aux_det_adc_value + RT5640_ADC_DRIFT_ADVALUE &&
+ result > rt5640->aux_det_adc_value - RT5640_ADC_DRIFT_ADVALUE)
+ {
+ dev_dbg(rt5640->codec->dev, "line_in insert, adc=%d\n", result);
+ if (line_in_status == LINE_IN_NO)
+ rt5640_set_linein(rt5640);
+ line_in_status = LINE_IN_OKAY;
+ } else {
+ line_in_status = LINE_IN_NO;
+ dev_dbg(rt5640->codec->dev, "line_in not insert, adc=%d\n", result);
+ }
}
}
- schedule_delayed_work(&rt5640->aux_det_work, msecs_to_jiffies(100));
+ schedule_delayed_work(&rt5640->adc_aux_work, RT5640_ADC_SAMPLE_JIFFIES);
}
static int rt5640_reset(struct snd_soc_codec *codec)
1000);
}
- /* Init workquence to set up line in func */
- INIT_DELAYED_WORK(&rt5640->init_delayed_work, rt5640_delay_workq);
- INIT_DELAYED_WORK(&rt5640->aux_det_work, aux_det_work_func);
-
- schedule_delayed_work(&rt5640->init_delayed_work, msecs_to_jiffies(20000));
+ if (rt5640->aux_chan) {
+ INIT_DELAYED_WORK(&rt5640->adc_aux_work, rt5640_aux_adc_poll);
+ schedule_delayed_work(&rt5640->adc_aux_work,
+ msecs_to_jiffies(20000));
+ }
return 0;
}
{
struct device_node *np = dev->of_node;
struct iio_channel *chan;
+ struct iio_channel *aux_chan;
u32 adc_value;
enum of_gpio_flags flags;
- unsigned long irq_flags;
int gpio, ret;
chan = iio_channel_get(dev, NULL);
}
rt5640->chan = chan;
+ aux_chan = iio_channel_get(dev, "aux-det");
+ if (IS_ERR(chan)) {
+ dev_warn(dev, "rt5640 have no io-channels-aux defined\n");
+ aux_chan = NULL;
+ } else {
+ if (!of_property_read_u32(np, "aux-det-adc-value", &adc_value)) {
+ rt5640->aux_det_adc_value = adc_value;
+ } else {
+ aux_chan = NULL;
+ dev_err(dev, "rt5640 have no aux_det_adc_value defined\n");
+ }
+ }
+ rt5640->aux_chan = aux_chan;
+
gpio = of_get_named_gpio_flags(np, "hp-con-gpio", 0, &flags);
if (gpio < 0) {
dev_err(dev, "Can not read property hp-con-gpio\n");
}
rt5640->hp_con_gpio = gpio;
- gpio = of_get_named_gpio_flags(np, "aux-det-gpio", 0, (enum of_gpio_flags *)&irq_flags);
- if (gpio < 0) {
- dev_err(dev, "Can not read property aux-det-gpio\n");
- } else {
- if (gpio_is_valid(gpio)) {
- ret = devm_gpio_request(dev, gpio, "aux-det-gpio");
- if (ret < 0) {
- dev_err(dev, "aux-det-gpio request ERROR\n");
- } else {
- ret = gpio_direction_input(gpio);
- if (ret < 0)
- dev_err(dev, "gpio_direction_input aux-det-gpio set ERROR\n");
- }
- }
- }
- rt5640->aux_det_gpio = gpio;
-
rt5640->pdata.in1_diff = of_property_read_bool(np,
"realtek,in1-differential");
rt5640->pdata.in2_diff = of_property_read_bool(np,
bool hp_insert;
int hp_con_gpio;
bool hp_con_gpio_active_high;
- struct delayed_work init_delayed_work;
- struct delayed_work aux_det_work;
- int aux_det_gpio;
- int aux_det_irq;
struct snd_soc_jack hp_jack;
+ struct delayed_work adc_aux_work;
+ struct iio_channel *aux_chan;
+ int aux_det_adc_value;
};
int rt5640_dmic_enable(struct snd_soc_codec *codec,