From patchwork Tue Oct 3 09:11:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 147773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1953271vqb; Tue, 3 Oct 2023 02:13:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEH3cu1nQcB+1E45whuwLVlk0Egvm4kwWxQcITQAV9R9KdIdNvcdwaCiLudcCH8BmQD2a8N X-Received: by 2002:a05:6358:590d:b0:14a:ddb8:9a12 with SMTP id g13-20020a056358590d00b0014addb89a12mr15904366rwf.6.1696324381047; Tue, 03 Oct 2023 02:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696324381; cv=none; d=google.com; s=arc-20160816; b=KIp9pfeTBu7z3JUYepH3rNHk0yCJ0ECovlLgFh68kXOCaZZ6zdu0Px9R7OsOglNiVd rLAY43NmNJesUTYZcC2RsOzjSBPXxTeuZ5BRo37YEVJB54nyYEcErgd5IhxrEQ+6cjLf Ksa4jNfdSO6WsWwE3cM8vHxdHbp8Ersuf03CbjvR/8bQP9BSYJ7DrD91HT8qCOBEOs7d /q9xmU2rqNbyeayVqMxAHiVc9ZyvvkLxc7F7M+aaoXuLFDv2uHzQt9QeyURN6Wld60vC uuv25ObYbr+/Fve++jpmnpTdPhueHLjJkGinwCZmGgWHTjQ/pk1RhJWfgpG+Wz7tbm7t NXpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=KKr+QvZEnvmd560G3Pi+nMek1mf67eakn+QhxahTASg=; fh=tLhAGTttXh18u18d6UOsWdUMeB3VfA1IORyQttQE6rQ=; b=K6ZkwdoXOazOVJ3hY0Mxz2txq/9lyAaVKqHkUODK4VIjmjC3Sg6H/FOCWdKqhTS6Xa QXTLPaRotaHYALumTIo2kUA1sZxamS5wApUpGNlCjSyQBT94vtgq6OgsPqDWy7W4mqQK XzeU5AKHDlQJyJGTV/o+6+Umt8VZ0Ncg4y74avoOThicE6yHBsW1/osDZvL4O+4RY/of i6QEe20dk6AhMWtcUDXRu2+sKDXqsi2oOT77NEmPKUFRetowLxrBdI4J+Y5A5SDdLkTb eJdP6bhjecXnoMMunZKDKwLLiGxiCIWWp0zrcR87JFovy60yELtAnnHPvzgcqch8f/tr wFOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VHWf01ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t13-20020a056a0021cd00b0068fac3509a9si1033409pfj.350.2023.10.03.02.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 02:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VHWf01ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id C509380FE535; Tue, 3 Oct 2023 02:12:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239588AbjJCJMe (ORCPT + 18 others); Tue, 3 Oct 2023 05:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239539AbjJCJMM (ORCPT ); Tue, 3 Oct 2023 05:12:12 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2F3AF; Tue, 3 Oct 2023 02:12:08 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3939Bxgr034489; Tue, 3 Oct 2023 04:11:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1696324319; bh=KKr+QvZEnvmd560G3Pi+nMek1mf67eakn+QhxahTASg=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=VHWf01ju3CwhKuJbNyYHwS/HWzY58xF+LTfEZYThKZU5F/7gF777NrbG/GC457EbD +z0/nA95c5i8sEqeUX7TFdSlikc37+M9dhzOW6WS7Hxf7fa+uuUxTBOtFIJZUwky0P s49l68mu4/CUBJn+2RUerHj8TrRn7VibUoPE9vtw= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3939BxxX000953 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Oct 2023 04:11:59 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 3 Oct 2023 04:11:58 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Tue, 3 Oct 2023 04:11:58 -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 3939BvKx021446; Tue, 3 Oct 2023 04:11:58 -0500 From: Jai Luthra Date: Tue, 3 Oct 2023 14:41:34 +0530 Subject: [PATCH v3 5/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A MIME-Version: 1.0 Message-ID: <20231003-mcasp_am62a-v3-5-2b631ff319ca@ti.com> References: <20231003-mcasp_am62a-v3-0-2b631ff319ca@ti.com> In-Reply-To: <20231003-mcasp_am62a-v3-0-2b631ff319ca@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=+xkZpNOowzAe51tzMWmJuWhX5IV9tm2zm+W/RB+Jfgs=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlG9rRkPQktzC01NM3xxNT6+Ktj9stwSjGBiR0z zIqqClvPlGJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZRva0QAKCRBD3pH5JJpx Re9dD/sFpUi/UU9bWQcutcZAfMBkXbnl944K1gH2ZU6y3XpQyvhJnGAc6NBhPvQJl/dJ/ETDs+C N7V0NCRKqPxiXFlq1xa/I9miMRXdx9lVzIdfFRxiYx5aGpTiJ4MfZaSolV36AA7QnQPFpmp9ZDo ZpQwWVldsyyz2xgIbbtDTD9EhsCSbaBATJ/wTTM3/hHp36VfEg1mv0q9tCklfxDNWDK/W6+Yif2 vIpzLgHB2vWlaNgc+R1jYf8YaZwE+HFEuUsCt09jIGDTmuB7E9k5oPv2FREGWIY8Du9bTfVK/rj aTUzrbzmYf/HUC4VEyn5xPGe0wX8d2PrgrT4vWMXDJNdqMRgbZ4D5qCLNM5/rQ8PcVcQHRsWjzi dvsNWqfNSBOrSZJIG5G9bkXd+9tytdbnouM/yKu04ZtdFgIxv5BLqRWYCH5rscdd3PC6L+apsTE Z2Vg0oOJWDZL5IcErcyNba42DcYsFrjGOyY7rPRYTJVmVfsd8XUDIWpE0xIXSdepGbfJ8TpY9rV 6BPtkqYBI5wx6ie0cq+oqSs6/R9BOf2RSF83FH9s0Nm/nzqxiIt2Dk9fcN26CqU6ONrYcUz35KS 9YfVXYV/uZYc2dadpwGn3XzU1IdoPr3sOQMbhf3zPxrPutLFyTR7oF5KBg79jLg3mSradtr6OcI fMSOdmiVWr6oa9A== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 02:12:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778725034061671877 X-GMAIL-MSGID: 1778725034061671877 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..8f64ac2c7568 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-default-pins { + 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>; +};