* [PATCH 1/5] arm64: dts: ti: k3-am62a-main: Add nodes for McASP
2023-07-31 12:44 [PATCH 0/5] arm64: ti: Enable audio on AM62A Jai Luthra
@ 2023-07-31 12:44 ` Jai Luthra
2023-08-02 7:38 ` Devarsh Thakkar
2023-07-31 12:44 ` [PATCH 2/5] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Jai Luthra
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Jai Luthra @ 2023-07-31 12:44 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, 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.
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Jayesh Choudhary <j-choudhary@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 8397cb80f559..e4ced2cc790b 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.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] arm64: dts: ti: k3-am62a-main: Add nodes for McASP
2023-07-31 12:44 ` [PATCH 1/5] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
@ 2023-08-02 7:38 ` Devarsh Thakkar
0 siblings, 0 replies; 14+ messages in thread
From: Devarsh Thakkar @ 2023-08-02 7:38 UTC (permalink / raw)
To: Jai Luthra, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Catalin Marinas,
Will Deacon
Cc: linux-arm-kernel, devicetree, linux-kernel, Jayesh Choudhary
On 31/07/23 18:14, Jai Luthra wrote:
> Same as AM62, AM62A has three instances of McASP which can be used for
> transmitting or receiving digital audio in various formats.
>
> Signed-off-by: Jai Luthra <j-luthra@ti.com>
> Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@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 8397cb80f559..e4ced2cc790b 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";
> + };
> };
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/5] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators
2023-07-31 12:44 [PATCH 0/5] arm64: ti: Enable audio on AM62A Jai Luthra
2023-07-31 12:44 ` [PATCH 1/5] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
@ 2023-07-31 12:44 ` Jai Luthra
2023-07-31 12:44 ` [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz Jai Luthra
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Jai Luthra @ 2023-07-31 12:44 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, Jai Luthra,
Devarsh Thakkar
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 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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz
2023-07-31 12:44 [PATCH 0/5] arm64: ti: Enable audio on AM62A Jai Luthra
2023-07-31 12:44 ` [PATCH 1/5] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
2023-07-31 12:44 ` [PATCH 2/5] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Jai Luthra
@ 2023-07-31 12:44 ` Jai Luthra
2023-08-02 7:39 ` Devarsh Thakkar
2023-07-31 12:44 ` [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Jai Luthra
2023-07-31 12:44 ` [PATCH 5/5] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A Jai Luthra
4 siblings, 1 reply; 14+ messages in thread
From: Jai Luthra @ 2023-07-31 12:44 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, 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.
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 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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz
2023-07-31 12:44 ` [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz Jai Luthra
@ 2023-08-02 7:39 ` Devarsh Thakkar
0 siblings, 0 replies; 14+ messages in thread
From: Devarsh Thakkar @ 2023-08-02 7:39 UTC (permalink / raw)
To: Jai Luthra, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Catalin Marinas,
Will Deacon
Cc: linux-arm-kernel, devicetree, linux-kernel
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 <j-luthra@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@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 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";
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
2023-07-31 12:44 [PATCH 0/5] arm64: ti: Enable audio on AM62A Jai Luthra
` (2 preceding siblings ...)
2023-07-31 12:44 ` [PATCH 3/5] arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz Jai Luthra
@ 2023-07-31 12:44 ` Jai Luthra
2023-08-02 10:45 ` Devarsh Thakkar
2023-07-31 12:44 ` [PATCH 5/5] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A Jai Luthra
4 siblings, 1 reply; 14+ messages in thread
From: Jai Luthra @ 2023-07-31 12:44 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, Jai Luthra,
Jayesh Choudhary
Add nodes for audio codec and sound card, enable the audio serializer
(McASP1) under use and update pinmux.
Link: https://www.ti.com/lit/zip/sprr459
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Jayesh Choudhary <j-choudhary@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 752c2f640f63..5f68d2eefe0f 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-pins-default {
+ 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 {
@@ -359,6 +403,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 {
@@ -434,3 +491,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.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
2023-07-31 12:44 ` [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Jai Luthra
@ 2023-08-02 10:45 ` Devarsh Thakkar
2023-08-02 11:40 ` Jai Luthra
0 siblings, 1 reply; 14+ messages in thread
From: Devarsh Thakkar @ 2023-08-02 10:45 UTC (permalink / raw)
To: Jai Luthra, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Catalin Marinas,
Will Deacon
Cc: linux-arm-kernel, devicetree, linux-kernel, Jayesh Choudhary
Hi Jai,
Thanks for the patch.
On 31/07/23 18:14, Jai Luthra wrote:
> Add nodes for audio codec and sound card, enable the audio serializer
> (McASP1) under use and update pinmux.
>
> Link: https://www.ti.com/lit/zip/sprr459
> Signed-off-by: Jai Luthra <j-luthra@ti.com>
> Reviewed-by: Jayesh Choudhary <j-choudhary@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 752c2f640f63..5f68d2eefe0f 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";
In my opinion better to give the codec name instead of board name here.
Regards
Devarsh
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
2023-08-02 10:45 ` Devarsh Thakkar
@ 2023-08-02 11:40 ` Jai Luthra
2023-08-02 13:35 ` Nishanth Menon
0 siblings, 1 reply; 14+ messages in thread
From: Jai Luthra @ 2023-08-02 11:40 UTC (permalink / raw)
To: Devarsh Thakkar
Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
linux-arm-kernel, devicetree, linux-kernel, Jayesh Choudhary
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
Hi Devarsh,
On Aug 02, 2023 at 16:15:12 +0530, Devarsh Thakkar wrote:
> Hi Jai,
>
> Thanks for the patch.
>
> On 31/07/23 18:14, Jai Luthra wrote:
> > Add nodes for audio codec and sound card, enable the audio serializer
> > (McASP1) under use and update pinmux.
> >
> > Link: https://www.ti.com/lit/zip/sprr459
> > Signed-off-by: Jai Luthra <j-luthra@ti.com>
> > Reviewed-by: Jayesh Choudhary <j-choudhary@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 752c2f640f63..5f68d2eefe0f 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";
>
> In my opinion better to give the codec name instead of board name here.
I agree, maybe calling it "sk-am62a-tlv320aic3106" would be the most
clear option.
Running a quick ripgrep on next tree:
$ rg "simple-audio-card,name" arch/*/boot/dts/
I see a healthy mix of using both board and/or codec name here - with TI
almost always using the board name. Maybe we can change the convention,
but it would be a good idea to at least update SK-AM62 as well to use
the new convention.
Is it okay with you if it is handled as a separate series?
>
> Regards
> Devarsh
--
Thanks,
Jai
GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
2023-08-02 11:40 ` Jai Luthra
@ 2023-08-02 13:35 ` Nishanth Menon
2023-08-02 14:39 ` Devarsh Thakkar
2023-08-03 5:42 ` Jai Luthra
0 siblings, 2 replies; 14+ messages in thread
From: Nishanth Menon @ 2023-08-02 13:35 UTC (permalink / raw)
To: Jai Luthra
Cc: Devarsh Thakkar, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
linux-arm-kernel, devicetree, linux-kernel, Jayesh Choudhary
On 17:10-20230802, Jai Luthra wrote:
> Hi Devarsh,
>
> On Aug 02, 2023 at 16:15:12 +0530, Devarsh Thakkar wrote:
> > Hi Jai,
> >
> > Thanks for the patch.
> >
> > On 31/07/23 18:14, Jai Luthra wrote:
> > > Add nodes for audio codec and sound card, enable the audio serializer
> > > (McASP1) under use and update pinmux.
> > >
> > > Link: https://www.ti.com/lit/zip/sprr459
> > > Signed-off-by: Jai Luthra <j-luthra@ti.com>
> > > Reviewed-by: Jayesh Choudhary <j-choudhary@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 752c2f640f63..5f68d2eefe0f 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";
> >
> > In my opinion better to give the codec name instead of board name here.
>
> I agree, maybe calling it "sk-am62a-tlv320aic3106" would be the most
> clear option.
>
> Running a quick ripgrep on next tree:
>
> $ rg "simple-audio-card,name" arch/*/boot/dts/
>
> I see a healthy mix of using both board and/or codec name here - with TI
> almost always using the board name. Maybe we can change the convention,
> but it would be a good idea to at least update SK-AM62 as well to use
> the new convention.
>
> Is it okay with you if it is handled as a separate series?
Will this cleanup of existing board break any userspace? If so, NO and
follow existing "board" convention - I'd like to maintain consistency,
even if that is not exactly clean! If not, cleanup in a later series
is fine, but please make sure to follow through this week - with this
patch following the convention of choice.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
2023-08-02 13:35 ` Nishanth Menon
@ 2023-08-02 14:39 ` Devarsh Thakkar
2023-08-03 5:42 ` Jai Luthra
1 sibling, 0 replies; 14+ messages in thread
From: Devarsh Thakkar @ 2023-08-02 14:39 UTC (permalink / raw)
To: Nishanth Menon, Jai Luthra
Cc: Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
linux-arm-kernel, devicetree, linux-kernel, Jayesh Choudhary
Hi Jai, Nishant,
On 02/08/23 19:05, Nishanth Menon wrote:
> On 17:10-20230802, Jai Luthra wrote:
>> Hi Devarsh,
>>
>> On Aug 02, 2023 at 16:15:12 +0530, Devarsh Thakkar wrote:
>>> Hi Jai,
>>>
>>> Thanks for the patch.
>>>
>>> On 31/07/23 18:14, Jai Luthra wrote:
>>>> Add nodes for audio codec and sound card, enable the audio serializer
>>>> (McASP1) under use and update pinmux.
>>>>
>>>> Link: https://www.ti.com/lit/zip/sprr459
>>>> Signed-off-by: Jai Luthra <j-luthra@ti.com>
>>>> Reviewed-by: Jayesh Choudhary <j-choudhary@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 752c2f640f63..5f68d2eefe0f 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";
>>>
>>> In my opinion better to give the codec name instead of board name here.
>>
>> I agree, maybe calling it "sk-am62a-tlv320aic3106" would be the most
>> clear option.
>>
>> Running a quick ripgrep on next tree:
>>
>> $ rg "simple-audio-card,name" arch/*/boot/dts/
>>
>> I see a healthy mix of using both board and/or codec name here - with TI
>> almost always using the board name. Maybe we can change the convention,
>> but it would be a good idea to at least update SK-AM62 as well to use
>> the new convention.
>>
>> Is it okay with you if it is handled as a separate series?
>
Yes agreed, the naming can be taken care of as separate series as it also
applies to other TI board (AM62x), we can brainstorm on the naming separately
and not block this patch.
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Regards
Devarsh
> Will this cleanup of existing board break any userspace? If so, NO and
> follow existing "board" convention - I'd like to maintain consistency,
> even if that is not exactly clean! If not, cleanup in a later series
> is fine, but please make sure to follow through this week - with this
> patch following the convention of choice.
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
2023-08-02 13:35 ` Nishanth Menon
2023-08-02 14:39 ` Devarsh Thakkar
@ 2023-08-03 5:42 ` Jai Luthra
1 sibling, 0 replies; 14+ messages in thread
From: Jai Luthra @ 2023-08-03 5:42 UTC (permalink / raw)
To: Nishanth Menon, Devarsh Thakkar
Cc: Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
linux-arm-kernel, devicetree, linux-kernel, Jayesh Choudhary
[-- Attachment #1: Type: text/plain, Size: 3480 bytes --]
Hi Nishanth, Devarsh,
On Aug 02, 2023 at 08:35:02 -0500, Nishanth Menon wrote:
> On 17:10-20230802, Jai Luthra wrote:
> > Hi Devarsh,
> >
> > On Aug 02, 2023 at 16:15:12 +0530, Devarsh Thakkar wrote:
> > > Hi Jai,
> > >
> > > Thanks for the patch.
> > >
> > > On 31/07/23 18:14, Jai Luthra wrote:
> > > > Add nodes for audio codec and sound card, enable the audio serializer
> > > > (McASP1) under use and update pinmux.
> > > >
> > > > Link: https://www.ti.com/lit/zip/sprr459
> > > > Signed-off-by: Jai Luthra <j-luthra@ti.com>
> > > > Reviewed-by: Jayesh Choudhary <j-choudhary@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 752c2f640f63..5f68d2eefe0f 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";
> > >
> > > In my opinion better to give the codec name instead of board name here.
> >
> > I agree, maybe calling it "sk-am62a-tlv320aic3106" would be the most
> > clear option.
> >
> > Running a quick ripgrep on next tree:
> >
> > $ rg "simple-audio-card,name" arch/*/boot/dts/
> >
> > I see a healthy mix of using both board and/or codec name here - with TI
> > almost always using the board name. Maybe we can change the convention,
> > but it would be a good idea to at least update SK-AM62 as well to use
> > the new convention.
> >
> > Is it okay with you if it is handled as a separate series?
>
> Will this cleanup of existing board break any userspace? If so, NO and
> follow existing "board" convention - I'd like to maintain consistency,
> even if that is not exactly clean!
Upon further inspection, yes changing existing boards can break
userspace applications as some procfs entries are enumerated with the
name of the soundcard. So updating AM62x is out of the question.
I am in favor of maintaining naming consistency with this board.
Devarsh, I notice the current scheme is not entirely opaque, as the pcm
device enumerates both the cpu & codec driver names:
root@am62xx-evm:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=AM62xSKEVM
AM62x-SKEVM, davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0
Default Audio Device
sysdefault:CARD=AM62xSKEVM
AM62x-SKEVM, davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0
Default Audio Device
> If not, cleanup in a later series is fine, but please make sure to
> follow through this week - with this patch following the convention of
> choice.
>
Please feel free to pull the current series, if no further comments.
> --
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
--
Thanks,
Jai
GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/5] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A
2023-07-31 12:44 [PATCH 0/5] arm64: ti: Enable audio on AM62A Jai Luthra
` (3 preceding siblings ...)
2023-07-31 12:44 ` [PATCH 4/5] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Jai Luthra
@ 2023-07-31 12:44 ` Jai Luthra
2023-08-02 10:46 ` Devarsh Thakkar
4 siblings, 1 reply; 14+ messages in thread
From: Jai Luthra @ 2023-07-31 12:44 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, 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
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 03fce1752521..9bcfa9b50876 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -714,6 +714,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.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 5/5] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A
2023-07-31 12:44 ` [PATCH 5/5] arm64: defconfig: Enable TPS6593 PMIC for SK-AM62A Jai Luthra
@ 2023-08-02 10:46 ` Devarsh Thakkar
0 siblings, 0 replies; 14+ messages in thread
From: Devarsh Thakkar @ 2023-08-02 10:46 UTC (permalink / raw)
To: Jai Luthra, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Catalin Marinas,
Will Deacon
Cc: linux-arm-kernel, devicetree, linux-kernel
On 31/07/23 18:14, Jai Luthra wrote:
> 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
>
> Signed-off-by: Jai Luthra <j-luthra@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@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 03fce1752521..9bcfa9b50876 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -714,6 +714,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
>
^ permalink raw reply [flat|nested] 14+ messages in thread