From: Marcel Ziswiler Date: Sun, 19 Jun 2016 01:00:01 +0000 (+0200) Subject: ARM: tegra: apalis/colibri t30: Integrate audio X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8948e7468ab9cbf0beb88cfc806fda37948ab9ff;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ARM: tegra: apalis/colibri t30: Integrate audio Integrate Freescale SGTL5000 analogue audio codec support. Signed-off-by: Marcel Ziswiler Reviewed-by: Stephen Warren Signed-off-by: Marcel Ziswiler [treding@nvidia.com: remove leading 0 from unit-address] Signed-off-by: Thierry Reding --- diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi index 192b95177aac..f6c7c3e958ac 100644 --- a/arch/arm/boot/dts/tegra30-apalis.dtsi +++ b/arch/arm/boot/dts/tegra30-apalis.dtsi @@ -48,6 +48,24 @@ pinctrl-0 = <&state_default>; state_default: pinmux { + /* Analogue Audio (On-module) */ + clk1_out_pw4 { + nvidia,pins = "clk1_out_pw4"; + nvidia,function = "extperiph1"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + dap3_fs_pp0 { + nvidia,pins = "dap3_fs_pp0", + "dap3_sclk_pp3", + "dap3_din_pp1", + "dap3_dout_pp2"; + nvidia,function = "i2s2"; + nvidia,pull = ; + nvidia,tristate = ; + }; + /* Apalis BKL1_ON */ pv2 { nvidia,pins = "pv2"; @@ -429,6 +447,15 @@ 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>; @@ -660,6 +687,12 @@ nvidia,sys-clock-req-active-high; }; + ahub@70080000 { + i2s@70080500 { + status = "okay"; + }; + }; + /* eMMC */ sdhci@78000600 { status = "okay"; @@ -733,4 +766,20 @@ 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"; + }; }; diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi index a265534cd314..5360d638eedc 100644 --- a/arch/arm/boot/dts/tegra30-colibri.dtsi +++ b/arch/arm/boot/dts/tegra30-colibri.dtsi @@ -29,6 +29,24 @@ pinctrl-0 = <&state_default>; state_default: pinmux { + /* Analogue Audio (On-module) */ + clk1_out_pw4 { + nvidia,pins = "clk1_out_pw4"; + nvidia,function = "extperiph1"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + dap3_fs_pp0 { + nvidia,pins = "dap3_fs_pp0", + "dap3_sclk_pp3", + "dap3_din_pp1", + "dap3_dout_pp2"; + nvidia,function = "i2s2"; + nvidia,pull = ; + nvidia,tristate = ; + }; + /* Colibri BL_ON */ pv2 { nvidia,pins = "pv2"; @@ -207,6 +225,15 @@ 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>; @@ -396,6 +423,12 @@ nvidia,sys-clock-req-active-high; }; + ahub@70080000 { + i2s@70080500 { + status = "okay"; + }; + }; + /* eMMC */ sdhci@78000600 { status = "okay"; @@ -471,4 +504,20 @@ 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"; + }; };