From patchwork Thu Sep 28 09:24:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13402387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A8EFCE7B12 for ; Thu, 28 Sep 2023 09:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dhtLGm/ME3JUbQXIBvG+Co2zVq/avqsud1JGqroL9Qk=; b=LwE8DPeB7cw9Ug oSVI0XYlkawwm3rhsAUY9JkHEhNChT6HKkctGhmZzUyt/1JouRS7iHIcd3vuv0q9L5acUEWJ38ukZ n71syOoHFNa3qV6gjTmXlnTzUKymk913y2KqgHuFl/ZA3QNcsTCmMDmxOSKqvPmT2tBoxlstXXMon RNcYlDa5vTIwiMfjxqqPyLf6WdcR7dlnLtIYmB6MUtrAQVEZwvkSYPr94befGcTAH1j4ghz/01fOu L6UHsbwPurIt49e6vqrd6cLktrPOZp3wxyXycdDhuX5HwkJDJg2vvY+imVN35JIZKqxxnzbm1uTIx 9SEdFWV6XNATqY7NVqYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlnH0-002jAx-22; Thu, 28 Sep 2023 09:25:30 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlnGk-002j1g-3B for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2023 09:25:17 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 38S9P9CD118943; Thu, 28 Sep 2023 04:25:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1695893109; bh=QldHW5aQ92qfFoxi2g/iZZDJsi0V5jj+6uN5TcYh0Ls=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=NdWtzcAgsM2ehwMy8oWeuNQGMc7d8c7QRr4ynBX6H4kSLTx4g/Lm69D5Lej3/z8ti pFvecB2rbQpvOol+rRMZa5MkpFWCZyGdHYWoUk2xEFdM1V9SvtwoHnEd40de0i7Nrc yHyJTbRgaF8+kNOglY7HbuSaANBIOgcrgj7zqwcc= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 38S9P9DM077544 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Sep 2023 04:25:09 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 28 Sep 2023 04:25:08 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 28 Sep 2023 04:25:08 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 38S9P8Br020218; Thu, 28 Sep 2023 04:25:08 -0500 From: Jai Luthra Date: Thu, 28 Sep 2023 14:54:30 +0530 Subject: [PATCH v2 5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A MIME-Version: 1.0 Message-ID: <20230928-mcasp_am62a-v2-5-ce9f0e1ba22b@ti.com> References: <20230928-mcasp_am62a-v2-0-ce9f0e1ba22b@ti.com> In-Reply-To: <20230928-mcasp_am62a-v2-0-ce9f0e1ba22b@ti.com> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon CC: , , , , , Jai Luthra , Jayesh Choudhary X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3271; i=j-luthra@ti.com; h=from:subject:message-id; bh=1F4EHY5Ra0+GiPN+5tdT3P1uireAl68KMG4dSOF8F/s=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlFUZlskkClleRXBjtrwy0RhB1Z37N3XiAO4III yNn84nP6vKJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZRVGZQAKCRBD3pH5JJpx Raw+EAC/IdZeFuyj9C9mBNczBedtWwNiSgGHO3fJXGwpvB363dgH6DhkGZY8j5JYqv1byKu4+KF IqjB8LguodXvT0/La07ZnwZMeFCj5FQRw57X1NXXIqpDzO5L2zuR1sNli6mIu+fg3zykUoKrogk PIHb0DYYLG5rFFsTofo5aHJr0Q30Jyq/CEYw44yvbrclbXBci+uRzHiyld0eE+evlcOdlf6THwp 9TJTr9bVRqLtf4axQxpGGP4RudKFVM+GDZCkr3BYINSjZbKHPmsyV2OVYiYpB4VMcDPrLI8qP0p nP9Vfbs3nV0dAjdTWlTuD83yma4RvG8mTYFpW9B+fq+rd6HNnnsC0HhamjPQEvI8lP+ZeaIo+ei n8wwIdhrqB24/81LFTfJ/9WOu/lDNairnz9Dkhjy5UDqsE4LjhwRjpV0S3SvN/Ly3V8/vtaM4Mg RA2Fr1lBhItVo0FtnZQ6yfcokc77suK7Y8Zl0bSyKpUl5eVNJMbyx7uMbLuQvEG7XYnoL4eOSRD 2f11dR27x7SXz5rBZ06uDn+o7wCfrwTyhA4GKKUMvXeO3Zb6SjDuBNU+fWiKnYZQQ8nph3vam/N X5SF1onhSOx62+AswsPjYpxKNCawRr+tZc5FJz5/3xvGhTZpG49x0629kex37nnu4JmrbYq/Jln boQYvTzywjFW6PQ== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230928_022515_123558_9A5FCAD3 X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use and update pinmux. Reviewed-by: Jayesh Choudhary Reviewed-by: Devarsh Thakkar Link: https://www.ti.com/lit/zip/sprr459 Signed-off-by: Jai Luthra --- 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..694eb36b4eb9 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 { @@ -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>; +};