From patchwork Tue Apr 9 10:13:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13622225 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 7DBF5CD1284 for ; Tue, 9 Apr 2024 10:16:50 +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=3f3Jkdjt6CCdL8sVZxnWRgoDBcWwUNafz6mdFvJNM+A=; b=BNApys6cor+hj4 rsD/HmwgDjEjCKNQYwK26SMhEhsXzb55h97RNP09ICc/3jj3GvDUBTbgDENljQL9IlkSb0hkVtRgV 3b3NiIkZF94At8DB6ZQVb7TMRCjS6USvgPOc4neKW6aoLGd41NzWiLBi8P93G8bAQn8qgZJmu80kh deN9nz1AuPPbcIQMDsf4vVS4++b3fOYIxrIN1cd3lzKuEhACM1u20G/hTqS7G1j0LZuOm73yfNjYd nEVELZ7TrlKt8Uy3atSA7ZZ/2lDKOYNeDPDplMmxvi2zJRCYNE4GJOg5a+uxEH60xubDUa4thKD5e rG2BDav3C0ZtkVDiRnzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8Wv-00000001PJE-1UbU; Tue, 09 Apr 2024 10:16:41 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8Ua-00000001NnQ-0fg3 for linux-arm-kernel@bombadil.infradead.org; Tue, 09 Apr 2024 10:14:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=PlNVVt0wcqoKbTlcpTD2Av1BFgB4YmPyV+Qn5GBtCCs=; b=Kyu6MCCVSPO03DtAAqsd69Cf0/ Haktc0P6YXnG9blYJxG/wM4frGyUcERYHNwIBWu7Y+zzV/o0EruizP+G5y2GoWOv5tobmKp0uCklB o/iTZID7kPffCFUTSseTaS1yARoOc2ZZQY+gpk1wNcWyXqjHV0Qe4cHx430+Qk60mGUJeHR3rnO6w FFNw73AG6izMmogozEgJ/cC4Cuq8zQnFLmtFsUFlaVvvzTbNzz5KHEpYcj29miuq1q9Z7CKKPd2Mr r3I2vgVn2f0aXNGAmPJ1tYBBMdB+/PFnQBIHHIvbse1xZ6JPeUsQWNIhRiIddM8I/CKH0JLOwAAaH jZIKl+QQ==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru8UV-00000007YHB-0CRd for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2024 10:14:14 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-415523d9824so55355705e9.3 for ; Tue, 09 Apr 2024 03:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1712657648; x=1713262448; 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=PlNVVt0wcqoKbTlcpTD2Av1BFgB4YmPyV+Qn5GBtCCs=; b=HBfPTEDkSq55FJOjfXTaTxxXnHHbvac3j9b0SkSGX1L5hH9/6PgF9GS4YpK15+ZKYV cW2/dTheTAz6rkcinHBUdaU8miIItFK0mlgeOGc+RUprnTl9CYYVLKdYSb2aNLVm7fzV Md+SimLYgQK/LRUQQLEQA0MuQ0r60W0ixH2NTnGQcQ+c+Nef2ctrD5oOiP3TdgET23X/ XCSSyHciFb/rg8ybhfqRv6JWUbMPxlDSeZLXMxftAJA9aZ4dx1PjJIowN9NDPiqKgvID VwpzvzJALsZU93pI9rBc3UiRZGnUSWy/bvjXPIMGeasX7PqiXnLvXM9Z5kKMqNPRvgmP EN0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712657648; x=1713262448; 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=PlNVVt0wcqoKbTlcpTD2Av1BFgB4YmPyV+Qn5GBtCCs=; b=Uu9clTtwsQSj7+wFNL6goVScCE+adqxVwQw7eEKeUGsvkF/4hliAmtlIxpwF2axeYO GsrohDGj2tUSDkF+qjf8jmmLwSYr0iAKwPElWJEbhN4Vf8tCgcGDkifZ5eXIUgIXVwul 0R0CGLZG3ID+BoMAb+0HHvQTYWDpTagt5n9rxYeryw7QdaBw9zaoGyARwjONRL3MQIJK HZqfTcOmNx74faGBaoyPmH713tR+3RNm6Q8YW0egCazv7Y1dSRTz19aagP2C7C0ZK/eR 57pTBSW+6f8uZMXPtsY1GpwHRPi6doGdL4Wz8nyyasQA+ALnPwONYl0E7kpqSjPpov5w M0Bg== X-Forwarded-Encrypted: i=1; AJvYcCWHEV8UsUemXt5Sl3jvkCwOjVCjnZEAPM4v4gXAgv/iICic3ateh66IefVjHIPvlBQYK52V24cROE2yn5eJsuYRbOgECwtT022CTGVQNWrCNZghfd0= X-Gm-Message-State: AOJu0YxUGLF5+fGD3BZOawLDFmZH7hCbS0OeiRx56fads+pg7hFSTBR2 VBrOl3/l0eICpE9UN6sgwMLHB76FKtlHup7I4yQPdUeuI3aJ3nFuCccfehHjDOc= X-Google-Smtp-Source: AGHT+IH93tvacaOiFnd4nqmc7gPsI2OQnyM0ybPS1MyBc1NNs/vnBJCMth9sI4K2Y7Z5nTAcW1vKuQ== X-Received: by 2002:a05:600c:1986:b0:416:4973:4d87 with SMTP id t6-20020a05600c198600b0041649734d87mr7777580wmq.3.1712657648192; Tue, 09 Apr 2024 03:14:08 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id r7-20020a05600c458700b00416b035c2d8sm1124149wmo.3.2024.04.09.03.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:14:07 -0700 (PDT) From: Alexandre Mergnat Date: Tue, 09 Apr 2024 12:13:39 +0200 Subject: [PATCH v2 18/18] arm64: dts: mediatek: add audio support for mt8365-evk MIME-Version: 1.0 Message-Id: <20240226-audio-i350-v2-18-3043d483de0d@baylibre.com> References: <20240226-audio-i350-v2-0-3043d483de0d@baylibre.com> In-Reply-To: <20240226-audio-i350-v2-0-3043d483de0d@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=3962; i=amergnat@baylibre.com; h=from:subject:message-id; bh=uSzLvOfclK6XqDtrVAYhNkEKbGoFUCZ/BcUUGGGjtWY=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBmFRTTPFBV6yfp7E/gtZ8jajBrd4nrGJXU7zuvHqAn MYzj5GiJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZhUU0wAKCRArRkmdfjHURd7sD/ 0d7oIOsEwKg1zZ6wKlZHYUcZVM3MBOkC/s+el2n0OhNu8d0vnDZUAx+2NSBnPNMYQIop5CXn599unK zTB9ZeemTVqcMLVooBi6G4H5zf1lXsZ0agCq1THO622I/7O/KyLM9HjgyytiVUS3YuIV7DmWnJyGDu JWxyOmTQoU5uvqQUYIowraVjoLhkxK3w+BoqD4+vcVUZnTPHDQkKsy2Yee+HqURFMKbREfaB68KkhC wacoL0XJvC2lG6ZkP5zkaO7QqqigeYrlE0QMlqnVxtrOb3STiREQptLDQy5W9iomslHnnwrirzTNXt wkvQnflZmuetIt96UlaJ7EfwpUfpcSnSyvIECFNKmEtBMlzzQcbBWvoRAR4crLjNi5Ni7VJMEive9T ZcNWB9rmdABfIoaj1hgs2V4kiA/cdx4C7/N2csgJGJfbfKN7KCDYtETjmaTZvrmfPtgWOd+KcQEu0F Scb6Cwuj55Hc7Yvvv6xQ9X9O82nSU8gyZ12H14H4jFh787GExA6h33K1MJwN0WAuok1upuW7MFqYkZ iitq8obavvUIfmBnqn9zRN++w1YJ3yvkdGcWPiJGV3vy4Mfi9isOq1jgOiSHCL+fhBPxBqImEsENqO LBlB7ibM5IOmfrPDyZ4N8yx3kZJR4+icLeV0DNeOR6m5LqtiDNRvLaxwtt9A== 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_111412_109206_A3A1D48E X-CRM114-Status: GOOD ( 12.79 ) 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..bf15d3c7a965 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 { + vaud28-supply = <&mt6357_vaud28_reg>; + mediatek,micbias0-microvolt = <1900000>; + mediatek,micbias1-microvolt = <1700000>; +}; + &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 = ;