[PATCH v4 0/3] ASoC/ARM: tegra: apalis t30/tk1/colibri t30: sgtl5000 audio

STALE3592d

5 messages, 2 authors, 2016-11-07 · open the first message on its own page

[PATCH v4 0/3] ASoC/ARM: tegra: apalis t30/tk1/colibri t30: sgtl5000 audio

From: Marcel Ziswiler <hidden>
Date: 2016-06-19 01:01:22

This series adds/integrates Freescale SGTL5000 analogue audio codec
support.

Changes in v4:
- simple-audio-card does still not allow for more advanced use cases
  like Tegra SoCs
- further platform drivers have been accepted since my last attempt
  (e.g. rt5677 one)
- relevance for one further board the new Toradex Apalis TK1
- drop unused sound/jack.h include
- in tegra_sgtl5000_driver_remove() pass return value of
  snd_soc_unregister_card() on to caller
- no longer set owner property in platform_driver to THIS_MODULE
- re-based/resend

Changes in v3:
- revert to not using simple-audio-card being incompatible with tegra
- rebased to for-next

Changes in v2:
- using simple-audio-card as suggested by Fabio

Marcel Ziswiler (3):
  ASoC: tegra: add tegra sgtl5000 machine driver
  ARM: tegra: apalis/colibri t30: integrate audio
  ARM: tegra: enable sgtl5000 audio

 .../bindings/sound/nvidia,tegra-audio-sgtl5000.txt |  42 ++++
 arch/arm/boot/dts/tegra30-apalis.dtsi              |  49 +++++
 arch/arm/boot/dts/tegra30-colibri.dtsi             |  49 +++++
 arch/arm/configs/tegra_defconfig                   |   1 +
 sound/soc/tegra/Kconfig                            |  11 ++
 sound/soc/tegra/Makefile                           |   2 +
 sound/soc/tegra/tegra_sgtl5000.c                   | 212 +++++++++++++++++++++
 7 files changed, 366 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.txt
 create mode 100644 sound/soc/tegra/tegra_sgtl5000.c

-- 
2.5.5

[PATCH v4 3/3] ARM: tegra: enable sgtl5000 audio

From: Marcel Ziswiler <hidden>
Date: 2016-06-19 01:01:09

The NVIDIA Tegra 3 aka T30 based Apalis T30 and Colibri T30 as well as
the new Tegra K1 aka TK1 based Apalis TK1 modules contain a Freescale
SGTL5000 analogue audio codec.

Signed-off-by: Marcel Ziswiler <redacted>
Reviewed-by: Stephen Warren <redacted>
Signed-off-by: Marcel Ziswiler <redacted>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/tegra_defconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index bc80a47..c1d0f91 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -216,6 +216,7 @@ CONFIG_SND_SOC_TEGRA_WM9712=y
 CONFIG_SND_SOC_TEGRA_TRIMSLICE=y
 CONFIG_SND_SOC_TEGRA_ALC5632=y
 CONFIG_SND_SOC_TEGRA_MAX98090=y
+CONFIG_SND_SOC_TEGRA_SGTL5000=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_TEGRA=y
-- 
2.5.5

[PATCH v4 2/3] ARM: tegra: apalis/colibri t30: integrate audio

From: Marcel Ziswiler <hidden>
Date: 2016-06-19 01:01:15

Integrate Freescale SGTL5000 analogue audio codec support.

Signed-off-by: Marcel Ziswiler <redacted>
Reviewed-by: Stephen Warren <redacted>
Signed-off-by: Marcel Ziswiler <redacted>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/boot/dts/tegra30-apalis.dtsi  | 49 ++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/tegra30-colibri.dtsi | 49 ++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 192b951..96865ea 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 = <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";
@@ -429,6 +447,15 @@
 		status = "okay";
 		clock-frequency = <100000>;
 
+		/* SGTL5000 audio codec */
+		sgtl5000: codec at 0a {
+			compatible = "fsl,sgtl5000";
+			reg = <0x0a>;
+			VDDA-supply = <&sys_3v3_reg>;
+			VDDIO-supply = <&sys_3v3_reg>;
+			clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+		};
+
 		pmic: tps65911 at 2d {
 			compatible = "ti,tps65911";
 			reg = <0x2d>;
@@ -660,6 +687,12 @@
 		nvidia,sys-clock-req-active-high;
 	};
 
+	ahub at 70080000 {
+		i2s at 70080500 {
+			status = "okay";
+		};
+	};
+
 	/* eMMC */
 	sdhci at 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 a265534..7b7af78 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 = <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";
@@ -207,6 +225,15 @@
 		status = "okay";
 		clock-frequency = <100000>;
 
+		/* SGTL5000 audio codec */
+		sgtl5000: codec at 0a {
+			compatible = "fsl,sgtl5000";
+			reg = <0x0a>;
+			VDDA-supply = <&sys_3v3_reg>;
+			VDDIO-supply = <&sys_3v3_reg>;
+			clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+		};
+
 		pmic: tps65911 at 2d {
 			compatible = "ti,tps65911";
 			reg = <0x2d>;
@@ -396,6 +423,12 @@
 		nvidia,sys-clock-req-active-high;
 	};
 
+	ahub at 70080000 {
+		i2s at 70080500 {
+			status = "okay";
+		};
+	};
+
 	/* eMMC */
 	sdhci at 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";
+	};
 };
-- 
2.5.5

Re: [PATCH v4 0/3] ASoC/ARM: tegra: apalis t30/tk1/colibri t30: sgtl5000 audio

From: Marcel Ziswiler <hidden>
Date: 2016-08-16 15:28:37

On Sun, 2016-06-19 at 02:59 +0200, Marcel Ziswiler wrote:
This series adds/integrates Freescale SGTL5000 analogue audio codec
support.

Changes in v4:
- simple-audio-card does still not allow for more advanced use cases
? like Tegra SoCs
- further platform drivers have been accepted since my last attempt
? (e.g. rt5677 one)
- relevance for one further board the new Toradex Apalis TK1
- drop unused sound/jack.h include
- in tegra_sgtl5000_driver_remove() pass return value of
? snd_soc_unregister_card() on to caller
- no longer set owner property in platform_driver to THIS_MODULE
- re-based/resend

Changes in v3:
- revert to not using simple-audio-card being incompatible with tegra
- rebased to for-next

Changes in v2:
- using simple-audio-card as suggested by Fabio

Marcel Ziswiler (3):
? ASoC: tegra: add tegra sgtl5000 machine driver
? ARM: tegra: apalis/colibri t30: integrate audio
? ARM: tegra: enable sgtl5000 audio

?.../bindings/sound/nvidia,tegra-audio-sgtl5000.txt |??42 ++++
?arch/arm/boot/dts/tegra30-apalis.dtsi??????????????|??49 +++++
?arch/arm/boot/dts/tegra30-colibri.dtsi?????????????|??49 +++++
?arch/arm/configs/tegra_defconfig???????????????????|???1 +
?sound/soc/tegra/Kconfig????????????????????????????|??11 ++
?sound/soc/tegra/Makefile???????????????????????????|???2 +
?sound/soc/tegra/tegra_sgtl5000.c???????????????????| 212
+++++++++++++++++++++
?7 files changed, 366 insertions(+)
?create mode 100644
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-
sgtl5000.txt
?create mode 100644 sound/soc/tegra/tegra_sgtl5000.c
With Mark finally having pulled the first patch of this series (https:/
/lkml.org/lkml/2016/8/15/297) I'm wondering whether the second and
third patch are now being pulled via tegra tree? Or should I rather re-
submit those as a new v5 patch set?

Re: [PATCH v4 0/3] ASoC/ARM: tegra: apalis t30/tk1/colibri t30: sgtl5000 audio

From: Thierry Reding <hidden>
Date: 2016-11-07 13:43:17

On Tue, Aug 16, 2016 at 01:55:28PM +0000, Marcel Ziswiler wrote:
On Sun, 2016-06-19 at 02:59 +0200, Marcel Ziswiler wrote:
quoted
This series adds/integrates Freescale SGTL5000 analogue audio codec
support.

Changes in v4:
- simple-audio-card does still not allow for more advanced use cases
? like Tegra SoCs
- further platform drivers have been accepted since my last attempt
? (e.g. rt5677 one)
- relevance for one further board the new Toradex Apalis TK1
- drop unused sound/jack.h include
- in tegra_sgtl5000_driver_remove() pass return value of
? snd_soc_unregister_card() on to caller
- no longer set owner property in platform_driver to THIS_MODULE
- re-based/resend

Changes in v3:
- revert to not using simple-audio-card being incompatible with tegra
- rebased to for-next

Changes in v2:
- using simple-audio-card as suggested by Fabio

Marcel Ziswiler (3):
? ASoC: tegra: add tegra sgtl5000 machine driver
? ARM: tegra: apalis/colibri t30: integrate audio
? ARM: tegra: enable sgtl5000 audio

?.../bindings/sound/nvidia,tegra-audio-sgtl5000.txt |??42 ++++
?arch/arm/boot/dts/tegra30-apalis.dtsi??????????????|??49 +++++
?arch/arm/boot/dts/tegra30-colibri.dtsi?????????????|??49 +++++
?arch/arm/configs/tegra_defconfig???????????????????|???1 +
?sound/soc/tegra/Kconfig????????????????????????????|??11 ++
?sound/soc/tegra/Makefile???????????????????????????|???2 +
?sound/soc/tegra/tegra_sgtl5000.c???????????????????| 212
+++++++++++++++++++++
?7 files changed, 366 insertions(+)
?create mode 100644
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-
sgtl5000.txt
?create mode 100644 sound/soc/tegra/tegra_sgtl5000.c
With Mark finally having pulled the first patch of this series (https:/
/lkml.org/lkml/2016/8/15/297) I'm wondering whether the second and
third patch are now being pulled via tegra tree? Or should I rather re-
submit those as a new v5 patch set?
Both patches applied now, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161107/2eb5a3a1/attachment-0001.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help