From mboxrd@z Thu Jan 1 00:00:00 1970 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 C3AB3C433F5 for ; Sun, 27 Mar 2022 18:54:05 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3K0L/Ad4SsYRZh+CKksGWUh44zPR57cb5k7a7xslaUw=; b=gGuDj1kEZIw/Zd JUrgUNhHNFARKDN2OwzpUlJIdLx6ikt7mXC8Y7oorA+ZGNc9J0Hk8MWP0rBU44bEOfKIEvZuMmI55 Vnkk6WenUlP1+Du+5GJ6dpaTv+jsr/IHBCgTVr3XTsvqlRtLdXvaIgkehKjBS5yafseYg3/r7RDP/ jk6Tc1JiDzaXbw6QvYUvFQRbrXbC9yn8F/kPKsCOVrNpCAWDp6g4PRDrTcLGW6u5w3LboXTtb+iGg u3ThZ1YiUIjNxCUnKd+EcjSvbM6PPYo/ShmqKPQNlx/mxrHfPz8xmti4euMJ3U/nLfm7yrViLCJl3 N9YjhkY9XY1oujreGNTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYY0P-005ub0-NE; Sun, 27 Mar 2022 18:52:49 +0000 Received: from mail-wr1-f48.google.com ([209.85.221.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYY0L-005uaF-9S; Sun, 27 Mar 2022 18:52:47 +0000 Received: by mail-wr1-f48.google.com with SMTP id h4so17328005wrc.13; Sun, 27 Mar 2022 11:52:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=zztFPC9CPOnkLrv/8DzA11FGoq7J+l0USFqX9eJaqaY=; b=sQBrsmzM4k3IYW5+Z6nr7TMbr3C1LMM4NJkWmvVEQ/Z3EHXmHm5ypHsz5ztqxDMNrQ tZ/R+u2j8sfMjO3wL5X85VcjkqkRo2SgPiTsgfJtBaSgewAXP9ZpyyY26SnBSbBgrTwq nvMTTUpkR6lGMw204TbsfvwRcSbdnicyutJzXnmli3f2TnufL0pw1njSM7IBElSMgA0O Cut5QKPuODIisgfQHHA/3q4TSswOIMmSWGIYPWb9KlK/bue8zdUUeftIeY1R9Bm+5jPE SVkGDa2haVLN68ewzbmJsFvTcrxC/FIy72u6lqV06+3fg7YVX/HQXcZxOGsb8l6o3f7t Ngmg== X-Gm-Message-State: AOAM531MXcgU4e+sIzcUVsTT2bmPIpE3haqtJhT8/wtIvRMiy0SjhhWE iJK69D0tcLwZ1HWr6JSCV6Wx2fSZ6Eg= X-Google-Smtp-Source: ABdhPJz9honcxTdlF2ddo2/FMtPMDCxo0vgAyJ4yUwt47j3e4yQ7tRQwgOM7MdxzxZAopuCsEVHU0Q== X-Received: by 2002:a05:6000:2aa:b0:204:1475:d497 with SMTP id l10-20020a05600002aa00b002041475d497mr18282213wry.232.1648407163277; Sun, 27 Mar 2022 11:52:43 -0700 (PDT) Received: from [192.168.0.162] (xdsl-188-155-201-27.adslplus.ch. [188.155.201.27]) by smtp.googlemail.com with ESMTPSA id r14-20020a7bc08e000000b0038ca55f9bcasm13784947wmh.42.2022.03.27.11.52.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Mar 2022 11:52:42 -0700 (PDT) Message-ID: <6ba2ffc8-455d-d689-723e-59a29b23a597@kernel.org> Date: Sun, 27 Mar 2022 20:52:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 2/4] arm64: dts: mediatek: Add device-tree for MT8195 Demo board Content-Language: en-US To: Fabien Parent , Matthias Brugger , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220327165837.3048639-1-fparent@baylibre.com> <20220327165837.3048639-3-fparent@baylibre.com> From: Krzysztof Kozlowski In-Reply-To: <20220327165837.3048639-3-fparent@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_115245_388926_D86EB999 X-CRM114-Status: GOOD ( 23.58 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27/03/2022 18:58, Fabien Parent wrote: > 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 { Generic node names, so "key" or "key-0" > + 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"; What's attached here? Enabling empty i2c controller? > +}; > + > +&i2c1 { > + clock-frequency = <400000>; > + pinctrl-0 = <&i2c1_pins>; > + pinctrl-names = "default"; > + status = "okay"; What's attached here? Enabling empty i2c node? > +}; > + > +&i2c2 { > + clock-frequency = <400000>; > + pinctrl-0 = <&i2c2_pins>; > + pinctrl-names = "default"; > + status = "okay"; What's attached here? Enabling empty i2c node? > +}; > + > +&i2c6 { > + clock-frequency = <400000>; > + pinctrl-0 = <&i2c6_pins>; > + pinctrl-names = "default"; > + status = "okay"; > + > + mt6360: mt6360@34 { Generic node names, so "pmic"? > + 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 = + MT6360_OPMODE_LP > + MT6360_OPMODE_ULP>; > + regulator-always-on; > + }; > + > + mt6360_buck2: buck2 { > + regulator-compatible = "BUCK2"; > + regulator-name = "mt6360,buck2"; > + regulator-min-microvolt = <300000>; > + regulator-max-microvolt = <1300000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP > + MT6360_OPMODE_ULP>; > + 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_OPMODE_LP>; > + }; > + > + mt6360_ldo2: ldo2 { > + regulator-compatible = "LDO2"; > + regulator-name = "mt6360,ldo2"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + > + mt6360_ldo3: ldo3 { > + regulator-compatible = "LDO3"; > + regulator-name = "mt6360,ldo3"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + > + mt6360_ldo5: ldo5 { > + regulator-compatible = "LDO5"; > + regulator-name = "mt6360,ldo5"; > + regulator-min-microvolt = <2700000>; > + regulator-max-microvolt = <3600000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + > + mt6360_ldo6: ldo6 { > + regulator-compatible = "LDO6"; > + regulator-name = "mt6360,ldo6"; > + regulator-min-microvolt = <500000>; > + regulator-max-microvolt = <2100000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + }; > + > + mt6360_ldo7: ldo7 { > + regulator-compatible = "LDO7"; > + regulator-name = "mt6360,ldo7"; > + regulator-min-microvolt = <500000>; > + regulator-max-microvolt = <2100000>; > + regulator-allowed-modes = + MT6360_OPMODE_LP>; > + regulator-always-on; > + }; > + }; > + }; > +}; > + > +&spi2 { > + pinctrl-0 = <&spi2_pins>; > + pinctrl-names = "default"; > + mediatek,pad-select = <0>; > + status = "okay"; What is attached here? Empty SPI? > +}; > + > +&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 { Any reasons to have all overrides/labels ordered randomly? I am not dreaming about alphabetical order, but at least some logical, so mmc1 next to mmc0... > + 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 { No underscores in node names. Hyphens are accepted. Same in all other cases below. > + 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 { Any reason keeping it inconsistent with mmc0 about naming? I mean... why having one naming pattern for mmc0 and entirely different for mmc1? Why i2c ends with "-pins" suffix and these do not? > + 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 { No pins suffix? One more pattern of naming... > + pins { > + pinmux = , > + , > + ; > + bias-pull-up; > + }; > + > + mt7921 { > + pinmux = , > + ; > + output-high; > + }; > + }; > + > + gpio_keys: gpio-keys { gpio-keys-pins > + pins { > + pinmux = ; > + input-enable; > + }; > + }; > + Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel