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 6e18a7208ec43d9b00920a83877915e0c81c08ef..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>;
                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";
                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 {
 
        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>;
                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>;
        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>;
                };
        };
 };