From patchwork Tue Feb 27 12:09:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13573701 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 A72BCC54E55 for ; Tue, 27 Feb 2024 12:14:42 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=46Dt5aOI2LF0CjQgJ76nkkYBvgm9E5CeZV10vY28R20=; b=CcA8AZue+R6U48 JuvvqGUaLb5ANQxK4D5ShXojYJilhnZTZcPwozbj2XNmL19Oyt976+gOtS8nrNwZI1Tv4QAroGMq6 QDFsAtZtYNdSbLQ6cM//2oCElHdlsQPOzrjX4zotVZzD5nF8Zct1xupLknmJV9zl9avIjl+1jadzS L57tAY1SzgBcUAfEeunV8+9NQNOAwRUar0odm2cqWfVCCvzv0RJY+zt4TpH0XCKHkZDVJn+Klz1mh CxJQV5wKBYlEviQglNpAe2L2kaz/RvcsF7LjeZTOgyIwJWkJM1GFPIKnoTZSRhyTLVzA/UOGmJiRA /WR2CnM4AwGMc+3lLlFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rewLo-0000000573k-1rEV; Tue, 27 Feb 2024 12:14:24 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rewIZ-000000054uN-1gw3; Tue, 27 Feb 2024 12:11:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709035861; bh=Jpx8HKm9BGBUo/aktxdkRyrJGYDFjXNdMQ+YMjx31sA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dfWbwXxJigyS5KeGUp9zCavzOTOxtYMxTZ1iXIUFADnqos5jbqkwfgbYPC8PRlH9c LlKO4XxnXvrfrF+f8343Rw/AV7w8ekHjDZsOMrJdllEvM0H2tT+UxKJ7mRtmX1Qprj GXgNLDtFzB0d3Hb5Ihyx26zaF2O7orkFTnn0B7LI73AC1PHp1BRZgMWSzyscrltTCc whV3tXz1DAC4+rkEKaIlf4UQBqVMWBAdfHZ64KGr1xLC0gYJlRTidDqQkCG0s1EDgw PhKid+mptZtDIx8Bijk8vRZBQi0WweGr7j/J+9R3FXnQvdlZwcvT4pmYKNMXoPeI9n QKNSHr7y3enkQ== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 9DAD037820EC; Tue, 27 Feb 2024 12:10:59 +0000 (UTC) From: AngeloGioacchino Del Regno To: broonie@kernel.org Subject: [PATCH 21/22] arm64: dts: mediatek: mt8195-cherry: Specify sound DAI links and routing Date: Tue, 27 Feb 2024 13:09:38 +0100 Message-ID: <20240227120939.290143-22-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227120939.290143-1-angelogioacchino.delregno@collabora.com> References: <20240227120939.290143-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_041103_759690_2AEE7116 X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. 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: , Cc: shraash@google.com, alsa-devel@alsa-project.org, allen-kh.cheng@mediatek.com, kuninori.morimoto.gx@renesas.com, lgirdwood@gmail.com, tiwai@suse.com, shane.chien@mediatek.com, krzysztof.kozlowski+dt@linaro.org, claudiu.beznea@tuxon.dev, kernel@collabora.com, robh@kernel.org, nfraprado@collabora.com, amergnat@baylibre.com, zhourui@huaqin.corp-partner.google.com, jiaxin.yu@mediatek.com, trevor.wu@mediatek.com, wenst@chromium.org, devicetree@vger.kernel.org, conor+dt@kernel.org, ckeepax@opensource.cirrus.com, arnd@arndb.de, frank.li@vivo.com, maso.huang@mediatek.com, u.kleine-koenig@pengutronix.de, eugen.hristev@collabora.com, alpernebiyasak@gmail.com, linux-mediatek@lists.infradead.org, linux-sound@vger.kernel.org, matthias.bgg@gmail.com, perex@perex.cz, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , xiazhengqiao@huaqin.corp-partner.google.com, dianders@chromium.org, linux-kernel@vger.kernel.org, jarkko.nikula@bitmer.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The drivers and bindings acquired support for specifying audio hardware and links in device tree: describe and link the sound related HW of this machine. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index f94c07f8b933..e405e226e449 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -240,6 +240,7 @@ adsp_device_mem: memory@60e80000 { spk_amplifier: rt1019p { compatible = "realtek,rt1019p"; label = "rt1019p"; + #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&rt1019p_pins_default>; sdb-gpios = <&pio 100 GPIO_ACTIVE_HIGH>; @@ -334,6 +335,7 @@ &disp_pwm0 { &dp_tx { status = "okay"; + #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&dptx_pin>; @@ -404,6 +406,7 @@ audio_codec: codec@1a { /* Realtek RT5682i or RT5682s, sharing the same configuration */ reg = <0x1a>; interrupts-extended = <&pio 89 IRQ_TYPE_EDGE_BOTH>; + #sound-dai-cells = <0>; realtek,jd-src = <1>; AVDD-supply = <&mt6359_vio18_ldo_reg>; @@ -1130,6 +1133,48 @@ &sound { "AFE_SOF_DL2", "AFE_SOF_DL3", "AFE_SOF_UL4", "AFE_SOF_UL5"; pinctrl-names = "default"; pinctrl-0 = <&aud_pins_default>; + + audio-routing = + "Headphone", "HPOL", + "Headphone", "HPOR", + "IN1P", "Headset Mic", + "Ext Spk", "Speaker"; + + mm-dai-link { + link-name = "ETDM1_IN_BE"; + mediatek,clk-provider = "cpu"; + }; + + hs-playback-dai-link { + link-name = "ETDM1_OUT_BE"; + mediatek,clk-provider = "cpu"; + codec { + sound-dai = <&audio_codec>; + }; + }; + + hs-capture-dai-link { + link-name = "ETDM2_IN_BE"; + mediatek,clk-provider = "cpu"; + codec { + sound-dai = <&audio_codec>; + }; + }; + + spk-playback-dai-link { + link-name = "ETDM2_OUT_BE"; + mediatek,clk-provider = "cpu"; + codec { + sound-dai = <&spk_amplifier>; + }; + }; + + displayport-dai-link { + link-name = "DPTX_BE"; + codec { + sound-dai = <&dp_tx>; + }; + }; }; &spi0 {