zephyr/dts/bindings/device_node.yaml.template
Ulf Magnusson 0ec0c84808 dts: bindings: Remove unused 'version' field
No binding has anything but 'version: 0.1', and the code in scripts/dts/
never does anything with it except print a warning if it isn't there.
It's undocumented what it means.

I suspect it's overkill if it's meant to be the binding format version.
If we'd need to tell different versions from each other, we could change
some other minor thing in the format, and it probably won't be needed.

Remove the 'version' fields from the bindings and the warning from the
scripts/dts/ scripts.

The new device tree script will give an error when unknown fields appear
in bindings.

The deletion was done with

    git ls-files 'dts/bindings/*.yaml' | xargs sed -i '/^\s*version: /d'

Some blank lines at the beginning of bindings were removed as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-22 09:28:07 -04:00

89 lines
3.0 KiB
Plaintext

title: <short description of the node>
description: >
Longer free-form description of the node, with spanning
lines
inherits:
- !include other.yaml # or [other1.yaml, other2.yaml]
# Files with other bindings that also apply to the node. If an attribute is set
# both in an included file and in the file that includes it, then the value
# from the including file (the file with the !include) is used.
< parent | child >:
# parent/child is used to document implicit relation between nodes.
# This information is required to generate parent related bits in child
# attributes.
# In case parent has 'bus', slave inherits some information from master.
# parent and child should share same bus-type value.
bus: <bus-type>
sub-node:
# Used for cases in which a dts node has children, and the children dont
# require/specify a 'compatible' property. The sub-node is effective the
# binding for the child.
#
# Here's an example for a pwm-leds binding in which the child nodes
# would be required to have 'pwms' properties.
sub-node:
properties:
pwms:
type: compound
category: required
properties:
# A typical property entry looks like this:
#
# <name of the property in the device tree - regexes are supported>:
# category: <required | optional>
# type: <string | int | boolean | array | uint8-array | string-array | compound>
# description: <description of property>
#
# Note that uint8-array is the name for what devicetree standard calls
# bytestring: its value is hexadecimal text with whitespace ignored,
# enclosed in square brackets.
#
# The 'type' attribute is currently ignored.
# At a minimum, an entry for the 'compatible' property is required, for
# matching nodes
compatible: <list of string compatible matches>
category: required
type: string
description: compatible of node
# 'reg' describes mmio registers
reg:
category: required
type: array
description: mmio register space
# 'interrupts' specifies the interrupts that the driver may use
interrupts:
category: required
type: array
description: required interrupts
# If the binding describes an interrupt controller, GPIO controller, pinmux
# device, or any other device referenced via a phandle plus a specifier (some
# additional data besides the phandle), then the cells in the specifier must be
# listed in '#cells', like below.
"#cells":
- cell0 # name of first cell
- cell1 # name of second cell
- cell2 # name of third cell
- and so on and so forth
# If the specifier is empty (e.g. '#clock-cells = <0>'), then '#cells' can
# either be omitted (recommended) or set to an empty array. Note that an empty
# array is specified as '"#cells": []' in YAML.
#
# For example, say that some device tree node has 'foo-gpios = <&gpio1 1 2>'.
# The <1 2> part of the property value is the specifier, with two cells in this
# example. The node pointed at by &gpio1 is expected to have
# '#gpio-cells = <2>', and its binding should have two elements in '#cells',
# corresponding to the 1 and 2 values above.