ARM: tegra: apalis/colibri t30: Integrate audio
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>
Sun, 19 Jun 2016 01:00:01 +0000 (03:00 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 7 Nov 2016 13:45:30 +0000 (14:45 +0100)
Integrate Freescale SGTL5000 analogue audio codec support.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
[treding@nvidia.com: remove leading 0 from unit-address]
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/tegra30-apalis.dtsi
arch/arm/boot/dts/tegra30-colibri.dtsi

index 192b95177aac38017b06b8287f4af087a1e2d643..f6c7c3e958ac39edf2ef91d10b1ccfdaf2d2d8c0 100644 (file)
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
+                       /* Analogue Audio (On-module) */
+                       clk1_out_pw4 {
+                               nvidia,pins = "clk1_out_pw4";
+                               nvidia,function = "extperiph1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap3_fs_pp0 {
+                               nvidia,pins =   "dap3_fs_pp0",
+                                               "dap3_sclk_pp3",
+                                               "dap3_din_pp1",
+                                               "dap3_dout_pp2";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Apalis BKL1_ON */
                        pv2 {
                                nvidia,pins = "pv2";
                status = "okay";
                clock-frequency = <100000>;
 
+               /* SGTL5000 audio codec */
+               sgtl5000: codec@a {
+                       compatible = "fsl,sgtl5000";
+                       reg = <0x0a>;
+                       VDDA-supply = <&sys_3v3_reg>;
+                       VDDIO-supply = <&sys_3v3_reg>;
+                       clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+               };
+
                pmic: tps65911@2d {
                        compatible = "ti,tps65911";
                        reg = <0x2d>;
                nvidia,sys-clock-req-active-high;
        };
 
+       ahub@70080000 {
+               i2s@70080500 {
+                       status = "okay";
+               };
+       };
+
        /* eMMC */
        sdhci@78000600 {
                status = "okay";
                        regulator-always-on;
                };
        };
+
+       sound {
+               compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
+                            "nvidia,tegra-audio-sgtl5000";
+               nvidia,model = "Toradex Apalis T30";
+               nvidia,audio-routing =
+                       "Headphone Jack", "HP_OUT",
+                       "LINE_IN", "Line In Jack",
+                       "MIC_IN", "Mic Jack";
+               nvidia,i2s-controller = <&tegra_i2s2>;
+               nvidia,audio-codec = <&sgtl5000>;
+               clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
+                        <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA30_CLK_EXTERN1>;
+               clock-names = "pll_a", "pll_a_out0", "mclk";
+       };
 };
index a265534cd314ebab0a3661f2f9b4f2db5b5472b6..5360d638eedcb48d9c6c64d3f83294008aa52167 100644 (file)
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
+                       /* Analogue Audio (On-module) */
+                       clk1_out_pw4 {
+                               nvidia,pins = "clk1_out_pw4";
+                               nvidia,function = "extperiph1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap3_fs_pp0 {
+                               nvidia,pins =   "dap3_fs_pp0",
+                                               "dap3_sclk_pp3",
+                                               "dap3_din_pp1",
+                                               "dap3_dout_pp2";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Colibri BL_ON */
                        pv2 {
                                nvidia,pins = "pv2";
                status = "okay";
                clock-frequency = <100000>;
 
+               /* SGTL5000 audio codec */
+               sgtl5000: codec@a {
+                       compatible = "fsl,sgtl5000";
+                       reg = <0x0a>;
+                       VDDA-supply = <&sys_3v3_reg>;
+                       VDDIO-supply = <&sys_3v3_reg>;
+                       clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+               };
+
                pmic: tps65911@2d {
                        compatible = "ti,tps65911";
                        reg = <0x2d>;
                nvidia,sys-clock-req-active-high;
        };
 
+       ahub@70080000 {
+               i2s@70080500 {
+                       status = "okay";
+               };
+       };
+
        /* eMMC */
        sdhci@78000600 {
                status = "okay";
                        regulator-always-on;
                };
        };
+
+       sound {
+               compatible = "toradex,tegra-audio-sgtl5000-colibri_t30",
+                            "nvidia,tegra-audio-sgtl5000";
+               nvidia,model = "Toradex Colibri T30";
+               nvidia,audio-routing =
+                       "Headphone Jack", "HP_OUT",
+                       "LINE_IN", "Line In Jack",
+                       "MIC_IN", "Mic Jack";
+               nvidia,i2s-controller = <&tegra_i2s2>;
+               nvidia,audio-codec = <&sgtl5000>;
+               clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
+                        <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA30_CLK_EXTERN1>;
+               clock-names = "pll_a", "pll_a_out0", "mclk";
+       };
 };