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: 145930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3208188vqu; Thu, 28 Sep 2023 03:29:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/LOG4iZxzywsLzjAEpTRumy2Ora7X4pVRu++MVwblKKMybOMeFsq8c/m+A8zYf93dGmlR X-Received: by 2002:a05:6a21:6da4:b0:14c:76bd:10df with SMTP id wl36-20020a056a216da400b0014c76bd10dfmr536795pzb.19.1695896972707; Thu, 28 Sep 2023 03:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695896972; cv=none; d=google.com; s=arc-20160816; b=BEHbRVvqLzN0TGQJ8HBfx+3YpAXG54Uyms28ApnnoHTz+EonhTp0u0xAgW6NvE5Cyf Xbir/s5kjy3nISKLB9wlvpk9sNdXmLkJQn7U6t2QKj5OyAGKhgodxToJFgzxi9quYr1B 8trTWZi/Hdj94a/dIC6gIhF5i1HPzaAXmWHjudztX697hGkY9wzoMo3ZkWNtY5vb1hMN MYDr1f2+ft8oYSqMd2gaZ1cEabA3fy/np5MHRCeyqfHO4rWOPF/+8XoUJ99fctZP+ARF 0BKAD7W4CD7OxGTD2U0mK8VV58eKhlJl0p7/DrUMefXr30wbZ6DuPI0tIRMMct6iewx6 uVtQ== 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=QldHW5aQ92qfFoxi2g/iZZDJsi0V5jj+6uN5TcYh0Ls=; fh=tLhAGTttXh18u18d6UOsWdUMeB3VfA1IORyQttQE6rQ=; b=wGjSbD3DwQwdCDbAolUZWiwqRvsW0SA8egFsoX0jimv2q7AyAcTepy6xeF7hdh2r0f kbK7H+tRbJtgB91Qw0WkyXseGMPHcM8X1U1Uf5/nMppV9QjY5DfEnPyqZT4EWNv2v6zR TU391r3KFeaasef3+l0cNs69sr91tqtKd70oPEipyMRtMRvR8HQTQvPMRTsmfCWHn8cE N6RpLqhmooqM1i8TvFdUwuh1FpCs//be4eiJUL83hOWEYur8HjGOAFYyUj2EnTdkq2DX 6rYQCxv9cjoOn9H3NltNGJW3hBVcdo5Xk1j5sSaNFb2AamE2DHMQRMPZYWawP83B/gkj vjPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NdWtzcAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id b17-20020a170903229100b001c61ad51779si11247031plh.623.2023.09.28.03.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 03:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NdWtzcAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 4043F8070EF0; Thu, 28 Sep 2023 02:26:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231778AbjI1JZt (ORCPT + 21 others); Thu, 28 Sep 2023 05:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231826AbjI1JZX (ORCPT ); Thu, 28 Sep 2023 05:25:23 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32623CE4; Thu, 28 Sep 2023 02:25:18 -0700 (PDT) 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-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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 02:26:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778276864039606107 X-GMAIL-MSGID: 1778276864039606107 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>; +};