| 1 |
# SPDX-License-Identifier: BSD-2-Clause |
| 2 |
# Copyright 2018 Linaro Ltd. |
| 3 |
# Copyright 2018 Arm Ltd. |
| 4 |
%YAML 1.2 |
| 5 |
--- |
| 6 |
$id: http://devicetree.org/schemas/aliases.yaml# |
| 7 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 8 |
|
| 9 |
title: /aliases Node |
| 10 |
description: | |
| 11 |
A devicetree may have an aliases node (``/aliases``) that defines one or more |
| 12 |
alias properties. |
| 13 |
The aliases node shall be at the root of the devicetree and have the node name |
| 14 |
``/aliases``. |
| 15 |
|
| 16 |
Each property of the ``/aliases`` node defines an alias, |
| 17 |
which can be used as a shorthand name for a node in the tree. |
| 18 |
The property name is the alias name, and the property value contains the full |
| 19 |
path to a node encoded as a string. |
| 20 |
For example, the property ``serial0 = "/simple-bus@fe000000/serial@11c500";`` |
| 21 |
defines the alias ``serial0``. |
| 22 |
|
| 23 |
An alias name must be a lowercase text string of 1 to 31 characters from the |
| 24 |
following character set. |
| 25 |
|
| 26 |
.. tabularcolumns:: | c p{8cm} | |
| 27 |
.. table:: Valid characters for alias names |
| 28 |
|
| 29 |
|
| 30 |
========= ================ |
| 31 |
Character Description |
| 32 |
========= ================ |
| 33 |
0-9 digit |
| 34 |
a-z lowercase letter |
| 35 |
\- dash |
| 36 |
========= ================ |
| 37 |
|
| 38 |
A client program may use an alias property name to refer to a full |
| 39 |
device path as all or part of its string value. A client program, when |
| 40 |
considering a string as a device path, shall detect and use the alias. |
| 41 |
|
| 42 |
properties: |
| 43 |
$nodename: |
| 44 |
const: aliases |
| 45 |
|
| 46 |
patternProperties: |
| 47 |
"^[a-z][a-z0-9\\-]*$": |
| 48 |
$ref: types.yaml#/definitions/string |
| 49 |
additionalProperties: false |
| 50 |
|
| 51 |
examples: |
| 52 |
- | |
| 53 |
aliases { |
| 54 |
serial0 = "/simple-bus@fe000000/serial@11c500"; |
| 55 |
ethernet0 = "/simple-bus@fe000000/ethernet@31c000"; |
| 56 |
}; |
| 57 |
|
| 58 |
maintainers: |
| 59 |
- Devicetree Specification Mailing List <[email protected]> |