From patchwork Fri Mar 24 08:55:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 74443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp481823vqo; Fri, 24 Mar 2023 02:14:26 -0700 (PDT) X-Google-Smtp-Source: AKy350Zx9Izp5eNrCGta0rAUTDL2jbW5boMfS3VssFfaTPCHXtmxSEdBvPIfHEP3qh1v9LPydGmp X-Received: by 2002:a17:902:ecd1:b0:19b:64bb:d546 with SMTP id a17-20020a170902ecd100b0019b64bbd546mr2183733plh.18.1679649266229; Fri, 24 Mar 2023 02:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679649266; cv=none; d=google.com; s=arc-20160816; b=vU4HL8rfIgiJboWvO7EPROVIV2WZSd5e/F7kfZgZeGC5Q8djoDBRIoyhFoDUECwQJd T+WccgciyfSJiqjvcmmB2RkgA8kLP8ypC7cp5tSKyC06AYywPkqtNTw8sr+yHh4lcgkb ec7Nr446liUTZHn0Wj+IcddPm7ylDDUBW6AzrkN2fSyxT9nCn3x8denbQ4mPrUz8afsW J/DRJPuCKvhDjHlBk83OudveKFvkIMQPIvQgCjFh6jaa7Lh7O+E1VMQpfvMxl11u09Gt UcZhmOZNZ1uk3TbNlrbySDFW33acr+23nwXClOjKxZCybj/l2GGbtqCMhSvCHrSDnutu OoeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lV+HXvD7QcdmJmzElwDez7tC33GDs2nZ7rVEaoUKP70=; b=zUf05MNa88kmCKtUTe1g+xWy2VjqYdXSmwlwwrusFEjVDuS5sKaU+jS738Qo5V7cbV hEj2+NVbh1jORh6xYRjxAEmuwxO6TrVXaM/8rduymYlcpQpv79cGpGyQvwvZBzOteWq3 N/R//lc5xj44Dt1ziFQloWUd+6s1wku8lwXy51t2fpk4mjOIJ0xX7zWwB/wExVokHVE0 A7okA9JsCkSYL1RR7OSMKajkA9eQYGVstsUnkuCaHeVWCMqgNkQYnmp7G+iYSrxmUik4 XBzJJAvV7Vj2ikzGR38ycY57cVXnJ5QIV+Slf0Uh3UmaplZttNbN17zip7GfPupgfjvK N3FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rEgB8SWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a170902848c00b0019ca3e987dbsi19326065plo.631.2023.03.24.02.14.13; Fri, 24 Mar 2023 02:14:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rEgB8SWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231974AbjCXIz7 (ORCPT + 99 others); Fri, 24 Mar 2023 04:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbjCXIzn (ORCPT ); Fri, 24 Mar 2023 04:55:43 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58E62241C9; Fri, 24 Mar 2023 01:55:40 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32O8tU0Q077432; Fri, 24 Mar 2023 03:55:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1679648130; bh=lV+HXvD7QcdmJmzElwDez7tC33GDs2nZ7rVEaoUKP70=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rEgB8SWp+aFINKlmfVUHmWKgA/0BfvP9p7VQ/gbNX/LthGHZgi7nDJg3pkR+1FK+I Vop71CBOhZzWs3crIxsiH06SUtRiDgQ4Nfj2APjbxZzLflXaXzcjWtLfIWUAVEx3ze jm1BSLy8uJ9kMv6SRJRui8X8+soO+4sGB7zy1HF4= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32O8tUoo063786 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Mar 2023 03:55:30 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 24 Mar 2023 03:55:29 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE110.ent.ti.com (157.170.170.21) 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; Fri, 24 Mar 2023 03:55:29 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32O8tTCe035786; Fri, 24 Mar 2023 03:55:29 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v7 6/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Date: Fri, 24 Mar 2023 14:25:20 +0530 Message-ID: <20230313-mcasp_upstream-v7-6-88168d0df9b8@ti.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230313-mcasp_upstream-v7-0-88168d0df9b8@ti.com> References: <20230313-mcasp_upstream-v7-0-88168d0df9b8@ti.com> MIME-Version: 1.0 X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3461; i=j-luthra@ti.com; h=from:subject:message-id; bh=GBSLCEn9irDxaEIQSwlX3uqzJq0b8qmTn/M8uqYMMDI=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkHWSKFS06xQ9UaZeV7f0LdY3MzfuIEB82Gvje1 6BM2FXaht6JAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZB1kigAKCRBD3pH5JJpx RZRCEADSrdnFI2KyybklEeVMcD8m4EdkL2h1zIVm2VxpRhlkkYkXJ6nAB5d0mnU8hV9RhNJ5o1a tFQ2KXMldmUew8RgQLf17byuL6crN0qQ9cT4qUTm2w7Fo0V1cTEXmc+UbB/5K6/rZARajnc2GhV HmGPGm0KbHu5hzkXh/5ZZgCr9XPsQPut8dFcV0xWgP93mvhTIIHp9LrU9Y3hgfQ1v6MpcHJnUx6 sOjDDCLADiDqtaQFc7lxfNS7Cu4T17z0LppiYx05VqXIfyT6KATSWHOEVHST6dxR9JCamV5Z7jx 3zT8tV6t1lKPiycXOysNuTNBY6hZ1S3B4/TgL/CAsluUZzkwG9G7M4AgrJa90cvYDjnMvhi4UA+ zIcXw3hhXqYvn3Ap2077RHn3SRYudS0mHSBPICVuSo9Wut5xRlZX+xgY+t0Elk5OX3AxYHP0YJV cJq2m3QYD71kQG41zYciNR1TJ6AE7FxhM+I4UKPt3Kdg9RU3V2XIP5PutlbQ934so+n6GWCevwZ yCHpEP610xZCNm/KXz8m2VsNLQFmgN+Tm9DFDNQL42MNiXpQs2y9clEfY2WP+/mIahOm7Nq4FdK WRVy1MGwde9tgYSIQytjZao93X8KPDiPTBtjV3qn5+f8SDv0idJfWkadvuw9JziAywORXq5e2hY cpfb8dsWEYIUoDA== 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=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761239909216807645?= X-GMAIL-MSGID: =?utf-8?q?1761239909216807645?= Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use and update pinmux. The codec (TLV320AIC3106) is also supplied with a DVDD 1.8V supply from the PMIC (TPS6593x) on the SK. [1] As the PMIC driver and devicetree node is missing, skip describing DVDD for now and manually set the OCMV voltage. Link: https://www.ti.com/lit/zip/sprr459 [1] 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 2296d656323c..8d7087e5f9e4 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -123,6 +123,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 { @@ -201,6 +236,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 { @@ -235,6 +279,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 */ + ai3x-ocmv = <1>; /* 1.5V */ + + /* Regulators */ + AVDD-supply = <&vcc_3v3_sys>; + IOVDD-supply = <&vcc_3v3_sys>; + DRVDD-supply = <&vcc_3v3_sys>; + }; }; &sdhci1 { @@ -303,3 +360,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>; +};