[PATCH v2 2/2] arm64: dts: imx93-phycore-segin: Add Phytec i.MX93 Segin

Conor Dooley conor at kernel.org
Thu Jan 18 07:56:44 PST 2024


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 = <&reg_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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240118/c8b85984/attachment.sig>


More information about the linux-arm-kernel mailing list