From patchwork Wed Jun 19 14:46:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13704049 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 9C12DC27C53 for ; Wed, 19 Jun 2024 14:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=/7n2AkJl0fgGMf2VEe6AhFr9U06FnNgwEKVPhxtEQpY=; b=WzlpwLjlTuaUpKDfRZ107UyyMr EHRIVjjOlODaF8auJse7QuzHo7zDS0TdHwM4VfOigeFbhxLX9HrejXRznS6bDOsOdcpqwoHk16FVQ FNmyS4hT0UoXRJNPFG3/VfZPErhMw91su7/0wDh3hELOEU1yThWr1MMyU4pv23TPPKlgJTVdkhLpp yO1UlxPeN269whFGpAl7kQIWOlDwvPy4cixfPoCKf0s8xS/6kYhruCadEpMnIb0SeIBS7N5eUB2cp g+GLFCKWY4H+xo1YyCXsfLYANybPwWwNKxlzwnNs6vhIl5gdU3OEOOHIcAkLiFTb1T9dZcYc4lPF1 Tscvmzqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJwcw-00000001ecs-1SYq; Wed, 19 Jun 2024 14:49:34 +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 1sJwao-00000001dJr-0xrx for linux-arm-kernel@bombadil.infradead.org; Wed, 19 Jun 2024 14:47:23 +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=/7n2AkJl0fgGMf2VEe6AhFr9U06FnNgwEKVPhxtEQpY=; b=MSBT995aYn/iWJ6KePZXJ2UHBt yxTA6xis68eZFo0Zwx9y2B3ZrdH1R2h1cFPLEoYMjLkj9xlG0REnPG/etvLRpfdwmm7S1NMXHXBU4 HLk0aWloWBmHITK1PbBTiI2jVLw9Tvpx2/mvnMfrDQze18KBgZBPTeDVc7zx7Ab8FigKPAieek9l1 EQ4J4nNGKX74jwPnNoYqp4e9zezotDL80QmdY4rP8s39Wb9eW3IAPc0nWqeWML4n/6yakOGrg7Iq1 nBnS9Zu2UOYkjjk2RSvtc9TnRBxg9Q0XcLRQx6mJ12zYQbSTM5Ufuz8TMAA72b4mj4FSBLXjh2Sbr YNhGpgdA==; Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJwag-00000007Msl-3iXc for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 14:47:16 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6f21ff4e6dso896524266b.3 for ; Wed, 19 Jun 2024 07:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718808433; x=1719413233; 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=/7n2AkJl0fgGMf2VEe6AhFr9U06FnNgwEKVPhxtEQpY=; b=UXBWsSaAEC8CIvWT2sGoP7CsrIQevzZfA0hb7FTvahc+i5PA9mlBGwm+mKKDFBaFvx 3cwYCIxzA9cXhHC86CGD0hw+vRijZYvpOpDbtiZp3R3qCS5G8Lf903nF4tv+gavlmXDc wvHgFoLE8Wmr7P2hZ5P5N0p43h9Plgbq9Lk11h34QpLTXwK06pn4InHd5ayUUoxDWp2f kL09JHQznfct3QbgzsCrHbIEQ+PL38x21e/8qJRSelgkFuRzavMzRLoNnAXJFjXZI6gI 7Oe4bLowofVBLhEXyFXNZ/WvciXBMhm7tFOlwC+NOfDdSsIK/dDvjO2re5QgUJeX36YQ N9Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718808433; x=1719413233; 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=/7n2AkJl0fgGMf2VEe6AhFr9U06FnNgwEKVPhxtEQpY=; b=aM9WhUKbMQDl0wWTBu9nb8anJVXyZfrHQpMp3/Yc9JBbkMHk1aGlO49vNMgE2lsqy8 BhHAMMujPnwtjHdo7Hs2Sy9KceFhPv86QelYpVjO3dFE7Q42mrlFu/wCvfxqP8beOf0t ykzpzPOoJWhtjzLdEg7okKjaLUQU1KQ8CYPVu8QGMJ1gjvCGx1u4w+th7S9T1j4htzww ctkZ/c6uXfVYXfeaQD/t+xITbYYkNNVnlMD5efNtHyCwDZ1JeniAP20SyvwtDAZ1wG1u x3KIMDdJjGKbBrbDmOSwn1tR5TOWyG0OBwiFaPVrdS801ED6jZZ1vQWKCWc032kLCpvY Mudg== X-Forwarded-Encrypted: i=1; AJvYcCVL3rJJagXtbOAnvKLcMSd73ZycYkDk23wee+cW1H/Nv0bjy9vhzYQByuoBypF2YJH1Yc1EGyJdnjKyAZxmSgAqrttVdfsnbB50oYfQW1pvQNTIP2E= X-Gm-Message-State: AOJu0YxLQn9lKpfLWcXiQYqjeOwqVK7K9bx9dNI7vTFcF5ODxwmSN3sa YmjXAnRICU5iLZBWgK4aLSM1ibp39XK5gpa8NIR9SVo1bTyHhk0uFQvDjyA5dy8= X-Google-Smtp-Source: AGHT+IFejjmBbR+O7NOilDUucTHeY4c4aDqAu2lRXv8q4ZHn25X/QRNZIhLDZJ8tRMuEdemHgCMIog== X-Received: by 2002:a17:907:c708:b0:a6f:9ded:3200 with SMTP id a640c23a62f3a-a6fab602dcamr173816566b.3.1718808433651; Wed, 19 Jun 2024 07:47:13 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a6f56da32c3sm679787566b.13.2024.06.19.07.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 07:47:12 -0700 (PDT) From: Alexandre Mergnat Date: Wed, 19 Jun 2024 16:46:52 +0200 Subject: [PATCH v6 16/16] arm64: dts: mediatek: add audio support for mt8365-evk MIME-Version: 1.0 Message-Id: <20240226-audio-i350-v6-16-f754ec1a7634@baylibre.com> References: <20240226-audio-i350-v6-0-f754ec1a7634@baylibre.com> In-Reply-To: <20240226-audio-i350-v6-0-f754ec1a7634@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 , Krzysztof Kozlowski 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=3674; i=amergnat@baylibre.com; h=from:subject:message-id; bh=AvMEH8+KihB+RCqkEHdbuY3XBZvm9qmhSI5bau/Z8bo=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBmcu9RgD0cIrV6/lCH0NYdwIPSFjZgfo8uICKgdRMK BiUeAheJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZnLvUQAKCRArRkmdfjHURX5xEA CVAxYmx20YDtVP5oFfSpgCktC+zv920AeENrb2JQxRdR02ezp1MasNc5UuKYalU+fXHwpgGjDaCEIf YqYAbCgFcT0QS/gij2R5R0zpORXf8quGhlpQx+5VqnF0lKCCG4U2PelntPOgKGMnZNlV2gEZodL/9n +0WiTS0FUzaTzQrC0vSh1CArExbmcxeg+JE6N+k3NCx1bEzRFX6yI3+F6bu40xUADNIrUNBzHkJtBr HSdVO4wWMXxuLM7EOZ+NWD3A4KdaToDG6T6gek5a1tVW5XQDUqMSxclIPtaF8Oyk0O9Cd8GCxKnkzC 0wc8qSbhEVnOpMFt8ONEHPQVdaDF3Gndv2J3j/bnG5yQ9Zgo/g2Ezz33cHu0loW9J2ca6SY9BRfRo+ E+JwpPhCxNLh+L288kzF6n9CBP+/O54C0LupdysRSxzDd/WBtbvZQMDCwIqpm5m+xJ41kOBe4eIPQr JnTj16T/X+Vb8FYvXw0mn1lv+K5VVh+uWTrcQZ52W1MsfpbU3HojZbfS4WzDawiPmc7YRa9/OOP45R sGmzx8awEwD38ybbIcpGx8lUo0lGI0w0vr/VlzSGrYXgl02FrsYjgu+F21jvflA+8QfY9ujx2B1zpU BKrnHGupCmTswsKViw1AnCcl4JFje0yKrx2j9WC0Fole5dwv41uEJaRkHfQg== 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-20240619_154715_287305_CDE01DD2 X-CRM114-Status: GOOD ( 12.47 ) 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 Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 50cbaefa1a99..f8e9bd732668 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -4,6 +4,7 @@ * Authors: * Fabien Parent * Bernhard Rosenkränzer + * Alexandre Mergnat */ /dts-v1/; @@ -86,6 +87,28 @@ 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>; + }; +}; + +&afe { + mediatek,dmic-mode = <1>; + status = "okay"; }; &cpu0 { @@ -178,9 +201,75 @@ &mt6357_pmic { interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; #interrupt-cells = <2>; + vaud28-supply = <&mt6357_vaud28_reg>; + audio-codec { + mediatek,micbias0-microvolt = <1900000>; + mediatek,micbias1-microvolt = <1700000>; + }; }; &pio { + aud_default_pins: audiodefault-pins { + clk-dat-pins { + pinmux = , + , + , + ; + }; + }; + + aud_dmic_pins: audiodmic-pins { + clk-dat-pins { + pinmux = , + , + ; + }; + }; + + aud_miso_off_pins: misooff-pins { + clk-dat-pins { + pinmux = , + , + , + ; + input-enable; + bias-pull-down; + drive-strength = <2>; + }; + }; + + aud_miso_on_pins: misoon-pins { + clk-dat-pins { + pinmux = , + , + , + ; + drive-strength = <6>; + }; + }; + + aud_mosi_off_pins: mosioff-pins { + clk-dat-pins { + pinmux = , + , + , + ; + input-enable; + bias-pull-down; + drive-strength = <2>; + }; + }; + + aud_mosi_on_pins: mosion-pins { + clk-dat-pins { + pinmux = , + , + , + ; + drive-strength = <6>; + }; + }; + ethernet_pins: ethernet-pins { phy_reset_pins { pinmux = ;