[v8,3/6] arm64: dts: ti: k3-am625-sk: Enable audio on AM62 SK

Message ID 20230313-mcasp_upstream-v8-3-4408134eb2f3@ti.com
State New
Headers
Series arm64: ti: Enable audio on AM62 and AM62A |

Commit Message

Jai Luthra March 28, 2023, 1:29 p.m. UTC
  Add nodes for audio codec and sound card, enable the audio serializer
(McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux.

Keep all audio related nodes in the common dtsi as they are exactly the
same between SK-AM62 and SK-AM62-LP.

Link: https://www.ti.com/lit/zip/sprr448 [1]
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts       | 11 ++++
 arch/arm64/boot/dts/ti/k3-am625-sk.dts         | 11 ++++
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 77 ++++++++++++++++++++++++++
 3 files changed, 99 insertions(+)
  

Comments

Nishanth Menon March 28, 2023, 1:32 p.m. UTC | #1
On 18:59-20230328, Jai Luthra wrote:
> Add nodes for audio codec and sound card, enable the audio serializer
> (McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux.
> 
> Keep all audio related nodes in the common dtsi as they are exactly the
> same between SK-AM62 and SK-AM62-LP.
> 
> Link: https://www.ti.com/lit/zip/sprr448 [1]
> Signed-off-by: Jai Luthra <j-luthra@ti.com>
> Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
>  arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts       | 11 ++++
>  arch/arm64/boot/dts/ti/k3-am625-sk.dts         | 11 ++++
>  arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 77 ++++++++++++++++++++++++++
>  3 files changed, 99 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> index b2ca19e3042e..5ed6b1abe87d 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> @@ -70,6 +70,17 @@ vddshv_sdio: regulator-4 {
>  		states = <1800000 0x0>,
>  			 <3300000 0x1>;
>  	};
> +
> +	vcc_1v8: regulator-5 {
> +		/* output of TPS62824DMQ */
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_1v8";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		vin-supply = <&vcc_3v3_sys>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>  };
>  
>  &main_pmx0 {
> diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> index cdc0858dd1b2..2b861681e548 100644
> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> @@ -87,6 +87,17 @@ vdd_sd_dv: regulator-4 {
>  		states = <1800000 0x0>,
>  			 <3300000 0x1>;
>  	};
> +
> +	vcc_1v8: regulator-5 {
> +		/* output of TPS6282518DMQ */
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_1v8";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		vin-supply = <&vcc_3v3_sys>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>  };

If the regulators are common, maybe we should first move the regulators
to common dtsi?

>  
>  &main_pmx0 {
> diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> index 54318a07d50c..2500cb9ba323 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> @@ -81,6 +81,41 @@ led-0 {
>  			default-state = "off";
>  		};
>  	};
> +
> +	tlv320_mclk: clk-0 {
> +		#clock-cells = <0>;
> +		compatible = "fixed-clock";
> +		clock-frequency = <12288000>;
> +	};
> +
> +	codec_audio: sound {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "AM62x-SKEVM";
> +		simple-audio-card,widgets =
> +			"Headphone",	"Headphone Jack",
> +			"Line",		"Line In",
> +			"Microphone",	"Microphone Jack";
> +		simple-audio-card,routing =
> +			"Headphone Jack",	"HPLOUT",
> +			"Headphone Jack",	"HPROUT",
> +			"LINE1L",		"Line In",
> +			"LINE1R",		"Line In",
> +			"MIC3R",		"Microphone Jack",
> +			"Microphone Jack",	"Mic Bias";
> +		simple-audio-card,format = "dsp_b";
> +		simple-audio-card,bitclock-master = <&sound_master>;
> +		simple-audio-card,frame-master = <&sound_master>;
> +		simple-audio-card,bitclock-inversion;
> +
> +		simple-audio-card,cpu {
> +			sound-dai = <&mcasp1>;
> +		};
> +
> +		sound_master: simple-audio-card,codec {
> +			sound-dai = <&tlv320aic3106>;
> +			clocks = <&tlv320_mclk>;
> +		};
> +	};
>  };
>  
>  &main_pmx0 {
> @@ -175,6 +210,15 @@ main_usb1_pins_default: main-usb1-pins-default {
>  			AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18/E16) USB1_DRVVBUS */
>  		>;
>  	};
> +
> +	main_mcasp1_pins_default: main-mcasp1-pins-default {
> +		pinctrl-single,pins = <
> +			AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
> +			AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
> +			AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
> +			AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
> +		>;
> +	};
>  };
>  
>  &wkup_uart0 {
> @@ -205,6 +249,19 @@ &main_i2c1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&main_i2c1_pins_default>;
>  	clock-frequency = <400000>;
> +
> +	tlv320aic3106: audio-codec@1b {
> +		#sound-dai-cells = <0>;
> +		compatible = "ti,tlv320aic3106";
> +		reg = <0x1b>;
> +		ai3x-micbias-vg = <1>;	/* 2.0V */
> +
> +		/* Regulators */
> +		AVDD-supply = <&vcc_3v3_sys>;
> +		IOVDD-supply = <&vcc_3v3_sys>;
> +		DRVDD-supply = <&vcc_3v3_sys>;
> +		DVDD-supply = <&vcc_1v8>;
> +	};
>  };
>  
>  &sdhci0 {
> @@ -272,3 +329,23 @@ &usb1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&main_usb1_pins_default>;
>  };
> +
> +&mcasp1 {
> +	status = "okay";
> +	#sound-dai-cells = <0>;
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&main_mcasp1_pins_default>;
> +
> +	op-mode = <0>;          /* MCASP_IIS_MODE */
> +	tdm-slots = <2>;
> +
> +	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
> +	       1 0 2 0
> +	       0 0 0 0
> +	       0 0 0 0
> +	       0 0 0 0
> +	>;
> +	tx-num-evt = <32>;
> +	rx-num-evt = <32>;
> +};
> 
> -- 
> 2.40.0
>
  
Jai Luthra March 28, 2023, 1:51 p.m. UTC | #2
Hi Nishanth,

On Mar 28, 2023 at 08:32:25 -0500, Nishanth Menon wrote:
> On 18:59-20230328, Jai Luthra wrote:
> > Add nodes for audio codec and sound card, enable the audio serializer
> > (McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux.
> > 
> > Keep all audio related nodes in the common dtsi as they are exactly the
> > same between SK-AM62 and SK-AM62-LP.
> > 
> > Link: https://www.ti.com/lit/zip/sprr448 [1]
> > Signed-off-by: Jai Luthra <j-luthra@ti.com>
> > Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
> > ---
> >  arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts       | 11 ++++
> >  arch/arm64/boot/dts/ti/k3-am625-sk.dts         | 11 ++++
> >  arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 77 ++++++++++++++++++++++++++
> >  3 files changed, 99 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> > index b2ca19e3042e..5ed6b1abe87d 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> > +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> > @@ -70,6 +70,17 @@ vddshv_sdio: regulator-4 {
> >  		states = <1800000 0x0>,
> >  			 <3300000 0x1>;
> >  	};
> > +
> > +	vcc_1v8: regulator-5 {
> > +		/* output of TPS62824DMQ */
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "vcc_1v8";
> > +		regulator-min-microvolt = <1800000>;
> > +		regulator-max-microvolt = <1800000>;
> > +		vin-supply = <&vcc_3v3_sys>;
> > +		regulator-always-on;
> > +		regulator-boot-on;
> > +	};
> >  };
> >  
> >  &main_pmx0 {
> > diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> > index cdc0858dd1b2..2b861681e548 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> > +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> > @@ -87,6 +87,17 @@ vdd_sd_dv: regulator-4 {
> >  		states = <1800000 0x0>,
> >  			 <3300000 0x1>;
> >  	};
> > +
> > +	vcc_1v8: regulator-5 {
> > +		/* output of TPS6282518DMQ */
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "vcc_1v8";
> > +		regulator-min-microvolt = <1800000>;
> > +		regulator-max-microvolt = <1800000>;
> > +		vin-supply = <&vcc_3v3_sys>;
> > +		regulator-always-on;
> > +		regulator-boot-on;
> > +	};
> >  };
> 
> If the regulators are common, maybe we should first move the regulators
> to common dtsi?
> 

The part number of this particular regulator is different in the 
schematics for the two boards.

For rest of the regulators I did not check, but I see the PMIC 
(TPS65219x) is present on SK-AM62-LP but missing on SK-AM62.

Thanks,
Jai

> >  
> >  &main_pmx0 {
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> > index 54318a07d50c..2500cb9ba323 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> > @@ -81,6 +81,41 @@ led-0 {
> >  			default-state = "off";
> >  		};
> >  	};
> > +
> > +	tlv320_mclk: clk-0 {
> > +		#clock-cells = <0>;
> > +		compatible = "fixed-clock";
> > +		clock-frequency = <12288000>;
> > +	};
> > +
> > +	codec_audio: sound {
> > +		compatible = "simple-audio-card";
> > +		simple-audio-card,name = "AM62x-SKEVM";
> > +		simple-audio-card,widgets =
> > +			"Headphone",	"Headphone Jack",
> > +			"Line",		"Line In",
> > +			"Microphone",	"Microphone Jack";
> > +		simple-audio-card,routing =
> > +			"Headphone Jack",	"HPLOUT",
> > +			"Headphone Jack",	"HPROUT",
> > +			"LINE1L",		"Line In",
> > +			"LINE1R",		"Line In",
> > +			"MIC3R",		"Microphone Jack",
> > +			"Microphone Jack",	"Mic Bias";
> > +		simple-audio-card,format = "dsp_b";
> > +		simple-audio-card,bitclock-master = <&sound_master>;
> > +		simple-audio-card,frame-master = <&sound_master>;
> > +		simple-audio-card,bitclock-inversion;
> > +
> > +		simple-audio-card,cpu {
> > +			sound-dai = <&mcasp1>;
> > +		};
> > +
> > +		sound_master: simple-audio-card,codec {
> > +			sound-dai = <&tlv320aic3106>;
> > +			clocks = <&tlv320_mclk>;
> > +		};
> > +	};
> >  };
> >  
> >  &main_pmx0 {
> > @@ -175,6 +210,15 @@ main_usb1_pins_default: main-usb1-pins-default {
> >  			AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18/E16) USB1_DRVVBUS */
> >  		>;
> >  	};
> > +
> > +	main_mcasp1_pins_default: main-mcasp1-pins-default {
> > +		pinctrl-single,pins = <
> > +			AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
> > +			AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
> > +			AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
> > +			AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
> > +		>;
> > +	};
> >  };
> >  
> >  &wkup_uart0 {
> > @@ -205,6 +249,19 @@ &main_i2c1 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&main_i2c1_pins_default>;
> >  	clock-frequency = <400000>;
> > +
> > +	tlv320aic3106: audio-codec@1b {
> > +		#sound-dai-cells = <0>;
> > +		compatible = "ti,tlv320aic3106";
> > +		reg = <0x1b>;
> > +		ai3x-micbias-vg = <1>;	/* 2.0V */
> > +
> > +		/* Regulators */
> > +		AVDD-supply = <&vcc_3v3_sys>;
> > +		IOVDD-supply = <&vcc_3v3_sys>;
> > +		DRVDD-supply = <&vcc_3v3_sys>;
> > +		DVDD-supply = <&vcc_1v8>;
> > +	};
> >  };
> >  
> >  &sdhci0 {
> > @@ -272,3 +329,23 @@ &usb1 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&main_usb1_pins_default>;
> >  };
> > +
> > +&mcasp1 {
> > +	status = "okay";
> > +	#sound-dai-cells = <0>;
> > +
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&main_mcasp1_pins_default>;
> > +
> > +	op-mode = <0>;          /* MCASP_IIS_MODE */
> > +	tdm-slots = <2>;
> > +
> > +	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
> > +	       1 0 2 0
> > +	       0 0 0 0
> > +	       0 0 0 0
> > +	       0 0 0 0
> > +	>;
> > +	tx-num-evt = <32>;
> > +	rx-num-evt = <32>;
> > +};
> > 
> > -- 
> > 2.40.0
> > 
> 
> -- 
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
  
Jai Luthra March 29, 2023, 8:04 a.m. UTC | #3
Hi,

On Mar 28, 2023 at 08:32:25 -0500, Nishanth Menon wrote:
> On 18:59-20230328, Jai Luthra wrote:
> > Add nodes for audio codec and sound card, enable the audio serializer
> > (McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux.
> > 
> > Keep all audio related nodes in the common dtsi as they are exactly the
> > same between SK-AM62 and SK-AM62-LP.
> > 
> > Link: https://www.ti.com/lit/zip/sprr448 [1]
> > Signed-off-by: Jai Luthra <j-luthra@ti.com>
> > Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
> > ---
> >  arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts       | 11 ++++
> >  arch/arm64/boot/dts/ti/k3-am625-sk.dts         | 11 ++++
> >  arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 77 ++++++++++++++++++++++++++
> >  3 files changed, 99 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> > index b2ca19e3042e..5ed6b1abe87d 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> > +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
> > @@ -70,6 +70,17 @@ vddshv_sdio: regulator-4 {
> >  		states = <1800000 0x0>,
> >  			 <3300000 0x1>;
> >  	};
> > +
> > +	vcc_1v8: regulator-5 {
> > +		/* output of TPS62824DMQ */
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "vcc_1v8";
> > +		regulator-min-microvolt = <1800000>;
> > +		regulator-max-microvolt = <1800000>;
> > +		vin-supply = <&vcc_3v3_sys>;
> > +		regulator-always-on;
> > +		regulator-boot-on;
> > +	};
> >  };
> >  
> >  &main_pmx0 {
> > diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> > index cdc0858dd1b2..2b861681e548 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> > +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> > @@ -87,6 +87,17 @@ vdd_sd_dv: regulator-4 {
> >  		states = <1800000 0x0>,
> >  			 <3300000 0x1>;
> >  	};
> > +
> > +	vcc_1v8: regulator-5 {
> > +		/* output of TPS6282518DMQ */
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "vcc_1v8";
> > +		regulator-min-microvolt = <1800000>;
> > +		regulator-max-microvolt = <1800000>;
> > +		vin-supply = <&vcc_3v3_sys>;
> > +		regulator-always-on;
> > +		regulator-boot-on;
> > +	};
> >  };
> 
> If the regulators are common, maybe we should first move the regulators
> to common dtsi?

Sorry, please disregard this patch, I went over the schematics again and 
found that I made a mistake here.

On SK-AM62-LP the audio codec gets the 1.8V from PMIC and not from a 
dedicated on-board regulator. On SK-AM62 we do have a dedicated on-board 
regulator for that.

Will fix this in next version.

Thanks,
Jai

> 
> >  
> >  &main_pmx0 {
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> > index 54318a07d50c..2500cb9ba323 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
> > @@ -81,6 +81,41 @@ led-0 {
> >  			default-state = "off";
> >  		};
> >  	};
> > +
> > +	tlv320_mclk: clk-0 {
> > +		#clock-cells = <0>;
> > +		compatible = "fixed-clock";
> > +		clock-frequency = <12288000>;
> > +	};
> > +
> > +	codec_audio: sound {
> > +		compatible = "simple-audio-card";
> > +		simple-audio-card,name = "AM62x-SKEVM";
> > +		simple-audio-card,widgets =
> > +			"Headphone",	"Headphone Jack",
> > +			"Line",		"Line In",
> > +			"Microphone",	"Microphone Jack";
> > +		simple-audio-card,routing =
> > +			"Headphone Jack",	"HPLOUT",
> > +			"Headphone Jack",	"HPROUT",
> > +			"LINE1L",		"Line In",
> > +			"LINE1R",		"Line In",
> > +			"MIC3R",		"Microphone Jack",
> > +			"Microphone Jack",	"Mic Bias";
> > +		simple-audio-card,format = "dsp_b";
> > +		simple-audio-card,bitclock-master = <&sound_master>;
> > +		simple-audio-card,frame-master = <&sound_master>;
> > +		simple-audio-card,bitclock-inversion;
> > +
> > +		simple-audio-card,cpu {
> > +			sound-dai = <&mcasp1>;
> > +		};
> > +
> > +		sound_master: simple-audio-card,codec {
> > +			sound-dai = <&tlv320aic3106>;
> > +			clocks = <&tlv320_mclk>;
> > +		};
> > +	};
> >  };
> >  
> >  &main_pmx0 {
> > @@ -175,6 +210,15 @@ main_usb1_pins_default: main-usb1-pins-default {
> >  			AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18/E16) USB1_DRVVBUS */
> >  		>;
> >  	};
> > +
> > +	main_mcasp1_pins_default: main-mcasp1-pins-default {
> > +		pinctrl-single,pins = <
> > +			AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
> > +			AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
> > +			AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
> > +			AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
> > +		>;
> > +	};
> >  };
> >  
> >  &wkup_uart0 {
> > @@ -205,6 +249,19 @@ &main_i2c1 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&main_i2c1_pins_default>;
> >  	clock-frequency = <400000>;
> > +
> > +	tlv320aic3106: audio-codec@1b {
> > +		#sound-dai-cells = <0>;
> > +		compatible = "ti,tlv320aic3106";
> > +		reg = <0x1b>;
> > +		ai3x-micbias-vg = <1>;	/* 2.0V */
> > +
> > +		/* Regulators */
> > +		AVDD-supply = <&vcc_3v3_sys>;
> > +		IOVDD-supply = <&vcc_3v3_sys>;
> > +		DRVDD-supply = <&vcc_3v3_sys>;
> > +		DVDD-supply = <&vcc_1v8>;
> > +	};
> >  };
> >  
> >  &sdhci0 {
> > @@ -272,3 +329,23 @@ &usb1 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&main_usb1_pins_default>;
> >  };
> > +
> > +&mcasp1 {
> > +	status = "okay";
> > +	#sound-dai-cells = <0>;
> > +
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&main_mcasp1_pins_default>;
> > +
> > +	op-mode = <0>;          /* MCASP_IIS_MODE */
> > +	tdm-slots = <2>;
> > +
> > +	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
> > +	       1 0 2 0
> > +	       0 0 0 0
> > +	       0 0 0 0
> > +	       0 0 0 0
> > +	>;
> > +	tx-num-evt = <32>;
> > +	rx-num-evt = <32>;
> > +};
> > 
> > -- 
> > 2.40.0
> > 
> 
> -- 
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
  

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
index b2ca19e3042e..5ed6b1abe87d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
@@ -70,6 +70,17 @@  vddshv_sdio: regulator-4 {
 		states = <1800000 0x0>,
 			 <3300000 0x1>;
 	};
+
+	vcc_1v8: regulator-5 {
+		/* output of TPS62824DMQ */
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vcc_3v3_sys>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &main_pmx0 {
diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index cdc0858dd1b2..2b861681e548 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -87,6 +87,17 @@  vdd_sd_dv: regulator-4 {
 		states = <1800000 0x0>,
 			 <3300000 0x1>;
 	};
+
+	vcc_1v8: regulator-5 {
+		/* output of TPS6282518DMQ */
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vcc_3v3_sys>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &main_pmx0 {
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
index 54318a07d50c..2500cb9ba323 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
@@ -81,6 +81,41 @@  led-0 {
 			default-state = "off";
 		};
 	};
+
+	tlv320_mclk: clk-0 {
+		#clock-cells = <0>;
+		compatible = "fixed-clock";
+		clock-frequency = <12288000>;
+	};
+
+	codec_audio: sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "AM62x-SKEVM";
+		simple-audio-card,widgets =
+			"Headphone",	"Headphone Jack",
+			"Line",		"Line In",
+			"Microphone",	"Microphone Jack";
+		simple-audio-card,routing =
+			"Headphone Jack",	"HPLOUT",
+			"Headphone Jack",	"HPROUT",
+			"LINE1L",		"Line In",
+			"LINE1R",		"Line In",
+			"MIC3R",		"Microphone Jack",
+			"Microphone Jack",	"Mic Bias";
+		simple-audio-card,format = "dsp_b";
+		simple-audio-card,bitclock-master = <&sound_master>;
+		simple-audio-card,frame-master = <&sound_master>;
+		simple-audio-card,bitclock-inversion;
+
+		simple-audio-card,cpu {
+			sound-dai = <&mcasp1>;
+		};
+
+		sound_master: simple-audio-card,codec {
+			sound-dai = <&tlv320aic3106>;
+			clocks = <&tlv320_mclk>;
+		};
+	};
 };
 
 &main_pmx0 {
@@ -175,6 +210,15 @@  main_usb1_pins_default: main-usb1-pins-default {
 			AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18/E16) USB1_DRVVBUS */
 		>;
 	};
+
+	main_mcasp1_pins_default: main-mcasp1-pins-default {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
+			AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
+			AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
+			AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
+		>;
+	};
 };
 
 &wkup_uart0 {
@@ -205,6 +249,19 @@  &main_i2c1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c1_pins_default>;
 	clock-frequency = <400000>;
+
+	tlv320aic3106: audio-codec@1b {
+		#sound-dai-cells = <0>;
+		compatible = "ti,tlv320aic3106";
+		reg = <0x1b>;
+		ai3x-micbias-vg = <1>;	/* 2.0V */
+
+		/* Regulators */
+		AVDD-supply = <&vcc_3v3_sys>;
+		IOVDD-supply = <&vcc_3v3_sys>;
+		DRVDD-supply = <&vcc_3v3_sys>;
+		DVDD-supply = <&vcc_1v8>;
+	};
 };
 
 &sdhci0 {
@@ -272,3 +329,23 @@  &usb1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_usb1_pins_default>;
 };
+
+&mcasp1 {
+	status = "okay";
+	#sound-dai-cells = <0>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_mcasp1_pins_default>;
+
+	op-mode = <0>;          /* MCASP_IIS_MODE */
+	tdm-slots = <2>;
+
+	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+	       1 0 2 0
+	       0 0 0 0
+	       0 0 0 0
+	       0 0 0 0
+	>;
+	tx-num-evt = <32>;
+	rx-num-evt = <32>;
+};