zephyr/dts/bindings
Ulf Magnusson b97ed9e4b4 scripts: dts: Generalize handling of phandle-array types
Generating generic information for 'type: phandle-array' properties in
edtlib was difficult due to defining phandle-array as just a list of
phandles and numbers. To make sense of a phandle-array property like
'pwms', you have to know that #pwm-cells is expected to appear on
each referenced controller, and that the binding for the controller has
a #cells.

Because of this, handling of various 'type: phandle-array' properties
was previously hardcoded in edtlib and exposed through properties like
Node.pwms, instead of through the generic Node.props (though with a lot
of shared code).

In practice, it turns out that all 'type: phandle-array' properties in
Zephyr work exactly the same way: They all have names that end in -s,
the 's' is removed to derive the name of related properties, and they
all look up #cells in the binding for the controller, which gives names
to the data values.

Strengthen the definition of 'type: phandle-array' to mean a property
that works exactly like the existing phandle-array properties (which
also means requiring that the name ends in -s). This removes a ton of
hardcoding from edtlib and allows new 'type: phandle-array' properties
to be added without making any code changes.

If we ever need a property type that's a list of phandles and numbers
but that doesn't follow this scheme, then we could add a separate type
for it. We should check if the standard scheme is fine first though.

The only property type for which no information is generated is now
'compound'.

There's some inconsistency in how we generate identifiers for clocks
compared to other 'type: phandle-array' properties, so keep
special-casing them for now in gen_defines.py (see the comment in
write_clocks()).

This change also enabled a bunch of other simplifications, like reusing
the ControllerAndData class for interrupts.

Piggyback generalization of *-map properties so that they work for any
phandle-array properties. It's now possible to have things like
'io-channel-map', if you need to.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-26 15:30:23 -07:00
..
arc dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
arm dts: nxp: ke1xf: Introduce nxp,kinetis-ke1xf-sim 2019-09-11 11:18:35 -05:00
audio dts: nordic: nrf9160: Add missing peripheral nodes 2019-09-10 22:47:43 +02:00
base scripts: dts: Generalize handling of phandle-array types 2019-09-26 15:30:23 -07:00
bluetooth scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -05:00
can scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -05:00
clock dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
cpu dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
crypto dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
display drivers: ssd16xx: use bytestring property for LUT and parameters 2019-09-18 15:00:38 -05:00
espi dts: espi: Cleanup eSPI block device tree 2019-09-20 14:30:40 -04:00
ethernet drivers: eth: add driver for ENC424J600 Ethernet Controller 2019-09-12 11:30:19 +03:00
flash_controller dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
gpio bindings/gpio: Add missing property "gpio-cells" 2019-09-26 12:35:28 -07:00
hwinfo bindings: hwinfo: Remove deprecated syntax in LiteX DNA binding 2019-09-26 05:54:50 -07:00
i2c dts: Use separate compatibles for Nordic TWI/TWIM/TWIS peripherals 2019-09-26 19:13:17 +02:00
i2s scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -05:00
ieee802154 dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
iio/adc dts/bindings: Add the representation for Microchip's XEC ADC 2019-09-25 06:12:52 -04:00
interrupt-controller dts: rv32m1: Rework interrupt mux dts descriptions 2019-09-09 13:47:20 -05:00
ipm dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
led scripts: dts: Replace 'sub-node:' with more general 'child-binding:' 2019-09-19 08:39:22 -05:00
led_strip dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
memory-controllers dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
mhu dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
misc dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
mmc dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
mmu_mpu scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
modem dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
mtd scripts: dts: Replace 'sub-node:' with more general 'child-binding:' 2019-09-19 08:39:22 -05:00
phy dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
pinctrl dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
power dts: nordic: nrf9160: Add missing peripheral nodes 2019-09-10 22:47:43 +02:00
ps2 dts: ps2: Fix yaml warning for PS/2 2019-09-18 22:25:18 -04:00
pwm dts: bindings: Remove deprecated syntax for ESP32 GPIO and NRF PWM 2019-09-25 20:57:08 -07:00
riscv dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
rng dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
rtc drivers: timer: add RTC support as system clock for CC13X2/CC26X2 2019-09-19 13:43:10 -05:00
sensor drivers: amg88xx: rework sensor driver to use DT 2019-09-17 06:27:21 -05:00
serial drivers: (le)u(s)art_gecko: use DT defined clock identifiers 2019-09-25 03:43:47 -07:00
spi dts: Use separate compatibles for Nordic SPI/SPIM/SPIS peripherals 2019-09-26 19:13:17 +02:00
sram dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
timer drivers/timer/hpet.c: migrate to devicetree 2019-09-17 22:37:09 +08:00
usb dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
watchdog dts: remove unused QMSI bindings 2019-09-18 11:06:18 -05:00
wifi dts: bindings: Shorten license headers 2019-09-07 10:25:02 -05:00
vendor-prefixes.txt drivers: esp32: UART Fix yaml/dts binding name 2019-09-11 07:50:20 -05:00