[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240118-excavate-bridged-7378c8ebc16a@spud>
Date: Thu, 18 Jan 2024 15:56:44 +0000
From: Conor Dooley <conor@...nel.org>
To: Mathieu Othacehe <othacehe@....org>
Cc: Primoz Fiser <primoz.fiser@...ik.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>, Li Yang <leoyang.li@....com>,
Stefan Wahren <wahrenst@....net>,
Christoph Stoidner <c.stoidner@...tec.de>,
Wadim Egorov <w.egorov@...tec.de>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
upstream@...ts.phytec.de
Subject: Re: [PATCH v2 2/2] arm64: dts: imx93-phycore-segin: Add Phytec
i.MX93 Segin
On Thu, Jan 18, 2024 at 02:43:07PM +0100, Mathieu Othacehe wrote:
>
> Hey,
>
> > Please do not order properties alphabetically. Instead, please read
> > the new documentation on property ordering that makes explicit what
> > has just been convention until now:
> > https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst?h=for-next&id=83a368a3fc8ae8538bccb713dc0cae9eacc04790#n112
>
> Thanks for the link.
>
> I have a question though. Regarding that section:
>
> --8<---------------cut here---------------start------------->8---
> /* SD-Card */
> &usdhc2 {
> pinctrl-names = "default", "state_100mhz", "state_200mhz";
> pinctrl-0 = <&pinctrl_usdhc2_default>, <&pinctrl_usdhc2_cd>;
> pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_cd>;
> pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_cd>;
> bus-width = <4>;
> cd-gpios = <&gpio3 00 GPIO_ACTIVE_LOW>;
> no-sdio;
> no-mmc;
> vmmc-supply = <®_usdhc2_vmmc>;
> status = "okay";
> };
> --8<---------------cut here---------------end--------------->8---
>
> The documentation states:
>
> --8<---------------cut here---------------start------------->8---
> Order of Properties in Device Node
> ----------------------------------
>
> The following order of properties in device nodes is preferred:
>
> 1. "compatible"
> 2. "reg"
> 3. "ranges"
> 4. Standard/common properties (defined by common bindings, e.g. without
> vendor-prefixes)
> 5. Vendor-specific properties
> 6. "status" (if applicable)
> 7. Child nodes, where each node is preceded with a blank line
> --8<---------------cut here---------------end--------------->8---
>
> All of the properties in my example are falling into the "4" category I
> guess, except for "status" that should come last. Now, how am I supposed
> to order those properties? I had a look to other IMX device trees and it
> is hard to establish a pattern. Pinctrl first, then alphabetical order?
> Anything else?
If that is the established order for imx devicetrees, then yeah, I would
follow that ordering. From my own quick check of recently added boards,
that is the way things seem to be.
Cheers,
Conor.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists