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 18EB2C6FD1D for ; Wed, 15 Mar 2023 04:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230478AbjCOEXw (ORCPT ); Wed, 15 Mar 2023 00:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbjCOEXt (ORCPT ); Wed, 15 Mar 2023 00:23:49 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CDEE3BD9E; Tue, 14 Mar 2023 21:23:47 -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 32F4Na6F066164; Tue, 14 Mar 2023 23:23:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678854216; bh=ZSV0W2dXKv2SlArPeCt+Qvh+W7Ngp8fUG1gBZOMtR3o=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=XXwR9J8nSTscyqJr+seO3wke/x5e6OdADjbheDsj539Ts1D0xbkJiAz6g91irnFNZ h9YQ7kBNyA2eTlAlJe2jz95quzUmeuFqySItThcfbFkDHeWhLQ2dxVbJE87Za0qyGQ odqOfUrC8JDNviu2qKLt5fen1Wkc1OTpBVQLHvcY= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32F4Na3I012950 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 14 Mar 2023 23:23:36 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 14 Mar 2023 23:23:35 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) 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; Tue, 14 Mar 2023 23:23:35 -0500 Received: from [172.24.145.215] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32F4NWw4054424; Tue, 14 Mar 2023 23:23:32 -0500 Message-ID: <49dde766-7e60-52cf-4c62-5e037164a75e@ti.com> Date: Wed, 15 Mar 2023 09:53:31 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v5 3/6] arm64: dts: ti: k3-am625-sk: Enable audio on AM62 SK To: Jai Luthra , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Mark Brown CC: , , References: <20230313-mcasp_upstream-v5-0-d6844707aa8a@ti.com> <20230313-mcasp_upstream-v5-3-d6844707aa8a@ti.com> Content-Language: en-US From: Jayesh Choudhary In-Reply-To: <20230313-mcasp_upstream-v5-3-d6844707aa8a@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/03/23 20:19, Jai Luthra wrote: > Add nodes for audio codec and sound card, enable the audio serializer > (McASP1) under use and update pinmux. > > Signed-off-by: Jai Luthra > --- > 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..3199042f3687 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>; > + }; > + > + sound { Should we put label 'codec_audio' here similar to am62a7-sk??? > + compatible = "simple-audio-card"; > + simple-audio-card,name = "AM62x-SKEVM"; > + simple-audio-card,widgets = > + "Headphone", "Headphone Jack", > + "Line", "Line In", > + "Microphone", "Microphone Jack"; Space/tab inconsistency after "Microphone", > + 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(0x0090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */ > + AM62X_IOPAD(0x0098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */ > + AM62X_IOPAD(0x008c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */ > + AM62X_IOPAD(0x0084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */ Better to have padding for the offsets here consistent across dt. Reviewed-by: Jayesh Choudhary > + >; > + }; > }; > > &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>; >