linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec
@ 2022-02-10 13:40 Ariel D'Alessandro
  2022-02-10 13:40 ` [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node Ariel D'Alessandro
  2022-02-10 16:53 ` (subset) [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec Mark Brown
  0 siblings, 2 replies; 8+ messages in thread
From: Ariel D'Alessandro @ 2022-02-10 13:40 UTC (permalink / raw)
  To: alsa-devel, devicetree, kernel, linux-arm-kernel, linux-imx,
	linux-kernel
  Cc: ariel.dalessandro, broonie, festevam, krzysztof.kozlowski,
	lgirdwood, michael, robh+dt, s.hauer, shawnguo

Commit 8c9b9cfb7724 ("ASoC: fsl-asoc-card: Support
fsl,imx-audio-tlv320aic31xx codec")' added support for tlv320aic31xx
codec to fsl-asoc-card, but missed the related device-tree compatible
string documentation. Fix this.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
---
 Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index b219626a5403..8b4f4015cfe4 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -40,6 +40,8 @@ The compatible list for this generic sound card currently:
 
  "fsl,imx-audio-tlv320aic32x4"
 
+ "fsl,imx-audio-tlv320aic31xx"
+
  "fsl,imx-audio-si476x"
 
  "fsl,imx-audio-wm8958"
-- 
2.34.1


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

* [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node
  2022-02-10 13:40 [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec Ariel D'Alessandro
@ 2022-02-10 13:40 ` Ariel D'Alessandro
  2022-02-13  4:18   ` Shawn Guo
  2022-03-10 12:29   ` Fabio Estevam
  2022-02-10 16:53 ` (subset) [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec Mark Brown
  1 sibling, 2 replies; 8+ messages in thread
From: Ariel D'Alessandro @ 2022-02-10 13:40 UTC (permalink / raw)
  To: alsa-devel, devicetree, kernel, linux-arm-kernel, linux-imx,
	linux-kernel
  Cc: ariel.dalessandro, broonie, festevam, krzysztof.kozlowski,
	lgirdwood, michael, robh+dt, s.hauer, shawnguo

BSH SystemMaster (SMM) S2 PRO board comes with an audio card based on
tlv320aic31xx family codec.

The audio card exposes two playback devices, one of them using the EASRC
(Enhanced Asynchronous Sample Rate Converter) module. Note that this
would require SDMA and EASRC firmware in order to work.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 .../dts/freescale/imx8mn-bsh-smm-s2pro.dts    | 94 +++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
index c6a8ed6745c1..3621354b4a92 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
@@ -7,6 +7,7 @@
 /dts-v1/;
 
 #include "imx8mn-bsh-smm-s2-common.dtsi"
+#include <dt-bindings/sound/tlv320aic31xx.h>
 
 / {
 	model = "BSH SMM S2 PRO";
@@ -16,6 +17,69 @@ memory@40000000 {
 		device_type = "memory";
 		reg = <0x0 0x40000000 0x0 0x20000000>;
 	};
+
+	sound-tlv320aic31xx {
+		compatible = "fsl,imx-audio-tlv320aic31xx";
+		model = "tlv320aic31xx-hifi";
+		audio-cpu = <&sai3>;
+		audio-codec = <&codec>;
+		audio-asrc = <&easrc>;
+		audio-routing =
+			"Ext Spk", "SPL",
+			"Ext Spk", "SPR";
+		mclk-id = <PLL_CLKIN_BCLK>;
+	};
+
+	vdd_input: vdd_input {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_input";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+};
+
+&easrc {
+	fsl,asrc-rate  = <48000>;
+	fsl,asrc-format = <10>;
+	status = "okay";
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+
+	codec: tlv320dac3101@18 {
+		#sound-dai-cells = <0>;
+		compatible = "ti,tlv320dac3101";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_dac_rst>;
+		reg = <0x18>;
+
+		ai31xx-micbias-vg = <MICBIAS_AVDDV>;
+
+		HPVDD-supply = <&buck4_reg>;
+		SPRVDD-supply = <&vdd_input>;
+		SPLVDD-supply = <&vdd_input>;
+		AVDD-supply = <&buck4_reg>;
+		IOVDD-supply = <&buck4_reg>;
+		DVDD-supply = <&buck5_reg>;
+		reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+
+		clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
+		clock-names = "mclk";
+	};
+};
+
+&sai3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sai3>;
+	assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
+	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
+	assigned-clock-rates = <24576000>;
+	fsl,sai-mclk-direction-output;
+	status = "okay";
 };
 
 /* eMMC */
@@ -30,6 +94,36 @@ &usdhc1 {
 };
 
 &iomuxc {
+	pinctrl_dac_rst: dac_rst {
+		fsl,pins = <
+			MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6		0x19 /* DAC_RST */
+		>;
+	};
+
+	pinctrl_espi2: espi2grp {
+		fsl,pins = <
+			MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK            0x082
+			MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI            0x082
+			MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO            0x082
+			MX8MN_IOMUXC_ECSPI2_SS0_ECSPI2_SS0		0x040
+		>;
+	};
+
+	pinctrl_i2c2: i2c2grp {
+		fsl,pins = <
+			MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL			0x400000c3
+			MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA			0x400000c3
+		>;
+	};
+
+	pinctrl_sai3: sai3grp {
+		fsl,pins = <
+			MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC		0xd6
+			MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK		0xd6
+			MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0		0xd6
+		>;
+	};
+
 	pinctrl_usdhc1: usdhc1grp {
 		fsl,pins = <
 			MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK			0x40000090
-- 
2.34.1


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

* Re: (subset) [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec
  2022-02-10 13:40 [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec Ariel D'Alessandro
  2022-02-10 13:40 ` [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node Ariel D'Alessandro
@ 2022-02-10 16:53 ` Mark Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Brown @ 2022-02-10 16:53 UTC (permalink / raw)
  To: Ariel D'Alessandro, kernel, linux-arm-kernel, devicetree,
	linux-imx, linux-kernel, alsa-devel
  Cc: shawnguo, robh+dt, krzysztof.kozlowski, lgirdwood, s.hauer,
	michael, festevam

On Thu, 10 Feb 2022 10:40:48 -0300, Ariel D'Alessandro wrote:
> Commit 8c9b9cfb7724 ("ASoC: fsl-asoc-card: Support
> fsl,imx-audio-tlv320aic31xx codec")' added support for tlv320aic31xx
> codec to fsl-asoc-card, but missed the related device-tree compatible
> string documentation. Fix this.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec
      commit: 23c2f1392f2f3a1c7a82c5d18f02d1a055ad6f16

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node
  2022-02-10 13:40 ` [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node Ariel D'Alessandro
@ 2022-02-13  4:18   ` Shawn Guo
  2022-02-14 11:45     ` Ariel D'Alessandro
  2022-03-10 12:29   ` Fabio Estevam
  1 sibling, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2022-02-13  4:18 UTC (permalink / raw)
  To: Ariel D'Alessandro
  Cc: alsa-devel, devicetree, kernel, linux-arm-kernel, linux-imx,
	linux-kernel, broonie, festevam, krzysztof.kozlowski, lgirdwood,
	michael, robh+dt, s.hauer

On Thu, Feb 10, 2022 at 10:40:49AM -0300, Ariel D'Alessandro wrote:
> BSH SystemMaster (SMM) S2 PRO board comes with an audio card based on
> tlv320aic31xx family codec.
> 
> The audio card exposes two playback devices, one of them using the EASRC
> (Enhanced Asynchronous Sample Rate Converter) module. Note that this
> would require SDMA and EASRC firmware in order to work.
> 
> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  .../dts/freescale/imx8mn-bsh-smm-s2pro.dts    | 94 +++++++++++++++++++
>  1 file changed, 94 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
> index c6a8ed6745c1..3621354b4a92 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
> @@ -7,6 +7,7 @@
>  /dts-v1/;
>  
>  #include "imx8mn-bsh-smm-s2-common.dtsi"
> +#include <dt-bindings/sound/tlv320aic31xx.h>
>  
>  / {
>  	model = "BSH SMM S2 PRO";
> @@ -16,6 +17,69 @@ memory@40000000 {
>  		device_type = "memory";
>  		reg = <0x0 0x40000000 0x0 0x20000000>;
>  	};
> +
> +	sound-tlv320aic31xx {
> +		compatible = "fsl,imx-audio-tlv320aic31xx";
> +		model = "tlv320aic31xx-hifi";
> +		audio-cpu = <&sai3>;
> +		audio-codec = <&codec>;
> +		audio-asrc = <&easrc>;
> +		audio-routing =
> +			"Ext Spk", "SPL",
> +			"Ext Spk", "SPR";
> +		mclk-id = <PLL_CLKIN_BCLK>;
> +	};
> +
> +	vdd_input: vdd_input {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vdd_input";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +	};
> +};
> +
> +&easrc {
> +	fsl,asrc-rate  = <48000>;

Double spaces before '='.

> +	fsl,asrc-format = <10>;
> +	status = "okay";
> +};
> +
> +&i2c2 {
> +	clock-frequency = <400000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c2>;
> +	status = "okay";
> +
> +	codec: tlv320dac3101@18 {

tlv320dac3101: audio-codec@18

> +		#sound-dai-cells = <0>;
> +		compatible = "ti,tlv320dac3101";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_dac_rst>;
> +		reg = <0x18>;
> +
> +		ai31xx-micbias-vg = <MICBIAS_AVDDV>;
> +
> +		HPVDD-supply = <&buck4_reg>;
> +		SPRVDD-supply = <&vdd_input>;
> +		SPLVDD-supply = <&vdd_input>;
> +		AVDD-supply = <&buck4_reg>;
> +		IOVDD-supply = <&buck4_reg>;
> +		DVDD-supply = <&buck5_reg>;
> +		reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
> +
> +		clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
> +		clock-names = "mclk";
> +	};
> +};
> +
> +&sai3 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sai3>;
> +	assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
> +	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
> +	assigned-clock-rates = <24576000>;
> +	fsl,sai-mclk-direction-output;
> +	status = "okay";
>  };
>  
>  /* eMMC */
> @@ -30,6 +94,36 @@ &usdhc1 {
>  };
>  
>  &iomuxc {
> +	pinctrl_dac_rst: dac_rst {

Name the node more in the same style as other pinctrl nodes.

Shawn

> +		fsl,pins = <
> +			MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6		0x19 /* DAC_RST */
> +		>;
> +	};
> +
> +	pinctrl_espi2: espi2grp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK            0x082
> +			MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI            0x082
> +			MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO            0x082
> +			MX8MN_IOMUXC_ECSPI2_SS0_ECSPI2_SS0		0x040
> +		>;
> +	};
> +
> +	pinctrl_i2c2: i2c2grp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL			0x400000c3
> +			MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA			0x400000c3
> +		>;
> +	};
> +
> +	pinctrl_sai3: sai3grp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC		0xd6
> +			MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK		0xd6
> +			MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0		0xd6
> +		>;
> +	};
> +
>  	pinctrl_usdhc1: usdhc1grp {
>  		fsl,pins = <
>  			MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK			0x40000090
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node
  2022-02-13  4:18   ` Shawn Guo
@ 2022-02-14 11:45     ` Ariel D'Alessandro
  0 siblings, 0 replies; 8+ messages in thread
From: Ariel D'Alessandro @ 2022-02-14 11:45 UTC (permalink / raw)
  To: Shawn Guo
  Cc: alsa-devel, devicetree, kernel, linux-arm-kernel, linux-imx,
	linux-kernel, broonie, festevam, krzysztof.kozlowski, lgirdwood,
	michael, robh+dt, s.hauer

Hi Shawn,

Thanks for the review, will address all the below changes in v3.

Regards,
Ariel

On 2/13/22 01:18, Shawn Guo wrote:
> On Thu, Feb 10, 2022 at 10:40:49AM -0300, Ariel D'Alessandro wrote:
>> BSH SystemMaster (SMM) S2 PRO board comes with an audio card based on
>> tlv320aic31xx family codec.
>>
>> The audio card exposes two playback devices, one of them using the EASRC
>> (Enhanced Asynchronous Sample Rate Converter) module. Note that this
>> would require SDMA and EASRC firmware in order to work.
>>
>> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>> ---
>>  .../dts/freescale/imx8mn-bsh-smm-s2pro.dts    | 94 +++++++++++++++++++
>>  1 file changed, 94 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
>> index c6a8ed6745c1..3621354b4a92 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
>> +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dts
>> @@ -7,6 +7,7 @@
>>  /dts-v1/;
>>  
>>  #include "imx8mn-bsh-smm-s2-common.dtsi"
>> +#include <dt-bindings/sound/tlv320aic31xx.h>
>>  
>>  / {
>>  	model = "BSH SMM S2 PRO";
>> @@ -16,6 +17,69 @@ memory@40000000 {
>>  		device_type = "memory";
>>  		reg = <0x0 0x40000000 0x0 0x20000000>;
>>  	};
>> +
>> +	sound-tlv320aic31xx {
>> +		compatible = "fsl,imx-audio-tlv320aic31xx";
>> +		model = "tlv320aic31xx-hifi";
>> +		audio-cpu = <&sai3>;
>> +		audio-codec = <&codec>;
>> +		audio-asrc = <&easrc>;
>> +		audio-routing =
>> +			"Ext Spk", "SPL",
>> +			"Ext Spk", "SPR";
>> +		mclk-id = <PLL_CLKIN_BCLK>;
>> +	};
>> +
>> +	vdd_input: vdd_input {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vdd_input";
>> +		regulator-min-microvolt = <5000000>;
>> +		regulator-max-microvolt = <5000000>;
>> +	};
>> +};
>> +
>> +&easrc {
>> +	fsl,asrc-rate  = <48000>;
> 
> Double spaces before '='.
> 
>> +	fsl,asrc-format = <10>;
>> +	status = "okay";
>> +};
>> +
>> +&i2c2 {
>> +	clock-frequency = <400000>;
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_i2c2>;
>> +	status = "okay";
>> +
>> +	codec: tlv320dac3101@18 {
> 
> tlv320dac3101: audio-codec@18
> 
>> +		#sound-dai-cells = <0>;
>> +		compatible = "ti,tlv320dac3101";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&pinctrl_dac_rst>;
>> +		reg = <0x18>;
>> +
>> +		ai31xx-micbias-vg = <MICBIAS_AVDDV>;
>> +
>> +		HPVDD-supply = <&buck4_reg>;
>> +		SPRVDD-supply = <&vdd_input>;
>> +		SPLVDD-supply = <&vdd_input>;
>> +		AVDD-supply = <&buck4_reg>;
>> +		IOVDD-supply = <&buck4_reg>;
>> +		DVDD-supply = <&buck5_reg>;
>> +		reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
>> +
>> +		clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
>> +		clock-names = "mclk";
>> +	};
>> +};
>> +
>> +&sai3 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&pinctrl_sai3>;
>> +	assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
>> +	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
>> +	assigned-clock-rates = <24576000>;
>> +	fsl,sai-mclk-direction-output;
>> +	status = "okay";
>>  };
>>  
>>  /* eMMC */
>> @@ -30,6 +94,36 @@ &usdhc1 {
>>  };
>>  
>>  &iomuxc {
>> +	pinctrl_dac_rst: dac_rst {
> 
> Name the node more in the same style as other pinctrl nodes.
> 
> Shawn
> 
>> +		fsl,pins = <
>> +			MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6		0x19 /* DAC_RST */
>> +		>;
>> +	};
>> +
>> +	pinctrl_espi2: espi2grp {
>> +		fsl,pins = <
>> +			MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK            0x082
>> +			MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI            0x082
>> +			MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO            0x082
>> +			MX8MN_IOMUXC_ECSPI2_SS0_ECSPI2_SS0		0x040
>> +		>;
>> +	};
>> +
>> +	pinctrl_i2c2: i2c2grp {
>> +		fsl,pins = <
>> +			MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL			0x400000c3
>> +			MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA			0x400000c3
>> +		>;
>> +	};
>> +
>> +	pinctrl_sai3: sai3grp {
>> +		fsl,pins = <
>> +			MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC		0xd6
>> +			MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK		0xd6
>> +			MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0		0xd6
>> +		>;
>> +	};
>> +
>>  	pinctrl_usdhc1: usdhc1grp {
>>  		fsl,pins = <
>>  			MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK			0x40000090
>> -- 
>> 2.34.1
>>

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

* Re: [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node
  2022-02-10 13:40 ` [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node Ariel D'Alessandro
  2022-02-13  4:18   ` Shawn Guo
@ 2022-03-10 12:29   ` Fabio Estevam
  2022-03-17 18:47     ` Ariel D'Alessandro
  1 sibling, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2022-03-10 12:29 UTC (permalink / raw)
  To: Ariel D'Alessandro
  Cc: Linux-ALSA,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Sascha Hauer,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	NXP Linux Team, linux-kernel, Mark Brown, Krzysztof Kozlowski,
	Liam Girdwood, Michael Trimarchi, Rob Herring, Sascha Hauer,
	Shawn Guo

Hi Ariel,

On Thu, Feb 10, 2022 at 10:41 AM Ariel D'Alessandro
<ariel.dalessandro@collabora.com> wrote:

> +&i2c2 {
> +       clock-frequency = <400000>;
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_i2c2>;
> +       status = "okay";
> +
> +       codec: tlv320dac3101@18 {
> +               #sound-dai-cells = <0>;
> +               compatible = "ti,tlv320dac3101";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_dac_rst>;
> +               reg = <0x18>;
> +
> +               ai31xx-micbias-vg = <MICBIAS_AVDDV>;
> +
> +               HPVDD-supply = <&buck4_reg>;
> +               SPRVDD-supply = <&vdd_input>;
> +               SPLVDD-supply = <&vdd_input>;
> +               AVDD-supply = <&buck4_reg>;
> +               IOVDD-supply = <&buck4_reg>;
> +               DVDD-supply = <&buck5_reg>;
> +               reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
> +
> +               clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
> +               clock-names = "mclk";

The clocks and clock-names properties are not documented in the codec bindings.

Also, the driver does not use call clk_get() on this mclk clock.

You should drop the clocks and clock-names properties.

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

* Re: [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node
  2022-03-10 12:29   ` Fabio Estevam
@ 2022-03-17 18:47     ` Ariel D'Alessandro
  2022-03-25 11:19       ` Ariel D'Alessandro
  0 siblings, 1 reply; 8+ messages in thread
From: Ariel D'Alessandro @ 2022-03-17 18:47 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Linux-ALSA,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Sascha Hauer,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	NXP Linux Team, linux-kernel, Mark Brown, Krzysztof Kozlowski,
	Liam Girdwood, Michael Trimarchi, Rob Herring, Sascha Hauer,
	Shawn Guo

Hi Fabio,

On 3/10/22 09:29, Fabio Estevam wrote:
> Hi Ariel,
> 
> On Thu, Feb 10, 2022 at 10:41 AM Ariel D'Alessandro
> <ariel.dalessandro@collabora.com> wrote:
> 
>> +&i2c2 {
>> +       clock-frequency = <400000>;
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&pinctrl_i2c2>;
>> +       status = "okay";
>> +
>> +       codec: tlv320dac3101@18 {
>> +               #sound-dai-cells = <0>;
>> +               compatible = "ti,tlv320dac3101";
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&pinctrl_dac_rst>;
>> +               reg = <0x18>;
>> +
>> +               ai31xx-micbias-vg = <MICBIAS_AVDDV>;
>> +
>> +               HPVDD-supply = <&buck4_reg>;
>> +               SPRVDD-supply = <&vdd_input>;
>> +               SPLVDD-supply = <&vdd_input>;
>> +               AVDD-supply = <&buck4_reg>;
>> +               IOVDD-supply = <&buck4_reg>;
>> +               DVDD-supply = <&buck5_reg>;
>> +               reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
>> +
>> +               clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
>> +               clock-names = "mclk";
> 
> The clocks and clock-names properties are not documented in the codec bindings.
> 
> Also, the driver does not use call clk_get() on this mclk clock.
> 
> You should drop the clocks and clock-names properties.

The sound card driver is calling clk_get() on the codec's clock. See
sound/soc/fsl/fsl-asoc-card.c:

    /* Get the MCLK rate only, and leave it controlled by CODEC drivers */
    if (codec_dev) {
        struct clk *codec_clk = clk_get(codec_dev, NULL);

        if (!IS_ERR(codec_clk)) {
            priv->codec_priv.mclk_freq = clk_get_rate(codec_clk);
            clk_put(codec_clk);
        }
    }

Regards,
Ariel

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

* Re: [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node
  2022-03-17 18:47     ` Ariel D'Alessandro
@ 2022-03-25 11:19       ` Ariel D'Alessandro
  0 siblings, 0 replies; 8+ messages in thread
From: Ariel D'Alessandro @ 2022-03-25 11:19 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Linux-ALSA,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Sascha Hauer,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	NXP Linux Team, linux-kernel, Mark Brown, Krzysztof Kozlowski,
	Liam Girdwood, Michael Trimarchi, Rob Herring, Sascha Hauer,
	Shawn Guo

Hi Fabio,

On 3/17/22 15:47, Ariel D'Alessandro wrote:
> Hi Fabio,
> 
> On 3/10/22 09:29, Fabio Estevam wrote:
>> Hi Ariel,
>>
>> On Thu, Feb 10, 2022 at 10:41 AM Ariel D'Alessandro
>> <ariel.dalessandro@collabora.com> wrote:
>>
>>> +&i2c2 {
>>> +       clock-frequency = <400000>;
>>> +       pinctrl-names = "default";
>>> +       pinctrl-0 = <&pinctrl_i2c2>;
>>> +       status = "okay";
>>> +
>>> +       codec: tlv320dac3101@18 {
>>> +               #sound-dai-cells = <0>;
>>> +               compatible = "ti,tlv320dac3101";
>>> +               pinctrl-names = "default";
>>> +               pinctrl-0 = <&pinctrl_dac_rst>;
>>> +               reg = <0x18>;
>>> +
>>> +               ai31xx-micbias-vg = <MICBIAS_AVDDV>;
>>> +
>>> +               HPVDD-supply = <&buck4_reg>;
>>> +               SPRVDD-supply = <&vdd_input>;
>>> +               SPLVDD-supply = <&vdd_input>;
>>> +               AVDD-supply = <&buck4_reg>;
>>> +               IOVDD-supply = <&buck4_reg>;
>>> +               DVDD-supply = <&buck5_reg>;
>>> +               reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
>>> +
>>> +               clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
>>> +               clock-names = "mclk";
>>
>> The clocks and clock-names properties are not documented in the codec bindings.
>>
>> Also, the driver does not use call clk_get() on this mclk clock.
>>
>> You should drop the clocks and clock-names properties.
> 
> The sound card driver is calling clk_get() on the codec's clock. See
> sound/soc/fsl/fsl-asoc-card.c:
> 
>     /* Get the MCLK rate only, and leave it controlled by CODEC drivers */
>     if (codec_dev) {
>         struct clk *codec_clk = clk_get(codec_dev, NULL);
> 
>         if (!IS_ERR(codec_clk)) {
>             priv->codec_priv.mclk_freq = clk_get_rate(codec_clk);
>             clk_put(codec_clk);
>         }
>     }

Do you have any other comments on this one? Otherwise, could you perhaps
ack this patch? See latest version:
  [PATCH v4] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio
card node

Thanks
Ariel

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

end of thread, other threads:[~2022-03-25 11:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 13:40 [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec Ariel D'Alessandro
2022-02-10 13:40 ` [PATCH v2 2/2] arm64: dts: imx8mn-bsh-smm-s2pro: Add tlv320aic31xx audio card node Ariel D'Alessandro
2022-02-13  4:18   ` Shawn Guo
2022-02-14 11:45     ` Ariel D'Alessandro
2022-03-10 12:29   ` Fabio Estevam
2022-03-17 18:47     ` Ariel D'Alessandro
2022-03-25 11:19       ` Ariel D'Alessandro
2022-02-10 16:53 ` (subset) [PATCH v2 1/2] ASoC: bindings: fsl-asoc-card: Add compatible for tlv320aic31xx codec Mark Brown

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