From patchwork Tue Apr 9 13:42:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13622642 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 A941ECD1284 for ; Tue, 9 Apr 2024 13:45:38 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dcl7oS606DCm6WeMB06Pc5lTwC4V1qJyW2t60AdsW4o=; b=ffgT0H6sUXCRTu vJQNM6emI1KY09U/zUtP6zraOQB6yAmTgSTMay1ibXrbciLwFizkwUPZQCq6gP5KM67l/LEcktZQP 4TCUjgnOlJoavaL7UGtuMIvaSnnQuLcq4Yjh6M4491lQLo1q9tD3HDbdTmf69C29SeLe5pKHmNifR X4OGJMTp6xtWkQHWwQNWaJsAhsot+4S1N+oNn4gSMgtjNAkxvvhz7wvT/TTuNmxrVqYCHi/xNTLbe rbZ9guy7zkwBe/MKkPNB2I13UqsFkIAIZzX5RcjLHYAa5FH4lLT/ISin6mjtC5aAHnkCWsE6ML2I8 xxN1DOWYoIsIEdU7YO/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruBmv-00000002EAt-2b1K; Tue, 09 Apr 2024 13:45:25 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruBkO-00000002CW7-0iGj for linux-arm-kernel@bombadil.infradead.org; Tue, 09 Apr 2024 13:42:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Cc:To:In-Reply-To:References:Message-Id :Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender :Reply-To:Content-ID:Content-Description; bh=IGsqJQWF1Ucte73TGgl0P2Cl+B2DHbp3lE/2oPwQwY0=; b=RNniikh1m4fOeVhWj1qqjIgd83 bIaVScLckIl8yz85vEmNTkJkZ5tEqSq5aFvjbvbQQN44/fP5U291Yl5X7mQeKZj0b3lRzf8Q9XEhr k7YQxrBDjpMPSKOVZUmNPR2Qx9/jPLyp0wW07oRuUlNURvbaOtSk5HAoJUqaQx10xpm/xlYb4wVAy qn+MObECBc/khLvCft4RytwTaauGy0GGr3flRWQKSsEWzUnE/lqtgE1Z0Gd7+3z/WpM/l3gTu0r+g +hSkJKyN2GTd5XUdRXBukusRpucxcOT3ArpcoJ7TMgGkQCcY+a84hpD/vSIIwwEQdRNsdPVU0Nk/U UeC2rl9w==; Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruBkJ-00000002E3J-1CA5 for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2024 13:42:47 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4163de295f9so16379145e9.2 for ; Tue, 09 Apr 2024 06:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1712670160; x=1713274960; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IGsqJQWF1Ucte73TGgl0P2Cl+B2DHbp3lE/2oPwQwY0=; b=w1fTzqdd9hyrEZtU2aGm3FP8FY8g6BAOZX/cj1eaEn7E6g65t3IRyeLEwT5c6NtClI 6C0EtZcsN2fzDBCMTSH/k3Zm5b1UavL1AcH6jJbh0EbhUQZsbkNKpPihb1qjcpV6mDGx QGKbOFfFXR5CsmQW+TUQjhjOpOrpbqN1n6slK2vi30R4vuRI4IDCxG9jeNesjxd9TIHl N/wY/yc6mjyOBJadDgnsjfDdLTKtKi1jh2lIMtYXVW5qd5aiZGG4iVQ0TqAe3nSCEHQ3 yZBPym3EjWTBRtGdhwSHy07QcKdUXKyKog4ZLi3nNFvr7jEy87Y8qO8W0uYDZiEVxs/C NSdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712670160; x=1713274960; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IGsqJQWF1Ucte73TGgl0P2Cl+B2DHbp3lE/2oPwQwY0=; b=NdU6W71x1iEMk1xLOgWtrTNj4DFY9+VZ0PGtegKm2YRyJ30PWU+W3jRyy3cufzm2Tw rL6UdfRE4MnecGK0hOAWuiNGEbaWrrPY2X1y8AjadQZIZR3xVBWT/hWpVN+xh5BDWR5+ ykeMSzrTiTQsJLHkVlIqzqYHfVfcqsl/Ky1G1VpY+LM+VDB0ZPNi2U2Ll3YZkTXxYaU8 xc0car6jPEcO4r3nTgb6QgL0ufGORUl57wxId9Tc0q3BzV0UOZAFNWnEKPuywDtSnvZI NPqZhq3BvRJE4RuvgcBIDOP4/sxV5GqHUmbuY3GCGAe/SP8ZRdkav9H8OotJk814ufU+ DMag== X-Forwarded-Encrypted: i=1; AJvYcCVUIPm6+e+tNTlKrO8Orq6M4ElCKWiOCghFKVkGI7in7eaYjV0wTIXBvU4Cek3F+w0/QcJVw5tMpXygzdHdcr4IL5d/TN6Z38o6BBrTC8upfhabcwM= X-Gm-Message-State: AOJu0YxgOpt5HNjLhVLy9wj4Cm9FI9G/MNWP+hOvAwV+oemhTqyb/zvE xgPvohe9FvIeibhVHdtR1uuiIMP07fky1mrH+YQujUhdLok1PmhMF114yVcYZT8= X-Google-Smtp-Source: AGHT+IG/iRx5ir5/ovsIbMfS8mk5u5aphffFDwTLsfaRoOPMCr5c7spDQQ+GP6mftM7G0850xXAw/w== X-Received: by 2002:a05:600c:4e0f:b0:416:7b2c:def5 with SMTP id b15-20020a05600c4e0f00b004167b2cdef5mr3740530wmq.2.1712670160253; Tue, 09 Apr 2024 06:42:40 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id j11-20020adff54b000000b003433bf6651dsm10753579wrp.75.2024.04.09.06.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 06:42:39 -0700 (PDT) From: Alexandre Mergnat Date: Tue, 09 Apr 2024 15:42:16 +0200 Subject: [PATCH v3 18/18] arm64: dts: mediatek: add audio support for mt8365-evk MIME-Version: 1.0 Message-Id: <20240226-audio-i350-v3-18-16bb2c974c55@baylibre.com> References: <20240226-audio-i350-v3-0-16bb2c974c55@baylibre.com> In-Reply-To: <20240226-audio-i350-v3-0-16bb2c974c55@baylibre.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Lee Jones , Flora Fu , Jaroslav Kysela , Takashi Iwai , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , Catalin Marinas , Will Deacon , Rob Herring Cc: 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, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3971; i=amergnat@baylibre.com; h=from:subject:message-id; bh=rmUU5KQQDjsuNrCnoS100FfCSVwtHEsMKsd4Yeoncng=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBmFUWs/X4+9lZbZVVrgUXvJF36fOR5nf9HCXtFKmub Eojk7WmJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZhVFrAAKCRArRkmdfjHURc0wD/ 45bfDP54YfMymdYp1DrRTulxgf6GxTPMlbsmaYC/6cJOUqee8t+L9WtVMsNrp7t8LfGDU3lDY7DoRr 6vNEioghcUnEv+Mc+SYl7wFoedQoAppu/BpfM70howwkJ2UVm+SUAzqgTjvtOwwEC4VY2h8X56zN2a LfJm6Zfjo5fE8H7XpUOf7F5E7EUR+eDKbDRrgA96OEuRy99jQrKasVCr+2ZDGx06J2yHrMAItWA7lb sR4Hy+3BRmHw710Xr0eta3e+SAHhqmDqcg9GQz8edgyqoFrmfhDzrsKuaRgVJksRLvo0/fyJhh8BWm ggJ6j0JO/EvFhhPG8VtKzyOpEtPw87GXwpdiBAHKbfVAGFgbK5oX6uA0oP78kar8WPv1YAloDpEsx+ oT+0QUuFzIu5TZjr2P00CZGUA+c1VVw7I5E1v7M1a0OwqRmjxd2H52CWPX0pxnkYQ+ZWfJOWqaZEfP JXM3aiqQLbew/R2iwVrMQlh0VkmWg0D5y+oSaN/yZFTY6Z12MNzp+ylKx34w6s4Nuw8dpsS1At7YxO Y3NzNjq61mtNk2oI6AIFWkeDyXsCWAYYySPd52T6MeQ79lwvWkBgUBURjyZQ0LiXHZomCM5OOEkckg 92hqaIi3kf8aFt6cxW2WzEKL1eAKxDEaYjMgHhcYn6CjpygtttRwko/+RTGw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240409_144243_617158_42B7B018 X-CRM114-Status: GOOD ( 11.99 ) 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 the sound node which is linked to the MT8365 SoC AFE and the MT6357 audio codec. Update the file header. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 98 +++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 50cbaefa1a99..eb0c5f076dd4 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2021-2022 BayLibre, SAS. - * Authors: - * Fabien Parent - * Bernhard Rosenkränzer + * Copyright (c) 2024 BayLibre, SAS. + * Authors: Fabien Parent + * Bernhard Rosenkränzer + * Alexandre Mergnat */ /dts-v1/; @@ -86,6 +86,29 @@ optee_reserved: optee@43200000 { reg = <0 0x43200000 0 0x00c00000>; }; }; + + sound: sound { + compatible = "mediatek,mt8365-mt6357"; + pinctrl-names = "default", + "dmic", + "miso_off", + "miso_on", + "mosi_off", + "mosi_on"; + pinctrl-0 = <&aud_default_pins>; + pinctrl-1 = <&aud_dmic_pins>; + pinctrl-2 = <&aud_miso_off_pins>; + pinctrl-3 = <&aud_miso_on_pins>; + pinctrl-4 = <&aud_mosi_off_pins>; + pinctrl-5 = <&aud_mosi_on_pins>; + mediatek,platform = <&afe>; + status = "okay"; + }; +}; + +&afe { + mediatek,dmic-mode = <1>; + status = "okay"; }; &cpu0 { @@ -174,6 +197,12 @@ &mmc1 { status = "okay"; }; +&mt6357_codec { + mediatek,micbias0-microvolt = <1900000>; + mediatek,micbias1-microvolt = <1700000>; + mediatek,vaud28-supply = <&mt6357_vaud28_reg>; +}; + &mt6357_pmic { interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; @@ -181,6 +210,67 @@ &mt6357_pmic { }; &pio { + aud_default_pins: audiodefault-pins { + pins { + pinmux = , + , + , + ; + }; + }; + + aud_dmic_pins: audiodmic-pins { + pins { + pinmux = , + , + ; + }; + }; + + aud_miso_off_pins: misooff-pins { + pins { + pinmux = , + , + , + ; + input-enable; + bias-pull-down; + drive-strength = ; + }; + }; + + aud_miso_on_pins: misoon-pins { + pins { + pinmux = , + , + , + ; + drive-strength = ; + }; + }; + + aud_mosi_off_pins: mosioff-pins { + pins { + pinmux = , + , + , + ; + input-enable; + bias-pull-down; + drive-strength = ; + }; + }; + + aud_mosi_on_pins: mosion-pins { + pins { + pinmux = , + , + , + ; + drive-strength = ; + }; + }; + ethernet_pins: ethernet-pins { phy_reset_pins { pinmux = ;