linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] arm64: ti: Enable audio on AM62A
@ 2023-10-03  9:11 Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 1/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra, Jayesh Choudhary, Julien Panis, Esteban Blanc

This patch series adds support for audio via headphone jack on
SK-AM62A-LP. The jack is wired to TLV320AIC3106 (codec), which is
connected to McASP1 (serializer) on the SoC.

The TRRS 3.5mm jack can be used for simultaneous playback and recording.

Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
Changes in v3:
- Add Fixes tag in PATCH [3/6], along with Aradhya's R-by
- Fix node names for mcasp1 pins (should end with -pins to match regex)
- Link to v2: https://lore.kernel.org/r/20230928-mcasp_am62a-v2-0-ce9f0e1ba22b@ti.com

Changes in v2:
- Move the patch that enables TPS6593 PMIC to this series
- Link to v1: https://lore.kernel.org/r/20230731-mcasp_am62a-v1-0-8bd137ffa8f1@ti.com

---
Jai Luthra (5):
      arm64: dts: ti: k3-am62a-main: Add nodes for McASP
      arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators
      arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz
      arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
      arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A

Julien Panis (1):
      arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC

 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi |  60 ++++++++++
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts   | 189 +++++++++++++++++++++++++++++-
 arch/arm64/configs/defconfig              |   1 +
 3 files changed, 247 insertions(+), 3 deletions(-)
---
base-commit: c9f2baaa18b5ea8f006a2b3a616da9597c71d15e
change-id: 20230731-mcasp_am62a-af1660624f97

Best regards,
-- 
Jai Luthra <j-luthra@ti.com>


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

* [PATCH v3 1/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
@ 2023-10-03  9:11 ` Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 2/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Jai Luthra
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra, Jayesh Choudhary

Same as AM62, AM62A has three instances of McASP which can be used for
transmitting or receiving digital audio in various formats.

Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 60 +++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index 3198af08fb9f..4ae7fdc5221b 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -816,4 +816,64 @@ ecap2: pwm@23120000 {
 		clock-names = "fck";
 		status = "disabled";
 	};
+
+	mcasp0: audio-controller@2b00000 {
+		compatible = "ti,am33xx-mcasp-audio";
+		reg = <0x00 0x02b00000 0x00 0x2000>,
+		      <0x00 0x02b08000 0x00 0x400>;
+		reg-names = "mpu", "dat";
+		interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "tx", "rx";
+
+		dmas = <&main_bcdma 0 0xc500 0>, <&main_bcdma 0 0x4500 0>;
+		dma-names = "tx", "rx";
+
+		clocks = <&k3_clks 190 0>;
+		clock-names = "fck";
+		assigned-clocks = <&k3_clks 190 0>;
+		assigned-clock-parents = <&k3_clks 190 2>;
+		power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>;
+		status = "disabled";
+	};
+
+	mcasp1: audio-controller@2b10000 {
+		compatible = "ti,am33xx-mcasp-audio";
+		reg = <0x00 0x02b10000 0x00 0x2000>,
+		      <0x00 0x02b18000 0x00 0x400>;
+		reg-names = "mpu", "dat";
+		interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 237 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "tx", "rx";
+
+		dmas = <&main_bcdma 0 0xc501 0>, <&main_bcdma 0 0x4501 0>;
+		dma-names = "tx", "rx";
+
+		clocks = <&k3_clks 191 0>;
+		clock-names = "fck";
+		assigned-clocks = <&k3_clks 191 0>;
+		assigned-clock-parents = <&k3_clks 191 2>;
+		power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>;
+		status = "disabled";
+	};
+
+	mcasp2: audio-controller@2b20000 {
+		compatible = "ti,am33xx-mcasp-audio";
+		reg = <0x00 0x02b20000 0x00 0x2000>,
+		      <0x00 0x02b28000 0x00 0x400>;
+		reg-names = "mpu", "dat";
+		interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "tx", "rx";
+
+		dmas = <&main_bcdma 0 0xc502 0>, <&main_bcdma 0 0x4502 0>;
+		dma-names = "tx", "rx";
+
+		clocks = <&k3_clks 192 0>;
+		clock-names = "fck";
+		assigned-clocks = <&k3_clks 192 0>;
+		assigned-clock-parents = <&k3_clks 192 2>;
+		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
+		status = "disabled";
+	};
 };

-- 
2.42.0


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

* [PATCH v3 2/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 1/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
@ 2023-10-03  9:11 ` Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 3/6] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz Jai Luthra
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra

VCC_3V3_MAIN is the output of LM5141-Q1, and it serves as an input to
TPS22965DSGT which produces VCC_3V3_SYS. [1]

Link: https://www.ti.com/lit/zip/sprr459 [1]
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index cff283c75f8e..c689d3da2def 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -79,10 +79,10 @@ vcc_5v0: regulator-1 {
 		regulator-boot-on;
 	};
 
-	vcc_3v3_sys: regulator-2 {
+	vcc_3v3_main: regulator-2 {
 		/* output of LM5141-Q1 */
 		compatible = "regulator-fixed";
-		regulator-name = "vcc_3v3_sys";
+		regulator-name = "vcc_3v3_main";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		vin-supply = <&vmain_pd>;
@@ -101,6 +101,17 @@ vdd_mmc1: regulator-3 {
 		gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
 	};
 
+	vcc_3v3_sys: regulator-4 {
+		/* output of TPS222965DSGT */
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_3v3_sys";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_3v3_main>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";

-- 
2.42.0


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

* [PATCH v3 3/6] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 1/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 2/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Jai Luthra
@ 2023-10-03  9:11 ` Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 4/6] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC Jai Luthra
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra

The TLV320AIC3106 audio codec is interfaced on the i2c-1 bus. With the
default rate of 400Khz the i2c register writes fail to sync:

[   36.026387] tlv320aic3x 1-001b: Unable to sync registers 0x16-0x16. -110
[   38.101130] omap_i2c 20010000.i2c: controller timed out

Dropping the rate to 100Khz fixes the issue.

Fixes: 38c4a08c820c ("arm64: dts: ti: Add support for AM62A7-SK")
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index c689d3da2def..866b2725f775 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -261,7 +261,7 @@ &main_i2c1 {
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c1_pins_default>;
-	clock-frequency = <400000>;
+	clock-frequency = <100000>;
 
 	exp1: gpio@22 {
 		compatible = "ti,tca6424";

-- 
2.42.0


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

* [PATCH v3 4/6] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
                   ` (2 preceding siblings ...)
  2023-10-03  9:11 ` [PATCH v3 3/6] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz Jai Luthra
@ 2023-10-03  9:11 ` Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Jai Luthra
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra, Julien Panis, Esteban Blanc

From: Julien Panis <jpanis@baylibre.com>

This patch adds support for TPS6593 PMIC on main I2C0 bus.
This device provides regulators (bucks and LDOs), but also
GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor)
which monitors the SoC error output signal, and a PFSM
(Pre-configurable Finite State Machine) which manages the
operational modes of the PMIC.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
Signed-off-by: Esteban Blanc <eblanc@baylibre.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 95 +++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index 866b2725f775..377ab823bbcc 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -232,6 +232,20 @@ AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */
 	};
 };
 
+&mcu_pmx0 {
+	status = "okay";
+
+	pmic_irq_pins_default: pmic-irq-default-pins {
+		pinctrl-single,pins = <
+			AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */
+		>;
+	};
+};
+
+&mcu_gpio0 {
+	status = "okay";
+};
+
 &main_i2c0 {
 	status = "okay";
 	pinctrl-names = "default";
@@ -255,6 +269,87 @@ usb_con_hs: endpoint {
 			};
 		};
 	};
+
+	tps659312: pmic@48 {
+		compatible = "ti,tps6593-q1";
+		reg = <0x48>;
+		ti,primary-pmic;
+		system-power-controller;
+
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_irq_pins_default>;
+		interrupt-parent = <&mcu_gpio0>;
+		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+
+		buck123-supply = <&vcc_3v3_sys>;
+		buck4-supply = <&vcc_3v3_sys>;
+		buck5-supply = <&vcc_3v3_sys>;
+		ldo1-supply = <&vcc_3v3_sys>;
+		ldo2-supply = <&vcc_3v3_sys>;
+		ldo3-supply = <&buck5>;
+		ldo4-supply = <&vcc_3v3_sys>;
+
+		regulators {
+			buck123: buck123 {
+				regulator-name = "vcc_core";
+				regulator-min-microvolt = <715000>;
+				regulator-max-microvolt = <895000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck4: buck4 {
+				regulator-name = "vcc_1v1";
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck5: buck5 {
+				regulator-name = "vcc_1v8_sys";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo1: ldo1 {
+				regulator-name = "vddshv5_sdio";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo2: ldo2 {
+				regulator-name = "vpp_1v8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo3: ldo3 {
+				regulator-name = "vcc_0v85";
+				regulator-min-microvolt = <850000>;
+				regulator-max-microvolt = <850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo4: ldo4 {
+				regulator-name = "vdda_1v8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
 };
 
 &main_i2c1 {

-- 
2.42.0


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

* [PATCH v3 5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
                   ` (3 preceding siblings ...)
  2023-10-03  9:11 ` [PATCH v3 4/6] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC Jai Luthra
@ 2023-10-03  9:11 ` Jai Luthra
  2023-10-03  9:11 ` [PATCH v3 6/6] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A Jai Luthra
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra, Jayesh Choudhary

Add nodes for audio codec and sound card, enable the audio serializer
(McASP1) under use and update pinmux.

Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Link: https://www.ti.com/lit/zip/sprr459
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 77 +++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index 377ab823bbcc..8f64ac2c7568 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -125,6 +125,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 = "AM62Ax-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>;
+		};
+	};
 };
 
 &mcu_pmx0 {
@@ -230,6 +265,15 @@ AM62AX_IOPAD(0x130, PIN_INPUT, 0) /* (AB17) RGMII1_TXC */
 			AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */
 		>;
 	};
+
+	main_mcasp1_pins_default: main-mcasp1-default-pins {
+		pinctrl-single,pins = <
+			AM62AX_IOPAD(0x090, PIN_INPUT, 2) /* (L19) GPMC0_BE0n_CLE.MCASP1_ACLKX */
+			AM62AX_IOPAD(0x098, PIN_INPUT, 2) /* (R18) GPMC0_WAIT0.MCASP1_AFSX */
+			AM62AX_IOPAD(0x08c, PIN_OUTPUT, 2) /* (K19) GPMC0_WEn.MCASP1_AXR0 */
+			AM62AX_IOPAD(0x084, PIN_INPUT, 2) /* (L18) GPMC0_ADVn_ALE.MCASP1_AXR2 */
+		>;
+	};
 };
 
 &mcu_pmx0 {
@@ -377,6 +421,19 @@ exp1: gpio@22 {
 				   "MCASP1_FET_SEL", "UART1_FET_SEL",
 				   "PD_I2C_IRQ", "IO_EXP_TEST_LED";
 	};
+
+	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 = <&buck5>;
+	};
 };
 
 &sdhci1 {
@@ -467,3 +524,23 @@ cpsw3g_phy0: ethernet-phy@0 {
 		ti,min-output-impedance;
 	};
 };
+
+&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.42.0


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

* [PATCH v3 6/6] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
                   ` (4 preceding siblings ...)
  2023-10-03  9:11 ` [PATCH v3 5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Jai Luthra
@ 2023-10-03  9:11 ` Jai Luthra
  2023-10-12  6:48 ` (subset) [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Vignesh Raghavendra
  2023-10-18 14:56 ` Vignesh Raghavendra
  7 siblings, 0 replies; 9+ messages in thread
From: Jai Luthra @ 2023-10-03  9:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, devicetree, linux-kernel, devarsht, a-bhatia1,
	Jai Luthra

SK-AM62A-LP uses TPS6593x PMIC (interfaced over I2C) to power the SoC
and various other peripherals on the board [1].

Specifically, the audio codec (TLV320AIC3106) on the board relies on the
PMIC for the DVDD (1.8V) supply.

[1]: https://www.ti.com/lit/zip/sprr459

Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 66bfbef73324..38f0ce9cd2a3 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -725,6 +725,7 @@ CONFIG_MFD_SEC_CORE=y
 CONFIG_MFD_SL28CPLD=y
 CONFIG_RZ_MTU3=y
 CONFIG_MFD_TPS65219=y
+CONFIG_MFD_TPS6594_I2C=m
 CONFIG_MFD_TI_AM335X_TSCADC=m
 CONFIG_MFD_ROHM_BD718XX=y
 CONFIG_MFD_WCD934X=m

-- 
2.42.0


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

* Re: (subset) [PATCH v3 0/6] arm64: ti: Enable audio on AM62A
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
                   ` (5 preceding siblings ...)
  2023-10-03  9:11 ` [PATCH v3 6/6] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A Jai Luthra
@ 2023-10-12  6:48 ` Vignesh Raghavendra
  2023-10-18 14:56 ` Vignesh Raghavendra
  7 siblings, 0 replies; 9+ messages in thread
From: Vignesh Raghavendra @ 2023-10-12  6:48 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Catalin Marinas, Will Deacon, Jai Luthra
  Cc: Vignesh Raghavendra, linux-arm-kernel, devicetree, linux-kernel,
	devarsht, a-bhatia1, Jayesh Choudhary, Julien Panis,
	Esteban Blanc

Hi Jai Luthra,

On Tue, 03 Oct 2023 14:41:29 +0530, Jai Luthra wrote:
> This patch series adds support for audio via headphone jack on
> SK-AM62A-LP. The jack is wired to TLV320AIC3106 (codec), which is
> connected to McASP1 (serializer) on the SoC.
> 
> The TRRS 3.5mm jack can be used for simultaneous playback and recording.
> 
> 
> [...]

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP
      commit: 1d181c96ef3b6f9b29474fb18eb9f426bb6b16ac
[2/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators
      commit: 770480e7eb729d49f2a10530d628e9778c1b3bd8
[3/6] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz
      commit: 63e5aa69b821472a3203a29e17c025329c1b151f
[4/6] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC
      commit: 3a8222080334fd0ffec9a6a563304f77571a1853
[5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
      commit: 4a2c5dddf9e9049bfb3dde18657ee349131b0def

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant 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.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh


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

* Re: (subset) [PATCH v3 0/6] arm64: ti: Enable audio on AM62A
  2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
                   ` (6 preceding siblings ...)
  2023-10-12  6:48 ` (subset) [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Vignesh Raghavendra
@ 2023-10-18 14:56 ` Vignesh Raghavendra
  7 siblings, 0 replies; 9+ messages in thread
From: Vignesh Raghavendra @ 2023-10-18 14:56 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Catalin Marinas, Will Deacon, Jai Luthra
  Cc: Vignesh Raghavendra, linux-arm-kernel, devicetree, linux-kernel,
	devarsht, a-bhatia1, Jayesh Choudhary, Julien Panis,
	Esteban Blanc

Hi Jai Luthra,

On Tue, 03 Oct 2023 14:41:29 +0530, Jai Luthra wrote:
> This patch series adds support for audio via headphone jack on
> SK-AM62A-LP. The jack is wired to TLV320AIC3106 (codec), which is
> connected to McASP1 (serializer) on the SoC.
> 
> The TRRS 3.5mm jack can be used for simultaneous playback and recording.
> 
> 
> [...]

I have applied the following to branch ti-k3-config-next on [1].
Thank you!

[6/6] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A
      commit: f9010eb938beb9a58c640b50d2fe65e4187c1fde

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant 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.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh


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

end of thread, other threads:[~2023-10-18 14:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03  9:11 [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Jai Luthra
2023-10-03  9:11 ` [PATCH v3 1/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
2023-10-03  9:11 ` [PATCH v3 2/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Jai Luthra
2023-10-03  9:11 ` [PATCH v3 3/6] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz Jai Luthra
2023-10-03  9:11 ` [PATCH v3 4/6] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC Jai Luthra
2023-10-03  9:11 ` [PATCH v3 5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Jai Luthra
2023-10-03  9:11 ` [PATCH v3 6/6] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A Jai Luthra
2023-10-12  6:48 ` (subset) [PATCH v3 0/6] arm64: ti: Enable audio on AM62A Vignesh Raghavendra
2023-10-18 14:56 ` Vignesh Raghavendra

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