Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devicetree: bindings: add top-level interrupt-source key #56788

Closed
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
13 changes: 8 additions & 5 deletions doc/_scripts/gen_devicetree_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,16 +491,19 @@ def print_binding_page(binding, base_names, vnd_lookup, dup_compats,
file=string_io)

# Binding description.
if binding.bus:
bus_help = f'These nodes are "{binding.bus}" bus nodes.'
else:
bus_help = ''
print_block(f'''\
Description
***********

{bus_help}
''', string_io)
if binding.bus:
print(f'These nodes are "{binding.bus}" bus nodes.\n\n',
file=string_io)
if binding.interrupt_source:
print('These nodes are interrupt sources, which means '
'they must have either an ``interrupts`` or an '
'``interrupts-extended`` property set.\n\n',
file=string_io)
print(to_code_block(binding.description.strip()), file=string_io)

# Properties.
Expand Down
14 changes: 14 additions & 0 deletions doc/build/dts/bindings-syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ like this:
# Used to match nodes to this binding:
compatible: "manufacturer,foo-device"

# Used to indicate that nodes of this type generate interrupts:
interrupt-source: <true | false>

properties:
# Requirements for and descriptions of the properties that this
# binding's nodes need to satisfy go here.
Expand Down Expand Up @@ -111,6 +114,17 @@ vendor. In these cases, there is no vendor prefix. One example is the
:dtcompatible:`gpio-leds` compatible which is commonly used to describe board
LEDs connected to GPIOs.

interrupt-source
****************

This key is a boolean. It is used to indicate that the hardware represented by
this compatible generates interrupts. If the binding contains
``interrupt-source: true``, then any node with this compatible must have either
an ``interrupts`` or an ``interrupts-extended`` property set.

Refer to the Devicetree Specification v0.3 section 2.4, Interrupts and
Interrupt Mapping, for more details about these properties.

.. _dt-bindings-properties:

Properties
Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/adc/nordic,nrf-adc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: nRF ADC node

compatible: "nordic,nrf-adc"

interrupt-source: true

include: adc-controller.yaml

properties:
reg:
required: true

interrupts:
required: true

"#io-channel-cells":
const: 1

Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/adc/nordic,nrf-comp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic nRF family COMP (Comparator)

compatible: "nordic,nrf-comp"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true

"#io-channel-cells":
type: int
const: 1
Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/adc/nordic,nrf-lpcomp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic nRF family LPCOMP (Low-power Comparator)

compatible: "nordic,nrf-lpcomp"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true

"#io-channel-cells":
type: int
const: 1
Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/adc/nordic,nrf-saadc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic Semiconductor nRF family SAADC node

compatible: "nordic,nrf-saadc"

interrupt-source: true

include: adc-controller.yaml

properties:
reg:
required: true

interrupts:
required: true

"#io-channel-cells":
const: 1

Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/arm/nordic,nrf-egu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic EGU (Event Generator Unit)

compatible: "nordic,nrf-egu"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/arm/nordic,nrf-kmu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic KMU (Key Management Unit)

compatible: "nordic,nrf-kmu"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/arm/nordic,nrf-spu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ description: Nordic SPU (System Protection Unit)

compatible: "nordic,nrf-spu"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/arm/nordic,nrf-swi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic nRF family SWI (Software Interrupt)

compatible: "nordic,nrf-swi"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/audio/nordic,nrf-pdm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic PDM (Pulse Density Modulation interface)

compatible: "nordic,nrf-pdm"

interrupt-source: true

include: [base.yaml, pinctrl-device.yaml]

properties:
reg:
required: true

interrupts:
required: true

pinctrl-0:
required: true

Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/clock/nordic,nrf-clock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic nRF clock control node

compatible: "nordic,nrf-clock"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true

hfclkaudio-frequency:
type: int
description: |
Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/crypto/nordic,nrf-ccm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic nRF family CCM (AES CCM mode encryption)

compatible: "nordic,nrf-ccm"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true

length-field-length-8-bits:
type: boolean
description: |
Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/crypto/nordic,nrf-ecb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic ECB (AES electronic codebook mode encryption)

compatible: "nordic,nrf-ecb"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/flash_controller/nordic,nrf-qspi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ description: |

compatible: "nordic,nrf-qspi"

interrupt-source: true

include: [flash-controller.yaml, pinctrl-device.yaml]

bus: qspi
Expand All @@ -34,8 +36,5 @@ properties:
required: true
const: 0

interrupts:
required: true

pinctrl-0:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/gpio/nordic,nrf-gpiote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: NRF5 GPIOTE node

compatible: "nordic,nrf-gpiote"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/i2c/nordic,nrf-twi-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

include: [i2c-controller.yaml, pinctrl-device.yaml]

interrupt-source: true

properties:
reg:
required: true

interrupts:
required: true

pinctrl-0:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/i2s/nordic,nrf-i2s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ description: Nordic I2S (Inter-IC sound interface)

compatible: "nordic,nrf-i2s"

interrupt-source: true

include: [i2s-controller.yaml, pinctrl-device.yaml]

properties:
reg:
required: true

interrupts:
required: true

pinctrl-0:
required: true

Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/ipm/nordic,nrf-ipc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic nRF family IPC (Interprocessor Communication)

compatible: "nordic,nrf-ipc"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/mbox/nordic,mbox-nrf-ipc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: Nordic nRF family IPC (MBOX Interprocessor Communication)

compatible: "nordic,mbox-nrf-ipc"

interrupt-source: true

include: [base.yaml, mailbox-controller.yaml]

properties:
Expand All @@ -18,8 +20,5 @@ properties:
required: true
description: RX supported channels mask

interrupts:
required: true

mbox-cells:
- channel
5 changes: 2 additions & 3 deletions dts/bindings/net/wireless/nordic,nrf-nfct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic nRF family NFCT (Near Field Communication Tag)

compatible: "nordic,nrf-nfct"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
5 changes: 2 additions & 3 deletions dts/bindings/net/wireless/nordic,nrf-radio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,14 @@ description: |

compatible: "nordic,nrf-radio"

interrupt-source: true

include: [base.yaml]

properties:
reg:
required: true

interrupts:
required: true

fem:
type: phandle
description: |
Expand Down
5 changes: 2 additions & 3 deletions dts/bindings/power/nordic,nrf-power.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ description: Nordic nRF power control node

compatible: "nordic,nrf-power"

interrupt-source: true

include: base.yaml

properties:
reg:
required: true

interrupts:
required: true
Loading