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 3B124CCF9E9 for ; Thu, 26 Sep 2024 07:57:40 +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:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=z7xr5oCYRzU4LK4+S61lI58qBjEJZmbC+wp+n+hRU04=; b=SUnQ8LoVFde6NnXIR36AL9e1Yi 85C3wGpE/f27lUmfJF03d0rAhsh9P2Ho8j0Z9FqjBl5Fp2u8BzTbK/FEesGP9q/NEqfuTr7BgaWXs wzzbxh04ESCw7I4q9pTmqDQDVx6G4hqk+5RFKJy/uBViGZk9vywgXJ9dcBCr65XmoypyO2N41UpE+ dtOgtj4fM8Au5mBikKL6payVzmxOsTKM9Yg0RW7ux+FRQxkh6trNjGMoqfUQZheAZNm5r2TdRFzRd hdHioxb1NqAD/HbAhXTrm+uCL3wDn/YRMV56EwUQMbt1MkcS6JRFHwaoYmKZ+nPY2xAmWUO1KMPaq NpMeXZeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stjNQ-00000007bnn-0SC7; Thu, 26 Sep 2024 07:57:28 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stjH7-00000007aF3-2fPt for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 07:50:59 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1stjGc-0001MC-VD; Thu, 26 Sep 2024 09:50:26 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1stjGb-001dUm-1u; Thu, 26 Sep 2024 09:50:25 +0200 Received: from mfe by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1stjGa-00D7UJ-32; Thu, 26 Sep 2024 09:50:24 +0200 Date: Thu, 26 Sep 2024 09:50:24 +0200 From: Marco Felsch To: Frank Li Cc: Michal =?utf-8?B?Vm9rw6HEjQ==?= , Rob Herring , Conor Dooley , Fabio Estevam , Michael Walle , devicetree@vger.kernel.org, Alexander Stein , Greg Kroah-Hartman , Sascha Hauer , Mathieu Othacehe , Hugo Villeneuve , linux-kernel@vger.kernel.org, Hiago De Franco , Herburger , Petr Benes , linux-usb@vger.kernel.org, Pengutronix Kernel Team , Joao Paulo Goncalves , Krzysztof Kozlowski , imx@lists.linux.dev, Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 2/2] arm64: dts: imx: Add imx8mp-iota2-lumpy board Message-ID: <20240926075024.777bdooiqd5myv3v@pengutronix.de> References: <20240924103941.1729061-1-michal.vokac@ysoft.com> <20240924103941.1729061-3-michal.vokac@ysoft.com> <20240924173714.qxxkhn6wscze7q5n@pengutronix.de> <87980643-44b4-4df9-9eb7-1583b5074bdd@ysoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_005057_869892_89DBA424 X-CRM114-Status: GOOD ( 38.04 ) 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 On 24-09-25, Frank Li wrote: > On Wed, Sep 25, 2024 at 01:30:31PM +0200, Michal Vokáč wrote: > > On 24. 09. 24 19:37, Marco Felsch wrote: > > > Hi Frank, > > > > > > On 24-09-24, Frank Li wrote: > > > > On Tue, Sep 24, 2024 at 12:39:41PM +0200, Michal Vokáč wrote: > > > > > The IOTA2 Lumpy board is based on the i.MX8MPlus EVK. > > > > > > > > > > Basic features are: > > > > > - 4GB LPDDR4 > > > > > - 64GB eMMC > > > > > - 2x 1GB Ethernet > > > > > - USB 3.0 Type-C dual role port, without power delivery > > > > > - USB 3.0 Type-A host port > > > > > - RGB LED - PWM driven > > > > > - speaker - PWM driven > > > > > - RTC with super capacitor backup > > > > > > > > > > Signed-off-by: Michal Vokáč > > > > > --- > > > > > v4: > > > > > - Moved the iomuxc node to the end of the file. > > > > > - Moved the bus-width and non-removeable properties below > > > > > the pinctrl-* properties in &usdhc3 node. > > > > > - Moved the fsl,ext-reset-output below the pinctrl-* properties > > > > > in &wdog1 node. > > > > > v3: > > > > > - Dropped pinctrl-names property from &usb_dwc3_1 node. > > > > > v2: > > > > > - Dropped unused property from pwm4 node. > > > > > - Sorted all nodes and properties using dt-format tool from Frank. > > > > > > > > > > arch/arm64/boot/dts/freescale/Makefile | 1 + > > > > > .../boot/dts/freescale/imx8mp-iota2-lumpy.dts | 423 ++++++++++++++++++ > > > > > > > > Suggest use https://github.com/lznuaa/dt-format > > > > sort node. any issue, let me know. > > > > > > Thanks for the link :) would be nice to have this script to be part of > > > the kernel. > > It depend on how much people like and use it. I don't see any reason why the kernel shouldn't have such a script, it makes the life easier for all of us (incl. the dt-maintainers). By that I mean the idea of having such a script since I actually didn't looked into your code. > >> The script follows the rules in [1] I'm just used to have > > > common properties like pinctrl-* in front of the device specific > > > properties e.g. "enable-active-high". But this rule is not part of [1] > > > so I can't blame the script. > > I just write it. Not 100% align order-of-properties-in-device-node yet. > Some propertiy need special treated. Thank you provide the feedback. > > I push change, enable-active-high and gpio will after regulator*. :) Thank you! Regards, Marco > > Frank > > > > > > > Regards, > > > Marco > > > > > > [1] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-properties-in-device-node > > > > Thank you for the review Frank & Marco. > > I quickly went through the file again and found another few properties > > that could be better ordered according to the kernel documentation [1]. > > > > > > > 2 files changed, 424 insertions(+) > > > > > create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts > > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile > > > > > index 9d3df8b218a2..aa26a50b7bb4 100644 > > > > > --- a/arch/arm64/boot/dts/freescale/Makefile > > > > > +++ b/arch/arm64/boot/dts/freescale/Makefile > > > > > @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk2.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk3.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mp-icore-mx8mp-edimm2.2.dtb > > > > > +dtb-$(CONFIG_ARCH_MXC) += imx8mp-iota2-lumpy.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mp-msc-sm2s-ep1.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mp-navqp.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts b/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts > > > > > new file mode 100644 > > > > > index 000000000000..9eb58e818dc7 > > > > > --- /dev/null > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dts > > > > > @@ -0,0 +1,423 @@ > > > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > > > > +/* > > > > > + * Copyright 2023 Y Soft > > > > > + */ > > > > > + > > > > > +/dts-v1/; > > > > > + > > > > > +#include "imx8mp.dtsi" > > > > > + > > > > > +/ { > > > > > + compatible = "ysoft,imx8mp-iota2-lumpy", "fsl,imx8mp"; > > > > > + model = "Y Soft i.MX8MPlus IOTA2 Lumpy board"; > > > > > + > > > > > + beeper { > > > > > + compatible = "pwm-beeper"; > > > > > + pwms = <&pwm4 0 500000 0>; > > > > > + }; > > > > > + > > > > > + chosen { > > > > > + stdout-path = &uart2; > > > > > + }; > > > > > + > > > > > + gpio_keys: gpio-keys { > > > > > + compatible = "gpio-keys"; > > > > > + pinctrl-0 = <&pinctrl_gpio_keys>; > > > > > + pinctrl-names = "default"; > > > > > + > > > > > + button-reset { > > > > > + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; > > > > > + label = "Factory RESET"; > > > > > + linux,code = ; > > > > > + }; > > > > > + }; > > > > > + > > > > > + reg_usb_host: regulator-usb-host { > > > > > + compatible = "regulator-fixed"; > > > > > + enable-active-high; > > > > > + gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; > > > > The enable-active-high and gpio should go bellow regulator-*. > > > > > > > + pinctrl-0 = <&pinctrl_usb_host_vbus>; > > > > > + pinctrl-names = "default"; > > > > > + regulator-max-microvolt = <5000000>; > > > > > + regulator-min-microvolt = <5000000>; > > > > > + regulator-name = "usb-host"; > > > > > + }; > > > > > + > > > > > + memory@40000000 { > > > > > + reg = <0x0 0x40000000 0 0x80000000>, > > > > > + <0x1 0x00000000 0 0x80000000>; > > > > > + device_type = "memory"; > > > > > + }; > > > > > +}; > > > > > + > > > > > +&A53_0 { > > > > > + cpu-supply = <®_arm>; > > > > > +}; > > > > > + > > > > > +&A53_1 { > > > > > + cpu-supply = <®_arm>; > > > > > +}; > > > > > + > > > > > +&A53_2 { > > > > > + cpu-supply = <®_arm>; > > > > > +}; > > > > > + > > > > > +&A53_3 { > > > > > + cpu-supply = <®_arm>; > > > > > +}; > > > > > + > > > > > +&eqos { > > > > > + phy-handle = <ðphy0>; > > > > > + phy-mode = "rgmii-id"; > > > > > + pinctrl-0 = <&pinctrl_eqos>; > > > > > + pinctrl-names = "default"; > > > > > + status = "okay"; > > > > > + > > > > > + mdio { > > > > > + compatible = "snps,dwmac-mdio"; > > > > > + #address-cells = <1>; > > > > > + #size-cells = <0>; > > > > > + > > > > > + ethphy0: ethernet-phy@0 { > > > > > + reg = <0>; > > > > > + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; > > > > > + interrupt-parent = <&gpio3>; > > > > > + micrel,led-mode = <0>; > > > > The micrel,* is a vendor specific property. It should go bellow the reset-*. > > > > > > > + pinctrl-0 = <&pinctrl_ethphy0>; > > > > > + pinctrl-names = "default"; > > > > > + reset-assert-us = <1000>; > > > > > + reset-deassert-us = <1000>; > > > > > + reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; > > > > > + }; > > > > > + }; > > > > > +}; > > > > > + > > > > > +&fec { > > > > > + fsl,magic-packet; > > > > > + phy-handle = <ðphy1>; > > > > > + phy-mode = "rgmii-id"; > > > > > + pinctrl-0 = <&pinctrl_fec>; > > > > > + pinctrl-names = "default"; > > > > > + status = "okay"; > > > > > + > > > > > + mdio { > > > > > + #address-cells = <1>; > > > > > + #size-cells = <0>; > > > > > + > > > > > + ethphy1: ethernet-phy@0 { > > > > > + reg = <0>; > > > > > + interrupts = <19 IRQ_TYPE_LEVEL_LOW>; > > > > > + interrupt-parent = <&gpio3>; > > > > > + micrel,led-mode = <0>; > > > > Same as above, micrel,* should go bellow common properties. > > I will send a v5 with these fixed. > > > > Michal > > > > > > > + pinctrl-0 = <&pinctrl_ethphy1>; > > > > > + pinctrl-names = "default"; > > > > > + reset-assert-us = <1000>; > > > > > + reset-deassert-us = <1000>; > > > > > + reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; > > > > > + }; > > > > > + }; > > > > > +}; > > > > > + >