From patchwork Mon Mar 13 14:49:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13172738 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 68CD1C6FD19 for ; Mon, 13 Mar 2023 15:46:50 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3q+BiMJeYdF7xdlEW1DbWnsnkpa0WBD46j1l1+j+160=; b=MUc3lJZBKfNACf 2Jws++5mZidwsYLTiDb9QEvzFVJb4MJN6NshuSnh4KeqI1325PrSvmK9uvFTH19Eo6GiImR9YDV8n hwi6mvikmjR43DE8hYY3jVuc0Dj+n3PkJrbCsXlRtMZszxRE/FCp0n5wBsLJF5jH0colxiyXWsYRh UjKqAxOXqWKmRurU7STxgfkdNLfNZWlNre9oNEmEpbvUVR8cHDEEi2BVVSl8tBxdUY4Q9uhhaahIf 06H7JInHRR/DqMu6hsfYqBUzHzrFRlUPMWTW4Vm162GRQKufqxEMjsDLk7Afb2joH3YpLgwSpXix1 nCboDju/J1nu1Ysn4PGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkMv-006Td2-G3; Mon, 13 Mar 2023 15:45:49 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkMZ-006TWX-F9 for linux-arm-kernel@bombadil.infradead.org; Mon, 13 Mar 2023 15:45:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=M9oOgXpy7VJsV6og9C3G518iHqPrz1pxGesdLOm0XXk=; b=FQdub6Jp/JCbCUV0KtDTuHKU5x uslyACtEFibVL5QuXH3xzUdlKV7MuCC4ZcrK5Ty1QKbrxo25DWV0O+vVJKoTgJJHQ54g7ctE81owC glGSDCYuCTOqdH4J79zOVpqmUiwk+Pb5qXPO7yxJY/NCRcoyNNtEwkR1oFPkFmCji79LhSp5/3XaB 3653pMOn/PppeL8kZTEqpYSCedEI01PH9xf+4JyUMmjMYMLKWZJzg35FQSSyrADEUNpW56pT/dhIx XWK9jTU19F+O0a9YvfZmsxDzJcvW4U0bU1h18IohMA1h4f4dwCdM0fRwv37qI9YiwEB9o02pKGMDt tOM9eKRw==; Received: from fllv0016.ext.ti.com ([198.47.19.142]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pbjUq-001P6P-2S for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 14:50:00 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32DEnl0G098652; Mon, 13 Mar 2023 09:49:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678718987; bh=M9oOgXpy7VJsV6og9C3G518iHqPrz1pxGesdLOm0XXk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=aQyd0xzxpQsh5u3jdoKM6M3PYnj10FG4/56uWrIUt8BwLV00IYZd/SfGNwBK6IrQN Rwv6/WWUoU34THeqgQTC7a0jCMA08QECxnEhWAFZWY2ym5/kdWlDEIbNX27djucOgX FqGNj6rA1LvKI4xwz9RVuy69YIOQx7bEccrYOALE= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32DEnlgj123692 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Mar 2023 09:49:47 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 13 Mar 2023 09:49:46 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 13 Mar 2023 09:49:46 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32DEnkOC005381; Mon, 13 Mar 2023 09:49:46 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Jai Luthra Subject: [PATCH v5 6/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Date: Mon, 13 Mar 2023 20:19:35 +0530 Message-ID: <20230313-mcasp_upstream-v5-6-d6844707aa8a@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v5-0-d6844707aa8a@ti.com> References: <20230313-mcasp_upstream-v5-0-d6844707aa8a@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3124; i=j-luthra@ti.com; h=from:subject:message-id; bh=e0XqG1n85p5rfGQ8c31UUUGa4/j6/dGgmGuUYExZ8Ok=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkDzbWHCsj+mR3HmGG6neUPrlEPfrjErffXZIG1 OpecTjEp62JAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZA821gAKCRBD3pH5JJpx RbMRD/sH6pQfqs0i5JoEQ0U9031GIJfnNJ6vKBj6cb4dHbDFv9//1/cjEF8eYfeYRzQ5bRAxPn1 sF1kkUigh85xwcTkXQfT3WuafJQYf2UtSZGv6DaAXJb86zAur8Qw8e/rgBXbSiHFaQWg7xcm+JN Kab7/Sn5KNB6uBUOtwHGMHCb7yq6gdRuEGY8UqPl7Vhv/71Qd2w+JzLRpeBALGlgQ2LfgYNBQQJ E/+E//B/1veWZfC/qU+BIZhX5iGPUOvpLf7eQdkgtkH5ksNonW0bgcxwrVCMLHYrT/pnUUL0x9z vNaebMRtO8DVPT6VGyXyDClQvQTIvOVqoXiuylww8pSM1Gr6PH89JhBxYuMCerJJ5zuUeblovYY khMIJ9N6rPltOEndUeBFvC9G18Es9snoH4W/tlImUVzI9SDjy8FQBHmgTxFeSLCupGki24ZlDVs CrwYZ5gQw7YYAOBnIqsWeJ/da0g6L/8A1lOi+c610H5QmsNqHJ8s970+3uNjTyzV0pAHKJzyF/W CftLyigWalAZp4js58hKhGXvA687VZCzrAckohSSAKDCHi3/DvAB7GkVtb78bVXJmsN5CZq/2tL dpUxrHNsuH3SxRBFMqazFs3nY9TooEzJxGpzWN8AtL3NDmZHfmhTVrGRSQiFcoXpiMP2vsMiNLG ayaFu8AJ0uGbabA== 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-20230313_144957_256736_27278993 X-CRM114-Status: GOOD ( 11.28 ) 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. Signed-off-by: Jai Luthra Reviewed-by: Jayesh Choudhary --- 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 063e69e45163..1775ed154aff 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -122,6 +122,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 { @@ -200,6 +235,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 { @@ -234,6 +278,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 */ + status = "okay"; + + /* Regulators */ + AVDD-supply = <&vcc_3v3_sys>; + IOVDD-supply = <&vcc_3v3_sys>; + DRVDD-supply = <&vcc_3v3_sys>; + }; }; &sdhci1 { @@ -302,3 +359,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>; +};