Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: "Michal Vokáč" <michal.vokac@ysoft.com>
Cc: Marco Felsch <m.felsch@pengutronix.de>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	Michael Walle <mwalle@kernel.org>,
	devicetree@vger.kernel.org,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Mathieu Othacehe <m.othacehe@gmail.com>,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>,
	linux-kernel@vger.kernel.org,
	Hiago De Franco <hiago.franco@toradex.com>,
	Herburger <gregor.herburger@ew.tq-group.com>,
	Petr Benes <petr.benes@ysoft.com>,
	linux-usb@vger.kernel.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Joao Paulo Goncalves <joao.goncalves@toradex.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	imx@lists.linux.dev, Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 2/2] arm64: dts: imx: Add imx8mp-iota2-lumpy board
Date: Wed, 25 Sep 2024 12:24:27 -0400	[thread overview]
Message-ID: <ZvQ5O553E0QFvced@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <87980643-44b4-4df9-9eb7-1583b5074bdd@ysoft.com>

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áč <michal.vokac@ysoft.com>
> > > > ---
> > > > 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.

>> 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*.

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 = <BTN_0>;
> > > > +		};
> > > > +	};
> > > > +
> > > > +	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 = <&reg_arm>;
> > > > +};
> > > > +
> > > > +&A53_1 {
> > > > +	cpu-supply = <&reg_arm>;
> > > > +};
> > > > +
> > > > +&A53_2 {
> > > > +	cpu-supply = <&reg_arm>;
> > > > +};
> > > > +
> > > > +&A53_3 {
> > > > +	cpu-supply = <&reg_arm>;
> > > > +};
> > > > +
> > > > +&eqos {
> > > > +	phy-handle = <&ethphy0>;
> > > > +	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 = <&ethphy1>;
> > > > +	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>;
> > > > +		};
> > > > +	};
> > > > +};
> > > > +


  reply	other threads:[~2024-09-25 16:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 10:39 [PATCH v4 0/2] Add support for new IMX8MP based board Michal Vokáč
2024-09-24 10:39 ` [PATCH v4 1/2] dt-bindings: arm: Add i.MX8MP IOTA2 Lumpy board Michal Vokáč
2024-09-24 10:39 ` [PATCH v4 2/2] arm64: dts: imx: Add imx8mp-iota2-lumpy board Michal Vokáč
2024-09-24 11:10   ` Marco Felsch
2024-09-24 15:15   ` Frank Li
2024-09-24 17:37     ` Marco Felsch
2024-09-25 11:30       ` Michal Vokáč
2024-09-25 16:24         ` Frank Li [this message]
2024-09-26  7:50           ` Marco Felsch
2024-09-25  1:56 ` [PATCH v4 0/2] Add support for new IMX8MP based board Rob Herring (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZvQ5O553E0QFvced@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregor.herburger@ew.tq-group.com \
    --cc=hiago.franco@toradex.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=imx@lists.linux.dev \
    --cc=joao.goncalves@toradex.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=m.othacehe@gmail.com \
    --cc=michal.vokac@ysoft.com \
    --cc=mwalle@kernel.org \
    --cc=petr.benes@ysoft.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox