zephyr/dts/bindings/device_node.yaml.template

90 lines
3.1 KiB
Plaintext

title: <short description of the node>
version: 0.1
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.