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
arm
audio
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
cpu
crypto
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
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
iio/adc dts/bindings: Add the representation for Microchip's XEC ADC 2019-09-25 06:12:52 -04:00
interrupt-controller
ipm
led scripts: dts: Replace 'sub-node:' with more general 'child-binding:' 2019-09-19 08:39:22 -05:00
led_strip
memory-controllers
mhu
misc
mmc
mmu_mpu
modem
mtd scripts: dts: Replace 'sub-node:' with more general 'child-binding:' 2019-09-19 08:39:22 -05:00
phy
pinctrl
power
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
rng
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
timer drivers/timer/hpet.c: migrate to devicetree 2019-09-17 22:37:09 +08:00
usb
watchdog dts: remove unused QMSI bindings 2019-09-18 11:06:18 -05:00
wifi
vendor-prefixes.txt