Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/build/dts/macros.bnf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; An RFC 7405 ABNF grammar for devicetree macros.

Check warning on line 1 in doc/build/dts/macros.bnf

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

Copyright missing

doc/build/dts/macros.bnf:1 File has no SPDX-FileCopyrightText header, consider adding one.

Check warning on line 1 in doc/build/dts/macros.bnf

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

License missing

doc/build/dts/macros.bnf:1 File has no SPDX-License-Identifier header, consider adding one.
;
; This does *not* cover macros pulled out of DT via Kconfig,
; like CONFIG_SRAM_BASE_ADDRESS, etc. It only describes the
Expand Down Expand Up @@ -55,6 +55,14 @@
node-macro =/ %s"DT_N" path-id %s"_RANGES_IDX_" DIGIT
%s"_VAL_CHILD_BUS_FLAGS_EXISTS"
node-macro =/ %s"DT_N" path-id %s"_FOREACH_RANGE"
; The map specific properties.
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT %s"_CHILD_SPECIFIER_POS"
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT %s"_CHILD_SPECIFIER_LEN"
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT %s"_PARENT_POS"
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT %s"_PARENT_LEN"
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT %s"_PARENT_SPECIFIER_POS"
node-macro =/ %s"DT_N" path-id %s"_P_" prop-id %s"_MAP_IDX_" DIGIT %s"_PARENT_SPECIFIER_LEN"
; Subnodes of the fixed-partitions compatible get macros which contain
; a unique ordinal value for each partition
node-macro =/ %s"DT_N" path-id %s"_PARTITION_ID" DIGIT
Expand Down
18 changes: 1 addition & 17 deletions dts/bindings/adc/arduino,uno-adc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,4 @@ description: |

compatible: "arduino,uno-adc"

include: base.yaml

properties:
io-channel-map:
type: compound
required: true

io-channel-map-mask:
type: compound

io-channel-map-pass-thru:
type: compound

"#io-channel-cells":
type: int
required: true
description: Number of items to expect in an ADC specifier
include: [base.yaml, io-channel-nexus.yaml]
8 changes: 6 additions & 2 deletions dts/bindings/gpio/gpio-nexus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
# SPDX-License-Identifier: Apache-2.0

# Common fields for GPIO nexus nodes
#
# see 2.5 Nexus Nodes and Specifier Mapping
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
# in the Devicetree Specification

properties:
gpio-map:
type: compound
required: true

gpio-map-mask:
type: compound
type: array

gpio-map-pass-thru:
type: compound
type: array

"#gpio-cells":
type: int
Expand Down
24 changes: 24 additions & 0 deletions dts/bindings/iio/io-channel-nexus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2025 TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0

# Common fields for io-channel nexus
#
# see 2.5 Nexus Nodes and Specifier Mapping
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
# in the Devicetree Specification

properties:
io-channel-map:
type: compound
required: true

io-channel-map-mask:
type: array

io-channel-map-pass-thru:
type: array

"#io-channel-cells":
type: int
required: true
description: Number of items to expect in the io-channel specifier, such as ADC channels.
24 changes: 24 additions & 0 deletions dts/bindings/interrupt-controller/interrupt-nexus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2025 TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0

# Common fields for interrupt nexus nodes
#
# See 2.4 Interrupts and Interrupt Mapping
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#interrupts-and-interrupt-mapping
# in the Devicetree Specification

properties:
interrupt-map:
type: compound
required: true

interrupt-map-mask:
type: array

interrupt-map-pass-thru:
type: array

"#interrupt-cells":
type: int
required: true
description: Number of items to expect in a interrupt specifier
8 changes: 1 addition & 7 deletions dts/bindings/pcie/host/pci-host-ecam-generic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: PCIe Controller in ECAM mode

compatible: "pci-host-ecam-generic"

include: pcie-controller.yaml
include: [pcie-controller.yaml, interrupt-nexus.yaml]

properties:
reg:
Expand All @@ -22,11 +22,5 @@ properties:
definition of non-prefetchable memory. One or both of prefetchable Memory
and IO Space may also be provided.

interrupt-map-mask:
type: array

interrupt-map:
type: compound

bus-range:
type: array
4 changes: 4 additions & 0 deletions dts/bindings/pwm/pwm-nexus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# SPDX-License-Identifier: Apache-2.0

# Common fields for PWM nexus nodes
#
# see 2.5 Nexus Nodes and Specifier Mapping
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
# in the Devicetree Specification

properties:
pwm-map:
Expand Down
8 changes: 8 additions & 0 deletions dts/bindings/test/vnd,gpio-nexus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2025, TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0

description: VND GPIO nexus

include: [gpio-nexus.yaml]

compatible: "vnd,gpio-nexus"
8 changes: 8 additions & 0 deletions dts/bindings/test/vnd,intr-nexus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2025, TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0

description: VND interrupt nexus

include: [interrupt-nexus.yaml]

compatible: "vnd,intr-nexus"
1 change: 1 addition & 0 deletions include/zephyr/devicetree.h
Original file line number Diff line number Diff line change
Expand Up @@ -5571,5 +5571,6 @@
#include <zephyr/devicetree/port-endpoint.h>
#include <zephyr/devicetree/display.h>
#include <zephyr/devicetree/hwspinlock.h>
#include <zephyr/devicetree/map.h>

#endif /* ZEPHYR_INCLUDE_DEVICETREE_H_ */
Loading
Loading