devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: dts: meson: u200 audio clean up
@ 2023-09-11 15:45 Jerome Brunet
  2023-09-11 15:45 ` [PATCH 1/5] arm64: dts: meson: u200: fix spdif output pin Jerome Brunet
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 15:45 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley
  Cc: Jerome Brunet, Christian Hewitt, devicetree, linux-kernel,
	linux-amlogic

This patchset fixes the recently merged audio support for u200 and adds the
missing onboard audio devices

Jerome Brunet (5):
  arm64: dts: meson: u200: fix spdif output pin
  arm64: dts: meson: u200: add missing audio clock controller
  arm64: dts: meson: u200: add spdifout b routes
  arm64: dts: meson: u200: use TDM C for HDMI
  arm64: dts: meson: u200: add onboard devices

 .../boot/dts/amlogic/meson-g12a-u200.dts      | 237 +++++++++++++++++-
 1 file changed, 226 insertions(+), 11 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/5] arm64: dts: meson: u200: fix spdif output pin
  2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
@ 2023-09-11 15:45 ` Jerome Brunet
  2023-09-11 15:45 ` [PATCH 2/5] arm64: dts: meson: u200: add missing audio clock controller Jerome Brunet
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 15:45 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley
  Cc: Jerome Brunet, Christian Hewitt, devicetree, linux-kernel,
	linux-amlogic

u200 outputs spdif on GPIOAO_10, not GPIOH_4 which is used for the LCD
panel.

Fixes: cfae4eadb7cd ("arm64: dts: meson: add audio playback to u200")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index 2878e3ad7de2..8fa17a62534c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -396,7 +396,7 @@ &sd_emmc_c {
 };
 
 &spdifout {
-	pinctrl-0 = <&spdif_out_h_pins>;
+	pinctrl-0 = <&spdif_ao_out_pins>;
 	pinctrl-names = "default";
 	status = "okay";
 };
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] arm64: dts: meson: u200: add missing audio clock controller
  2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
  2023-09-11 15:45 ` [PATCH 1/5] arm64: dts: meson: u200: fix spdif output pin Jerome Brunet
@ 2023-09-11 15:45 ` Jerome Brunet
  2023-09-11 15:45 ` [PATCH 3/5] arm64: dts: meson: u200: add spdifout b routes Jerome Brunet
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 15:45 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley
  Cc: Jerome Brunet, Christian Hewitt, devicetree, linux-kernel,
	linux-amlogic

The audio subsystem will not work if the audio clock controller is not
enabled.

Fixes: cfae4eadb7cd ("arm64: dts: meson: add audio playback to u200")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index 8fa17a62534c..2380d237d220 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -286,6 +286,10 @@ &cpu3 {
 	clock-latency = <50000>;
 };
 
+&clkc_audio {
+	status = "okay";
+};
+
 &cvbs_vdac_port {
 	cvbs_vdac_out: endpoint {
 		remote-endpoint = <&cvbs_connector_in>;
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] arm64: dts: meson: u200: add spdifout b routes
  2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
  2023-09-11 15:45 ` [PATCH 1/5] arm64: dts: meson: u200: fix spdif output pin Jerome Brunet
  2023-09-11 15:45 ` [PATCH 2/5] arm64: dts: meson: u200: add missing audio clock controller Jerome Brunet
@ 2023-09-11 15:45 ` Jerome Brunet
  2023-09-11 15:45 ` [PATCH 4/5] arm64: dts: meson: u200: use TDM C for HDMI Jerome Brunet
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 15:45 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley
  Cc: Jerome Brunet, Christian Hewitt, devicetree, linux-kernel,
	linux-amlogic

spdifout B remains untested as it can only feed the HDMI controller, which
does not support spdif ATM.

Still if the u200 has spdifout b, the routes to it should be set.

Fixes: cfae4eadb7cd ("arm64: dts: meson: add audio playback to u200")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index 2380d237d220..921b62c5ab33 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -166,7 +166,10 @@ sound {
 				"TDM_B Playback", "TDMOUT_B OUT",
 				"SPDIFOUT IN 0", "FRDDR_A OUT 3",
 				"SPDIFOUT IN 1", "FRDDR_B OUT 3",
-				"SPDIFOUT IN 2", "FRDDR_C OUT 3";
+				"SPDIFOUT IN 2", "FRDDR_C OUT 3",
+				"SPDIFOUT_B IN 0", "FRDDR_A OUT 4",
+				"SPDIFOUT_B IN 1", "FRDDR_B OUT 4",
+				"SPDIFOUT_B IN 2", "FRDDR_C OUT 4";
 
 		assigned-clocks = <&clkc CLKID_MPLL2>,
 				  <&clkc CLKID_MPLL0>,
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] arm64: dts: meson: u200: use TDM C for HDMI
  2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
                   ` (2 preceding siblings ...)
  2023-09-11 15:45 ` [PATCH 3/5] arm64: dts: meson: u200: add spdifout b routes Jerome Brunet
@ 2023-09-11 15:45 ` Jerome Brunet
  2023-09-11 15:45 ` [PATCH 5/5] arm64: dts: meson: u200: add onboard devices Jerome Brunet
  2023-09-11 15:53 ` [PATCH 0/5] arm64: dts: meson: u200 audio clean up Neil Armstrong
  5 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 15:45 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley
  Cc: Jerome Brunet, Christian Hewitt, devicetree, linux-kernel,
	linux-amlogic

On the u200, TDM B is wired to the onboard AD82584F i2c speaker codec.
This makes TDM B a poor choice for the interface dedicated to HDMI which
uses 4 i2s lanes.

TDM A is not a good choice either as it is connected to the SDIO wifi/bt
chip.

TDM C is not used externally by default, which makes it a better choice for
the HDMI interface.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index 921b62c5ab33..da66e2e1dffb 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -159,10 +159,10 @@ vddcpu: regulator-vddcpu {
 	sound {
 		compatible = "amlogic,axg-sound-card";
 		model = "U200";
-		audio-aux-devs = <&tdmout_b>;
-		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
-				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
-				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
+		audio-aux-devs = <&tdmout_c>;
+		audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+				"TDMOUT_C IN 1", "FRDDR_B OUT 2",
+				"TDMOUT_C IN 2", "FRDDR_C OUT 2",
 				"TDM_B Playback", "TDMOUT_B OUT",
 				"SPDIFOUT IN 0", "FRDDR_A OUT 3",
 				"SPDIFOUT IN 1", "FRDDR_B OUT 3",
@@ -193,7 +193,7 @@ dai-link-2 {
 
 		/* 8ch hdmi interface */
 		dai-link-3 {
-			sound-dai = <&tdmif_b>;
+			sound-dai = <&tdmif_c>;
 			dai-format = "i2s";
 			dai-tdm-slot-tx-mask-0 = <1 1>;
 			dai-tdm-slot-tx-mask-1 = <1 1>;
@@ -202,7 +202,7 @@ dai-link-3 {
 			mclk-fs = <256>;
 
 			codec {
-				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
+				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
 			};
 		};
 
@@ -412,11 +412,11 @@ &spdifout_b {
 	status = "okay";
 };
 
-&tdmif_b {
+&tdmif_c {
 	status = "okay";
 };
 
-&tdmout_b {
+&tdmout_c {
 	status = "okay";
 };
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] arm64: dts: meson: u200: add onboard devices
  2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
                   ` (3 preceding siblings ...)
  2023-09-11 15:45 ` [PATCH 4/5] arm64: dts: meson: u200: use TDM C for HDMI Jerome Brunet
@ 2023-09-11 15:45 ` Jerome Brunet
  2023-09-11 15:56   ` Krzysztof Kozlowski
  2023-09-11 15:53 ` [PATCH 0/5] arm64: dts: meson: u200 audio clean up Neil Armstrong
  5 siblings, 1 reply; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 15:45 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley
  Cc: Jerome Brunet, Christian Hewitt, devicetree, linux-kernel,
	linux-amlogic

Add missing audio devices found on the u200 PCB. This includes
* Lineout connected to the internal DAC
* SPDIF input connected to a coaxial socket
* TDM input decoders allowing output loopback
* TDM A and B output encoders and interfaces

TDM A and B link format is set by the related external codec.
Internal audio DAC can hook to any TDM output.

This change does not include support necessary the optional the speaker and
PDM Mic headers

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-u200.dts      | 228 +++++++++++++++++-
 1 file changed, 218 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index da66e2e1dffb..9abe37b5b227 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -9,6 +9,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
 
 / {
 	compatible = "amlogic,u200", "amlogic,g12a";
@@ -19,6 +20,22 @@ aliases {
 		ethernet0 = &ethmac;
 	};
 
+	dioo2133: audio-amplifier-0 {
+		#sound-dai-cells = <0>;
+		compatible = "simple-audio-amplifier";
+		status = "okay";
+		enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+		VCC-supply = <&vcc_5v>;
+		sound-name-prefix = "10U2";
+	};
+
+	spdif_dir: audio-codec-0 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dir";
+		status = "okay";
+		sound-name-prefix = "DIR";
+	};
+
 	spdif_dit: audio-codec-1 {
 		#sound-dai-cells = <0>;
 		compatible = "linux,spdif-dit";
@@ -159,17 +176,71 @@ vddcpu: regulator-vddcpu {
 	sound {
 		compatible = "amlogic,axg-sound-card";
 		model = "U200";
-		audio-aux-devs = <&tdmout_c>;
-		audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+		audio-widgets = "Line", "Lineout";
+		audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmout_c>,
+				 <&tdmin_a>, <&tdmin_b>, <&tdmin_c>,
+				 <&tdmin_lb>, <&dioo2133>;
+		audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
+				"TDMOUT_A IN 1", "FRDDR_B OUT 0",
+				"TDMOUT_A IN 2", "FRDDR_C OUT 0",
+				"TDM_A Playback", "TDMOUT_A OUT",
+				"TDMOUT_B IN 0", "FRDDR_A OUT 1",
+				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
+				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
+				"TDM_B Playback", "TDMOUT_B OUT",
+				"TDMOUT_C IN 0", "FRDDR_A OUT 2",
 				"TDMOUT_C IN 1", "FRDDR_B OUT 2",
 				"TDMOUT_C IN 2", "FRDDR_C OUT 2",
-				"TDM_B Playback", "TDMOUT_B OUT",
+				"TDM_C Playback", "TDMOUT_C OUT",
 				"SPDIFOUT IN 0", "FRDDR_A OUT 3",
 				"SPDIFOUT IN 1", "FRDDR_B OUT 3",
 				"SPDIFOUT IN 2", "FRDDR_C OUT 3",
 				"SPDIFOUT_B IN 0", "FRDDR_A OUT 4",
 				"SPDIFOUT_B IN 1", "FRDDR_B OUT 4",
-				"SPDIFOUT_B IN 2", "FRDDR_C OUT 4";
+				"SPDIFOUT_B IN 2", "FRDDR_C OUT 4",
+				"TDMIN_A IN 0", "TDM_A Capture",
+				"TDMIN_A IN 1", "TDM_B Capture",
+				"TDMIN_A IN 2", "TDM_C Capture",
+				"TDMIN_A IN 3", "TDM_A Loopback",
+				"TDMIN_A IN 4", "TDM_B Loopback",
+				"TDMIN_A IN 5", "TDM_C Loopback",
+				"TDMIN_B IN 0", "TDM_A Capture",
+				"TDMIN_B IN 1", "TDM_B Capture",
+				"TDMIN_B IN 2", "TDM_C Capture",
+				"TDMIN_B IN 3", "TDM_A Loopback",
+				"TDMIN_B IN 4", "TDM_B Loopback",
+				"TDMIN_B IN 5", "TDM_C Loopback",
+				"TDMIN_C IN 0", "TDM_A Capture",
+				"TDMIN_C IN 1", "TDM_B Capture",
+				"TDMIN_C IN 2", "TDM_C Capture",
+				"TDMIN_C IN 3", "TDM_A Loopback",
+				"TDMIN_C IN 4", "TDM_B Loopback",
+				"TDMIN_C IN 5", "TDM_C Loopback",
+				"TDMIN_LB IN 3", "TDM_A Capture",
+				"TDMIN_LB IN 4", "TDM_B Capture",
+				"TDMIN_LB IN 5", "TDM_C Capture",
+				"TDMIN_LB IN 0", "TDM_A Loopback",
+				"TDMIN_LB IN 1", "TDM_B Loopback",
+				"TDMIN_LB IN 2", "TDM_C Loopback",
+				"TODDR_A IN 0", "TDMIN_A OUT",
+				"TODDR_B IN 0", "TDMIN_A OUT",
+				"TODDR_C IN 0", "TDMIN_A OUT",
+				"TODDR_A IN 1", "TDMIN_B OUT",
+				"TODDR_B IN 1", "TDMIN_B OUT",
+				"TODDR_C IN 1", "TDMIN_B OUT",
+				"TODDR_A IN 2", "TDMIN_C OUT",
+				"TODDR_B IN 2", "TDMIN_C OUT",
+				"TODDR_C IN 2", "TDMIN_C OUT",
+				"TODDR_A IN 3", "SPDIFIN Capture",
+				"TODDR_B IN 3", "SPDIFIN Capture",
+				"TODDR_C IN 3", "SPDIFIN Capture",
+				"TODDR_A IN 6", "TDMIN_LB OUT",
+				"TODDR_B IN 6", "TDMIN_LB OUT",
+				"TODDR_C IN 6", "TDMIN_LB OUT",
+				"10U2 INL", "ACODEC LOLP",
+				"10U2 INR", "ACODEC LORP",
+				"Lineout", "10U2 OUTL",
+				"Lineout", "10U2 OUTR";
 
 		assigned-clocks = <&clkc CLKID_MPLL2>,
 				  <&clkc CLKID_MPLL0>,
@@ -191,8 +262,52 @@ dai-link-2 {
 			sound-dai = <&frddr_c>;
 		};
 
-		/* 8ch hdmi interface */
 		dai-link-3 {
+			sound-dai = <&toddr_a>;
+		};
+
+		dai-link-4 {
+			sound-dai = <&toddr_b>;
+		};
+
+		dai-link-5 {
+			sound-dai = <&toddr_c>;
+		};
+
+		/* Connected to the WIFI/BT chip */
+		dai-link-6 {
+			sound-dai = <&tdmif_a>;
+			dai-format = "dsp_a";
+			dai-tdm-slot-tx-mask-0 = <1 1>;
+			mclk-fs = <256>;
+
+			codec-0 {
+				sound-dai = <&toacodec TOACODEC_IN_A>;
+			};
+
+			codec-1 {
+				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
+			};
+		};
+
+		/* Connected to the onboard AD82584F DAC */
+		dai-link-7 {
+			sound-dai = <&tdmif_b>;
+			dai-format = "i2s";
+			dai-tdm-slot-tx-mask-0 = <1 1>;
+			mclk-fs = <256>;
+
+			codec-0 {
+				sound-dai = <&toacodec TOACODEC_IN_B>;
+			};
+
+			codec-1 {
+				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
+			};
+		};
+
+		/* 8ch HDMI interface */
+		dai-link-8 {
 			sound-dai = <&tdmif_c>;
 			dai-format = "i2s";
 			dai-tdm-slot-tx-mask-0 = <1 1>;
@@ -201,13 +316,17 @@ dai-link-3 {
 			dai-tdm-slot-tx-mask-3 = <1 1>;
 			mclk-fs = <256>;
 
-			codec {
+			codec-0 {
+				sound-dai = <&toacodec TOACODEC_IN_C>;
+			};
+
+			codec-1 {
 				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
 			};
 		};
 
-		/* spdif hdmi or toslink interface */
-		dai-link-4 {
+		/* spdif hdmi and coax output */
+		dai-link-9 {
 			sound-dai = <&spdifout>;
 
 			codec-0 {
@@ -220,7 +339,7 @@ codec-1 {
 		};
 
 		/* spdif hdmi interface */
-		dai-link-5 {
+		dai-link-10 {
 			sound-dai = <&spdifout_b>;
 
 			codec {
@@ -229,16 +348,38 @@ codec {
 		};
 
 		/* hdmi glue */
-		dai-link-6 {
+		dai-link-11 {
 			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
 
 			codec {
 				sound-dai = <&hdmi_tx>;
 			};
 		};
+
+		/* internal codec glue */
+		dai-link-12 {
+			sound-dai = <&toacodec TOACODEC_OUT>;
+
+			codec {
+				sound-dai = <&acodec>;
+			};
+		};
+
+		/* spdif coax input */
+		dai-link-13 {
+			sound-dai = <&spdifin>;
+
+			codec {
+				sound-dai = <&spdif_dir>;
+			};
+		};
 	};
 };
 
+&acodec {
+	status = "okay";
+};
+
 &arb {
 	status = "okay";
 };
@@ -402,6 +543,12 @@ &sd_emmc_c {
 	vqmmc-supply = <&flash_1v8>;
 };
 
+&spdifin {
+	pinctrl-0 = <&spdif_in_h_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &spdifout {
 	pinctrl-0 = <&spdif_ao_out_pins>;
 	pinctrl-names = "default";
@@ -412,14 +559,75 @@ &spdifout_b {
 	status = "okay";
 };
 
+&tdmif_a {
+	pinctrl-0 = <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>, <&tdm_a_dout0_pins> ;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&tdmif_b {
+	pinctrl-0 = <&mclk0_a_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>,
+		    <&tdm_b_dout0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	assigned-clocks = <&clkc_audio AUD_CLKID_TDM_MCLK_PAD0>,
+			  <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
+			  <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
+	assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+				 <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+				 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+	assigned-clock-rates = <0>, <0>, <0>;
+};
+
 &tdmif_c {
 	status = "okay";
 };
 
+&tdmin_a {
+	status = "okay";
+};
+
+&tdmin_b {
+	status = "okay";
+};
+
+&tdmin_c {
+	status = "okay";
+};
+
+&tdmin_lb {
+	status = "okay";
+};
+
+&tdmout_a {
+	status = "okay";
+};
+
+&tdmout_b {
+	status = "okay";
+};
+
 &tdmout_c {
 	status = "okay";
 };
 
+&toacodec {
+	status = "okay";
+};
+
+&toddr_a {
+	status = "okay";
+};
+
+&toddr_b {
+	status = "okay";
+};
+
+&toddr_c {
+	status = "okay";
+};
+
 &tohdmitx {
 	status = "okay";
 };
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/5] arm64: dts: meson: u200 audio clean up
  2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
                   ` (4 preceding siblings ...)
  2023-09-11 15:45 ` [PATCH 5/5] arm64: dts: meson: u200: add onboard devices Jerome Brunet
@ 2023-09-11 15:53 ` Neil Armstrong
  5 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2023-09-11 15:53 UTC (permalink / raw)
  To: Kevin Hilman, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
	Jerome Brunet
  Cc: devicetree, linux-amlogic, linux-kernel

Hi,

On Mon, 11 Sep 2023 17:45:36 +0200, Jerome Brunet wrote:
> This patchset fixes the recently merged audio support for u200 and adds the
> missing onboard audio devices
> 
> Jerome Brunet (5):
>   arm64: dts: meson: u200: fix spdif output pin
>   arm64: dts: meson: u200: add missing audio clock controller
>   arm64: dts: meson: u200: add spdifout b routes
>   arm64: dts: meson: u200: use TDM C for HDMI
>   arm64: dts: meson: u200: add onboard devices
> 
> [...]

Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.7/arm64-dt)

[1/5] arm64: dts: meson: u200: fix spdif output pin
      https://git.kernel.org/amlogic/c/66561cb158d0a25054bbcf423d59dd782311f60d
[2/5] arm64: dts: meson: u200: add missing audio clock controller
      https://git.kernel.org/amlogic/c/f9dc2d96e1bfb33635df7edf0a1b8572bbb20954
[3/5] arm64: dts: meson: u200: add spdifout b routes
      https://git.kernel.org/amlogic/c/4e47ea869289dab588c0152ec90d6eb5bf7f7169
[4/5] arm64: dts: meson: u200: use TDM C for HDMI
      https://git.kernel.org/amlogic/c/956236a24aec8364a3ee5d287e23c0c01cfb9c7c
[5/5] arm64: dts: meson: u200: add onboard devices
      https://git.kernel.org/amlogic/c/f1decbd5629bf0dbd3af3b2f803f72a27eb01c7f

These changes has been applied on the intermediate git tree [1].

The v6.7/arm64-dt branch will then be sent via a formal Pull Request to the Linux SoC maintainers
for inclusion in their intermediate git branches in order to be sent to Linus during
the next merge window, or sooner if it's a set of fixes.

In the cases of fixes, those will be merged in the current release candidate
kernel and as soon they appear on the Linux master branch they will be
backported to the previous Stable and Long-Stable kernels [2].

The intermediate git branches are merged daily in the linux-next tree [3],
people are encouraged testing these pre-release kernels and report issues on the
relevant mailing-lists.

If problems are discovered on those changes, please submit a signed-off-by revert
patch followed by a corrective changeset.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

-- 
Neil


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] arm64: dts: meson: u200: add onboard devices
  2023-09-11 15:45 ` [PATCH 5/5] arm64: dts: meson: u200: add onboard devices Jerome Brunet
@ 2023-09-11 15:56   ` Krzysztof Kozlowski
  2023-09-11 16:01     ` Neil Armstrong
  2023-09-11 16:52     ` Jerome Brunet
  0 siblings, 2 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-11 15:56 UTC (permalink / raw)
  To: Jerome Brunet, Neil Armstrong, Kevin Hilman, Krzysztof Kozlowski,
	Rob Herring, Conor Dooley
  Cc: Christian Hewitt, devicetree, linux-kernel, linux-amlogic

On 11/09/2023 17:45, Jerome Brunet wrote:
> Add missing audio devices found on the u200 PCB. This includes
> * Lineout connected to the internal DAC
> * SPDIF input connected to a coaxial socket
> * TDM input decoders allowing output loopback
> * TDM A and B output encoders and interfaces
> 
> TDM A and B link format is set by the related external codec.
> Internal audio DAC can hook to any TDM output.
> 
> This change does not include support necessary the optional the speaker and
> PDM Mic headers
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  .../boot/dts/amlogic/meson-g12a-u200.dts      | 228 +++++++++++++++++-
>  1 file changed, 218 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> index da66e2e1dffb..9abe37b5b227 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> @@ -9,6 +9,7 @@
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/gpio/meson-g12a-gpio.h>
>  #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
> +#include <dt-bindings/sound/meson-g12a-toacodec.h>
>  
>  / {
>  	compatible = "amlogic,u200", "amlogic,g12a";
> @@ -19,6 +20,22 @@ aliases {
>  		ethernet0 = &ethmac;
>  	};
>  
> +	dioo2133: audio-amplifier-0 {
> +		#sound-dai-cells = <0>;
> +		compatible = "simple-audio-amplifier";

compatible is by convention first property. Do you have different style
in Amlogic/Meson?

> +		status = "okay";

status is by default.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] arm64: dts: meson: u200: add onboard devices
  2023-09-11 15:56   ` Krzysztof Kozlowski
@ 2023-09-11 16:01     ` Neil Armstrong
  2023-09-11 16:52     ` Jerome Brunet
  1 sibling, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2023-09-11 16:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Jerome Brunet, Kevin Hilman,
	Krzysztof Kozlowski, Rob Herring, Conor Dooley
  Cc: Christian Hewitt, devicetree, linux-kernel, linux-amlogic

On 11/09/2023 17:56, Krzysztof Kozlowski wrote:
> On 11/09/2023 17:45, Jerome Brunet wrote:
>> Add missing audio devices found on the u200 PCB. This includes
>> * Lineout connected to the internal DAC
>> * SPDIF input connected to a coaxial socket
>> * TDM input decoders allowing output loopback
>> * TDM A and B output encoders and interfaces
>>
>> TDM A and B link format is set by the related external codec.
>> Internal audio DAC can hook to any TDM output.
>>
>> This change does not include support necessary the optional the speaker and
>> PDM Mic headers
>>
>> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
>> ---
>>   .../boot/dts/amlogic/meson-g12a-u200.dts      | 228 +++++++++++++++++-
>>   1 file changed, 218 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> index da66e2e1dffb..9abe37b5b227 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> @@ -9,6 +9,7 @@
>>   #include <dt-bindings/gpio/gpio.h>
>>   #include <dt-bindings/gpio/meson-g12a-gpio.h>
>>   #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
>> +#include <dt-bindings/sound/meson-g12a-toacodec.h>
>>   
>>   / {
>>   	compatible = "amlogic,u200", "amlogic,g12a";
>> @@ -19,6 +20,22 @@ aliases {
>>   		ethernet0 = &ethmac;
>>   	};
>>   
>> +	dioo2133: audio-amplifier-0 {
>> +		#sound-dai-cells = <0>;
>> +		compatible = "simple-audio-amplifier";
> 
> compatible is by convention first property. Do you have different style
> in Amlogic/Meson?

Not really, no specific style

> 
>> +		status = "okay";
> 
> status is by default.

I'll fix the patch on my tree.

Thanks,
Neil

> 
> 
> Best regards,
> Krzysztof
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] arm64: dts: meson: u200: add onboard devices
  2023-09-11 15:56   ` Krzysztof Kozlowski
  2023-09-11 16:01     ` Neil Armstrong
@ 2023-09-11 16:52     ` Jerome Brunet
  1 sibling, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2023-09-11 16:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Krzysztof Kozlowski, Rob Herring, Conor Dooley
  Cc: Christian Hewitt, devicetree, linux-kernel, linux-amlogic


On Mon 11 Sep 2023 at 17:56, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 11/09/2023 17:45, Jerome Brunet wrote:
>> Add missing audio devices found on the u200 PCB. This includes
>> * Lineout connected to the internal DAC
>> * SPDIF input connected to a coaxial socket
>> * TDM input decoders allowing output loopback
>> * TDM A and B output encoders and interfaces
>> 
>> TDM A and B link format is set by the related external codec.
>> Internal audio DAC can hook to any TDM output.
>> 
>> This change does not include support necessary the optional the speaker and
>> PDM Mic headers
>> 
>> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
>> ---
>>  .../boot/dts/amlogic/meson-g12a-u200.dts      | 228 +++++++++++++++++-
>>  1 file changed, 218 insertions(+), 10 deletions(-)
>> 
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> index da66e2e1dffb..9abe37b5b227 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> @@ -9,6 +9,7 @@
>>  #include <dt-bindings/gpio/gpio.h>
>>  #include <dt-bindings/gpio/meson-g12a-gpio.h>
>>  #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
>> +#include <dt-bindings/sound/meson-g12a-toacodec.h>
>>  
>>  / {
>>  	compatible = "amlogic,u200", "amlogic,g12a";
>> @@ -19,6 +20,22 @@ aliases {
>>  		ethernet0 = &ethmac;
>>  	};
>>  
>> +	dioo2133: audio-amplifier-0 {
>> +		#sound-dai-cells = <0>;
>> +		compatible = "simple-audio-amplifier";
>
> compatible is by convention first property. Do you have different style
> in Amlogic/Meson?
>
>> +		status = "okay";
>
> status is by default.
>

It look odd to me too but this was be consistent with the other codec
introduced by the change being fixed by this patchset.

>
> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-11 21:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 15:45 [PATCH 0/5] arm64: dts: meson: u200 audio clean up Jerome Brunet
2023-09-11 15:45 ` [PATCH 1/5] arm64: dts: meson: u200: fix spdif output pin Jerome Brunet
2023-09-11 15:45 ` [PATCH 2/5] arm64: dts: meson: u200: add missing audio clock controller Jerome Brunet
2023-09-11 15:45 ` [PATCH 3/5] arm64: dts: meson: u200: add spdifout b routes Jerome Brunet
2023-09-11 15:45 ` [PATCH 4/5] arm64: dts: meson: u200: use TDM C for HDMI Jerome Brunet
2023-09-11 15:45 ` [PATCH 5/5] arm64: dts: meson: u200: add onboard devices Jerome Brunet
2023-09-11 15:56   ` Krzysztof Kozlowski
2023-09-11 16:01     ` Neil Armstrong
2023-09-11 16:52     ` Jerome Brunet
2023-09-11 15:53 ` [PATCH 0/5] arm64: dts: meson: u200 audio clean up Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).