2023-07-31 13:25:44

by Jai Luthra

[permalink] [raw]
Subject: [PATCH 0/5] arm64: ti: Enable audio on AM62A

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.

The series depends on PMIC support:
https://lore.kernel.org/all/[email protected]/

Some of the patches have been posted (and reviewed) before as part of a
combined audio series (v9) for AM62 & AM62A:
https://lore.kernel.org/all/[email protected]/

Changes since v9 of last series:
- Use DVDD (1.8V) supply from TPS6594 PMIC
- Drop OCMV configuration as DVDD is present now
- Lower i2c-1 rate to 100Khz after testing on multiple boards
- Enable PMIC drivers (as modules) in defconfig

Signed-off-by: Jai Luthra <[email protected]>
---
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

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

Best regards,
--
Jai Luthra <[email protected]>



2023-07-31 13:43:26

by Jai Luthra

[permalink] [raw]
Subject: [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz

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.

Signed-off-by: Jai Luthra <[email protected]>
---
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 9d34b8fe4ecb..752c2f640f63 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -338,7 +338,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.41.0


2023-07-31 14:22:18

by Jai Luthra

[permalink] [raw]
Subject: [PATCH 2/5] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators

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 <[email protected]>
Reviewed-by: Devarsh Thakkar <[email protected]>
---
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 133e32f7c6cc..9d34b8fe4ecb 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.41.0


2023-08-02 08:46:34

by Devarsh Thakkar

[permalink] [raw]
Subject: Re: [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz



On 31/07/23 18:14, Jai Luthra wrote:
> 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.
>
> Signed-off-by: Jai Luthra <[email protected]>

Reviewed-by: Devarsh Thakkar <[email protected]>

> ---
> 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 9d34b8fe4ecb..752c2f640f63 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
> @@ -338,7 +338,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";