Skip to content
745 changes: 718 additions & 27 deletions scripts/dts/edtlib.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/dts/test-bindings-2/multidir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

description: Binding in test-bindings-2/

compatible: "in-dir-2"
compatible: "in-dir"
70 changes: 70 additions & 0 deletions scripts/dts/test-bindings/chosen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (c) 2019..2020 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

description: Chosen properties

compatible: "chosen"

properties:
stdout-path:
type: string
required: false
description: >
Device to be used for boot console output
If the character ":" is present in the value, this terminates the path.
The meaning of any characters following the ":" is device-specific, and
must be specified in the relevant binding documentation.
For UART devices, the preferred binding is a string in the form:
path:<baud>{<parity>{<bits>{<flow>}}}
where
path - path of uart device
baud - baud rate in decimal
parity - 'n' (none), 'o', (odd) or 'e' (even)
bits - number of data bits
flow - 'r' (rts)
For example: 115200n8r

zephyr,flash:
type: path
required: false
description: TBD

zephyr,sram:
type: path
required: false
description: TBD

zephyr,ccm:
type: path
required: false
description: TBD

zephyr,console:
type: path
required: false
description: TBD

zephyr,shell-uart:
type: path
required: false
description: TBD

zephyr,bt-uart:
type: path
required: false
description: TBD

zephyr,uart-pipe:
type: path
required: false
description: TBD

zephyr,bt-mon-uart:
type: path
required: false
description: TBD

zephyr,uart-mcumgr:
type: path
required: false
description: TBD
58 changes: 58 additions & 0 deletions scripts/dts/test-bindings/clock-consumer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright (c) 2018..2020 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

# -- Assigned clock parents and rates --
# Some platforms may require initial configuration of default parent clocks
# and clock frequencies. Such a configuration can be specified in a device tree
# node through assigned-clocks, assigned-clock-parents and assigned-clock-rates
# properties.

description: Clock consumer

compatible: "clock-consumer"

properties:
clocks:
type: phandle-array
required: true
description: >
List of phandle and clock specifier pairs, one pair for each clock
input to the device. Note - if the clock provider specifies '0' for
clock-cells, then only the phandle portion of the pair will appear.

clock-names:
type: string-array
required: false
description: >
List of clock input name strings sorted in the same order as the clocks
property.

clock-ranges:
type: boolean
required: false
description: >
Empty property indicating that child nodes can inherit named clocks from
this node. Useful for bus nodes to provide a clock to their children.

assigned-clocks:
type: phandle-array
required: false
description: >
List of phandle and clock specifier pairs, one pair for each assigned
clock input. Note - if the clock provider specifies '0' for
clock-cells, then only the phandle portion of the pair will appear.

assigned-clock-parents:
type: phandle-array
required: false
description: >
List of parent clocks in the form of a phandle and clock
specifier pair. The list shall correspond to the clocks listed in the
assigned-clocks directive.

assigned-clock-rates:
type: array
required: false
description: >
List of frequencies in Hz. The list shall correspond to the clocks
listed in the assigned-clocks directive.
40 changes: 40 additions & 0 deletions scripts/dts/test-bindings/clock-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2019, Linaro Limited
# Copyright (c) 2019..2020 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

# Common fields for clock controllers

description: Clock provider

compatible: "clock-provider"

properties:
"#clock-cells":
type: int
required: true
description: Number of items to expect in a Clock specifier

clock-output-names:
type: string-array
required: false
description: >
A list of strings of clock output signal names indexed by the first
cell in the clock specifier.

clock-indices:
type: array
required: false
description: >
The identifying number for the clocks in the node. If it is not linear
from zero, then this allows the mapping of identifiers into the
clock-output-names array.

protected-clocks:
type: phandles
required: false
description: >
Clocks that are not fully exposed, such as in situations where those
clocks are used by drivers running in ARM secure execution levels.

clock-cells:
- clock-id
24 changes: 24 additions & 0 deletions scripts/dts/test-bindings/fixed-partition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2018..2020 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

description: Fixed partition (one of the partions of a 'fixed-partitions' node).

compatible: "fixed-partition"

properties:
label:
type: string
required: false
description: The label / name for this partition. If omitted, the label is taken
from the node name (excluding the unit address).

read-only:
type: boolean
required: false
description: This parameter, if present, is a hint that this
partition should/ can only be used read-only.

reg:
type: array
required: false
description: partition offset (address) and size within flash
14 changes: 14 additions & 0 deletions scripts/dts/test-bindings/gpio-2-cell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: BSD-3-Clause

description: GPIO controller with two cells

compatible: "gpio-two-cell"

properties:
"#gpio-cells":
type: int
required: true

gpio-cells:
- gpio_cell_one
- gpio_cell_two
47 changes: 47 additions & 0 deletions scripts/dts/test-bindings/gpio-led.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (c) 2020 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

description: GPIO LED

compatible: "gpio-led"

properties:
gpios:
type: phandle-array
required: true
function:
required: false
type: int
description: Numerical LED functon identifier.
color:
required: false
type: int
description: Numerical LED color identifier
default-state:
required: false
type: int
default: 0
description: >
The initial state of the LED. Valid values are LED_STATE_OFF (0),
LED_STATE_ON (1), and LED_STATE_KEEP (2). If the LED is already on or
off and the default-state property is set the to same value, then no
glitch should be produced where the LED momentarily turns off (or on).
The LED_STATE_KEEP setting will keep the LED at whatever its current
state is, without producing a glitch. The default is LED_STATE_OFF (0)
if this property is not present.
led-pattern:
required: false
type: array
description: Array of integers with default pattern for certain triggers.
retain-state-suspended:
required: false
type: boolean
description: Retain the state of the LED in suspend state.
retain-state-shutdown:
required: false
type: boolean
description: Retain the state of the LED on shutdown.
panic-indicator:
required: false
type: boolean
description: The LED should be used as a panic indicator.
6 changes: 6 additions & 0 deletions scripts/dts/test-bindings/gpio-leds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2020 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

description: GPIO LEDs controller

compatible: "gpio-leds"
2 changes: 1 addition & 1 deletion scripts/dts/test-bindings/multidir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

description: Binding in test-bindings/

compatible: "in-dir-1"
compatible: "in-dir"
25 changes: 25 additions & 0 deletions scripts/dts/test-bindings/partition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2018,2019 Bobby Noelte
# SPDX-License-Identifier: Apache-2.0

description: Flash partition definition for fixed partitions

compatible: "fixed-partitions"

properties:
"#address-cells":
type: int
required: true
description: >
<1>: for partitions that require a single 32-bit cell to represent their
size/address (aka the value is below 4 GiB)
<2>: for partitions that require two 32-bit cells to represent their
size/address (aka the value is 4 GiB or greater).

"#size-cells":
type: int
required: false
description: >
<1>: for partitions that require a single 32-bit cell to represent their
size/address (aka the value is below 4 GiB)
<2>: for partitions that require two 32-bit cells to represent their
size/address (aka the value is 4 GiB or greater).
Loading