linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] arm64: dts: meson-axg: add audio support
@ 2018-07-24 12:52 Jerome Brunet
  2018-07-24 12:52 ` [PATCH 01/14] arm64: dts: meson-axg: improve power supplies description Jerome Brunet
                   ` (14 more replies)
  0 siblings, 15 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Philipp Zabel

The main purpose of this patchset is to add the audio devices on amlogic's
AXG SoCs.

Some codecs require some power supplies. This is why the 3 first patches
deal with the S400 power supplies, even if some are not related to audio.

In term of dependency, apart from the clock bindings you have already
pulled for your second PR to arm-soc, this patchset requires the ARB
reset bindings [0] for patch 5. I don't know if Philip can make it
available somewhere ?

Of course, if the dependencies make this patchset too complicated to
merge in this cycle, I'll resubmit once the next rc1 is out.

Jerome Brunet (14):
  arm64: dts: meson-axg: improve power supplies description
  arm64: dts: meson-axg: add vcc 5v regulator on the s400
  arm64: dts: meson-axg: add usb power regulator
  arm64: dts: meson-axg: add audio arb reset controller
  arm64: dts: meson-axg: add audio fifos
  arm64: dts: meson-axg: add spdifout
  arm64: dts: meson-axg: add tdmin formatters
  arm64: dts: meson-axg: add tdmout formatters
  arm64: dts: meson-axg: add tdm interfaces
  arm64: dts: meson-axg: add linein codec
  arm64: dts: meson-axg: add lineout codec
  arm64: dts: meson-axg: add spdif-dit codec
  arm64: dts: meson-axg: s400: enable audio devices
  arm64: dts: meson-axg: add s400 sound card

 .../arm64/boot/dts/amlogic/meson-axg-s400.dts | 237 ++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi    | 216 ++++++++++++++++
 2 files changed, 453 insertions(+)

-- 
2.17.1


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

* [PATCH 01/14] arm64: dts: meson-axg: improve power supplies description
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 02/14] arm64: dts: meson-axg: add vcc 5v regulator on the s400 Jerome Brunet
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the parent supply of the s400 power supplies.
Also add 'regulator-always-on' property on the regulators which can't
be disabled

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index fd90fa4a282c..09c7909a78ea 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -65,6 +65,7 @@
 		regulator-name = "12V";
 		regulator-min-microvolt = <12000000>;
 		regulator-max-microvolt = <12000000>;
+		regulator-always-on;
 	};
 
 	vddio_boot: regulator-vddio_boot {
@@ -72,6 +73,8 @@
 		regulator-name = "VDDIO_BOOT";
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
 	};
 
 	vddao_3v3: regulator-vddao_3v3 {
@@ -79,6 +82,8 @@
 		regulator-name = "VDDAO_3V3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		vin-supply = <&main_12v>;
+		regulator-always-on;
 	};
 
 	vddio_ao18: regulator-vddio_ao18 {
@@ -86,6 +91,8 @@
 		regulator-name = "VDDIO_AO18";
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
 	};
 
 	vcc_3v3: regulator-vcc_3v3 {
@@ -93,6 +100,8 @@
 		regulator-name = "VCC_3V3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
 	};
 
 	emmc_pwrseq: emmc-pwrseq {
-- 
2.17.1


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

* [PATCH 02/14] arm64: dts: meson-axg: add vcc 5v regulator on the s400
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
  2018-07-24 12:52 ` [PATCH 01/14] arm64: dts: meson-axg: improve power supplies description Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 03/14] arm64: dts: meson-axg: add usb power regulator Jerome Brunet
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

This regulator is controlled by a GPIO and supplies various devices
on the board, such as the lineout codec, the usb supply or the lcd
controller.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 09c7909a78ea..5937d8c3a6ed 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -104,6 +104,17 @@
 		regulator-always-on;
 	};
 
+	vcc_5v: regulator-vcc_5v {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&main_12v>;
+
+		gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	emmc_pwrseq: emmc-pwrseq {
 		compatible = "mmc-pwrseq-emmc";
 		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
-- 
2.17.1


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

* [PATCH 03/14] arm64: dts: meson-axg: add usb power regulator
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
  2018-07-24 12:52 ` [PATCH 01/14] arm64: dts: meson-axg: improve power supplies description Jerome Brunet
  2018-07-24 12:52 ` [PATCH 02/14] arm64: dts: meson-axg: add vcc 5v regulator on the s400 Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 04/14] arm64: dts: meson-axg: add audio arb reset controller Jerome Brunet
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

The usb power regulator is supplied by the vcc 5v regulator and
controlled by a GPIO. This will be needed to enable usb.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 5937d8c3a6ed..7489b88f27d7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -115,6 +115,17 @@
 		enable-active-high;
 	};
 
+	usb_pwr: regulator-usb_pwr {
+		compatible = "regulator-fixed";
+		regulator-name = "USB_PWR";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc_5v>;
+
+		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	emmc_pwrseq: emmc-pwrseq {
 		compatible = "mmc-pwrseq-emmc";
 		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
-- 
2.17.1


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

* [PATCH 04/14] arm64: dts: meson-axg: add audio arb reset controller
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (2 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 03/14] arm64: dts: meson-axg: add usb power regulator Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 05/14] arm64: dts: meson-axg: add audio fifos Jerome Brunet
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the audio memory arbiter which control the access of the audio
fifos to the DDR.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 6adc8d3dbf0a..3893c630d969 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -189,6 +189,13 @@
 
 				resets = <&reset RESET_AUDIO>;
 			};
+
+			arb: reset-controller@280 {
+				compatible = "amlogic,meson-axg-audio-arb";
+				reg = <0x0 0x280 0x0 0x4>;
+				#reset-cells = <1>;
+				clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
+			};
 		};
 
 		cbus: bus@ffd00000 {
-- 
2.17.1


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

* [PATCH 05/14] arm64: dts: meson-axg: add audio fifos
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (3 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 04/14] arm64: dts: meson-axg: add audio arb reset controller Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 06/14] arm64: dts: meson-axg: add spdifout Jerome Brunet
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Philipp Zabel

Add TODDR and FRDDR audio fifos of the AXG SoC.
These fifos are the capture and playback memory interfaces of audio
subsystem of the AXG.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---

 Kevin,

 As you will see below, this patch depends on the ARB reset bindings which
 have been accepted by Philip recently.

 Cheers
 Jerome

 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 3893c630d969..a20189844d92 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -11,6 +11,7 @@
 #include <dt-bindings/clock/axg-aoclkc.h>
 #include <dt-bindings/gpio/meson-axg-gpio.h>
 #include <dt-bindings/reset/amlogic,meson-axg-reset.h>
+#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
 
 / {
 	compatible = "amlogic,meson-axg";
@@ -190,6 +191,72 @@
 				resets = <&reset RESET_AUDIO>;
 			};
 
+			toddr_a: audio-controller@100 {
+				compatible = "amlogic,axg-toddr";
+				reg = <0x0 0x100 0x0 0x1c>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "TODDR_A";
+				interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
+				resets = <&arb AXG_ARB_TODDR_A>;
+				status = "disabled";
+			};
+
+			toddr_b: audio-controller@140 {
+				compatible = "amlogic,axg-toddr";
+				reg = <0x0 0x140 0x0 0x1c>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "TODDR_B";
+				interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
+				resets = <&arb AXG_ARB_TODDR_B>;
+				status = "disabled";
+			};
+
+			toddr_c: audio-controller@180 {
+				compatible = "amlogic,axg-toddr";
+				reg = <0x0 0x180 0x0 0x1c>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "TODDR_C";
+				interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
+				resets = <&arb AXG_ARB_TODDR_C>;
+				status = "disabled";
+			};
+
+			frddr_a: audio-controller@1c0 {
+				compatible = "amlogic,axg-frddr";
+				reg = <0x0 0x1c0 0x0 0x1c>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "FRDDR_A";
+				interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
+				resets = <&arb AXG_ARB_FRDDR_A>;
+				status = "disabled";
+			};
+
+			frddr_b: audio-controller@200 {
+				compatible = "amlogic,axg-frddr";
+				reg = <0x0 0x200 0x0 0x1c>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "FRDDR_B";
+				interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
+				resets = <&arb AXG_ARB_FRDDR_B>;
+				status = "disabled";
+			};
+
+			frddr_c: audio-controller@240 {
+				compatible = "amlogic,axg-frddr";
+				reg = <0x0 0x240 0x0 0x1c>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "FRDDR_C";
+				interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
+				resets = <&arb AXG_ARB_FRDDR_C>;
+				status = "disabled";
+			};
+
 			arb: reset-controller@280 {
 				compatible = "amlogic,meson-axg-audio-arb";
 				reg = <0x0 0x280 0x0 0x4>;
-- 
2.17.1


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

* [PATCH 06/14] arm64: dts: meson-axg: add spdifout
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (4 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 05/14] arm64: dts: meson-axg: add audio fifos Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 07/14] arm64: dts: meson-axg: add tdmin formatters Jerome Brunet
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the SPDIF output device of the axg audio subsystem

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index a20189844d92..c56016a48cc4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -263,6 +263,17 @@
 				#reset-cells = <1>;
 				clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
 			};
+
+			spdifout: audio-controller@480 {
+				compatible = "amlogic,axg-spdifout";
+				reg = <0x0 0x480 0x0 0x50>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "SPDIFOUT";
+				clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
+					 <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
+				clock-names = "pclk", "mclk";
+				status = "disabled";
+			};
 		};
 
 		cbus: bus@ffd00000 {
-- 
2.17.1


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

* [PATCH 07/14] arm64: dts: meson-axg: add tdmin formatters
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (5 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 06/14] arm64: dts: meson-axg: add spdifout Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 08/14] arm64: dts: meson-axg: add tdmout formatters Jerome Brunet
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the tdm devices responsible for decoding the data provided
through audio serial interface.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index c56016a48cc4..55e4ac734023 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -264,6 +264,62 @@
 				clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
 			};
 
+			tdmin_a: audio-controller@300 {
+				compatible = "amlogic,axg-tdmin";
+				reg = <0x0 0x300 0x0 0x40>;
+				sound-name-prefix = "TDMIN_A";
+				clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
+					 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
+
+			tdmin_b: audio-controller@340 {
+				compatible = "amlogic,axg-tdmin";
+				reg = <0x0 0x340 0x0 0x40>;
+				sound-name-prefix = "TDMIN_B";
+				clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
+					 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
+
+			tdmin_c: audio-controller@380 {
+				compatible = "amlogic,axg-tdmin";
+				reg = <0x0 0x380 0x0 0x40>;
+				sound-name-prefix = "TDMIN_C";
+				clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
+					 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
+
+			tdmin_lb: audio-controller@3c0 {
+				compatible = "amlogic,axg-tdmin";
+				reg = <0x0 0x3c0 0x0 0x40>;
+				sound-name-prefix = "TDMIN_LB";
+				clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
+					 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
+
 			spdifout: audio-controller@480 {
 				compatible = "amlogic,axg-spdifout";
 				reg = <0x0 0x480 0x0 0x50>;
-- 
2.17.1


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

* [PATCH 08/14] arm64: dts: meson-axg: add tdmout formatters
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (6 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 07/14] arm64: dts: meson-axg: add tdmin formatters Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 09/14] arm64: dts: meson-axg: add tdm interfaces Jerome Brunet
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the tdm devices responsible for serializing audio samples
for i2s/tdm interfaces

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 55e4ac734023..67b6d4ec980e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -330,6 +330,48 @@
 				clock-names = "pclk", "mclk";
 				status = "disabled";
 			};
+
+			tdmout_a: audio-controller@500 {
+				compatible = "amlogic,axg-tdmout";
+				reg = <0x0 0x500 0x0 0x40>;
+				sound-name-prefix = "TDMOUT_A";
+				clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
+
+			tdmout_b: audio-controller@540 {
+				compatible = "amlogic,axg-tdmout";
+				reg = <0x0 0x540 0x0 0x40>;
+				sound-name-prefix = "TDMOUT_B";
+				clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
+
+			tdmout_c: audio-controller@580 {
+				compatible = "amlogic,axg-tdmout";
+				reg = <0x0 0x580 0x0 0x40>;
+				sound-name-prefix = "TDMOUT_C";
+				clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
+					 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
+				clock-names = "pclk", "sclk", "sclk_sel",
+					      "lrclk", "lrclk_sel";
+				status = "disabled";
+			};
 		};
 
 		cbus: bus@ffd00000 {
-- 
2.17.1


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

* [PATCH 09/14] arm64: dts: meson-axg: add tdm interfaces
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (7 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 08/14] arm64: dts: meson-axg: add tdmout formatters Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 10/14] arm64: dts: meson-axg: add linein codec Jerome Brunet
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the devices reponsible for managing the i2s/tdm clocks and pads

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 67b6d4ec980e..32f6dcacc2bc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -93,6 +93,39 @@
 		method = "smc";
 	};
 
+	tdmif_a: audio-controller@0 {
+		compatible = "amlogic,axg-tdm-iface";
+		#sound-dai-cells = <0>;
+		sound-name-prefix = "TDM_A";
+		clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
+			 <&clkc_audio AUD_CLKID_MST_A_SCLK>,
+			 <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
+		clock-names = "mclk", "sclk", "lrclk";
+		status = "disabled";
+	};
+
+	tdmif_b: audio-controller@1 {
+		compatible = "amlogic,axg-tdm-iface";
+		#sound-dai-cells = <0>;
+		sound-name-prefix = "TDM_B";
+		clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+			 <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+			 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+		clock-names = "mclk", "sclk", "lrclk";
+		status = "disabled";
+	};
+
+	tdmif_c: audio-controller@2 {
+		compatible = "amlogic,axg-tdm-iface";
+		#sound-dai-cells = <0>;
+		sound-name-prefix = "TDM_C";
+		clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
+			 <&clkc_audio AUD_CLKID_MST_C_SCLK>,
+			 <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
+		clock-names = "mclk", "sclk", "lrclk";
+		status = "disabled";
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13
-- 
2.17.1


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

* [PATCH 10/14] arm64: dts: meson-axg: add linein codec
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (8 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 09/14] arm64: dts: meson-axg: add tdm interfaces Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-25 19:18   ` Martin Blumenstingl
  2018-07-24 12:52 ` [PATCH 11/14] arm64: dts: meson-axg: add lineout codec Jerome Brunet
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the es7241 analog to digital converter which is fed by the
lienin jack of the s400

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 7489b88f27d7..fb101a1c6660 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -178,6 +178,16 @@
 			gpios = <&gpio_speaker 2 0>;
 		};
 	};
+
+	linein: audio-codec@0 {
+		#sound-dai-cells = <0>;
+		compatible = "everest,es7241";
+		VDDA-supply = <&vcc_3v3>;
+		VDDP-supply = <&vcc_3v3>;
+		VDDD-supply = <&vcc_3v3>;
+		status = "okay";
+		sound-name-prefix = "Linein";
+	};
 };
 
 &ethmac {
-- 
2.17.1


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

* [PATCH 11/14] arm64: dts: meson-axg: add lineout codec
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (9 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 10/14] arm64: dts: meson-axg: add linein codec Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 12/14] arm64: dts: meson-axg: add spdif-dit codec Jerome Brunet
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the es7154 digital to analog converter which supplies the
lienout jack of the s400

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index fb101a1c6660..d318647c86a7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -188,6 +188,15 @@
 		status = "okay";
 		sound-name-prefix = "Linein";
 	};
+
+	lineout: audio-codec@1 {
+		#sound-dai-cells = <0>;
+		compatible = "everest,es7154";
+		VDD-supply = <&vcc_3v3>;
+		PVDD-supply = <&vcc_5v>;
+		status = "okay";
+		sound-name-prefix = "Lineout";
+	};
 };
 
 &ethmac {
-- 
2.17.1


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

* [PATCH 12/14] arm64: dts: meson-axg: add spdif-dit codec
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (10 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 11/14] arm64: dts: meson-axg: add lineout codec Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 13/14] arm64: dts: meson-axg: s400: enable audio devices Jerome Brunet
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the SPDIF playback codec to the axg s400 board

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index d318647c86a7..d5c01427a5ca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -197,6 +197,13 @@
 		status = "okay";
 		sound-name-prefix = "Lineout";
 	};
+
+	spdif_dit: audio-codec@2 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+		status = "okay";
+		sound-name-prefix = "DIT";
+	};
 };
 
 &ethmac {
-- 
2.17.1


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

* [PATCH 13/14] arm64: dts: meson-axg: s400: enable audio devices
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (11 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 12/14] arm64: dts: meson-axg: add spdif-dit codec Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-24 12:52 ` [PATCH 14/14] arm64: dts: meson-axg: add s400 sound card Jerome Brunet
  2018-07-25 19:11 ` [PATCH 00/14] arm64: dts: meson-axg: add audio support Martin Blumenstingl
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Enable the audio devices on the s400.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../arm64/boot/dts/amlogic/meson-axg-s400.dts | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index d5c01427a5ca..9f5d81c3ee29 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -226,6 +226,18 @@
 	};
 };
 
+&frddr_a {
+	status = "okay";
+};
+
+&frddr_b {
+	status = "okay";
+};
+
+&frddr_c {
+	status = "okay";
+};
+
 &uart_A {
 	status = "okay";
 	pinctrl-0 = <&uart_a_pins>;
@@ -334,3 +346,63 @@
 	status = "okay";
 	vref-supply = <&vddio_ao18>;
 };
+
+&spdifout {
+	pinctrl-0 = <&spdif_out_a20_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&tdmin_a {
+	status = "okay";
+};
+
+&tdmin_b {
+	status = "okay";
+};
+
+&tdmin_c {
+	status = "okay";
+};
+
+&tdmin_lb {
+	status = "okay";
+};
+
+&tdmout_c {
+	status = "okay";
+};
+
+&tdmif_a {
+	pinctrl-0 = <&tdma_sclk_pins>, <&tdma_fs_pins>,
+		    <&tdma_din0_pins>, <&tdma_dout0_x15_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&tdmif_b {
+	pinctrl-0 = <&tdmb_sclk_pins>, <&tdmb_fs_pins>,
+		    <&tdmb_din3_pins>, <&mclk_b_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&tdmif_c {
+	pinctrl-0 = <&tdmc_sclk_pins>, <&tdmc_fs_pins>,
+		    <&tdmc_din1_pins>, <&tdmc_dout2_pins>,
+		    <&mclk_c_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&toddr_a {
+	status = "okay";
+};
+
+&toddr_b {
+	status = "okay";
+};
+
+&toddr_c {
+	status = "okay";
+};
-- 
2.17.1


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

* [PATCH 14/14] arm64: dts: meson-axg: add s400 sound card
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (12 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 13/14] arm64: dts: meson-axg: s400: enable audio devices Jerome Brunet
@ 2018-07-24 12:52 ` Jerome Brunet
  2018-07-25 19:11 ` [PATCH 00/14] arm64: dts: meson-axg: add audio support Martin Blumenstingl
  14 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2018-07-24 12:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Add the sound card of the s400. With it the following interface
should be working:
 * Lineout
 * Daugther card speaker 1 (same output as lineout)
 * Linein
 * SPDIF output

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---

 Compared to what is actually available on the platform, the following
 is not provided ATM:
 * SPDIF input: WIP.
 * PDM DMICs: WIP.
 * TDM A - BT Codec: missing BT codec.
 * TDM B - Speaker analog loopback: missing tlv320adc codec.

 .../arm64/boot/dts/amlogic/meson-axg-s400.dts | 108 ++++++++++++++++++
 1 file changed, 108 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 9f5d81c3ee29..1b89c2cc5414 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -204,6 +204,113 @@
 		status = "okay";
 		sound-name-prefix = "DIT";
 	};
+
+	sound {
+		compatible = "amlogic,axg-sound-card";
+		amlogic,name = "AXG-S400";
+		amlogic,aux-devs = <&tdmin_a>, <&tdmin_b>,  <&tdmin_c>,
+				   <&tdmin_lb>, <&tdmout_c>;
+		amlogic,widgets = "Line", "Lineout",
+				  "Line", "Linein",
+				  "Speaker", "Speaker1 Left",
+				  "Speaker", "Speaker1 Right";
+		amlogic,routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+				  "SPDIFOUT IN 0", "FRDDR_A OUT 3",
+				  "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+				  "SPDIFOUT IN 1", "FRDDR_B OUT 3",
+				  "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+				  "SPDIFOUT IN 2", "FRDDR_C OUT 3",
+				  "TDM_C Playback", "TDMOUT_C OUT",
+				  "TDMIN_A IN 2", "TDM_C Capture",
+				  "TDMIN_A IN 5", "TDM_C Loopback",
+				  "TDMIN_B IN 2", "TDM_C Capture",
+				  "TDMIN_B IN 5", "TDM_C Loopback",
+				  "TDMIN_C IN 2", "TDM_C Capture",
+				  "TDMIN_C IN 5", "TDM_C Loopback",
+				  "TDMIN_LB IN 2", "TDM_C Loopback",
+				  "TDMIN_LB IN 5", "TDM_C Capture",
+				  "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 6", "TDMIN_LB OUT",
+				  "TODDR_B IN 6", "TDMIN_LB OUT",
+				  "TODDR_C IN 6", "TDMIN_LB OUT",
+				  "Lineout", "Lineout AOUTL",
+				  "Lineout", "Lineout AOUTR",
+				  "Speaker1 Left", "SPK1 OUT_A",
+				  "Speaker1 Left", "SPK1 OUT_B",
+				  "Speaker1 Right", "SPK1 OUT_C",
+				  "Speaker1 Right", "SPK1 OUT_D",
+				  "Linein AINL", "Linein",
+				  "Linein AINR", "Linein";
+		assigned-clocks = <&clkc CLKID_HIFI_PLL>,
+				  <&clkc CLKID_MPLL0>,
+				  <&clkc CLKID_MPLL1>;
+		assigned-clock-parents = <0>, <0>, <0>;
+		assigned-clock-rates = <589824000>,
+				       <270950400>,
+				       <393216000>;
+		status = "okay";
+
+		amlogic,dai-link@0 {
+			sound-dai = <&frddr_a>;
+		};
+
+		amlogic,dai-link@1 {
+			sound-dai = <&frddr_b>;
+		};
+
+		amlogic,dai-link@2 {
+			sound-dai = <&frddr_c>;
+		};
+
+		amlogic,dai-link@3 {
+			sound-dai = <&toddr_a>;
+		};
+
+		amlogic,dai-link@4 {
+			sound-dai = <&toddr_b>;
+		};
+
+		amlogic,dai-link@5 {
+			sound-dai = <&toddr_c>;
+		};
+
+		amlogic,dai-link@6 {
+			sound-dai = <&tdmif_c>;
+			dai-format = "i2s";
+			dai-tdm-slot-tx-mask-2 = <1 1>;
+			dai-tdm-slot-rx-mask-1 = <1 1>;
+			mclk-fs = <256>;
+
+			codec@0 {
+				sound-dai = <&lineout>;
+			};
+
+			codec@1 {
+				sound-dai = <&speaker_amp1>;
+			};
+
+			codec@2 {
+				sound-dai = <&linein>;
+			};
+
+		};
+
+		amlogic,dai-link@7 {
+			sound-dai = <&spdifout>;
+
+			codec {
+				sound-dai = <&spdif_dit>;
+			};
+		};
+	};
 };
 
 &ethmac {
@@ -272,6 +379,7 @@
 		PVDD_B-supply = <&main_12v>;
 		PVDD_C-supply = <&main_12v>;
 		PVDD_D-supply = <&main_12v>;
+		sound-name-prefix = "SPK1";
 	};
 };
 
-- 
2.17.1


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

* Re: [PATCH 00/14] arm64: dts: meson-axg: add audio support
  2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
                   ` (13 preceding siblings ...)
  2018-07-24 12:52 ` [PATCH 14/14] arm64: dts: meson-axg: add s400 sound card Jerome Brunet
@ 2018-07-25 19:11 ` Martin Blumenstingl
  2018-07-25 21:19   ` jbrunet
  14 siblings, 1 reply; 21+ messages in thread
From: Martin Blumenstingl @ 2018-07-25 19:11 UTC (permalink / raw)
  To: jbrunet
  Cc: khilman, carlo, devicetree, linux-kernel, p.zabel, linux-amlogic,
	linux-arm-kernel

Hi Jerome,

On Tue, Jul 24, 2018 at 2:53 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> The main purpose of this patchset is to add the audio devices on amlogic's
> AXG SoCs.
>
> Some codecs require some power supplies. This is why the 3 first patches
> deal with the S400 power supplies, even if some are not related to audio.
>
> In term of dependency, apart from the clock bindings you have already
> pulled for your second PR to arm-soc, this patchset requires the ARB
> reset bindings [0] for patch 5. I don't know if Philip can make it
> available somewhere ?
>
> Of course, if the dependencies make this patchset too complicated to
> merge in this cycle, I'll resubmit once the next rc1 is out.
>
> Jerome Brunet (14):
>   arm64: dts: meson-axg: improve power supplies description
>   arm64: dts: meson-axg: add vcc 5v regulator on the s400
>   arm64: dts: meson-axg: add usb power regulator
>   arm64: dts: meson-axg: add audio arb reset controller
>   arm64: dts: meson-axg: add audio fifos
>   arm64: dts: meson-axg: add spdifout
>   arm64: dts: meson-axg: add tdmin formatters
>   arm64: dts: meson-axg: add tdmout formatters
>   arm64: dts: meson-axg: add tdm interfaces
>   arm64: dts: meson-axg: add linein codec
>   arm64: dts: meson-axg: add lineout codec
>   arm64: dts: meson-axg: add spdif-dit codec
>   arm64: dts: meson-axg: s400: enable audio devices
>   arm64: dts: meson-axg: add s400 sound card
nit-pick: one patch uses "arm64: dts: meson-axg: s400" in the subject
while other patches that are touching the s400 board aren't
if you have to re-send this series: can you please use the "arm64:
dts: meson-axg: s400:" prefix for all patches touching the s400 board?


Thank you!
Regards
Martin

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

* Re: [PATCH 10/14] arm64: dts: meson-axg: add linein codec
  2018-07-24 12:52 ` [PATCH 10/14] arm64: dts: meson-axg: add linein codec Jerome Brunet
@ 2018-07-25 19:18   ` Martin Blumenstingl
  2018-07-25 22:07     ` jbrunet
  0 siblings, 1 reply; 21+ messages in thread
From: Martin Blumenstingl @ 2018-07-25 19:18 UTC (permalink / raw)
  To: jbrunet
  Cc: khilman, carlo, devicetree, linux-amlogic, linux-kernel,
	linux-arm-kernel

Hi Jerome,

On Tue, Jul 24, 2018 at 3:09 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Add the es7241 analog to digital converter which is fed by the
> lienin jack of the s400
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> index 7489b88f27d7..fb101a1c6660 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> @@ -178,6 +178,16 @@
>                         gpios = <&gpio_speaker 2 0>;
>                 };
>         };
> +
> +       linein: audio-codec@0 {
there is a unit-address but no reg property - I am wondering if this is allowed?
for the regulators we're using regulator-<unique-name> instead of
regulator@<unique number>

(this applies to other patches in this series as well)

> +               #sound-dai-cells = <0>;
> +               compatible = "everest,es7241";
> +               VDDA-supply = <&vcc_3v3>;
> +               VDDP-supply = <&vcc_3v3>;
> +               VDDD-supply = <&vcc_3v3>;
> +               status = "okay";
> +               sound-name-prefix = "Linein";
SPDIF output uses capital letters "SPDIFOUT"
I am not familiar with the sound subsystem (thus I'm not sure where
this shows up) so I am wondering if the naming should be consistent?


Regards
Martin

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

* Re: [PATCH 00/14] arm64: dts: meson-axg: add audio support
  2018-07-25 19:11 ` [PATCH 00/14] arm64: dts: meson-axg: add audio support Martin Blumenstingl
@ 2018-07-25 21:19   ` jbrunet
  2018-07-25 21:26     ` Martin Blumenstingl
  0 siblings, 1 reply; 21+ messages in thread
From: jbrunet @ 2018-07-25 21:19 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: khilman, carlo, devicetree, linux-kernel, p.zabel, linux-amlogic,
	linux-arm-kernel

On Wed, 2018-07-25 at 21:11 +0200, Martin Blumenstingl wrote:
> nit-pick: one patch uses "arm64: dts: meson-axg: s400" in the subject
> while other patches that are touching the s400 board aren't
> if you have to re-send this series: can you please use the "arm64:
> dts: meson-axg: s400:" prefix for all patches touching the s400 board?

hum, do we really have such rule, or do you think we should add one ?
Kevin, do you have opinion ?

Not that I really mind either way, but prefixes rules are usually there to help
maintainer filter the patches. Will such rule help in any way ?


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

* Re: [PATCH 00/14] arm64: dts: meson-axg: add audio support
  2018-07-25 21:19   ` jbrunet
@ 2018-07-25 21:26     ` Martin Blumenstingl
  2018-07-26 21:38       ` Kevin Hilman
  0 siblings, 1 reply; 21+ messages in thread
From: Martin Blumenstingl @ 2018-07-25 21:26 UTC (permalink / raw)
  To: jbrunet
  Cc: khilman, carlo, devicetree, linux-kernel, p.zabel, linux-amlogic,
	linux-arm-kernel

Hi Jerome,

On Wed, Jul 25, 2018 at 11:19 PM <jbrunet@baylibre.com> wrote:
>
> On Wed, 2018-07-25 at 21:11 +0200, Martin Blumenstingl wrote:
> > nit-pick: one patch uses "arm64: dts: meson-axg: s400" in the subject
> > while other patches that are touching the s400 board aren't
> > if you have to re-send this series: can you please use the "arm64:
> > dts: meson-axg: s400:" prefix for all patches touching the s400 board?
>
> hum, do we really have such rule, or do you think we should add one ?
looking at the git history in arch/arm64/boot/dts/amlogic: it seems
that we don't have a rule yet, even though some (some of
your's/Neil's/my) patches were using that naming schema in the past

> Kevin, do you have opinion ?
>
> Not that I really mind either way, but prefixes rules are usually there to help
> maintainer filter the patches. Will such rule help in any way ?
maybe it's just a problem of a false initial impression
I read "arm64: dts: meson-axg: add usb power regulator" in the
cover-letter and came to the conclusion that this patch must be wrong
since meson-axg.dtsi should not have any regulators (unless they're
built into the SoC). only when looking at the patch itself I realized
that it's fine because it patches the s400.dts


Regards
Martin

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

* Re: [PATCH 10/14] arm64: dts: meson-axg: add linein codec
  2018-07-25 19:18   ` Martin Blumenstingl
@ 2018-07-25 22:07     ` jbrunet
  0 siblings, 0 replies; 21+ messages in thread
From: jbrunet @ 2018-07-25 22:07 UTC (permalink / raw)
  To: Martin Blumenstingl, Rob Herring
  Cc: khilman, carlo, devicetree, linux-amlogic, linux-kernel,
	linux-arm-kernel

On Wed, 2018-07-25 at 21:18 +0200, Martin Blumenstingl wrote:
> Hi Jerome,
> 
> On Tue, Jul 24, 2018 at 3:09 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
> > 
> > Add the es7241 analog to digital converter which is fed by the
> > lienin jack of the s400
> > 
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> >  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > index 7489b88f27d7..fb101a1c6660 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > @@ -178,6 +178,16 @@
> >                         gpios = <&gpio_speaker 2 0>;
> >                 };
> >         };
> > +
> > +       linein: audio-codec@0 {
> 
> there is a unit-address but no reg property - I am wondering if this is allowed?
> for the regulators we're using regulator-<unique-name> instead of
> regulator@<unique number>
> 
> (this applies to other patches in this series as well)

I did that because I tried to keep node-name generic as described in the DT
spec. The idea of numbering the nodes (without a reg property) in such a way
came from :
Documentation/devicetree/bindings/sound/simple-card.txt:
=> look at the multi dai link example. I'm doing exactly the same on the axg
card's dai-links. Nothing new here.

that being said, section 2.2.1 of the DT specs says:

" If the node has no reg property, the @unit-address must be omitted and the
node-name alone differentiates the node from other nodes at the same level in
the tree "

So apparently, this is used but not ok ?
I could make 'linein' the node-name instead of the label but that wouldn't be
very generic.
We could also have dai-link-2 instead dai-link@2 (audio-codec-3 instead of 
audio-codec@3). I seems to be OK with the spec, but it also looks weird ...

Rob, do you have opinion on this ? 

> 
> > +               #sound-dai-cells = <0>;
> > +               compatible = "everest,es7241";
> > +               VDDA-supply = <&vcc_3v3>;
> > +               VDDP-supply = <&vcc_3v3>;
> > +               VDDD-supply = <&vcc_3v3>;
> > +               status = "okay";
> > +               sound-name-prefix = "Linein";
> 
> SPDIF output uses capital letters "SPDIFOUT"
> I am not familiar with the sound subsystem (thus I'm not sure where
> this shows up) so I am wondering if the naming should be consistent?

This string is used to prefix the name of the different widgets and controls
provided. It is useful when several devices provides component and control with
the same names. It happens when several instances of a component are used but
also with classic names, such as "Playback"

I don't think there is a rule regarding capitalization.
Some name are all capital in ASoC, some just have the first letter in upper
case. It doesn't change anything technically, and I personally don't care.

> 
> Regards
> Martin



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

* Re: [PATCH 00/14] arm64: dts: meson-axg: add audio support
  2018-07-25 21:26     ` Martin Blumenstingl
@ 2018-07-26 21:38       ` Kevin Hilman
  0 siblings, 0 replies; 21+ messages in thread
From: Kevin Hilman @ 2018-07-26 21:38 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: jbrunet, carlo, devicetree, linux-kernel, p.zabel, linux-amlogic,
	linux-arm-kernel

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Hi Jerome,
>
> On Wed, Jul 25, 2018 at 11:19 PM <jbrunet@baylibre.com> wrote:
>>
>> On Wed, 2018-07-25 at 21:11 +0200, Martin Blumenstingl wrote:
>> > nit-pick: one patch uses "arm64: dts: meson-axg: s400" in the subject
>> > while other patches that are touching the s400 board aren't
>> > if you have to re-send this series: can you please use the "arm64:
>> > dts: meson-axg: s400:" prefix for all patches touching the s400 board?
>>
>> hum, do we really have such rule, or do you think we should add one ?
> looking at the git history in arch/arm64/boot/dts/amlogic: it seems
> that we don't have a rule yet, even though some (some of
> your's/Neil's/my) patches were using that naming schema in the past
>
>> Kevin, do you have opinion ?
>>
>> Not that I really mind either way, but prefixes rules are usually there to help
>> maintainer filter the patches. Will such rule help in any way ?
> maybe it's just a problem of a false initial impression
> I read "arm64: dts: meson-axg: add usb power regulator" in the
> cover-letter and came to the conclusion that this patch must be wrong
> since meson-axg.dtsi should not have any regulators (unless they're
> built into the SoC). only when looking at the patch itself I realized
> that it's fine because it patches the s400.dts

I actually had the same first impression problem.  At first glance, it
looks like all the patches are AXG-generic, and only the 2 that mention
s400 apply to the board.

So, if this needs a respin, I'd prefer the board name where appropriate,
but it's not something I'm going to be picky about.

Kevin

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

end of thread, other threads:[~2018-07-26 21:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
2018-07-24 12:52 ` [PATCH 01/14] arm64: dts: meson-axg: improve power supplies description Jerome Brunet
2018-07-24 12:52 ` [PATCH 02/14] arm64: dts: meson-axg: add vcc 5v regulator on the s400 Jerome Brunet
2018-07-24 12:52 ` [PATCH 03/14] arm64: dts: meson-axg: add usb power regulator Jerome Brunet
2018-07-24 12:52 ` [PATCH 04/14] arm64: dts: meson-axg: add audio arb reset controller Jerome Brunet
2018-07-24 12:52 ` [PATCH 05/14] arm64: dts: meson-axg: add audio fifos Jerome Brunet
2018-07-24 12:52 ` [PATCH 06/14] arm64: dts: meson-axg: add spdifout Jerome Brunet
2018-07-24 12:52 ` [PATCH 07/14] arm64: dts: meson-axg: add tdmin formatters Jerome Brunet
2018-07-24 12:52 ` [PATCH 08/14] arm64: dts: meson-axg: add tdmout formatters Jerome Brunet
2018-07-24 12:52 ` [PATCH 09/14] arm64: dts: meson-axg: add tdm interfaces Jerome Brunet
2018-07-24 12:52 ` [PATCH 10/14] arm64: dts: meson-axg: add linein codec Jerome Brunet
2018-07-25 19:18   ` Martin Blumenstingl
2018-07-25 22:07     ` jbrunet
2018-07-24 12:52 ` [PATCH 11/14] arm64: dts: meson-axg: add lineout codec Jerome Brunet
2018-07-24 12:52 ` [PATCH 12/14] arm64: dts: meson-axg: add spdif-dit codec Jerome Brunet
2018-07-24 12:52 ` [PATCH 13/14] arm64: dts: meson-axg: s400: enable audio devices Jerome Brunet
2018-07-24 12:52 ` [PATCH 14/14] arm64: dts: meson-axg: add s400 sound card Jerome Brunet
2018-07-25 19:11 ` [PATCH 00/14] arm64: dts: meson-axg: add audio support Martin Blumenstingl
2018-07-25 21:19   ` jbrunet
2018-07-25 21:26     ` Martin Blumenstingl
2018-07-26 21:38       ` Kevin Hilman

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).