Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp400445rwl; Wed, 29 Mar 2023 03:40:15 -0700 (PDT) X-Google-Smtp-Source: AKy350b48JPiA4sYDBtF8oALtPVuUQP/FQEwvIab9SHsbp3g05+5tauAutOlVcbZczgZiR+u7NJj X-Received: by 2002:a17:906:4d8b:b0:92f:7c42:8631 with SMTP id s11-20020a1709064d8b00b0092f7c428631mr18733538eju.16.1680086414905; Wed, 29 Mar 2023 03:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680086414; cv=none; d=google.com; s=arc-20160816; b=JZI2TTwQFJVm3fYQTQFtzpv6CKgrnos5Qp7Hb5vUaOgBxVnAFgEoxnHvZio5dFPd1o Efxji5+XyQgu1ladFg4RQtQ6DFO0BBCAvYy9kZ1NkFtZQZmYVd1H8S1JRXdllTlbE0Jj 70dgZbkcSc6M3mMmxJcLRBIccgMTA5DkC/sWPr6m+EtUWAZ1dgiyTDhI7DPb+I8I4Vki M2FuFwcqlC+37noA9zeOhNFm1sRgzbtXAthGyaXG+i0OOxMEt3PNT94S8rYg2vP8pRgR oRo8rntu1K1WyjmWsa2siluN9J+7PnO+2QvyF1F3PKb7JpQlFbxn1YJdX6v/zO0GEp57 YY3w== 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=lV+HXvD7QcdmJmzElwDez7tC33GDs2nZ7rVEaoUKP70=; b=xJyO09vdUXP1mfRzMN50KsGLlcctyXqcld/dm8vgVBliTgJ/g7/x/+boi+OnxYGqQ8 1icgKrJcRDbb55wPt05O72iMgI9kVSqKeF+s64zKuJvcK90Ob7R4KbYCqrarG+sTpeuL QyKAIKTQj9iObpEzDJIBe2OFr1ytv4DMmZihSg6Z2+pu7QhqcDu6047ptya7q/JYMwYl PXGR3CiAdvuqHKw8qhQWGcdwuJXDKRC3TFOOmLptqdkn23NWtcQaeIS97/0rnkHl00b7 u8+Dr8YLQfzeuJIiLSS8CaJRwKcGKZ9SFiGgaZ4DD9wQlS1xij8wGvtpQzwNSGqX7SRB fJQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=txyvRP2L; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qu6-20020a170907110600b008c580ab8d9esi10406894ejb.69.2023.03.29.03.39.50; Wed, 29 Mar 2023 03:40:14 -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=txyvRP2L; 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 S231157AbjC2Kb7 (ORCPT + 99 others); Wed, 29 Mar 2023 06:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbjC2Kby (ORCPT ); Wed, 29 Mar 2023 06:31:54 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 569C246B3; Wed, 29 Mar 2023 03:31:42 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32TAVVvN098585; Wed, 29 Mar 2023 05:31:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680085891; bh=lV+HXvD7QcdmJmzElwDez7tC33GDs2nZ7rVEaoUKP70=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=txyvRP2Lsov/pxFOBqyupEWnwbHES7DfwhmSApO/GBd3Ns9ng7AVATZcGWpEeV/TH D1Ad1V4gOSpgIzdrEbf5xMN2XVwm9rQR8/faUrgi/UlDq2vPNkdkScQ5tjG4YFYpTO X57DCqq7qKEyKJlxuTLiH/hvxV2Ngl+Ff8Fyb2iE= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32TAVVsN082151 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Mar 2023 05:31:31 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 29 Mar 2023 05:31:30 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) 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, 29 Mar 2023 05:31:30 -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 32TAVUlX054206; Wed, 29 Mar 2023 05:31:30 -0500 From: Jai Luthra Date: Wed, 29 Mar 2023 16:01:03 +0530 Subject: [PATCH v9 6/6] arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20230313-mcasp_upstream-v9-6-6d937efe4ec4@ti.com> References: <20230313-mcasp_upstream-v9-0-6d937efe4ec4@ti.com> In-Reply-To: <20230313-mcasp_upstream-v9-0-6d937efe4ec4@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=3461; i=j-luthra@ti.com; h=from:subject:message-id; bh=GBSLCEn9irDxaEIQSwlX3uqzJq0b8qmTn/M8uqYMMDI=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkJBN51iZYomreIyh8x1rFsO0X7NpQeh33ZYLap 6Rk63VJ0bmJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZCQTeQAKCRBD3pH5JJpx RfBeD/9VsIfc9VA2vXJwaVfIlNnxo9XQFQPyRE3iKwG7rCffmhm+pYk+fz3rZTwSZFOX3tJoKHE 4OjTTg7IVExtrxa4Pu9k2H+8RxoWlh6Elgl3yWfVT+Jg7sxuOaaiJaSN8pmERPF3XkIRGyefgKs LGga8vWucKDUhwfzAnWqj1mSNQWYwjS0C/ro8e6Newn00GDQzxUpBUtXAayJGwqm0mg3rpv4kI0 +EOe1Xkt0/0m7CAIlrienqtmbnDXixjwuQqVpVkoA75hgHJwsvLYnJQPW9IPJgLRp4BwKYoHS/U LPN9UmnwAILOMy6JoQyZ3+wL0X6IYcchOqQRbYkqRmIPCnR4nOIHwRPQjkKknRj1D5u3O7kKg2d DXr+X8xdeHKfWjut5gCOx7U2ZAAlS/YlfvrIGu50CzaQNlWD4FElgojC0lDOGQGN+XGDYUPt2i9 7VdY84hxHbabrUPIEy9yBH7REryYdqnAiwhCSdqtaFvTJpFvmeMMjyhZrtnmzmqRP63s3Wk+EvW pQieDgmsNGjbI90gQ5+SkDAOAGVHA63+rdH+cUaJKn9N6ZGUDo/OGtFzTG/CFzSGme4TAA8U2Uu rGxscqkvXnE5GQCTmpw+A/qHWhlH4a6UyoItTEPc7jv1DPxsiVyaqiUAaQseIs/PirqV4uVZ5F7 9fPWJoeb6OJ2ZXA== 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 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. [1] As the PMIC driver and devicetree node is missing, skip describing DVDD for now and manually set the OCMV voltage. Link: https://www.ti.com/lit/zip/sprr459 [1] 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 2296d656323c..8d7087e5f9e4 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -123,6 +123,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 { @@ -201,6 +236,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 { @@ -235,6 +279,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 { @@ -303,3 +360,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>; +}; -- 2.40.0