From patchwork Tue Mar 28 13:29:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 76092 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2228454vqo; Tue, 28 Mar 2023 06:44:43 -0700 (PDT) X-Google-Smtp-Source: AKy350aRLMynalUzfdMtmSCOtIxwASOzyKgdyOdsqgLuzAlNldsbTSzjNPJATIF/Bu9W0gGqeIf0 X-Received: by 2002:a17:906:5288:b0:932:3d1b:b67a with SMTP id c8-20020a170906528800b009323d1bb67amr16013865ejm.41.1680011083357; Tue, 28 Mar 2023 06:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680011083; cv=none; d=google.com; s=arc-20160816; b=OZr1GvVCFQ/5K3GgHLSc5U8XlRfm8KWJcyaTw2Br0+7uL/13SyQBQu8TQiShHF4+V/ krlHYbrRZDemKyA4/KoTpdsBPXc/zyq99CT/IQFHjik31Ab87S9igjSA2cVvAryN1O// Edlmsp4Yt4SsX6FWSvTKDHGT4jW0sRsiMtgL0qFe2wXr/8gzfX5hgc164GL8aWCX89ad 7bo1YyYWSxfkrYEFO5gb8D6yRQjABzi7XlPAtblxlNplAr07dU2tiroPCToDV2FGOLMF 75DIIjyKl63a+EsFRihblhCi23EAW0rk3g6b5xUMR+9A1/4g+79p65I+fucDCD1arpD7 H/Zg== 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=GcjcK0aiufr3pNfevNc1Fajnc2tfgJ/plgHPTJwi63o=; b=FW/XHkF7kL5+nxqsE3uGcGKRebeQTnkXDVUtt1kajA3jxdP8p31MfjRhm21/e3IiCD LXJ07lD239zQ1dPVO6QMnaxtj9pXvg13Rzcv7GIe3F4/C8KcB9YJbZcaQUOkG3wJZpQO thVpxYyzM2xRlQ6k7KRSYcoD12JR+ZWvlCZNWvE9NaiIw+AOZhjhrU5W8Rdbq2cn05So 5uuzBrSKjJGsjNwpm0sIQlf/BhQb7LvdEBi+QGWWtn555lGgREypEhz5ECVrWUnSibAe ypTUxT3yHJaEGPM/1jvpnXXoZj3AQ3lN2iyn1WY/pK44sV7UcI2Jr0Z8MGDsEx5WS/Co 3q2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kisIOWDM; 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 m15-20020a17090607cf00b0092be3f07851si27422524ejc.141.2023.03.28.06.44.17; Tue, 28 Mar 2023 06:44:43 -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=kisIOWDM; 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 S233193AbjC1NaO (ORCPT + 99 others); Tue, 28 Mar 2023 09:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233165AbjC1N3v (ORCPT ); Tue, 28 Mar 2023 09:29:51 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 760DFB741; Tue, 28 Mar 2023 06:29:48 -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 32SDTZeX005659; Tue, 28 Mar 2023 08:29:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680010175; bh=GcjcK0aiufr3pNfevNc1Fajnc2tfgJ/plgHPTJwi63o=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=kisIOWDMXNUOKro/l1wAMFLJwHKj2JHDxNZs4O3byXnthjFmxJh/1L5wnLF3UABOf WKMZXGma3XsoD4KKwJFY+DK5e5FE3HZnNk7NkQoevIBWfi15k9hdabHMdRocdoaNxe 3p1i0xFSyX2JkYTwYr80oanEeTS4zSX2RqkxXDWQ= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32SDTZH9125973 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Mar 2023 08:29:35 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 28 Mar 2023 08:29:35 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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; Tue, 28 Mar 2023 08:29:35 -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 32SDTYT1031408; Tue, 28 Mar 2023 08:29:35 -0500 From: Jai Luthra Date: Tue, 28 Mar 2023 18:59:21 +0530 Subject: [PATCH v8 3/6] arm64: dts: ti: k3-am625-sk: Enable audio on AM62 SK MIME-Version: 1.0 Message-ID: <20230313-mcasp_upstream-v8-3-4408134eb2f3@ti.com> References: <20230313-mcasp_upstream-v8-0-4408134eb2f3@ti.com> In-Reply-To: <20230313-mcasp_upstream-v8-0-4408134eb2f3@ti.com> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Catalin Marinas , Will Deacon , Rob Herring , Krzysztof Kozlowski CC: , , , Aradhya Bhatia , Devarsh Thakkar , Jayesh Choudhary , Andrew Davis , Jai Luthra X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4839; i=j-luthra@ti.com; h=from:subject:message-id; bh=vzGrfqEKlhkGfNdmuVqiHcQV4XDMwCqemhlXKuW2nWE=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkIuu38nQDmUJFnGxu025sMntWQe2D85Y6IA4nW ZKtAM2ZNL2JAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZCLrtwAKCRBD3pH5JJpx RfGSEACcaRzresD2Ah/N4SUh81VX9cqCKpgrdRCSttCFWn61kQax3OTpFvNie3R0DdbXxkb/Snv NUdqp8GRWWrYl41ttIZPJhulRcjJIuQNYi9D58ENV2SotK7iYF2dwezno047l079aA+58d3oKeD 7pU1WiKUpBpLY5WZi4eCw+WFxhBF4s8+75593RvBhZayN73lk9VqTuMiSKjpIapEjn7dAWjrLuz RCIMq8/eHz0FVvc5GHJGPQhgueyUq7F/4edEIc5jjpfpzdgKUWYk7xV0ITARrUKgzhyP68IRWra 7gFc32lwDejBe7NN7nsEbgOamDhCeSAEzwaXdCjCe7GQXmDczSwQkB9/xfY5K3HWlGxaJFN6Gme KUD3PhHJiHwDfuWKZeSRCb4dHtuL2mLSWnWdVLw4T/vVtVZczL87qI9Uo83BtBVbkCAu1qifhIF 7bnmMuxnMxyu877hFw8TSN0i+xX4MPeYGnH8TBwCAUql3qsME9KidBRdYJGvuL/ft5Xh7b9K8lg db20kfNbpjtTdF5Ab93EfL9ADCLHnEq5ilaGTEUiWA7Kv7pEqkG1m5E7pfP/tsj/zxxybglghtx N7kRSYA1KkR1/IKnzxlwouOQNeH/7GbFNYzw8/R4s6/hxbHsfdvb2ZUXtyTI9XM2D2S5TnsvDbI z7INRFwk29d/Z8Q== 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?1761619301875922380?= X-GMAIL-MSGID: =?utf-8?q?1761619301875922380?= Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux. Keep all audio related nodes in the common dtsi as they are exactly the same between SK-AM62 and SK-AM62-LP. Link: https://www.ti.com/lit/zip/sprr448 [1] Signed-off-by: Jai Luthra Reviewed-by: Jayesh Choudhary --- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 11 ++++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 11 ++++ arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 77 ++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts index b2ca19e3042e..5ed6b1abe87d 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts @@ -70,6 +70,17 @@ vddshv_sdio: regulator-4 { states = <1800000 0x0>, <3300000 0x1>; }; + + vcc_1v8: regulator-5 { + /* output of TPS62824DMQ */ + 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; + }; }; &main_pmx0 { diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index cdc0858dd1b2..2b861681e548 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -87,6 +87,17 @@ vdd_sd_dv: regulator-4 { states = <1800000 0x0>, <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; + }; }; &main_pmx0 { diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi index 54318a07d50c..2500cb9ba323 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -81,6 +81,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 = "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>; + }; + }; }; &main_pmx0 { @@ -175,6 +210,15 @@ main_usb1_pins_default: main-usb1-pins-default { AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18/E16) 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 { @@ -205,6 +249,19 @@ &main_i2c1 { pinctrl-names = "default"; pinctrl-0 = <&main_i2c1_pins_default>; clock-frequency = <400000>; + + 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 { @@ -272,3 +329,23 @@ &usb1 { pinctrl-names = "default"; pinctrl-0 = <&main_usb1_pins_default>; }; + +&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>; +};