From: Jai Luthra <j-luthra@ti.com>
To: Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
Aradhya Bhatia <a-bhatia1@ti.com>,
Devarsh Thakkar <devarsht@ti.com>,
Jayesh Choudhary <j-choudhary@ti.com>, Andrew Davis <afd@ti.com>,
Jai Luthra <j-luthra@ti.com>
Subject: [PATCH v9 6/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A
Date: Wed, 29 Mar 2023 16:01:03 +0530 [thread overview]
Message-ID: <20230313-mcasp_upstream-v9-6-6d937efe4ec4@ti.com> (raw)
In-Reply-To: <20230313-mcasp_upstream-v9-0-6d937efe4ec4@ti.com>
Add nodes for audio codec and sound card, enable the audio serializer
(McASP1) under use and update pinmux.
The codec (TLV320AIC3106) is also supplied with a DVDD 1.8V supply from
the PMIC (TPS6593x) on the SK. [1] As the PMIC driver and devicetree
node is missing, skip describing DVDD for now and manually set the OCMV
voltage.
Link: https://www.ti.com/lit/zip/sprr459 [1]
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 2296d656323c..8d7087e5f9e4 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -123,6 +123,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>;
+ };
+ };
};
&main_pmx0 {
@@ -201,6 +236,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 */
+ >;
+ };
};
&main_i2c0 {
@@ -235,6 +279,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 */
+ ai3x-ocmv = <1>; /* 1.5V */
+
+ /* Regulators */
+ AVDD-supply = <&vcc_3v3_sys>;
+ IOVDD-supply = <&vcc_3v3_sys>;
+ DRVDD-supply = <&vcc_3v3_sys>;
+ };
};
&sdhci1 {
@@ -303,3 +360,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.40.0
next prev parent reply other threads:[~2023-03-29 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 10:30 [PATCH v9 0/6] arm64: ti: Enable audio on AM62 and AM62A Jai Luthra
2023-03-29 10:30 ` [PATCH v9 1/6] arm64: defconfig: Enable audio drivers for TI K3 SoCs Jai Luthra
2023-03-30 2:54 ` Nishanth Menon
2023-03-29 10:30 ` [PATCH v9 2/6] arm64: dts: ti: k3-am62-main: Add McASP nodes Jai Luthra
2023-03-29 10:31 ` [PATCH v9 3/6] arm64: dts: ti: k3-am625-sk: Enable audio on AM62 SK Jai Luthra
2023-03-29 10:31 ` [PATCH v9 4/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Jai Luthra
2023-03-29 10:31 ` [PATCH v9 5/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Jai Luthra
2023-03-29 10:31 ` Jai Luthra [this message]
2023-03-30 2:50 ` [PATCH v9 6/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Nishanth Menon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230313-mcasp_upstream-v9-6-6d937efe4ec4@ti.com \
--to=j-luthra@ti.com \
--cc=a-bhatia1@ti.com \
--cc=afd@ti.com \
--cc=catalin.marinas@arm.com \
--cc=devarsht@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=j-choudhary@ti.com \
--cc=kristo@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).