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: 13175523 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40D3EC61DA4 for ; Wed, 15 Mar 2023 09:05:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7ak7sknBhya16t7GwmKEcrBOG+P6mcI6NVXf6XlvE6o=; b=b93c7ZfeGHcu0r XveM6yxuqFknNeoMulHvtG2Hwl37JevNX9LM0YwPKNtYShd+gg5mmV40TMxDwfDhTVjDv+UsetAbt o8GwqHwZhYxa3tmI+JdGTQlu1yFyfkaWeXFOMSbfuMP0e6wX/9hncO5PclKM3iZpiwXpL7kYaadrm jEQO0XAG1kFi46PU/8eYv/mcCrY93kYzeGqMWDrcaOK7Ma6aPqJI48GonvascGiXiL6kb5DF9Dls6 WWkvWSOoyk9DwsiQ62d6Bhu2OEAIMCU3Hr1v4OWDiEPt01+qnQ9awJgUdOt+9kEtKdKoCR0y8e7Kq 39L6zDDfaAOCwcCkZuZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcN3F-00Crrr-0D; Wed, 15 Mar 2023 09:04:05 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcN30-00Crk8-1N for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 09:03:53 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_020350_546606_AFE4A79A X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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>;