linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH] dt-bindings: Add schema for known '/aliases' property names
Date: Tue, 13 Apr 2021 17:13:24 -0500	[thread overview]
Message-ID: <20210413221324.2261097-1-robh@kernel.org> (raw)

'/aliases' node property names haven't ever been documented. There's
some names such as 'serial' which are pretty much standard. Then there
are other (mostly) platform specific names which sneak in as a way to
have indices for devices. Let's add a schema so that any new alias names
can be reviewed.

The list of property names consists of common aliases which are widely
used and ones which are used by the kernel, but are marked deprecated.
New users of deprecated names are allowed, but discouraged. There's
still more names which are present in DT files, but not used in the
kernel or u-boot (it's not trivial to check u-boot usage though). These
will generate warnings.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/aliases.yaml          | 101 ++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/aliases.yaml

diff --git a/Documentation/devicetree/bindings/aliases.yaml b/Documentation/devicetree/bindings/aliases.yaml
new file mode 100644
index 000000000000..223adbe4a2e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/aliases.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/aliases.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: '/aliases' node properties
+
+maintainers:
+  - Rob Herring <robh@kernel.org>
+
+description: |
+  This schema defines the list of known alias names.
+
+properties:
+  $nodename:
+    const: aliases
+
+patternProperties:
+  '^ethernet[0-9]+$': true
+  '^i2c[0-9]+$': true
+  '^mmc[0-9]+$': true
+  '^serial[0-9]+$': true
+  '^spi[0-9]+$': true
+  '^rtc[0-9]+$': true
+  '^watchdog[0-9]+$': true
+  '^usb[0-9]+$': true
+
+  # Deprecated aliases in use. Don't add to this list.
+  '^display[0-9]+$':
+    deprecated: true
+
+  '^dmc[0-9]+$':
+    deprecated: true
+
+  '^fimc[0-9]+$':
+    deprecated: true
+
+  '^fimc-lite[0-9]+$':
+    deprecated: true
+
+  '^fiu[0-9]+$':
+    deprecated: true
+
+  '^gpio[0-9]+$':
+    deprecated: true
+
+  '^gsc[0-9]+$':
+    deprecated: true
+
+  '^hsuart[0-9]+$':
+    deprecated: true
+
+  '^ipu[0-9]+$':
+    deprecated: true
+
+  '^mdio-gpio[0-9]+$':
+    deprecated: true
+
+  '^mshc[0-9]+$':
+    deprecated: true
+
+  '^mu[0-9]+$':
+    deprecated: true
+
+  '^phy[0-9]+$':
+    deprecated: true
+
+  '^pinctrl[0-9]+$':
+    deprecated: true
+
+  '^rproc[0-9]+$':
+    deprecated: true
+
+  '^sai[0-9]+$':
+    deprecated: true
+
+  '^saif[0-9]+$':
+    deprecated: true
+
+  '^ssc[0-9]+$':
+    deprecated: true
+
+  '^stmpe-i2c[0-9]+$':
+    deprecated: true
+
+  '^timer[0-9]+$':
+    deprecated: true
+
+  '^tmuctrl[0-9]+$':
+    deprecated: true
+
+  '^usbdrdphy[0-9]+$':
+    deprecated: true
+
+  '^usbphy[0-9]+$':
+    deprecated: true
+
+additionalProperties: false
+
+...
-- 
2.27.0


                 reply	other threads:[~2021-04-13 22:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210413221324.2261097-1-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).