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: 68884 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1230772wrd; Mon, 13 Mar 2023 07:53:06 -0700 (PDT) X-Google-Smtp-Source: AK7set/E8BYnpQfq06O5VWjOtgrP8Ehr9NymnbkiWrV1ZEMFWTu0XEPVMeC3414vZ3JsxZPP1nNz X-Received: by 2002:a05:6a20:bf11:b0:d3:565c:9f44 with SMTP id gc17-20020a056a20bf1100b000d3565c9f44mr7854495pzb.38.1678719186362; Mon, 13 Mar 2023 07:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678719186; cv=none; d=google.com; s=arc-20160816; b=lZNucp1vur7ZjAJHAsUCcbxwioZ6XyiH+866bO9iCG1lUYeTSHJjgimHlYla6O/Zec PxO9TkFoypnEQPG3RPx1AmwLmumTLSkpxf7GWnTF/2WmaP4kUpzLWKSljjal9/JoAYBh vWEN9Rtwc46NunhLtKYCgxj6rwxmVAhYtf0tOXPLXE+SRdk3Tm5jCgwJiOMsKTgTSkZt X4uyIIFAHL9GqGiHzJHsAA3bBe51am5c947y2bFsxTXbHgR9TZu6fUQZQlKF/Jkur8QQ xejZFLgs4/55CxMn1h5Fy675EgANIYumY0VI54W/sWg4W5t1Yq7PwHGywaILl5Yhu/8X v2pQ== 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=M9oOgXpy7VJsV6og9C3G518iHqPrz1pxGesdLOm0XXk=; b=Em4qzY+alLx9bqpoUPP/f0wP9Jjb0cn0hA4ZWLe9j+6vmWmB8EYOvvGyaVvGXxk4DJ Quoj2sOA5v+BeerIBJxY26OHljLb/20/TK1xxYdzhuZIe6yXd7ZQquqEHQlqWw+F/8np 5Uzi7B/ViLx1jiogWz9cr06N3ubQteFItg+UuqmW1xjcgoQycShf8v/lNg2l51KTQFGJ dbIrRkTKp4JT/U2S+euKoQlNhnLP+D5DciwYYSyesOHWDzWpqsmbh07Xu17adYBfryeA lgiaioCp4tL9jh9N956VL0lL5aAC4XcTtDd2njKlEXY7PBDNhP4m1y0duhwtjI8ARqRr tu5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aQyd0xzx; 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 e21-20020a656495000000b0050318a4a5casi6604217pgv.408.2023.03.13.07.52.49; Mon, 13 Mar 2023 07:53:06 -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=aQyd0xzx; 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 S231671AbjCMOv3 (ORCPT + 99 others); Mon, 13 Mar 2023 10:51:29 -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 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham 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?1760264649193248508?= X-GMAIL-MSGID: =?utf-8?q?1760264649193248508?= 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>; +};