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: 207180 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2656045dyb; Tue, 27 Feb 2024 04:18:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXoJDwgNvJJWioFH99gOsTldpYZ90+LbnJyqReGLjcb3peLDr2EqHqLxa7MbOOE6V0hZn5xB5TyhV+LvKyNXvmsUuPkcw== X-Google-Smtp-Source: AGHT+IFOINrQ9P9+FXho5LcoG8sjJegQhMxzts2+VuSbsgB4Iu6Q5QrvIPorhG0WIEAIMO098kvp X-Received: by 2002:a19:6510:0:b0:512:a30e:9fff with SMTP id z16-20020a196510000000b00512a30e9fffmr5808928lfb.21.1709036332252; Tue, 27 Feb 2024 04:18:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709036332; cv=pass; d=google.com; s=arc-20160816; b=IqK8yIHJx3puds7HQMi2cstoR5PiYRWmn6cJvViO6iDpjF+WW7n4xK5w2+bFCxjlwv 0FcE3kvTl9/1Fez0aivUNwxIRrmAbP29NrQlkpmEKFEDmKf9lYnfjexl3YtKaW0uFOZL S6bTvgcuNuklYq3RJsJBuKpSD4rWQ1ZSVKe+Vb7qsifL+NUh/W9umQldZSPqetfr0N+q ++XVSUQbRca441/0D3xe6xb7+HiG1GzEXZTKiAr+Xks3gWJ3F3OGQMO4eb0liqkZUHcA eFLiZ79UPm+u4th+iL3oPdAl0Vy5tkIvBKsSM+BkQe3HFxcOf20Z5+Oyih8ekkvvx569 uSeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Sjxk+G0JXaulLp0Gsjtb2mSL2FrjZisK0OaKlVbjzRk=; fh=9iEt4iCRn9CzCxci4w2sdEG90CBf9Xi5ef9RsAZByLs=; b=FhO1rPBKLBHmeul5sjeZcPWkU4UM1EJ1BXojn3IUT3FSB1N7XEitU2BzbuP1vjGAbk /hEco0tWG18U11A8tJg8uX23FTdiZKvjcvYt3BGfs5DorcHk25dl/q+xymkwSSTjXroY nYyib5vlHtrAOBSpYH89sP9ywtGccTcu7RIMYjCl9XoI6N1tO2Q+7gG691/tCVibAKQh lO6b0mn97e2knPxQueaAB2g3WZlESvaVEy3ut1JZk00ki155OnX5DYrspxGFztIieQ9D JU5dZw16ZoSz7A6QfSqfjbkyTQkwSfcN6QM8WWly1ceusCJMkMmdrQJnJCh7oroT7R1S XHhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dfWbwXxJ; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-83200-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83200-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h17-20020a1709060f5100b00a3e7b8a8347si666478ejj.1053.2024.02.27.04.18.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 04:18:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83200-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dfWbwXxJ; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-83200-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83200-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D24C51F21170 for ; Tue, 27 Feb 2024 12:18:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DE3A1534F7; Tue, 27 Feb 2024 12:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="dfWbwXxJ" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8874A14F987; Tue, 27 Feb 2024 12:11:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709035868; cv=none; b=GmG9N8+iSt3MD9e7bv0LcCopGkd566A2iZYx3jQDVAYKOU8h0lFah4FpAWlJTCv3Um7Wi+8I2UX3zMoE4L/I/v++DH2pJzAHDVDD7ozz2qsTaX0o6oGaNrNBwZr470ykBJScmPlWttH2Qk9OBSnSHh65+MwH7f64ZNp7VaHoACw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709035868; c=relaxed/simple; bh=Jpx8HKm9BGBUo/aktxdkRyrJGYDFjXNdMQ+YMjx31sA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MCHFC/mLst/dNpqNeF+l3zmwCxRz5fOzbe9sqJSvrcAqaDWlAiMkf36CTGSMQw1xpc9bll205cqNSU8j1ZQJZ3/Lk/Vc8BHrgRv+7BOwVJdYHwXLGUk6qd/CbOkMVtVNr6wz+gWrse8f/QLFr7xiipnX1ZzMMta7hOAa0/JrU0g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=dfWbwXxJ; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com 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 Cc: wenst@chromium.org, lgirdwood@gmail.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, perex@perex.cz, tiwai@suse.com, trevor.wu@mediatek.com, maso.huang@mediatek.com, xiazhengqiao@huaqin.corp-partner.google.com, arnd@arndb.de, kuninori.morimoto.gx@renesas.com, shraash@google.com, amergnat@baylibre.com, nicolas.ferre@microchip.com, u.kleine-koenig@pengutronix.de, dianders@chromium.org, frank.li@vivo.com, allen-kh.cheng@mediatek.com, eugen.hristev@collabora.com, claudiu.beznea@tuxon.dev, jarkko.nikula@bitmer.com, jiaxin.yu@mediatek.com, alpernebiyasak@gmail.com, ckeepax@opensource.cirrus.com, zhourui@huaqin.corp-partner.google.com, nfraprado@collabora.com, alsa-devel@alsa-project.org, shane.chien@mediatek.com, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, AngeloGioacchino Del Regno 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792054481415647944 X-GMAIL-MSGID: 1792054481415647944 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 {