arm64: dts: rockchip: add dp audio support for rk3399-tve1205g
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-tve1205g.dts
index 1cb199edeb597a5c7576b91021c1883807fcebda..343301944e8c8c1b9c33063c7340597218fae578 100644 (file)
@@ -55,8 +55,9 @@
                compatible = "simple-panel";
                backlight = <&backlight>;
                power-supply = <&vcc3v3_s0>;
-               enable-gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
+               enable-gpios = <&gpio3 GPIO_A0 GPIO_ACTIVE_HIGH>;
                bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
+               delay,prepare = <50>;
                ports {
                        panel_in_edp: endpoint {
                                remote-endpoint = <&edp_out_panel>;
                };
        };
 
+       usb_cam_gpio: usb-cam-gpio {
+               compatible = "usb-cam-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&usb_cam_on_gpio>;
+               hd-cam-gpios = <&gpio3 GPIO_A1 GPIO_ACTIVE_HIGH>;
+               ir-cam-gpios = <&gpio3 GPIO_A2 GPIO_ACTIVE_HIGH>;
+               status = "okay";
+       };
+
        vcc_sys: vcc-sys {
                compatible = "regulator-fixed";
                regulator-name = "vcc_sys";
                regulator-boot-on;
        };
 
-       es8316-sound {
+       cx2072x-sound {
                compatible = "simple-audio-card";
                simple-audio-card,format = "i2s";
-               simple-audio-card,name = "rockchip,es8316-codec";
+               simple-audio-card,name = "rockchip,cx2072x-codec";
                simple-audio-card,mclk-fs = <256>;
                simple-audio-card,widgets =
-                       "Microphone", "Mic Jack",
-                       "Headphone", "Headphone Jack";
+                       "Microphone", "Microphone Jack",
+                       "Line", "Microphone Headset",
+                       "Headphone", "Headphone Jack",
+                       "Speaker", "Speaker External";
                simple-audio-card,routing =
-                       "Mic Jack", "MICBIAS1",
-                       "IN1P", "Mic Jack",
-                       "Headphone Jack", "HPOL",
-                       "Headphone Jack", "HPOR";
+                       "PORTC", "Microphone Jack",
+                       "PortD Mic Bias", "Microphone Headset",
+                       "Headphone Jack", "PORTA",
+                       "Speaker External", "PORTG";
                simple-audio-card,cpu {
                        sound-dai = <&i2s0>;
                };
                simple-audio-card,codec {
-                       sound-dai = <&es8316>;
+                       sound-dai = <&cx2072x>;
                };
        };
 
+       sound {
+               compatible = "rockchip,cdndp-sound";
+               rockchip,cpu = <&i2s2>;
+               rockchip,codec = <&cdn_dp>;
+               status = "okay";
+       };
+
        spdif-sound {
                compatible = "simple-audio-card";
                simple-audio-card,name = "rockchip,spdif";
                reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
        };
 
+       leds: gpio-leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 =<&leds_gpio>;
+
+               led@1 {
+                       gpios = <&gpio1 GPIO_C6 GPIO_ACTIVE_HIGH>;
+                       label = "battery_led_amber";
+                       retain-state-suspended;
+               };
+
+               led@2 {
+                       gpios = <&gpio1 GPIO_D0 GPIO_ACTIVE_HIGH>;
+                       label = "battery_led_white";
+                       retain-state-suspended;
+               };
+
+               led@3 {
+                       gpios = <&gpio3 GPIO_A5 GPIO_ACTIVE_HIGH>;
+                       label = "call_answer_led";
+               };
+
+               led@4 {
+                       gpios = <&gpio3 GPIO_B1 GPIO_ACTIVE_HIGH>;
+                       label = "call_decline_led";
+               };
+
+               led@5 {
+                       gpios = <&gpio2 GPIO_D3 GPIO_ACTIVE_HIGH>;
+                       label = "rec_mute_led";
+               };
+
+               led@6 {
+                       gpios = <&gpio2 GPIO_D4 GPIO_ACTIVE_HIGH>;
+                       label = "play_mute_led";
+               };
+
+               led@7 {
+                       gpios = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
+                       label = "wl_led";
+               };
+       };
+
        wireless-wlan {
                compatible = "wlan-platdata";
                rockchip,grf = <&grf>;
 
        uboot-charge {
                compatible = "rockchip,uboot-charge";
-               rockchip,uboot-charge-on = <0>;
-               rockchip,android-charge-on = <1>;
+               rockchip,uboot-charge-on = <1>;
+               rockchip,android-charge-on = <0>;
+               rockchip,uboot-exit-charge-level = <2>;
+               rockchip,uboot-low-power-level = <1>;
+               rockchip,uboot-charge-brightness = <0>;
+               max-input-voltage = <20000>;
+               max-input-current = <6000>;
        };
 
        vibrator {
        };
 };
 
+&edp_in_vopl {
+       status = "disabled";
+};
+
 &emmc_phy {
        status = "okay";
 };
        status = "disabled";
 };
 
+&cdn_dp {
+       status = "okay";
+       extcon = <&fusb0>, <&fusb1>;
+};
+
+&dp_in_vopb {
+       status = "disabled";
+};
+
 &i2s0 {
        status = "okay";
        rockchip,i2s-broken-burst-len;
        rockchip,playback-channels = <8>;
        rockchip,capture-channels = <8>;
+       rockchip,bclk-fs = <32>;
        #sound-dai-cells = <0>;
 };
 
 &i2s2 {
+       status = "okay";
        #sound-dai-cells = <0>;
 };
 
                                regulator-max-microvolt = <3000000>;
                                regulator-name = "vcca3v0_codec";
                                regulator-state-mem {
-                                       regulator-off-in-suspend;
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3000000>;
                                };
                        };
 
                                regulator-max-microvolt = <1800000>;
                                regulator-name = "vcca1v8_codec";
                                regulator-state-mem {
-                                       regulator-off-in-suspend;
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
                                };
                        };
 
        i2c-scl-rising-time-ns = <140>;
        i2c-scl-falling-time-ns = <30>;
 
-       es8316: es8316@10 {
+       cx2072x:cx2072x@33 {
+               status = "okay";
                #sound-dai-cells = <0>;
-               compatible = "everest,es8316";
-               reg = <0x11>;
+               compatible = "cnxt,cx20723";
+               reg = <0x33>;
                clocks = <&cru SCLK_I2S_8CH_OUT>;
                clock-names = "mclk";
                spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
                pinctrl-0 = <&hidkey_irq_gpio>;
                reg = <0x68>;
                hid-descr-addr = <0x0001>;
+               hid-support-wakeup;
        };
 
        ec_battery@76 {
                reg = <0x76>;
                virtual_power = <0>;
                monitor_sec = <5>;
+               ec-notify-gpios = <&gpio1 GPIO_C4 GPIO_ACTIVE_HIGH>;
        };
 };
 
                pd-charge-only = <1>;
                typec0-enable-gpios = <&gpio1 GPIO_A3 GPIO_ACTIVE_HIGH>;
                typec1-enable-gpios = <&gpio1 GPIO_A4 GPIO_ACTIVE_HIGH>;
-               typec0-discharge-gpios = <&gpio0 GPIO_B4 GPIO_ACTIVE_HIGH>;
-               typec1-discharge-gpios = <&gpio0 GPIO_B5 GPIO_ACTIVE_HIGH>;
        };
 };
 
                reg = <0x22>;
                pinctrl-names = "default";
                pinctrl-0 = <&fusb1_int>;
-               vbus-5v-gpios = <&gpio4 GPIO_D6 GPIO_ACTIVE_LOW>;
+               vbus-5v-gpios = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
                int-n-gpios = <&gpio1 GPIO_B5 GPIO_ACTIVE_HIGH>;
+               discharge-gpios = <&gpio0 GPIO_B5 GPIO_ACTIVE_HIGH>;
                charge-dev = <&bq25700>;
+               support-uboot-charge = <1>;
+               port-num = <1>;
                status = "okay";
        };
 };
                reg = <0x22>;
                pinctrl-names = "default";
                pinctrl-0 = <&fusb0_int>;
-               vbus-5v-gpios = <&gpio4 GPIO_D5 GPIO_ACTIVE_LOW>;
+               vbus-5v-gpios = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>;
                int-n-gpios = <&gpio1 GPIO_A2 GPIO_ACTIVE_HIGH>;
+               discharge-gpios = <&gpio0 GPIO_B4 GPIO_ACTIVE_HIGH>;
                charge-dev = <&bq25700>;
+               support-uboot-charge = <1>;
+               port-num = <0>;
                status = "okay";
        };
 };
        status = "disabled";
 };
 
+&pcie_phy {
+       status = "okay";
+};
+
+&pcie0 {
+       ep-gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+       num-lanes = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie_clkreqn_cpm>;
+       status = "okay";
+};
+
 &pmu_io_domains {
        status = "okay";
        pmu1830-supply = <&vcc_1v8>;
                };
        };
 
+       gpio-leds {
+               leds_gpio: leds-gpio {
+                       rockchip,pins =
+                               <1 GPIO_C6 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <1 GPIO_D0 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <3 GPIO_A5 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <3 GPIO_B1 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <2 GPIO_D3 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <2 GPIO_D4 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <4 GPIO_D2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
        usb2 {
                host_vbus_drv: host-vbus-drv {
                        rockchip,pins =
                };
        };
 
+       usb_camera {
+               usb_cam_on_gpio: usb-cam-on-gpio {
+                       rockchip,pins =
+                               <3 GPIO_A1 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <3 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
        fusb30x {
                fusb0_int: fusb0-int {
                        rockchip,pins =
-                               <1 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>;
+                               <1 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <0 GPIO_B4 RK_FUNC_GPIO &pcfg_pull_up>;
                };
                fusb1_int: fusb1-int {
                        rockchip,pins =
-                               <1 GPIO_B5 RK_FUNC_GPIO &pcfg_pull_up>;
+                               <1 GPIO_B5 RK_FUNC_GPIO &pcfg_pull_up>,
+                               <0 GPIO_B5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 };