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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96882C6FD19 for ; Mon, 13 Mar 2023 14:51:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231731AbjCMOva (ORCPT ); Mon, 13 Mar 2023 10:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbjCMOu4 (ORCPT ); Mon, 13 Mar 2023 10:50:56 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A56738BD; Mon, 13 Mar 2023 07:50:24 -0700 (PDT) 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 Content-Type: text/plain; charset="utf-8" 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 Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use and update pinmux. 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 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>; +}; -- 2.39.2