Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5866561ioo; Wed, 1 Jun 2022 14:27:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa/UuR6llfh6eS9cOGtAZ5B+yYW7aFffJQqFiIgOYkGOpxvSTHc4aTIS8Zcgg9zJHXg7Qt X-Received: by 2002:a17:902:b694:b0:162:6ea:30 with SMTP id c20-20020a170902b69400b0016206ea0030mr1425990pls.95.1654118867843; Wed, 01 Jun 2022 14:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118867; cv=none; d=google.com; s=arc-20160816; b=p/mNv9nfRCvovMgIMLd6oG6I09yrlhz4a1PTcaSPREM9aC3sW6pH4FhB9Rn0hwnwiT yksPBLgL7aWi7m8rBIf9mU6iUHs/pnHHWZHmsHZUPcCTLtqrC+N/W84GSdQ/WT+EW1it dhwfUVNJ9DGuwV5AUYPcbRoMuzPHZUZ/kBTlwJ1aS0aOq7EK9U27sIWPExK3HCzZ1NPu UF3hBlNuc7uo1Kk9kISKWLageAZvJNvl0/U9HhqKwLHYsfTAC1Oefx6XEzUR79vVGQBg HXchAREcGVUKwoW5iCfNhgMTEe1suixNNxworo7iX4ECusgdivAXed9owx8PVcd3s2q1 HCIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YnwlxkEskig5qSEZkf1OUJFDCbLfIauiQR7owBPAAo8=; b=yTTxh+prlplsEgedEPcLQN4ir0V90SC3U31xM9gaYLZmfB021kuyLZKd5dinP5GXqv NCbud3bJZk8c8gk14sSoN2LD4+7mH9jEIhjmbcNVNflSSXhi8Ji6BxHQZt/rmVH2zNcd Rg1wZ2TWf1I6UjnYsUYGDT6qNJT7Kulq2i5wNp6gSt6oJIN/lpObLgZUagq1+P0kltGz MB9BwcXwXfhvQH/4mbB9Yl93w07GvtaNd1109w+kjz0pxuc/qNefk8dhDCiz6bDiZ0ln ti+ytvUQ2GlUfuHKPsUXAkrVFURw4X+Xts6Yro7wEkMT6Ht3JTS4HEOXQuvKXRdyIFj5 g/Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3oy882D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g26-20020a63201a000000b003f9caa62632si3670808pgg.65.2022.06.01.14.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:27:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3oy882D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 97855243ECE; Wed, 1 Jun 2022 13:18:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352127AbiFAKlL (ORCPT + 99 others); Wed, 1 Jun 2022 06:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350516AbiFAKlK (ORCPT ); Wed, 1 Jun 2022 06:41:10 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 654117E1CF for ; Wed, 1 Jun 2022 03:41:06 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id f9so2948189ejc.0 for ; Wed, 01 Jun 2022 03:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=YnwlxkEskig5qSEZkf1OUJFDCbLfIauiQR7owBPAAo8=; b=o3oy882DW5XoM121QxgLAIqDZmLSK6/PrEQb4XvQeRV0EbxfAnEYajgac3QLI9FcMp 4SF5C5oNQogqHKHnGl1RjMphuthUgorSKRQaD3mLQrEnRwutFisd/3XW2m/RJCzJ0+1v tkp0rArEAuR2Tk4/dlGSFfTxR/sxOC1Cdk3lvFAiSzaUJCoeqQvk34iQ3YtoEwYP9jQC vqMMi5q+lDHqZkOawknPynNZ7RJd/5GHehRkUcT7oK0EPZ21LSkvWGONymsEa+4JEP7i qjK82e59DvTe0ppOR5EgGlx6B82dcRv5j9w7gCLxi/yDXx5qJ39cTI5FpLvoPg4bTzNf MbMw== 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=YnwlxkEskig5qSEZkf1OUJFDCbLfIauiQR7owBPAAo8=; b=zoFh5zS55y1IqzUfJlWvQyr7rocfl+px7+sv9wpBDToRHqmbPR+rNLC5c+HZPRr+my YuAc0ABrtLIB4zMfFl4cT0SBkqZ7DkOBRk0BCEgAPyVr1gZ3lk1dn4oHkVNqjuoGAp1v e8xJH7tWdM3njI6wzcb5/oaUKiaOKbWO5Oqa5tzKb+LWZ39EJj2huWYmiJ9xq8HpUz5s UzjCvpPl4Me1Bxpro085LR0snqk+zNGRYj/+8dkL5iJTWftW+Tdu6WcjSTK5PsxPF3Vh 0Aa6hAVg3OV9hNM8V0iH80sHSz5v/trTPw1tFnqtItQjR6xfPs88kC4y+3vVoaBmY1st 4k6g== X-Gm-Message-State: AOAM532cQW8WBYYtgG1ecy5N/b9K5PF0IrTWrufwY7fxety0/QHfKJcv 9kcri32iYg3zvtQ7h5S3TcLs7g== X-Received: by 2002:a17:907:9805:b0:6f4:fe0e:5547 with SMTP id ji5-20020a170907980500b006f4fe0e5547mr56262621ejc.426.1654080064935; Wed, 01 Jun 2022 03:41:04 -0700 (PDT) Received: from [192.168.0.179] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id b17-20020a50e791000000b0042ac2705444sm774652edn.58.2022.06.01.03.41.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jun 2022 03:41:04 -0700 (PDT) Message-ID: <72329bd9-3d8d-a18c-236d-8a84e5dcc455@linaro.org> Date: Wed, 1 Jun 2022 12:41:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 17/17] arm64: dts: mediatek: add mt8365-evk board device-tree Content-Language: en-US To: Fabien Parent , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, qii.wang@mediatek.com, matthias.bgg@gmail.com, jic23@kernel.org, chaotian.jing@mediatek.com, ulf.hansson@linaro.org, srinivas.kandagatla@linaro.org, chunfeng.yun@mediatek.com, broonie@kernel.org, wim@linux-watchdog.org, linux@roeck-us.net Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, linux-phy@lists.infradead.org, linux-serial@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org, linux-watchdog@vger.kernel.org References: <20220531135026.238475-1-fparent@baylibre.com> <20220531135026.238475-18-fparent@baylibre.com> From: Krzysztof Kozlowski In-Reply-To: <20220531135026.238475-18-fparent@baylibre.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/05/2022 15:50, Fabien Parent wrote: > Add device-tree for the MT8365-EVK board. The MT8365 EVK board > has the following IOs: > * DPI <-> HDMI bridge and HDMI connector. > * 2 audio jack > * 1 USB Type-A Host port > * 2 UART to USB port > * 1 battery connector > * 1 eMMC > * 1 SD card > * 2 camera connectors > * 1 M.2 slot for connectivity > * 1 DSI connector + touchscreen connector > * RPI compatible header > * 1 Ethernet port Thank you for your patch. There is something to discuss/improve. > > Signed-off-by: Fabien Parent > --- > arch/arm64/boot/dts/mediatek/Makefile | 1 + > arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 578 ++++++++++++++++++++ > 2 files changed, 579 insertions(+) > create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts > > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile > index c7d4636a2cb7..02a9f784358e 100644 > --- a/arch/arm64/boot/dts/mediatek/Makefile > +++ b/arch/arm64/boot/dts/mediatek/Makefile > @@ -40,4 +40,5 @@ 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) += mt8365-evk.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb > diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts > new file mode 100644 > index 000000000000..8f472caa06a3 > --- /dev/null > +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts > @@ -0,0 +1,578 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2021 BayLibre, SAS. > + * Author: Fabien Parent > + */ > + > +/dts-v1/; > + > +#include > +#include > +#include > +#include "mt8365.dtsi" > +#include "mt6357.dtsi" > + > +/ { > + model = "MediaTek MT8365 Open Platform EVK"; > + compatible = "mediatek,mt8365-evk", "mediatek,mt8365"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:921600n8"; > + }; > + > + connector { > + compatible = "hdmi-connector"; > + label = "hdmi"; > + type = "a"; > + > + port { > + hdmi_connector_in: endpoint { > + remote-endpoint = <&hdmi_connector_out>; > + }; > + }; > + }; > + > + 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 { key-volume-up, volume-up-key or key-0 > + gpios = <&pio 24 GPIO_ACTIVE_LOW>; > + label = "volume_up"; > + linux,code = ; > + wakeup-source; > + debounce-interval = <15>; > + }; > + }; > + > + memory@40000000 { > + device_type = "memory"; > + reg = <0 0x40000000 0 0xc0000000>; > + }; > + > + usb_otg_vbus: regulator-2 { > + compatible = "regulator-fixed"; > + regulator-name = "otg_vbus"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + gpio = <&pio 16 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > + 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>; > + }; > + }; > +}; > + > +&cpu0 { > + proc-supply = <&mt6357_vproc_reg>; > + sram-supply = <&mt6357_vsram_proc_reg>; > +}; > + > +&cpu1 { > + proc-supply = <&mt6357_vproc_reg>; > + sram-supply = <&mt6357_vsram_proc_reg>; > +}; > + > +&cpu2 { > + proc-supply = <&mt6357_vproc_reg>; > + sram-supply = <&mt6357_vsram_proc_reg>; > +}; > + > +&cpu3 { > + proc-supply = <&mt6357_vproc_reg>; > + sram-supply = <&mt6357_vsram_proc_reg>; > +}; > + > +&dpi0 { > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&dpi_func_pins>; > + pinctrl-1 = <&dpi_idle_pins>; > + assigned-clocks = <&topckgen CLK_TOP_DPI0_SEL>; > + assigned-clock-parents = <&topckgen CLK_TOP_LVDSPLL_D4>; > + > + /* > + * Ethernet and HDMI are sharing pins. > + * Only one can be enabled at a time and require the physical switch > + * SW2101 to be set on DPI position > + */ > + status = "okay"; > + > + port { > + dpi_out: endpoint { > + remote-endpoint = <&it66121_in>; > + }; > + }; > +}; > + > +ðernet { > + pinctrl-names = "default"; > + pinctrl-0 = <ðernet_pins>; > + phy-handle = <ð_phy>; > + phy-mode = "rmii"; > + mac-address = [00 00 00 00 00 00]; > + > + /* > + * Ethernet and HDMI are sharing pins. > + * Only one can be enabled at a time and require the physical switch > + * SW2101 to be set on LAN position > + */ > + status = "disabled"; > + > + mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + > + eth_phy: ethernet-phy@0 { > + reg = <0>; > + }; > + }; > +}; > + > +&i2c1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c1_pins>; > + clock-frequency = <100000>; > + status = "okay"; > + #address-cells = <1>; > + #size-cells = <0>; You defined address/size in DTSI. > + > + it66121hdmitx: hdmi@4c { > + compatible = "ite,it66121"; > + pinctrl-names = "default"; > + pinctrl-0 = <&ite_pins>; > + vcn33-supply = <&mt6357_vibr_reg>; > + vcn18-supply = <&mt6357_vsim2_reg>; > + vrf12-supply = <&mt6357_vrf12_reg>; > + reset-gpios = <&pio 69 GPIO_ACTIVE_LOW>; > + interrupts-extended = <&pio 68 IRQ_TYPE_LEVEL_LOW>; > + #sound-dai-cells = <0>; > + reg = <0x4c>; Put reg after compatible. > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + > + it66121_in: endpoint { > + bus-width = <12>; > + remote-endpoint = <&dpi_out>; > + }; > + }; > + > + port@1 { > + reg = <1>; > + > + hdmi_connector_out: endpoint { > + remote-endpoint = <&hdmi_connector_in>; > + }; > + }; > + }; > + }; > +}; > + > +&mmc0 { > + status = "okay"; Status okay goes to the end. In some nodes you keep that style, in some not. Confusing. > + 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 = <0x12012>; > + vmmc-supply = <&mt6357_vemc_reg>; > + vqmmc-supply = <&mt6357_vio18_reg>; > + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; > + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; > + non-removable; > +}; > + > +&mmc1 { > + pinctrl-names = "default", "state_uhs"; > + pinctrl-0 = <&mmc1_pins_default>; > + pinctrl-1 = <&mmc1_pins_uhs>; > + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>; > + bus-width = <4>; > + max-frequency = <200000000>; > + cap-sd-highspeed; > + sd-uhs-sdr50; > + sd-uhs-sdr104; > + vmmc-supply = <&mt6357_vmch_reg>; > + vqmmc-supply = <&mt6357_vio18_reg>; > + status = "okay"; > +}; > + > +&mt6357_pmic { > + interrupt-parent = <&pio>; > + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-controller; > + #interrupt-cells = <2>; > +}; > + > +&mt6357_vibr_reg { > + regulator-always-on; > +}; > + > +/* Needed by MSDC1 */ > +&mt6357_vmc_reg { > + regulator-always-on; > +}; > + > +&mt6357_vrf12_reg { > + regulator-always-on; > +}; > + > +&mt6357_vsim2_reg { > + regulator-always-on; > +}; > + > +&mt6357keys { > + power-key { > + label = "power"; > + linux,keycodes = ; > + wakeup-source; > + }; > + > + volume-down { volume-down-key > + label = "volume_down"; > + linux,keycodes = ; Best regards, Krzysztof