From patchwork Sun Mar 27 16:58:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12792865 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 8F23CC433FE for ; Sun, 27 Mar 2022 17:00:51 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pk8bdXP4M0f41C6Vy/eRcWvvQ0QG0Yg9OkasK3Ao+Wg=; b=vHnF3mi4KDxiQG GrY7GOZkW24W30CpkDpfRx8Ob1vb2BIFpqoNxVxk1UY5mHb5DrN8qSC55oUxu5ji+J+GsBmRaZ5/o 0Ogx2ulkR3vuWr4KReKxnyUyXki253xO9U2aZYnvWS4e2+ELxXiLFwnskCJtBcQ6X5HiVLKE1b+0z xQKSyPJugPzeafLrNK0h5EgoCNOoDj0KFdGNTBqYf4kfODfTvf8w+ciMJHYo5cqS4nJ1mD1C8BvuW NFpfRDUWuRaZHPG4P4LqQZ8S72/0y3JKKUfaXjjMOPJXHbQ/86zEztRd81fEwQpeQDBn7+uehwwWs RW2kmNbjnauj2VXH/80g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWEr-005ku1-Dt; Sun, 27 Mar 2022 16:59:37 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWEn-005ksk-MI for linux-arm-kernel@lists.infradead.org; Sun, 27 Mar 2022 16:59:34 +0000 Received: by mail-wm1-x329.google.com with SMTP id 123-20020a1c1981000000b0038b3616a71aso7182734wmz.4 for ; Sun, 27 Mar 2022 09:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GrkiYksIXcCr7YZZWEOvdXT2DA/jInP9u8Xo7/nCL0M=; b=GTZ2XxQZHx/jRc8T3Lv8E/z/1GWp49b6uLzBucRMSL8INJw5DyBeUQhnVhdavWirNL tmbW/itm/3LLUXpvwmVjZtWKBlaucszhH7zqf2ICmRqR+ZSLdu/uBqWj/+M5nzzzBn6U nmt5JvEmbzXijPg3VkZYogg+nJGQKOML2CgpTCo5P3ARFH9+ptXLbkv9C2YmJZMXQ1iZ 7n8JkRVZjiFQla+jJumiLaTgmNmDSEsF47JF+ICa995EBRgvQ9R2A/0MyLBRZsMqki48 sYxCPujMABUPs1bSP2dlqvfbClKwfe0fuPkhxyLkX0IXqK0iAzHHK8opy/CvaDSjhehd i2GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GrkiYksIXcCr7YZZWEOvdXT2DA/jInP9u8Xo7/nCL0M=; b=ZpmfYi4Bf8hnoGizLA+so3Jgg9yTCqL8xgpZEq7coqH32IilGruNf0/e0WwIWUHtI9 h1oy5QrQ+DhcVdZXFjJnp3Z371a6AQRR/tefcFTALtu1uy8mC7HVK1kStjJCnE+EA7at 5pokJg/6Pq+0tDpiJw/ll6cRKFvduAjHj5K+Bmns3dF3RqQK/l1sf8xt+K51isadWV5u AeuckUAqVssv/XQRmUVkARgTtBAljlaJ2oLVHqBi2trCrWao0HaVptHC28KLl/9YOjAa sfcXwY1v+kX3sMS7P6kM+/YVIjofPZkucxkY9vqiBW0pKuypy3VepmY/T6Jcmp3BV+j2 dJBg== X-Gm-Message-State: AOAM532DNxnbzGL0Fx2ISxIoeWeme2aadWGOK4KXKQjnf1VvjTbjBKJx X6H0WcV8Y7+l4ZcJNVtXf56MWw== X-Google-Smtp-Source: ABdhPJy/tdJJQlDuv4mW16c8o9cKE4bOlxZGTM69qH8mj9pl3CI+OQLQ5IbGpH33qgENVnCRDEzp4A== X-Received: by 2002:a7b:c77a:0:b0:38c:2c33:d8f1 with SMTP id x26-20020a7bc77a000000b0038c2c33d8f1mr29485151wmk.115.1648400372558; Sun, 27 Mar 2022 09:59:32 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id 2-20020a1c1902000000b00380d3873d6asm9979423wmz.43.2022.03.27.09.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 09:59:32 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang Cc: Fabien Parent , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/4] dt-bindings: arm64: dts: mediatek: Add mt8195-demo board Date: Sun, 27 Mar 2022 18:58:34 +0200 Message-Id: <20220327165837.3048639-2-fparent@baylibre.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327165837.3048639-1-fparent@baylibre.com> References: <20220327165837.3048639-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_095933_759319_5EE6E382 X-CRM114-Status: GOOD ( 10.56 ) 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 bindings for the MediaTek mt8195-demo board. Signed-off-by: Fabien Parent --- Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml index ab0593c77321..1f68afb19d81 100644 --- a/Documentation/devicetree/bindings/arm/mediatek.yaml +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml @@ -131,6 +131,10 @@ properties: - enum: - mediatek,mt8183-evb - const: mediatek,mt8183 + - items: + - enum: + - mediatek,mt8195-demo + - const: mediatek,mt8195 - items: - enum: - mediatek,mt8195-evb From patchwork Sun Mar 27 16:58:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12792867 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 2EDD9C433EF for ; Sun, 27 Mar 2022 17:01:10 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QIMCjMJYCr7yU+j8J8OwO474k4jn9uvFkFlafqeQpAU=; b=spEaTMYaBLutD3 lx7LgP4irw/dpTr0vjjhoz9wG64fvRW4uEkeAAPCNUhlxkl4STJz2GVqo1hnUilA2oCNnu8j+R5Ah u+sh6MJ2f6o7EG+2spEDaw3Y4qEKq4mL0LfdDs931Epyf+UNXcGjSQItE+B0QDxGsrtQ9lhrsuWD7 1ijJPpCZPcR2ySUemRDDwN6/V5W97sifHvNe2kbWysr8OqR0p1hHbhicy7vjh0OQtSqw8ueyzNNCi yIaMob7OOlBjXkBVeqLNBKa+lKW6jIztFgy0yGXnBkuE5eIz+cd5igXW5Pdsoz080roF3PduYOl8i oHhQVOy4+cbA4Ng8hHRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWF4-005kzG-Jq; Sun, 27 Mar 2022 16:59:51 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWEt-005kum-AU for linux-arm-kernel@lists.infradead.org; Sun, 27 Mar 2022 16:59:41 +0000 Received: by mail-wm1-x335.google.com with SMTP id r7so7072390wmq.2 for ; Sun, 27 Mar 2022 09:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FAWIncwTqvdWr+vTVrpGUz4HSBxrtF7PI86nkB/iGHw=; b=OkaVhGoHBp1vXejxSnBedJjHVqbTw437NtL71p5aH6eUGAavCrepnkyFmRvqLNG728 5j8kUlALSZLd5gWa1x1/Gjle1uOXgZSpj5Ak6j4opXPdN4ic/fUw3fJ9aVSkVMJiA2vx 6xjTIkSdlfuPPYSvLVAX2sVC+VjIM9K9O8YHFWgXnoaYhIjq80OfmOet7inqr6/39WBB NAHw5pHZnkwnn+5Vm66DW708AAhhDoSc+xtPC3rZU0vuMedffKT/Pfhu7xJCb1nsD4TY fhq5/YoT3SVGe8BiyI8A3oMFGlMyRPG2AzcoDjESW4Cr+ZveNTJxQ+t2TKwvlxqpr7mM 5pgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FAWIncwTqvdWr+vTVrpGUz4HSBxrtF7PI86nkB/iGHw=; b=ynIRBRscWX48oTimGYQVWuEKAYwruArkvt3mW4wINOWgpuCyhvoa5578j+vWjtsue+ /yGegSNrL1KWAAMOMsK966JCyCeSiML86ZsWyn8MhaUaq8pi1FxPKznmKhPUNsjgqodD x7KZcJL/x5vv/9P0Rjq/7Oolaw7vJ5bVd4WqDzsoV1MI1l4mNaQC63EOwBvP385siRVs IMPPLREwVhmDa9cbAQPQj6+UY7REbUH/RRhBKG9cgSLY+EESOveoq8cpyNwJZ60N6IPu SPbQfyW4oElyzk5kin3efF92QAWiTpJmILt2OejksPSWA2x9oKM/9sI9Oyz51qBkdcDr XDlA== X-Gm-Message-State: AOAM530/TCxXK1gviZM1fIYeXDFCxSR0RuAmUbAoOTIpvdTDoIasOxmZ qgzUll69a3EJT82vwoSjTHJ9xg== X-Google-Smtp-Source: ABdhPJy1BHq9yjVUI7wiI6HBdrofqgl3Bj4vo6iDMB1oY9MOG+iLCqpzSwkdNGa8YtAd3RNz5vUO7A== X-Received: by 2002:a05:600c:1989:b0:38c:b8b3:8fa8 with SMTP id t9-20020a05600c198900b0038cb8b38fa8mr29897009wmq.18.1648400377857; Sun, 27 Mar 2022 09:59:37 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id 2-20020a1c1902000000b00380d3873d6asm9979423wmz.43.2022.03.27.09.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 09:59:37 -0700 (PDT) From: Fabien Parent To: Matthias Brugger , Rob Herring , Krzysztof Kozlowski Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] arm64: dts: mediatek: Add device-tree for MT8195 Demo board Date: Sun, 27 Mar 2022 18:58:35 +0200 Message-Id: <20220327165837.3048639-3-fparent@baylibre.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327165837.3048639-1-fparent@baylibre.com> References: <20220327165837.3048639-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_095939_392916_B082C10A X-CRM114-Status: GOOD ( 18.43 ) 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 basic device-tree for the MT8195 Demo board. The Demo board is made by MediaTek and has a MT8195 SoC, associated with the MT6359 and MT6360 PMICs, and the MT7921 connectivity chip. The IOs available on that board are: * 1 USB Type-C connector with DP aux mode support * 1 USB Type-A connector * 1 full size HDMI RX and 1 full size HDMI TX connector * 1 uSD slot * 40 pins header * SPI interface header * 1 M.2 slot * 1 audio jack * 1 micro-USB port for serial debug * 2 connectors for DSI displays * 3 connectors for CSI cameras * 1 connector for a eDP panel * 1 MMC storage This commit adds basic support in order to be able to boot. Signed-off-by: Fabien Parent --- This patch depends on the following patches: [0] https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/ [1] https://patchwork.kernel.org/project/linux-mediatek/patch/20220216113131.13145-4-tinghan.shen@mediatek.com/ arch/arm64/boot/dts/mediatek/Makefile | 1 + arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 539 +++++++++++++++++++ 2 files changed, 540 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-demo.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index 5da29e7223e4..c7d4636a2cb7 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -38,5 +38,6 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts new file mode 100644 index 000000000000..f486cdf7e22b --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts @@ -0,0 +1,539 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2022 BayLibre, SAS. + * Author: Fabien Parent + */ +/dts-v1/; + +#include "mt8195.dtsi" +#include "mt6359.dtsi" + +#include +#include +#include +#include + +/ { + model = "MediaTek MT8195 demo board"; + compatible = "mediatek,mt8195-demo", "mediatek,mt8195"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:921600n8"; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0 0x40000000 0 0x80000000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* 12 MiB reserved for OP-TEE (BL32) + * +-----------------------+ 0x43e0_0000 + * | SHMEM 2MiB | + * +-----------------------+ 0x43c0_0000 + * | | TA_RAM 8MiB | + * + TZDRAM +--------------+ 0x4340_0000 + * | | TEE_RAM 2MiB | + * +-----------------------+ 0x4320_0000 + */ + optee_reserved: optee@43200000 { + no-map; + reg = <0 0x43200000 0 0x00c00000>; + }; + + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */ + bl31_secmon_reserved: secmon@54600000 { + no-map; + reg = <0 0x54600000 0x0 0x30000>; + }; + }; + + firmware { + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys>; + + volume-up { + gpios = <&pio 106 GPIO_ACTIVE_LOW>; + label = "volume_up"; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + +&mmc0 { + status = "okay"; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + cap-mmc-hw-reset; + no-sdio; + no-sd; + hs400-ds-delay = <0x14c11>; + vmmc-supply = <&mt6359_vemc_1_ldo_reg>; + vqmmc-supply = <&mt6359_vufs_ldo_reg>; + non-removable; +}; + +&pmic { + interrupt-parent = <&pio>; + interrupts = <222 IRQ_TYPE_LEVEL_HIGH>; +}; + +&i2c0 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2c1 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2c2 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2c6 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c6_pins>; + pinctrl-names = "default"; + status = "okay"; + + mt6360: mt6360@34 { + compatible = "mediatek,mt6360"; + reg = <0x34>; + interrupt-controller; + interrupt-parent = <&pio>; + interrupts = <101 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "IRQB"; + + charger { + compatible = "mediatek,mt6360-chg"; + richtek,vinovp-microvolt = <14500000>; + + otg_vbus_regulator: usb-otg-vbus-regulator { + regulator-compatible = "usb-otg-vbus"; + regulator-name = "usb-otg-vbus"; + regulator-min-microvolt = <4425000>; + regulator-max-microvolt = <5825000>; + }; + }; + + regulator { + compatible = "mediatek,mt6360-regulator"; + LDO_VIN3-supply = <&mt6360_buck2>; + + mt6360_buck1: buck1 { + regulator-compatible = "BUCK1"; + regulator-name = "mt6360,buck1"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = ; + regulator-always-on; + }; + + mt6360_buck2: buck2 { + regulator-compatible = "BUCK2"; + regulator-name = "mt6360,buck2"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = ; + regulator-always-on; + }; + + mt6360_ldo1: ldo1 { + regulator-compatible = "LDO1"; + regulator-name = "mt6360,ldo1"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + + mt6360_ldo2: ldo2 { + regulator-compatible = "LDO2"; + regulator-name = "mt6360,ldo2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + + mt6360_ldo3: ldo3 { + regulator-compatible = "LDO3"; + regulator-name = "mt6360,ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + + mt6360_ldo5: ldo5 { + regulator-compatible = "LDO5"; + regulator-name = "mt6360,ldo5"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3600000>; + regulator-allowed-modes = ; + }; + + mt6360_ldo6: ldo6 { + regulator-compatible = "LDO6"; + regulator-name = "mt6360,ldo6"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2100000>; + regulator-allowed-modes = ; + }; + + mt6360_ldo7: ldo7 { + regulator-compatible = "LDO7"; + regulator-name = "mt6360,ldo7"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2100000>; + regulator-allowed-modes = ; + regulator-always-on; + }; + }; + }; +}; + +&spi2 { + pinctrl-0 = <&spi2_pins>; + pinctrl-names = "default"; + mediatek,pad-select = <0>; + status = "okay"; +}; + +&mt6359_vgpu11_buck_reg { + regulator-always-on; +}; + +&mt6359_vsram_others_ldo_reg { + regulator-always-on; +}; + +&mt6359_vpu_buck_reg { + regulator-always-on; +}; + +&mt6359_vcore_buck_reg { + regulator-always-on; +}; + +&mt6359_vproc1_buck_reg { + regulator-always-on; +}; + +&mt6359_vproc2_buck_reg { + regulator-always-on; +}; + +&mt6359_vsram_md_ldo_reg { + regulator-always-on; +}; + +&mt6359_vbbck_ldo_reg { + regulator-always-on; +}; + +&mt6359_vrf12_ldo_reg { + regulator-always-on; +}; + +&mmc1 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_uhs>; + cd-gpios = <&pio 129 GPIO_ACTIVE_LOW>; + bus-width = <4>; + max-frequency = <200000000>; + cap-sd-highspeed; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&mt6360_ldo5>; + vqmmc-supply = <&mt6360_ldo3>; + status = "okay"; +}; + +&xhci0 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + vbus-supply = <&otg_vbus_regulator>; + status = "okay"; +}; + +&xhci1 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + status = "okay"; +}; + +&xhci2 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + status = "okay"; +}; + +&xhci3 { + vusb33-supply = <&mt6359_vusb_ldo_reg>; + status = "okay"; +}; + +&u3phy0 { + status = "okay"; +}; + +&u3phy1 { + status = "okay"; +}; + +&u3phy2 { + status = "okay"; +}; + +&u3phy3 { + status = "okay"; +}; + +&pio { + mmc0_pins_default: mmc0default { + pins_cmd_dat { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + pins_clk { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins_rst { + pinmux = ; + drive-strength = ; + bias-pull-up = ; + }; + }; + + mmc0_pins_uhs: mmc0uhs{ + pins_cmd_dat { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + pins_clk { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins_ds { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins_rst { + pinmux = ; + drive-strength = ; + bias-pull-up = ; + }; + }; + + mmc1_pins_default: mmc1-pins-default { + pins_cmd_dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + pins_clk { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins_insert { + pinmux = ; + bias-pull-up; + }; + }; + + mmc1_pins_uhs: mmc1-pins-uhs { + pins_cmd_dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + pins_clk { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + }; + + i2c0_pins: i2c0-pins { + pins { + pinmux = , + ; + bias-pull-up; + mediatek,rsel = ; + mediatek,drive-strength-adv = <7>; + }; + }; + + i2c1_pins: i2c1-pins { + pins { + pinmux = , + ; + bias-pull-up; + mediatek,rsel = ; + mediatek,drive-strength-adv = <7>; + }; + }; + + i2c2_pins: i2c2-pins { + pins { + pinmux = , + ; + bias-pull-up; + mediatek,rsel = ; + mediatek,drive-strength-adv = <7>; + }; + }; + + i2c6_pins: i2c6-pin { + pins { + pinmux = , + ; + bias-pull-up; + mediatek,rsel = ; + }; + }; + + spi2_pins: spi-pins { + pins { + pinmux = , + , + , + ; + bias-disable; + }; + }; + + pcie0_pins_default: pcie0default { + pins { + pinmux = , + , + ; + bias-pull-up; + }; + }; + + pcie1_pins_default: pcie1default { + pins { + pinmux = , + , + ; + bias-pull-up; + }; + + mt7921 { + pinmux = , + ; + output-high; + }; + }; + + gpio_keys: gpio-keys { + pins { + pinmux = ; + input-enable; + }; + }; + + uart0_pins: uart0-pins { + pins { + pinmux = , + ; + }; + }; + + uart1_pins: uart1-pins { + pins { + pinmux = , + ; + }; + }; +}; From patchwork Sun Mar 27 16:58:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12792868 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 24661C433F5 for ; Sun, 27 Mar 2022 17:01:16 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=itoX15NbU5Ya5uV7TsvjeoFrWzWx/6ht2a4oP6k68Os=; b=kOZDpCJdlg4a7S QCeNS4BHCUwu+w/h2K0uFRHdUe0MSBx1/TXn225esBYiP9JTrJsKV/ruK6yKibT3s2PdDnfjCprDT EYz/IGT4yX0z3YW7IMAignwikyHlM683VvyCPM2bVmLA6XTISF0g6KUMxmQADYdbyTUx4XIbrpVuz CbUGHlvNEkmGLY0gCGPkss4OdOV0xEZZ96RcxIkoUg/WymIr1L0p2BjgEs4Stt1zPluu2r1tCzqS4 J4+aVkt9oAczgcZEQW2Y2vvvWy7AzPCzUiTBBfKlsF8vw44KV2tOTQbjmF6X9jiF8i2n2AfqRD0Uy bh16q7NS6O8nWmoNYyPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWFH-005l6c-JM; Sun, 27 Mar 2022 17:00:03 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWEv-005kva-6u for linux-arm-kernel@lists.infradead.org; Sun, 27 Mar 2022 16:59:43 +0000 Received: by mail-wm1-x330.google.com with SMTP id r190-20020a1c2bc7000000b0038a1013241dso7198176wmr.1 for ; Sun, 27 Mar 2022 09:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w9yOef5SF2ptXbZCon6US9rM+lNuvu/cG2d6ltNWSnc=; b=577AsB00T7qdRNLEEMs8//vnIYxsdavNMPva+BkPV2I+/A/yzujMl9Gp5VbrFV+QvR RbCwZUU93h6R1QcsevXhSaKmFNvZXTAo7N8C6FORPu1KvwS2ntqcyQnzCHikUmF4flHv m13HVh3SiZYoUEbTdpB3dA5QM6h3f1nDkd1sq1dprATygmXLhSqSsGygsQS0DPHozJ0X SkV6T6TvByKSxzwemnh/wMIesK8eWXclrWl8vPa9wYoDm2qOplMs8PDKakRmSgCzwxky rDrfM7ZxlytwdJk0H2UKLmp99kQ6AetcYBkCoLAmGRat6CPvbPaPMyEYHo6FUmtb3xZK qYBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w9yOef5SF2ptXbZCon6US9rM+lNuvu/cG2d6ltNWSnc=; b=wKV4fscywUFPgkUT7gyb/Er0PwJWu01krJC3os5WoEiVTx79E6VJPlKgFlR0q8fFNy L3n5aYcSriHIyb4sLHKmTmno4od3rQo6T3kjajN4pJ1OBcPQJsWCH5f5L/4vxcnCw6Cj YydRzMKNiCnT4+bLQiV2rJWOtyQb1GUhnmoKDcUX8Ay+dA4qvNKhW5oGjg/nYubgyQUR 7wIIwel4/Hya3L9FDI5TC4rMDbbWfn1I65FwQtvQHkZtkn0BD08Zms/1SVpXUKjeG4EM 2RmZSUKkP2HP5QK4LAgjI4zz7745a/F4rGhcSbtXwLipWeEWWONuNWnPQQaXPB0Tcy4H GWJw== X-Gm-Message-State: AOAM5304JzMr7cmbVnz+KOix4HbqSrz0QHobI+HapIW5LKrrWSI7e1Gh v4J9x8MvF9fz8EcsWj/CoFqSRA== X-Google-Smtp-Source: ABdhPJy7xMQGyH/VkEQ2uAxTzSUTciloFVj6v1JtIaiyTf0GIpXD8gOEL3HxjHl5QzGgt90Tu5CZ5w== X-Received: by 2002:a05:600c:2e45:b0:38c:8854:252f with SMTP id q5-20020a05600c2e4500b0038c8854252fmr29983615wmf.78.1648400379964; Sun, 27 Mar 2022 09:59:39 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id 2-20020a1c1902000000b00380d3873d6asm9979423wmz.43.2022.03.27.09.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 09:59:39 -0700 (PDT) From: Fabien Parent To: Catalin Marinas , Will Deacon Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] arm64: defconfig: enable MT6359 regulator driver Date: Sun, 27 Mar 2022 18:58:36 +0200 Message-Id: <20220327165837.3048639-4-fparent@baylibre.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327165837.3048639-1-fparent@baylibre.com> References: <20220327165837.3048639-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_095941_281482_BAC6FC54 X-CRM114-Status: UNSURE ( 9.94 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The PMIC regulators are essentials to be able to boot MediaTek MT8195 based boards to userspace. Like the other MediaTek PMIC regulator driver, let's enable as well the one for the MT6359 PMIC. Signed-off-by: Fabien Parent --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 50aa3d75ab4f..1e521f17cb39 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -644,6 +644,7 @@ CONFIG_REGULATOR_MAX77620=y CONFIG_REGULATOR_MAX8973=y CONFIG_REGULATOR_MP8859=y CONFIG_REGULATOR_MT6358=y +CONFIG_REGULATOR_MT6359=y CONFIG_REGULATOR_MT6397=y CONFIG_REGULATOR_PCA9450=y CONFIG_REGULATOR_PF8X00=y From patchwork Sun Mar 27 16:58:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12792869 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 09AA6C433EF for ; Sun, 27 Mar 2022 17:01:32 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AwDB9NwM7d0Fp+10uc0nn6DnPAaW+62ie/AvUEGR5mM=; b=Inq1ck8vTtYizX y6ukvKzqFEZViturZ4RAy2RlZlWPSRLsbgP5HNHpgPCCp4WKEoyc0dPz9t8TZWk3IXUJ34nLfRV+l J1HpMMA7IFcS4LEh0TCbLHzXb/7XInfzH14CGvU9Eq8wjmkbAVK3IafjlwyNCYe79yefm1zHW1K4n SYm2L07OwxoWf2sPXljSQhFW+UTbGawHqVsZJ0+G0KOtVwIL/mrUAin4TCMozZXEV0ikLpYz9eHeD 05+4bkIrF6UYHINBYlimkBcTKslM+HAdN2TjXZMvH3cpCGd9VuV5dBGitJkobDuSr7SK8MyiKo0Du hGT3MbI5MATjEenZEkYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWFT-005lC8-O9; Sun, 27 Mar 2022 17:00:15 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYWF0-005kxQ-6F for linux-arm-kernel@lists.infradead.org; Sun, 27 Mar 2022 16:59:47 +0000 Received: by mail-wm1-x32b.google.com with SMTP id bi13-20020a05600c3d8d00b0038c2c33d8f3so11667380wmb.4 for ; Sun, 27 Mar 2022 09:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4dHculRAI2T1sdBQuUCuijr3MsMNFpwYgNhV4UVBo28=; b=dGEfnIpxH7NETyD6jMggdWVlUItaxdC6Sa1P3MX9M9phQ/WFxnobiOMzyxs/Nd1hZH IHZsMJeV3JmCU+CPHg0AwfMCIX0eFpltuSfYmJZANz+dd7kiKjb1FfuHFEQrbsMRLQPB dI0kCQ+VaZOdYwlGHIREjg9SQMgR9Fg/f+G6/eas47WKjPNes43TNbBvBWE9pd8HebAE A8UE47KXwoLzqbDlu1321k7wagdGvoceKQmC1AluHRtCtCGrXfdMYGijdQzS/pWUmdQQ yE0yQ2TyyThSobsQ5t9m1gg/sWXVC+9pbIIgYh4M5i9yPXCM4IfdV/IHYjlIWy/+Sn0m LcPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4dHculRAI2T1sdBQuUCuijr3MsMNFpwYgNhV4UVBo28=; b=SapmanP9EnzDhhhpoCB5SS50aaz9HYjRdJu0+vRCpdJkkEpEoEbDzOxnlEOaETqbBX 6Xfn0rLdh0UB+x4sfaWEimjLvSGUxmIiOmhx1VJN2EaMDbZRh09GmF3hy9gWlzeIV+1E N8BD42qqws6RzjjA0jJSwPwP2ZEj1iatINut2Lm5akb2cR9ifY8QJSMwjNLVcsRgezHe IWWCQtB4cSNrYtq/MAkS3Pjxph1Yn4VCX1AAP9wvUSLqBpyHWs9mKUf+8gh40Tga+1Uq 5BNQsBiF3zEHR3OqyqgDbFmNrqub4m6D/aoSeCwelmTL1n9u2bQk9q+k8hhImoAXUZay HZbg== X-Gm-Message-State: AOAM530HzQNTKM9SUs1KuV0dnQoy/CBP4Ub8Mb0Z4jko+Outp/ZxAwvW 6kXR1NBmI3FMv4b4FA3pG8fWLQ== X-Google-Smtp-Source: ABdhPJzC7L0Pd32AE623df9SYio+x6E6ipqoM2hmzAtWQN10D49PTa8avorj4SAOwUCmgWJKDctbUA== X-Received: by 2002:a1c:f211:0:b0:381:6c60:742f with SMTP id s17-20020a1cf211000000b003816c60742fmr21224906wmc.130.1648400384729; Sun, 27 Mar 2022 09:59:44 -0700 (PDT) Received: from radium.lan ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id 2-20020a1c1902000000b00380d3873d6asm9979423wmz.43.2022.03.27.09.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 09:59:44 -0700 (PDT) From: Fabien Parent To: Catalin Marinas , Will Deacon Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] arm64: defconfig: enable some mt6360 PMIC drivers Date: Sun, 27 Mar 2022 18:58:37 +0200 Message-Id: <20220327165837.3048639-5-fparent@baylibre.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327165837.3048639-1-fparent@baylibre.com> References: <20220327165837.3048639-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_095946_258760_E808DA4C X-CRM114-Status: GOOD ( 10.86 ) 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 Enable the charger and regulator driver for the MT6360 PMIC. These drivers are essential for some MediaTek MT8195 based boards to boot properly. Signed-off-by: Fabien Parent --- arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 1e521f17cb39..3848246f6727 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -565,6 +565,7 @@ CONFIG_SYSCON_REBOOT_MODE=y CONFIG_BATTERY_SBS=m CONFIG_BATTERY_BQ27XXX=y CONFIG_BATTERY_MAX17042=m +CONFIG_CHARGER_MT6360=m CONFIG_CHARGER_BQ25890=m CONFIG_CHARGER_BQ25980=m CONFIG_SENSORS_ARM_SCMI=y @@ -625,6 +626,7 @@ CONFIG_MFD_EXYNOS_LPASS=m CONFIG_MFD_HI6421_PMIC=y CONFIG_MFD_HI655X_PMIC=y CONFIG_MFD_MAX77620=y +CONFIG_MFD_MT6360=y CONFIG_MFD_MT6397=y CONFIG_MFD_SPMI_PMIC=y CONFIG_MFD_RK808=y @@ -645,6 +647,7 @@ CONFIG_REGULATOR_MAX8973=y CONFIG_REGULATOR_MP8859=y CONFIG_REGULATOR_MT6358=y CONFIG_REGULATOR_MT6359=y +CONFIG_REGULATOR_MT6360=y CONFIG_REGULATOR_MT6397=y CONFIG_REGULATOR_PCA9450=y CONFIG_REGULATOR_PF8X00=y