* [PATCH v3 0/2] Enable audio support for J722S-EVM
@ 2024-06-25 11:32 Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 1/2] arm64: dts: ti: k3-j722s-main: Add audio_refclk node Jayesh Choudhary
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jayesh Choudhary @ 2024-06-25 11:32 UTC (permalink / raw)
To: linux-kernel, nm, vigneshr, j-luthra, j-choudhary
Cc: kristo, robh, krzk+dt, conor+dt, linux-arm-kernel, devicetree,
u-kumar1
Hello All,
These 2 patches enable audio on J722S-EVM platform.
This patch depends upon the bcdma driver fix posted upstream:
<https://lore.kernel.org/all/20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.com/>
Changelog v2->v3:
- Move audio_refclk1 node to SOC level dtsi (k3-j722s-main.dtsi)
in a separate patch
- Rename vcc_3v3_aud to vsys_io_3v3
- Fix ball number for McASP pins in comments
- Fix padding for audio_ext_refclk1_pins_default pinmux
- Pick up R-by from Jai
v2 patch:
<https://lore.kernel.org/all/20240612051246.41117-1-j-choudhary@ti.com/>
Changelog v1->v2:
- Fix dtb warning for pin-muxing
v1 patch:
<https://lore.kernel.org/all/20240611082820.17442-1-j-choudhary@ti.com/>
Jayesh Choudhary (2):
arm64: dts: ti: k3-j722s-main: Add audio_refclk node
arm64: dts: ti: k3-j722s-evm: Enable analog audio support
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 109 ++++++++++++++++++++++
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 9 ++
2 files changed, 118 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] arm64: dts: ti: k3-j722s-main: Add audio_refclk node
2024-06-25 11:32 [PATCH v3 0/2] Enable audio support for J722S-EVM Jayesh Choudhary
@ 2024-06-25 11:33 ` Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 2/2] arm64: dts: ti: k3-j722s-evm: Enable analog audio support Jayesh Choudhary
2024-07-04 7:55 ` [PATCH v3 0/2] Enable audio support for J722S-EVM Vignesh Raghavendra
2 siblings, 0 replies; 4+ messages in thread
From: Jayesh Choudhary @ 2024-06-25 11:33 UTC (permalink / raw)
To: linux-kernel, nm, vigneshr, j-luthra, j-choudhary
Cc: kristo, robh, krzk+dt, conor+dt, linux-arm-kernel, devicetree,
u-kumar1
On J722S SoC, the AUDIO_REFCLK1 can be used as input to external
peripherals when configured through CTRL_MMR.
Add audio_refclk1 node which would be used as system clock for the
audio codec TLV320AIC3106.
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
index 228c6c89245c..a6b7817d35bc 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
@@ -163,6 +163,15 @@ serdes_ln_ctrl: mux-controller@4080 {
mux-reg-masks = <0x00 0x3>, /* SERDES0 lane0 select */
<0x10 0x3>; /* SERDES1 lane0 select */
};
+
+ audio_refclk1: clock@82e4 {
+ compatible = "ti,am62-audio-refclk";
+ reg = <0x82e4 0x4>;
+ clocks = <&k3_clks 157 18>;
+ assigned-clocks = <&k3_clks 157 18>;
+ assigned-clock-parents = <&k3_clks 157 33>;
+ #clock-cells = <0>;
+ };
};
&wkup_conf {
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] arm64: dts: ti: k3-j722s-evm: Enable analog audio support
2024-06-25 11:32 [PATCH v3 0/2] Enable audio support for J722S-EVM Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 1/2] arm64: dts: ti: k3-j722s-main: Add audio_refclk node Jayesh Choudhary
@ 2024-06-25 11:33 ` Jayesh Choudhary
2024-07-04 7:55 ` [PATCH v3 0/2] Enable audio support for J722S-EVM Vignesh Raghavendra
2 siblings, 0 replies; 4+ messages in thread
From: Jayesh Choudhary @ 2024-06-25 11:33 UTC (permalink / raw)
To: linux-kernel, nm, vigneshr, j-luthra, j-choudhary
Cc: kristo, robh, krzk+dt, conor+dt, linux-arm-kernel, devicetree,
u-kumar1
The audio support on J722S-EVM is using TLV320AIC3106[0] codec
connected to McASP1 serializers.
- Add the nodes for sound-card, audio codec and McASP1.
- Add hog for TRC_MUX_SEL to select between McASP and TRACE signals
- Add hogs for GPIO_AUD_RSTn and MCASP1_FET_SEL which is used to
switch between HDMI audio and codec audio.
- Add pinmux for MCASP1 and AUDIO_EXT_REFCLK1.
[0]: <https://www.ti.com/lit/gpn/TLV320AIC3106>
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Jai Luthra <j-luthra@ti.com>
---
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 109 ++++++++++++++++++++++++
1 file changed, 109 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index 253b02f0437d..facf61957af5 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -107,6 +107,15 @@ vdd_sd_dv: regulator-TLV71033 {
<3300000 0x1>;
};
+ vsys_io_3v3: regulator-vsys-io-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_io_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vsys_io_1v8: regulator-vsys-io-1v8 {
compatible = "regulator-fixed";
regulator-name = "vsys_io_1v8";
@@ -124,6 +133,35 @@ vsys_io_1v2: regulator-vsys-io-1v2 {
regulator-always-on;
regulator-boot-on;
};
+
+ codec_audio: sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "J722S-EVM";
+ 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 = <&audio_refclk1>;
+ };
+ };
};
&main_pmx0 {
@@ -210,6 +248,21 @@ main_usb1_pins_default: main-usb1-default-pins {
J722S_IOPAD(0x0258, PIN_INPUT, 0) /* (B27) USB1_DRVVBUS */
>;
};
+
+ main_mcasp1_pins_default: main-mcasp1-default-pins {
+ pinctrl-single,pins = <
+ J722S_IOPAD(0x0090, PIN_INPUT, 2) /* (P27) GPMC0_BE0n_CLE.MCASP1_ACLKX */
+ J722S_IOPAD(0x0098, PIN_INPUT, 2) /* (V21) GPMC0_WAIT0.MCASP1_AFSX */
+ J722S_IOPAD(0x008c, PIN_OUTPUT, 2) /* (N23) GPMC0_WEn.MCASP1_AXR0 */
+ J722S_IOPAD(0x0084, PIN_INPUT, 2) /* (N21) GPMC0_ADVn_ALE.MCASP1_AXR2 */
+ >;
+ };
+
+ audio_ext_refclk1_pins_default: audio-ext-refclk1-default-pins {
+ pinctrl-single,pins = <
+ J722S_IOPAD(0x00a0, PIN_OUTPUT, 1) /* (N24) GPMC0_WPn.AUDIO_EXT_REFCLK1 */
+ >;
+ };
};
&cpsw3g {
@@ -285,6 +338,12 @@ &wkup_i2c0 {
bootph-all;
};
+&k3_clks {
+ /* Configure AUDIO_EXT_REFCLK1 pin as output */
+ pinctrl-names = "default";
+ pinctrl-0 = <&audio_ext_refclk1_pins_default>;
+};
+
&main_i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
@@ -316,6 +375,41 @@ p05-hog {
gpios = <5 GPIO_ACTIVE_HIGH>;
output-high;
};
+
+ p01_hog: p01-hog {
+ /* P01 - TRC_MUX_SEL */
+ gpio-hog;
+ gpios = <0 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "TRC_MUX_SEL";
+ };
+
+ p02_hog: p02-hog {
+ /* P02 - MCASP1_FET_SEL */
+ gpio-hog;
+ gpios = <2 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "MCASP1_FET_SEL";
+ };
+
+ p13_hog: p13-hog {
+ /* P13 - GPIO_AUD_RSTn */
+ gpio-hog;
+ gpios = <13 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "GPIO_AUD_RSTn";
+ };
+ };
+
+ tlv320aic3106: audio-codec@1b {
+ #sound-dai-cells = <0>;
+ compatible = "ti,tlv320aic3106";
+ reg = <0x1b>;
+ ai3x-micbias-vg = <1>; /* 2.0V */
+ AVDD-supply = <&vsys_io_3v3>;
+ IOVDD-supply = <&vsys_io_3v3>;
+ DRVDD-supply = <&vsys_io_3v3>;
+ DVDD-supply = <&vsys_io_1v8>;
};
};
@@ -457,3 +551,18 @@ &usb1 {
phys = <&serdes0_usb_link>;
phy-names = "cdns3,usb3-phy";
};
+
+&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
+ >;
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 0/2] Enable audio support for J722S-EVM
2024-06-25 11:32 [PATCH v3 0/2] Enable audio support for J722S-EVM Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 1/2] arm64: dts: ti: k3-j722s-main: Add audio_refclk node Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 2/2] arm64: dts: ti: k3-j722s-evm: Enable analog audio support Jayesh Choudhary
@ 2024-07-04 7:55 ` Vignesh Raghavendra
2 siblings, 0 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2024-07-04 7:55 UTC (permalink / raw)
To: linux-kernel, nm, j-luthra, Jayesh Choudhary
Cc: Vignesh Raghavendra, kristo, robh, krzk+dt, conor+dt,
linux-arm-kernel, devicetree, u-kumar1
Hi Jayesh Choudhary,
On Tue, 25 Jun 2024 17:02:59 +0530, Jayesh Choudhary wrote:
> These 2 patches enable audio on J722S-EVM platform.
>
> This patch depends upon the bcdma driver fix posted upstream:
> <https://lore.kernel.org/all/20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.com/>
>
> Changelog v2->v3:
> - Move audio_refclk1 node to SOC level dtsi (k3-j722s-main.dtsi)
> in a separate patch
> - Rename vcc_3v3_aud to vsys_io_3v3
> - Fix ball number for McASP pins in comments
> - Fix padding for audio_ext_refclk1_pins_default pinmux
> - Pick up R-by from Jai
>
> [...]
I have applied the following to branch ti-k3-dts-next on [1].
Thank you!
[1/2] arm64: dts: ti: k3-j722s-main: Add audio_refclk node
commit: a5cd7067e45c33907afe20c0d1ab5e75b09a1ee2
[2/2] arm64: dts: ti: k3-j722s-evm: Enable analog audio support
commit: 3a36c535dfd279ff093cc9271f474a99531bea21
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] 4+ messages in thread
end of thread, other threads:[~2024-07-04 7:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 11:32 [PATCH v3 0/2] Enable audio support for J722S-EVM Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 1/2] arm64: dts: ti: k3-j722s-main: Add audio_refclk node Jayesh Choudhary
2024-06-25 11:33 ` [PATCH v3 2/2] arm64: dts: ti: k3-j722s-evm: Enable analog audio support Jayesh Choudhary
2024-07-04 7:55 ` [PATCH v3 0/2] Enable audio support for J722S-EVM 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).