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 D5902C369D2 for ; Wed, 25 Sep 2024 11:32:08 +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:Content-Transfer-Encoding: Content-Type: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=hxagW0FnMKA1WsvZNBxUuoXtqQsT77XoKbAVByUrEvw=; b=vhYnCrk/PjkJ2ecAt9lVlBEPdW rBkJ80J9J/jgr5lnZubsJVIvNFcBo8WPnpf+qrav4TWM1ZYyz08w+fF7Hlj6VMJMoX/+mWWetPbhr 5oH4Qrd9q/lEGFW4ppjzF6/mzRQmAUyUkFQCO+qUJELMuCNJgvCvn4psobzyKxhJPukN/GHArqRjX GyyPvujvSbuiDbsgK/V6Sw+4SnvBuR/t2QUir6porJZjsBS/fLfQHKM+CinvunWE+QS3mTrugNPdu V1Vo0CdKz2EisYwfYNXDJgWqVhjpPgj3Yvb/C5v7XWWYiik31e93oBoiwdrAiX76A2XigRiNdNW2l QYPO3oXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stQFQ-00000004sqU-2lhf; Wed, 25 Sep 2024 11:31:56 +0000 Received: from uho.ysoft.cz ([81.19.3.130]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stQE9-00000004sco-3fiF for linux-arm-kernel@lists.infradead.org; Wed, 25 Sep 2024 11:30:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1727263832; bh=hxagW0FnMKA1WsvZNBxUuoXtqQsT77XoKbAVByUrEvw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=K2ZB8PiQCH0Of/+V6shxnF1wQSHyYoF7T3dCeTs1dCkPe5oGFH9UsRFKj4XdkIjLV MV1Ip/5AON2FxDr5Q8yIN26v8XuSeUU3S+aA725nCw7HPZ9D9enfRpAeZWI3fQlh/u XjlIVrz02VBW2l1EmRk9iFsTw2+ovlipoZkpfg/A= Received: from [10.1.8.111] (unknown [10.1.8.111]) by uho.ysoft.cz (Postfix) with ESMTP id DF20CA025E; Wed, 25 Sep 2024 13:30:31 +0200 (CEST) Message-ID: <87980643-44b4-4df9-9eb7-1583b5074bdd@ysoft.com> Date: Wed, 25 Sep 2024 13:30:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] arm64: dts: imx: Add imx8mp-iota2-lumpy board To: Marco Felsch Cc: 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, Frank Li References: <20240924103941.1729061-1-michal.vokac@ysoft.com> <20240924103941.1729061-3-michal.vokac@ysoft.com> <20240924173714.qxxkhn6wscze7q5n@pengutronix.de> Content-Language: en-US From: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= In-Reply-To: <20240924173714.qxxkhn6wscze7q5n@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240925_043038_423728_A9149CAD X-CRM114-Status: GOOD ( 20.83 ) 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. 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. 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. > > 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>; >>> + }; >>> + }; >>> +}; >>> +