From: Frank Li <Frank.li@nxp.com>
To: conor+dt@kernel.org, krzk@kernel.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, krzk+dt@kernel.org, robh@kernel.org,
shawnguo@kernel.org, festevam@gmail.com
Subject: Device tree node order sort tool
Date: Tue, 17 Sep 2024 11:43:53 -0400 [thread overview]
Message-ID: <ZumjueKy+tvkODnB@lizhi-Precision-Tower-5810> (raw)
All:
I write a simple tools to sort device tree to make sure nodes and
properties sort as correct order.
https://github.com/lznuaa/dt-format
There are many dt files, which have node order trivial issue, when
try to upstream. To reduce reviewer's time, dt-format can help correct the
order.
I just want to make sure my understand about node order is correct.
Rule 1: node@hexvalue, order by hexvalue
Rule 2: label: node, order by node name
Rule 3: node, order by node name
Rule 3: &label order by label
Rule 4: children node already after property
Rule 5: "status" always is last one.
Rule 6: property order as below list[unfinished], otherwise, order
by name.
compatible
reg
reg-names
ranges
#interrupt-cells
interrupt-controller
interrupts
interrupt-names
#gpio-cells
gpio-controller
gpio-ranges
#address-cells
#size-cells
clocks
clock-names
assigned-clocks
assigned-clock-parents
assigned-clock-rates
dmas
dma-names
Frank
next reply other threads:[~2024-09-17 15:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 15:43 Frank Li [this message]
2024-09-18 8:03 ` Device tree node order sort tool Krzysztof Kozlowski
2024-09-18 8:17 ` Conor Dooley
2024-09-18 15:07 ` Frank Li
2024-09-26 9:04 ` Shawn Guo
2024-09-26 15:09 ` Frank Li
2024-09-27 7:32 ` Krzysztof Kozlowski
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=ZumjueKy+tvkODnB@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=robh@kernel.org \
--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