OSDN Git Service

ARM: DTS: omap5-uevm: Enable basic audio (McPDM <-> twl6040)
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / arch / arm / boot / dts / omap5-uevm.dts
index 3b99ec2..159720d 100644 (file)
                reg = <0x80000000 0x7F000000>; /* 2032 MB */
        };
 
+       aliases {
+               display0 = &hdmi0;
+       };
+
        vmmcsd_fixed: fixedregulator-mmcsd {
                compatible = "regulator-fixed";
                regulator-name = "vmmcsd_fixed";
                        default-state = "off";
                };
        };
+
+       tpd12s015: encoder@0 {
+               compatible = "ti,tpd12s015";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&tpd12s015_pins>;
+
+               gpios = <&gpio9 0 GPIO_ACTIVE_HIGH>,    /* TCA6424A P01, CT CP HPD */
+                       <&gpio9 1 GPIO_ACTIVE_HIGH>,    /* TCA6424A P00, LS OE */
+                       <&gpio7 1 GPIO_ACTIVE_HIGH>;    /* GPIO 193, HPD */
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               tpd12s015_in: endpoint@0 {
+                                       remote-endpoint = <&hdmi_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+
+                               tpd12s015_out: endpoint@0 {
+                                       remote-endpoint = <&hdmi_connector_in>;
+                               };
+                       };
+               };
+       };
+
+       hdmi0: connector@0 {
+               compatible = "hdmi-connector";
+               label = "hdmi";
+
+               type = "b";
+
+               port {
+                       hdmi_connector_in: endpoint {
+                               remote-endpoint = <&tpd12s015_out>;
+                       };
+               };
+       };
+
+       sound: sound {
+               compatible = "ti,abe-twl6040";
+               ti,model = "omap5-uevm";
+
+               ti,mclk-freq = <19200000>;
+
+               ti,mcpdm = <&mcpdm>;
+
+               ti,twl6040 = <&twl6040>;
+
+               /* Audio routing */
+               ti,audio-routing =
+                       "Headset Stereophone", "HSOL",
+                       "Headset Stereophone", "HSOR",
+                       "Line Out", "AUXL",
+                       "Line Out", "AUXR",
+                       "HSMIC", "Headset Mic",
+                       "Headset Mic", "Headset Mic Bias",
+                       "AFML", "Line In",
+                       "AFMR", "Line In";
+       };
 };
 
 &omap5_pmx_core {
        pinctrl-names = "default";
        pinctrl-0 = <
-                       &twl6040_pins
-                       &mcpdm_pins
-                       &mcbsp1_pins
-                       &mcbsp2_pins
                        &usbhost_pins
                        &led_gpio_pins
        >;
                >;
        };
 
+       dss_hdmi_pins: pinmux_dss_hdmi_pins {
+               pinctrl-single,pins = <
+                       0x0fc (PIN_INPUT_PULLUP | MUX_MODE0)    /* hdmi_cec.hdmi_cec */
+                       0x100 (PIN_INPUT | MUX_MODE0)   /* hdmi_ddc_scl.hdmi_ddc_scl */
+                       0x102 (PIN_INPUT | MUX_MODE0)   /* hdmi_ddc_sda.hdmi_ddc_sda */
+               >;
+       };
+
+       tpd12s015_pins: pinmux_tpd12s015_pins {
+               pinctrl-single,pins = <
+                       0x0fe (PIN_INPUT_PULLDOWN | MUX_MODE6)  /* hdmi_hpd.gpio7_193 */
+               >;
+       };
 };
 
 &omap5_pmx_wkup {
                        ti,wakeup;
                };
 
+               clk32kgaudio: palmas_clk32k@1 {
+                       compatible = "ti,palmas-clk32kgaudio";
+                       #clock-cells = <0>;
+               };
+
                palmas_pmic {
                        compatible = "ti,palmas-pmic";
                        interrupt-parent = <&palmas>;
                        };
                };
        };
+
+       twl6040: twl@4b {
+               compatible = "ti,twl6040";
+               reg = <0x4b>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&twl6040_pins>;
+
+               interrupts = <GIC_SPI 119 IRQ_TYPE_NONE>; /* IRQ_SYS_2N cascaded to gic */
+               interrupt-parent = <&gic>;
+               ti,audpwron-gpio = <&gpio5 13 0>;  /* gpio line 141 */
+
+               vio-supply = <&smps7_reg>;
+               v2v1-supply = <&smps9_reg>;
+               enable-active-high;
+
+               clocks = <&clk32kgaudio>;
+               clock-names = "clk32k";
+       };
 };
 
 &i2c5 {
        pinctrl-0 = <&i2c5_pins>;
 
        clock-frequency = <400000>;
+
+       gpio9: gpio@22 {
+               compatible = "ti,tca6424";
+               reg = <0x22>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
 };
 
-&mcbsp3 {
-       status = "disabled";
+&mcpdm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcpdm_pins>;
+       status = "okay";
+};
+
+&mcbsp1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcbsp1_pins>;
+       status = "okay";
+};
+
+&mcbsp2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcbsp2_pins>;
+       status = "okay";
 };
 
 &usbhshost {
 &cpu0 {
        cpu0-supply = <&smps123_reg>;
 };
+
+&dss {
+       status = "ok";
+};
+
+&hdmi {
+       status = "ok";
+       vdda-supply = <&ldo4_reg>;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&dss_hdmi_pins>;
+
+       port {
+               hdmi_out: endpoint {
+                       remote-endpoint = <&tpd12s015_in>;
+               };
+       };
+};