ARM: dts: am57xx-beagle-x15: Enable analog audio support
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 24 Aug 2015 07:20:07 +0000 (10:20 +0300)
committerTony Lindgren <tony@atomide.com>
Mon, 12 Oct 2015 22:00:37 +0000 (15:00 -0700)
The analog audio setup consists of:
McASP3 <-> tlv320aic3104 codec

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/am57xx-beagle-x15.dts

index f9f31b15e0f6a26e705f41800396bcf7ebca851c..3e36d49e452f8173d1a0a209923db0a697205032 100644 (file)
                        };
                };
        };
+
+       sound0: sound@0 {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "BeagleBoard-X15";
+               simple-audio-card,widgets =
+                       "Line", "Line Out",
+                       "Line", "Line In";
+               simple-audio-card,routing =
+                       "Line Out",     "LLOUT",
+                       "Line Out",     "RLOUT",
+                       "MIC2L",        "Line In",
+                       "MIC2R",        "Line In";
+               simple-audio-card,format = "dsp_b";
+               simple-audio-card,bitclock-master = <&sound0_master>;
+               simple-audio-card,frame-master = <&sound0_master>;
+               simple-audio-card,bitclock-inversion;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&mcasp3>;
+               };
+
+               sound0_master: simple-audio-card,codec {
+                       sound-dai = <&tlv320aic3104>;
+                       clocks = <&clkout2_clk>;
+               };
+       };
 };
 
 &dra7_pmx_core {
                        0x370 (PIN_OUTPUT | MUX_MODE14)         /* gpio6_28 LS_OE */
                >;
        };
+
+       clkout2_pins_default: clkout2_pins_default {
+               pinctrl-single,pins = <
+                       0x294 (PIN_OUTPUT_PULLDOWN | MUX_MODE9) /* xref_clk0.clkout2 */
+               >;
+       };
+
+       clkout2_pins_sleep: clkout2_pins_sleep {
+               pinctrl-single,pins = <
+                       0x294 (PIN_INPUT | MUX_MODE15)  /* xref_clk0.clkout2 */
+               >;
+       };
+
+       mcasp3_pins_default: mcasp3_pins_default {
+               pinctrl-single,pins = <
+                       0x324 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_aclkx.mcasp3_aclkx */
+                       0x328 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_fsx.mcasp3_fsx */
+                       0x32c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr0.mcasp3_axr0 */
+                       0x330 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr1.mcasp3_axr1 */
+               >;
+       };
+
+       mcasp3_pins_sleep: mcasp3_pins_sleep {
+               pinctrl-single,pins = <
+                       0x324 (PIN_INPUT | MUX_MODE15)
+                       0x328 (PIN_INPUT | MUX_MODE15)
+                       0x32c (PIN_INPUT | MUX_MODE15)
+                       0x330 (PIN_INPUT | MUX_MODE15)
+               >;
+       };
 };
 
 &i2c1 {
                interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
                #thermal-sensor-cells = <1>;
        };
+
+       tlv320aic3104: tlv320aic3104@18 {
+               #sound-dai-cells = <0>;
+               compatible = "ti,tlv320aic3104";
+               reg = <0x18>;
+               pinctrl-names = "default", "sleep";
+               pinctrl-0 = <&clkout2_pins_default>;
+               pinctrl-1 = <&clkout2_pins_sleep>;
+               status = "okay";
+               adc-settle-ms = <40>;
+
+               AVDD-supply = <&vdd_3v3>;
+               IOVDD-supply = <&vdd_3v3>;
+               DRVDD-supply = <&vdd_3v3>;
+               DVDD-supply = <&aic_dvdd>;
+       };
 };
 
 &i2c3 {
 &pcie1 {
        gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
 };
+
+&mcasp3 {
+       #sound-dai-cells = <0>;
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&mcasp3_pins_default>;
+       pinctrl-1 = <&mcasp3_pins_sleep>;
+       status = "okay";
+
+       op-mode = <0>;  /* MCASP_IIS_MODE */
+       tdm-slots = <2>;
+       /* 4 serializers */
+       serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+               1 2 0 0
+       >;
+};