From patchwork Wed Mar 15 09:03: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: 663629 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 B9535C61DA4 for ; Wed, 15 Mar 2023 09:04:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229459AbjCOJER (ORCPT ); Wed, 15 Mar 2023 05:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjCOJEQ (ORCPT ); Wed, 15 Mar 2023 05:04:16 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EAD824124; Wed, 15 Mar 2023 02:03:52 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32F93eZr127348; Wed, 15 Mar 2023 04:03:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678871021; bh=KmiYo0Mp/7UOsWp+C/ZJZUsUsiy/rrCL5FhE3tFewDs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HiClqlSekjRUGVyA4HA4B/lp6sbHgEqGm6Li+euW1kgUyT+jAIJ0XOgQuBTXwySlW 3/88Vxz5G7/tGR/G3UVrrEcfY90drGvQcPd/GK/qbN5WVA1B5pqiFqUKJawz7ix207 jqK69oENRIMx/Tj7/G8QHmbgwsxdjjS04lCNIMrA= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F93eWG005946 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Mar 2023 04:03:40 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 15 Mar 2023 04:03:40 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) 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; Wed, 15 Mar 2023 04:03:40 -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 32F93dbK055346; Wed, 15 Mar 2023 04:03:40 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v6 1/6] arm64: defconfig: Enable audio drivers for TI K3 SoCs Date: Wed, 15 Mar 2023 14:33:30 +0530 Message-ID: <20230313-mcasp_upstream-v6-1-77685d7cbeb8@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> References: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=840; i=j-luthra@ti.com; h=from:subject:message-id; bh=HwVDODIMEdhkR4OZ+E+QhHZzJZLC2RvE10il4WYmg/w=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkEYdWkJG1mF8uNjfE7WqYPLm3Fxfhj49x4rx5r 0ZdzfG2rn+JAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZBGHVgAKCRBD3pH5JJpx RWuTEACLGecPCJpEA1HYo5G1/8Gze5zn0Sbe0czlj8QERUTDnhQhOgik/Y/IZzgAoXxoJLIrquL KHWK7jVPmdXQN5o9mx2qFApXVDly0FngDjsCZ9ZnY7rg1+t20Nw0dGaiIM78CkJZfM4Crv9Vk7k mf+s8vqRdvxtZzpqEWHnzo9lP4Vr1jiG7UVUC4xFdzMxlwiY4px12BL+64NKq0TFwPDXNgm0a+e 9GcY7mXYSVWyKcS6gDLPjzkY7gyrlcA7sfhkK07B8+vvgErMdUa0xasibQ4QeIjv3jHIFbqCKRq ww2Sh9lj4GSAUl9HQzHLDZD/Ns+ziVJZW9/ohWUfccUjaxfdQ7Jt2jbz/kdsJNvwRsSXlqD6/Mi SMqV0AbQ9GB3McREXNxL3SSeX8zAT8cjwr1DEx7j+TQHnYw6r4AQ+duQmzR0fOeISYcF9UOHKsp 5TzbFDtVgXkGBJulzGSTF6IjkwzW3JDwHMXdds+PRh0N19iPDNWglKTvatuspdChVZvP7v50FFg KopQSlVTR9M4m0w59xnYreFwK51+XEe0fZu6UZhOwpeVqf2BjziGcPD91z3uB3Gonj1KAK6MdOU wau548tRTJZEarM/TIPPAkq+rXJRcOF5btlB8Adpu225z3leH2DDa6G8WHPoZltGmUoAgZTM6zR 5+rPAXtXK1D4yNQ== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org TI's K3 platform uses McASP as the digital audio interface on the SoCs. AM62x and AM62A based starter kits also use the TLV320AIC3106 codec with a 3.5mm jack for analog audio input and output. Signed-off-by: Jai Luthra --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 7790ee42c68a..7e0ce1833904 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -898,6 +898,8 @@ CONFIG_SND_SOC_LPASS_WSA_MACRO=m CONFIG_SND_SOC_LPASS_VA_MACRO=m CONFIG_SND_SOC_LPASS_RX_MACRO=m CONFIG_SND_SOC_LPASS_TX_MACRO=m +CONFIG_SND_SOC_DAVINCI_MCASP=m +CONFIG_SND_SOC_TLV320AIC3X_I2C=m CONFIG_SND_SIMPLE_CARD=m CONFIG_SND_AUDIO_GRAPH_CARD=m CONFIG_SND_AUDIO_GRAPH_CARD2=m From patchwork Wed Mar 15 09:03:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 664299 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 3ACD0C6FD1D for ; Wed, 15 Mar 2023 09:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbjCOJES (ORCPT ); Wed, 15 Mar 2023 05:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjCOJEQ (ORCPT ); Wed, 15 Mar 2023 05:04:16 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F8F52CC6C; Wed, 15 Mar 2023 02:03:52 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32F93gNr127353; Wed, 15 Mar 2023 04:03:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678871022; bh=pNYjOPZLfTGHtUQIJS1+TCtBaAmBtJH01h9FWZ4IfQc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tcsvrlEU8wSCjYkQb9ti1idRRqNTe0WVV+UUZF8BMgeUKPgG8Fre7KlfWXbxmOKdm iH47s4rSE3I49gKwUQDqGIAvW76cYfwaytRgRoOjTgvSqS+8k4/xlZUaGH2lsjFw1O TXutjzRLV+pabNsmm0IIKBuyGZoNkiXkNjHp6kaY= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F93grZ068228 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Mar 2023 04:03:42 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) 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.16; Wed, 15 Mar 2023 04:03:41 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE112.ent.ti.com (10.64.6.33) 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; Wed, 15 Mar 2023 04:03:41 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32F93fTY104696; Wed, 15 Mar 2023 04:03:41 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v6 2/6] arm64: dts: ti: k3-am62-main: Add McASP nodes Date: Wed, 15 Mar 2023 14:33:31 +0530 Message-ID: <20230313-mcasp_upstream-v6-2-77685d7cbeb8@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> References: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2740; i=j-luthra@ti.com; h=from:subject:message-id; bh=0fD4RCKgRcyT90JHKtvgV3Ukjm3btUjTWtPkMvr2fQE=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkEYdXP14+js+tZYpFg8pyCv3M+O2Uv+BJf+iyX e6f5WZzIoGJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZBGHVwAKCRBD3pH5JJpx RWH4D/9LfrXZS9pnZAmF+QTx0tlZQEH4/NeXBuLSllaR6R9B/8RJ1xpM1k7VCHlz7B3XKIqJAZy VDft4OyhobE2CMCyNr2+Bova98JztxGvOwcHRJ5ylD9HbNlxpPOgUiR2b/0GYgMjNwHOgC1yx6R F2doBG4cd64Zi0soUQGH1b+DSL6X8/XDpNJl/cw8iLI7V1F4i2BqHrm7TqFskCoILsYW7Cr3x+Z Uh6A3/0oerIZtrmDkkuLqE/umF88O8Jar140o/DaNTW0kTDI/ckS13G+gkruQJA5i9nmaCTUVxl HaOA9IkRdwmW1GhZ+IoDk5OgAli5O8fLXc6IZ+TR9nd7Ez44jUjHPtwHo1ED2l7ydIqmEdFG4WZ L+FULqV+Ng1jG3oU1prTl5fmQN7okVrqUKYtjqiZOfdjnKI+P3RMitILYFVuA326lsumNjIr40C DdsL8H6eGmWv0JbHEp4lEMpDyURn5jNEoQO+dyvNChKWmPhHkWDSJld35dmS+hOssZ5w8MYmVOP 4O/PGi/CpVm8Lv39WwEwLzl5GIrK0amDvp4J+o8s44Z7Fpg4qWiS/vU2HENyRwa3B4dd2AGlzQW vu1REZ8LcBaj6mDw21ZRo88COkHSYAOZG6TjjwDPinIy31QncTk43XZw5/DIhYhMvNnJDYzULBK Nlmm4gBem/R1knw== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jayesh Choudhary Add the nodes for McASP 0-2. Use the audio-friendly 96MHz main_1_hsdivout6_clk as clock parent instead of the default 100Mhz main_2_hsdivout8_clk source. Signed-off-by: Jayesh Choudhary Signed-off-by: Jai Luthra Reviewed-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index ea683fd77d6a..c52c23ac409a 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -787,4 +787,64 @@ epwm2: pwm@23020000 { clock-names = "tbclk", "fck"; status = "disabled"; }; + + mcasp0: audio-controller@2b00000 { + compatible = "ti,am33xx-mcasp-audio"; + reg = <0x00 0x02b00000 0x00 0x2000>, + <0x00 0x02b08000 0x00 0x400>; + reg-names = "mpu", "dat"; + interrupts = , + ; + interrupt-names = "tx", "rx"; + + dmas = <&main_bcdma 0 0xc500 0>, <&main_bcdma 0 0x4500 0>; + dma-names = "tx", "rx"; + + clocks = <&k3_clks 190 0>; + clock-names = "fck"; + assigned-clocks = <&k3_clks 190 0>; + assigned-clock-parents = <&k3_clks 190 2>; + power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; + + mcasp1: audio-controller@2b10000 { + compatible = "ti,am33xx-mcasp-audio"; + reg = <0x00 0x02b10000 0x00 0x2000>, + <0x00 0x02b18000 0x00 0x400>; + reg-names = "mpu", "dat"; + interrupts = , + ; + interrupt-names = "tx", "rx"; + + dmas = <&main_bcdma 0 0xc501 0>, <&main_bcdma 0 0x4501 0>; + dma-names = "tx", "rx"; + + clocks = <&k3_clks 191 0>; + clock-names = "fck"; + assigned-clocks = <&k3_clks 191 0>; + assigned-clock-parents = <&k3_clks 191 2>; + power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; + + mcasp2: audio-controller@2b20000 { + compatible = "ti,am33xx-mcasp-audio"; + reg = <0x00 0x02b20000 0x00 0x2000>, + <0x00 0x02b28000 0x00 0x400>; + reg-names = "mpu", "dat"; + interrupts = , + ; + interrupt-names = "tx", "rx"; + + dmas = <&main_bcdma 0 0xc502 0>, <&main_bcdma 0 0x4502 0>; + dma-names = "tx", "rx"; + + clocks = <&k3_clks 192 0>; + clock-names = "fck"; + assigned-clocks = <&k3_clks 192 0>; + assigned-clock-parents = <&k3_clks 192 2>; + power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; }; From patchwork Wed Mar 15 09:03:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 663628 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 94004C6FD1D for ; Wed, 15 Mar 2023 09:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbjCOJEU (ORCPT ); Wed, 15 Mar 2023 05:04:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231247AbjCOJET (ORCPT ); Wed, 15 Mar 2023 05:04:19 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F263C7B106; Wed, 15 Mar 2023 02:03:54 -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 32F93hSS071003; Wed, 15 Mar 2023 04:03:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678871023; bh=dbRo9CG8rPz+9vRLKQy1ZqxRvHhMJsijvfgjIDKZMV4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=mD08ix5hU2XghFTtYwdu9Uzs8fy0IDQbd6jLjZH3xslmcn3FOLPcBVHc8Qj5VLGIN xfTTGNHnwXDj6qo0V0rHq2e1EcxNCROnGPp9XnWFvF1PoTaoyT+O3CWsRxbyCBSHan UMoVV2sEuiFur98DwqoTq7WTvcyY/dqgqy9F5UNo= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F93hMI005953 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Mar 2023 04:03:43 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 15 Mar 2023 04:03:43 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) 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; Wed, 15 Mar 2023 04:03:43 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32F93gXd037444; Wed, 15 Mar 2023 04:03:43 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v6 3/6] arm64: dts: ti: k3-am625-sk: Enable audio on AM62 SK Date: Wed, 15 Mar 2023 14:33:32 +0530 Message-ID: <20230313-mcasp_upstream-v6-3-77685d7cbeb8@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> References: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3571; i=j-luthra@ti.com; h=from:subject:message-id; bh=7Vgma2GMxuyqZPI3nXPi3i31mgAM2U3Bt2vq1SMGYSE=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkEYdYzlSzeTgMNt2OJLj3UcX1u18Ot4p/LWWxH NAG+rHbAJWJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZBGHWAAKCRBD3pH5JJpx RUjvEAC0gG5WpyGkL+KzTzE2J/Kp7Q6oJG+UYDyPI2FT+byzqNxwdGld0DUdCbvNCeHrP/JhKJv dEShelCr3jVM1Jne7Twiaq1jQLDH3nsXyN+Svi8ZfXb/FeUwFcuVorpk3a3ryu0/uaRk2XKT79M qauKXXxWFgu7LlgRLA4Viwc8zAp9l3hGtUgTu56f/Sh0O5yZZ4cwkrWPowdeSsj4YdcFzuQJ7PU tqOYEczhvDAYAaTlvKbTtJyLpd1pCNndzGOoLAvhLimKr1mz744yu2KY/TXHbrO2b1yNIBL3Eu6 zbdRJnD1pKKB6OYgMMUNYwlEQ6+8TlImttVTOGNHDglEuppkrWvJ6OiN465gPuMzy4QpjLlNTgU 2ZyHcEgi6XZYGiIIWStJ90Q2s/cGgRsEcO8eyXcFn0huJgpe/5z5Yw2KW6lu3XxQcdFGN2YoxDl 92XXSIgXQXnWtu3lNAkGaTA7u0EVn0XFYoQnTvGYew2NljmlVvyd/HBVy64leAP6IyKhGUo7rex bLFFwDqz3Law+ku9wnAE9+OBIjxsGrtY7vZbfK1g38/9WZpKbSXtjAkXlPvonUjPe303z8bIPxM 6vPo65+YJBB3FBznpJS+puSe7mZIErAt/oPdcXMgbWw3a5Rs/3AzHz2KMPwKwng3wlm/PHW9N62 nBrrgrsax+dyCbg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Reviewed-by: Jayesh Choudhary --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 6bc7d63cf52f..2727a3c81e93 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -141,6 +141,52 @@ vdd_sd_dv: regulator-4 { <3300000 0x1>; }; + vcc_1v8: regulator-5 { + /* output of TPS6282518DMQ */ + compatible = "regulator-fixed"; + regulator-name = "vcc_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_3v3_sys>; + regulator-always-on; + regulator-boot-on; + }; + + tlv320_mclk: clk-0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <12288000>; + }; + + codec_audio: sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "AM62x-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>; + }; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default"; @@ -292,6 +338,15 @@ main_usb1_pins_default: main-usb1-pins-default { AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */ >; }; + + main_mcasp1_pins_default: main-mcasp1-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */ + AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */ + AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */ + AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */ + >; + }; }; &wkup_uart0 { @@ -349,6 +404,19 @@ exp1: gpio@22 { pinctrl-names = "default"; pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>; }; + + 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 = <&vcc_1v8>; + }; }; &sdhci0 { @@ -406,6 +474,26 @@ cpsw3g_phy1: ethernet-phy@1 { }; }; +&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>; +}; + &mailbox0_cluster0 { mbox_m4_0: mbox-m4-0 { ti,mbox-rx = <0 0 0>; From patchwork Wed Mar 15 09:03:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 663627 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 36927C76195 for ; Wed, 15 Mar 2023 09:04:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbjCOJEX (ORCPT ); Wed, 15 Mar 2023 05:04:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbjCOJET (ORCPT ); Wed, 15 Mar 2023 05:04:19 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9908D6F487; Wed, 15 Mar 2023 02:03:55 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32F93jaX130748; Wed, 15 Mar 2023 04:03:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678871025; bh=RH6IGOBKyWb5TL4T3BDnL6uqcLnQ3GKUukovClXK7+0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wVwIIL2BfYwK3UUmRCI+3KlKmg7VSJmyApRH+J8WbPXpp0TXJ+k2MbKTuGbMvokcF 3ShCE2dSazrb7OHX9pEAtAoGB+zTWyLKyv40mhZY+z1yxqyhYQcVh0Un/ZlCG2Afz8 g5QoKPe6DDkWbZixXBPFGybsy29C3q75BHZjJPZM= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F93jFW071141 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Mar 2023 04:03:45 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 15 Mar 2023 04:03:44 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) 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; Wed, 15 Mar 2023 04:03:44 -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 32F93ikF055370; Wed, 15 Mar 2023 04:03:44 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v6 4/6] arm64: dts: ti: k3-am62a-main: Add nodes for McASP Date: Wed, 15 Mar 2023 14:33:33 +0530 Message-ID: <20230313-mcasp_upstream-v6-4-77685d7cbeb8@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> References: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2667; i=j-luthra@ti.com; h=from:subject:message-id; bh=xgmiFF1fi21On59siDCp+cbV/lQsLPbVNThaNyvdUF8=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkEYdZIoHpP/nlbD2inbX3GXKf89wPCNYhlfc8P sfRRHO1E1CJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZBGHWQAKCRBD3pH5JJpx RWrqD/47AYgH3ypV6nu+3P6+ukxqKj7lIUCEXHvN9VDCbT3NY4RiEAlmAelSzgSJJgx0heWZ1QA XOAGh5YM60iFjZT6vfSBvWN5J4Sqj2VNAs1reSr6zB/s1/mlPh1enEEwHgvbE2EiMUh37bd/uGV kXpfwIK/3g7nRq8dzJ6sNrL0eBIWFIPAlEhmmIKDZLevSkZLGDTOTmdzChH88kFORK2JEqORDV0 4oKA74wX39HaOEqlblphhXk3DSCIvtordo36xGJAzjesp7+R0m78TYM0qWf524PKcfVusYAq4H+ RP4+gunbOr2+o/l1cVt4j4n6bViZ7zIXAWt3L7fQJMvnrsUiEBRhSezSyuqFqrwFTiDN6YAm4xE v2o2qfTvk9I06VyfLghZoUZH1hbfd8tGsyadpaQU6K6YmnsTPVQoTKObsA9mT2IYsfjhhzjEMk6 iaa7hswxtsaewwFga93FV7W1Ub9R6DkXpTBfrYgYxDePvy/iq73q9LTVebJ4+6JhdJ/CYC3Ul4X 6EO3MLwix3Mg0/tYFtBDEnu1aITofsp52yKf3SgwLf8ofzARyzzTHZFayz9nFWBN5N3YPuZn+zQ eBWKeEKzuYtlFtdNpw432qguCFOKnAG5BCOUohSbv/AMH6hCld58d5HE/yJiXOfJvcBJ6Yz+mLd dW1v2cJLncOsHIg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Same as AM62, AM62A has three instances of McASP which can be used for transmitting or receiving digital audio in various formats. Signed-off-by: Jai Luthra Reviewed-by: Jayesh Choudhary --- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi index 393a1a40b68b..50e4fcb1d678 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi @@ -660,4 +660,64 @@ ecap2: pwm@23120000 { clock-names = "fck"; status = "disabled"; }; + + mcasp0: audio-controller@2b00000 { + compatible = "ti,am33xx-mcasp-audio"; + reg = <0x00 0x02b00000 0x00 0x2000>, + <0x00 0x02b08000 0x00 0x400>; + reg-names = "mpu", "dat"; + interrupts = , + ; + interrupt-names = "tx", "rx"; + + dmas = <&main_bcdma 0 0xc500 0>, <&main_bcdma 0 0x4500 0>; + dma-names = "tx", "rx"; + + clocks = <&k3_clks 190 0>; + clock-names = "fck"; + assigned-clocks = <&k3_clks 190 0>; + assigned-clock-parents = <&k3_clks 190 2>; + power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; + + mcasp1: audio-controller@2b10000 { + compatible = "ti,am33xx-mcasp-audio"; + reg = <0x00 0x02b10000 0x00 0x2000>, + <0x00 0x02b18000 0x00 0x400>; + reg-names = "mpu", "dat"; + interrupts = , + ; + interrupt-names = "tx", "rx"; + + dmas = <&main_bcdma 0 0xc501 0>, <&main_bcdma 0 0x4501 0>; + dma-names = "tx", "rx"; + + clocks = <&k3_clks 191 0>; + clock-names = "fck"; + assigned-clocks = <&k3_clks 191 0>; + assigned-clock-parents = <&k3_clks 191 2>; + power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; + + mcasp2: audio-controller@2b20000 { + compatible = "ti,am33xx-mcasp-audio"; + reg = <0x00 0x02b20000 0x00 0x2000>, + <0x00 0x02b28000 0x00 0x400>; + reg-names = "mpu", "dat"; + interrupts = , + ; + interrupt-names = "tx", "rx"; + + dmas = <&main_bcdma 0 0xc502 0>, <&main_bcdma 0 0x4502 0>; + dma-names = "tx", "rx"; + + clocks = <&k3_clks 192 0>; + clock-names = "fck"; + assigned-clocks = <&k3_clks 192 0>; + assigned-clock-parents = <&k3_clks 192 2>; + power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; }; From patchwork Wed Mar 15 09:03: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: 664297 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 56F29C6FD1D for ; Wed, 15 Mar 2023 09:04:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231716AbjCOJEY (ORCPT ); Wed, 15 Mar 2023 05:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231343AbjCOJET (ORCPT ); Wed, 15 Mar 2023 05:04:19 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ADF76F629; Wed, 15 Mar 2023 02:03:55 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32F93kik130753; Wed, 15 Mar 2023 04:03:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678871026; bh=Cm4fxL8aqP+M/xiJppfBdfZbTdZp5e43WLIPjo0QZ38=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Lu3X/WYKAxGVJpNoggdDp5dyDNBAEprOCGYqJCdQgr98DPXetOhEpG2CMreYee0Mb pVCJkSzrx4HLlIX5Trc9ca1M/u+vEQBUOVyPWie6B3Et3ZEX1C3B30ZZYkKkMqab/9 FInvriATfY5/jIaSQ4M3ZWLHdJZhC3OsG/dRiLMQ= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F93kv3089844 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Mar 2023 04:03:46 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 15 Mar 2023 04:03:46 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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; Wed, 15 Mar 2023 04:03:46 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32F93jDM037463; Wed, 15 Mar 2023 04:03:45 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v6 5/6] arm64: dts: ti: k3-am62a7-sk: Split vcc_3v3 regulators Date: Wed, 15 Mar 2023 14:33:34 +0530 Message-ID: <20230313-mcasp_upstream-v6-5-77685d7cbeb8@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> References: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1387; i=j-luthra@ti.com; h=from:subject:message-id; bh=8FGf5SMnjUpyVTelFPfg4Qsiky79X6LMQvgpym9Ks7E=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkEYdavNSNzkAJkgXnlueUkK7nt9SZ1rJC40ETm Zoi/bH+nYGJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZBGHWgAKCRBD3pH5JJpx RQCND/9rq/O3t3MD05JrxNfuUkO7AtEUmYx2M83XuSo0yOpncXAgz+5QE5eA3JT3kBCnOcy33lV vtyouIHBxT26S2HSosOyymzAAfwTl9fm/hCK1skMwXBmjD4rbWrRsICwcWZGvZtI9LzKe0N432D 2Lrp7LUR+rsD4IaE4U5T1S/QmG/K9aPafTclIDvnzKUImyB5iD+zENcBE3y0mVR7JPIGavOigDL 0zr3xKstM0ZQUHeYWobSBiSzq/ecBNvgh6PZygJmn9uYsNwQYEH43QEs2XDA78urMg2IvctGM50 G30YsLQeftGkME/Ev/2VVZ8dQKdkXud21jk7D4hHw8ZhTOc/oq0Qe9zMn6z4Fmfx3Bj3oJlPkKp nJySxZLefDn9x3zG1WEOkWmSfyl7p91Z36Fs4MqTxfRZdwt2RTZvv5K8LwkQ9oVLLbddO/6Sji+ 8XFs0gCkEKAiiQ2EB89jiKvdu/ZwS3wEHeCzmPR4fjekPALCLNIAbRdLicoAoJRazgkmP93mfhj 7122tmoMIZBMXoO8TJIFOFvcNGmQrujS4KlLuzr4wRYiiYcxsBBBNWrTxykwrh2yC/GDX92W52C pwOAUzCIGEsetN5Nrcu0IXXnX1P2g2XSqHGxyEi2FzXe9WK0NCjoQUngrkDezTg8UoTToOQQVhC tqGLh5gpmhl5xvg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org VCC_3V3_MAIN is the output of LM5141-Q1, and it serves as an input to TPS22965DSGT which produces VCC_3V3_SYS. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts index 5c9012141ee2..063e69e45163 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -76,10 +76,10 @@ vcc_5v0: regulator-1 { regulator-boot-on; }; - vcc_3v3_sys: regulator-2 { + vcc_3v3_main: regulator-2 { /* output of LM5141-Q1 */ compatible = "regulator-fixed"; - regulator-name = "vcc_3v3_sys"; + regulator-name = "vcc_3v3_main"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; vin-supply = <&vmain_pd>; @@ -98,6 +98,17 @@ vdd_mmc1: regulator-3 { gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; }; + vcc_3v3_sys: regulator-4 { + /* output of TPS222965DSGT */ + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3_sys"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_main>; + regulator-always-on; + regulator-boot-on; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default"; From patchwork Wed Mar 15 09:03: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: 663626 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 3449DC74A5B for ; Wed, 15 Mar 2023 09:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231788AbjCOJEZ (ORCPT ); Wed, 15 Mar 2023 05:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbjCOJEU (ORCPT ); Wed, 15 Mar 2023 05:04:20 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C53926EBAB; Wed, 15 Mar 2023 02:03:56 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32F93mLA127362; Wed, 15 Mar 2023 04:03:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678871028; bh=0lYrIScH+yNn1X25mqEMmFmR/i3+JO5JFvUIYx6TOGw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=bFeC/h6T4k3ESORquN6FmF3TQIYYJ0YjgJV6va9A34UUnZC076qIabDrsFwaEVuOL vbqC3HgOMPVPQp9tZwH+L8RmHIvT5JcAmgy+lHsoWha9WLSNfnmYn2eYNu1Kt+jQen 7i2+z/cYd161jwxhzRhTH4josOJK65vCLpKK5cbE= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F93mOA005980 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Mar 2023 04:03:48 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 15 Mar 2023 04:03:47 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE112.ent.ti.com (157.170.170.23) 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; Wed, 15 Mar 2023 04:03:47 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32F93kmd055400; Wed, 15 Mar 2023 04:03:47 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , , Andrew Davis , Jayesh Choudhary , Devarsh Thakkar , Aradhya Bhatia , Jai Luthra Subject: [PATCH v6 6/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A Date: Wed, 15 Mar 2023 14:33:35 +0530 Message-ID: <20230313-mcasp_upstream-v6-6-77685d7cbeb8@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> References: <20230313-mcasp_upstream-v6-0-77685d7cbeb8@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3410; i=j-luthra@ti.com; h=from:subject:message-id; bh=mbTjZi6u12cwf6QVpxp0isgwDzQXw7xYfsdeXS3858g=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkEYdbb4YNVXTXdqXRxfr6iVIS5Yr7OXhefyKZW yUWU68llqqJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZBGHWwAKCRBD3pH5JJpx Rf2yD/oCcNtGVcH7HJelvXLqlIEa9MM5tHFR8pfJO0HGwghNt0Gt3BfZQbu2OfJpjriYbKCPsNO iu0Ar+ZEJd52TxfQ8qFwyMwMjFKWWEx1Ef8m0LKkNyCoEzm4l2Qbpc+IvGFS9oiF6mHEOCdCqMr DWveudrQSrvQFBogmHJJ06wil0YDEV69hiqNvNa1iTJBQh2YO1ABdYGcArUXpcWniQmzZXGk6Sr FlRAG02u/SCkSR3AoKRQTxICE9mjPIKP1a+gkxBZ5XU2S6W+muuqh6TxSk1HTZsXg4zi3Vf62Is Y7CO1GF+d2AqAHXdXY0+x5DRSvunDLwQBBtckvfE/gvUThM/Uhm7y2CP7aZgzqC3vOaliGoDP3o mSJ1MjdnBS0r67MZJAYLD7ialbjYqn69zszodkQiqONKIaYDog1C3LFOe4Fo7xBBcn+mP5kD5jd 7MiVHY6Hig+tPHkgIsoOqKFa48wK6NUXiWutf1oXDXPvJLkHhh3Sx+53sFWds5Xg9RcWD69WR6S BjZiJ+ZC1s5WteVwnv3jMQ8AHJEGP9ggxlSwOpqmLuxBvq4ut0CfbU5v7Fy2mzlRJAVoMURmKDr FR6ynrrPp7ODy+005aj4Kdf45uYNYSfcczISFD3ER3ZOlnqDT2khOw8Mr1A7vFwYcjCP8EoTBOH iHEiXT1YNS7C0dg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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. As the PMIC driver and devicetree node is missing, skip describing DVDD for now and manually set the OCMV voltage. 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..2ee894340be1 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 */ + ai3x-ocmv = <1>; /* 1.5V */ + + /* 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>; +};