dt-bindings: Add missing array size constraints

DT properties which can have multiple entries need to specify what the
entries are and define how many entries there can be. In the case of
only a single entry, just 'maxItems: 1' is sufficient.

Add the missing entry constraints. These were found with a modified
meta-schema. Unfortunately, there are a few cases where the size
constraints are not defined such as common bindings, so the meta-schema
can't be part of the normal checks.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210104230253.2805217-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Rob Herring 2021-01-04 16:02:53 -07:00
parent ca880a15ef
commit 0499220d6d
74 changed files with 118 additions and 35 deletions

View file

@ -30,8 +30,8 @@ properties:
Interrupts can be used to notify the completion of cache operations.
The number of interrupts should match to the number of CPU cores.
The specified interrupts correspond to CPU0, CPU1, ... in this order.
minItems: 1
maxItems: 4
minItems: 1
maxItems: 4
cache-unified: true

View file

@ -61,6 +61,7 @@ properties:
maxItems: 8
calxeda,sgpio-gpio:
maxItems: 3
description: |
phandle-gpio bank, bit offset, and default on or off, which indicates
that the driver supports SGPIO indicator lights using the indicated

View file

@ -22,6 +22,7 @@ properties:
const: canaan,k210-clk
clocks:
maxItems: 1
description:
Phandle of the SoC 26MHz fixed-rate oscillator clock.

View file

@ -60,6 +60,7 @@ properties:
Phandle of the I2C controller used for DDC EDID probing
hpd-gpios:
maxItems: 1
description: >
The GPIO pin for the HDMI hotplug detect (if it doesn't appear
as an interrupt/status bit in the HDMI controller itself)

View file

@ -37,6 +37,7 @@ properties:
Phandle of the I2C controller used for DDC EDID probing
hpd-gpios:
maxItems: 1
description: >
The GPIO pin for the HDMI hotplug detect (if it doesn't appear
as an interrupt/status bit in the HDMI controller itself)

View file

@ -30,6 +30,7 @@ properties:
power supply for LCM (1.8V)
dcdc-en-gpios:
maxItems: 1
description: |
phandle of the gpio for power ic line
Power IC supply enable, High active

View file

@ -37,7 +37,8 @@ properties:
reset-gpios: true
'mantix,tp-rstn-gpios':
mantix,tp-rstn-gpios:
maxItems: 1
description: second reset line that triggers DSI config load
backlight: true

View file

@ -30,6 +30,7 @@ properties:
panel. The novatek,nt36672a compatible shall always be provided as a fallback.
reset-gpios:
maxItems: 1
description: phandle of gpio for reset line - This should be 8mA, gpio
can be configured using mux, pinctrl, pinctrl-names (active high)

View file

@ -21,7 +21,7 @@ properties:
- fsl,imx8mp-dsp
reg:
description: Should contain register location and length
maxItems: 1
clocks:
items:

View file

@ -39,8 +39,7 @@ properties:
- const: atmel,at25
reg:
description:
Chip select number.
maxItems: 1
spi-max-frequency: true

View file

@ -19,6 +19,7 @@ properties:
const: nxp,ptn5150
int-gpios:
maxItems: 1
deprecated: true
description:
GPIO pin (input) connected to the PTN5150's INTB pin.
@ -31,6 +32,7 @@ properties:
maxItems: 1
vbus-gpios:
maxItems: 1
description:
GPIO pin (output) used to control VBUS. If skipped, no such control
takes place.

View file

@ -81,6 +81,7 @@ properties:
const: 2
reset-gpios:
maxItems: 1
description:
GPIO specification for the RESET input. This is an active low signal to
the PCA953x. Not valid for Maxim MAX732x devices.

View file

@ -40,6 +40,7 @@ properties:
ADC reference voltage supply
adi,sync-in-gpios:
maxItems: 1
description:
Enables synchronization of multiple devices that require simultaneous
sampling. A pulse is always required if the configuration is changed
@ -76,6 +77,7 @@ patternProperties:
properties:
reg:
maxItems: 1
description: |
The channel number.

View file

@ -23,6 +23,7 @@ properties:
maxItems: 1
clocks:
maxItems: 1
description:
Input clock used to derive the sample clock. Expected to be the
SoC's APB clock.

View file

@ -20,7 +20,7 @@ properties:
description: Power supply for the reference voltage
reg:
description: spi chipselect number according to the usual spi bindings
maxItems: 1
spi-max-frequency:
description: maximal spi bus frequency supported

View file

@ -68,6 +68,7 @@ patternProperties:
properties:
reg:
maxItems: 1
description: |
ADC channel number.
See include/dt-bindings/iio/qcom,spmi-vadc.h

View file

@ -41,6 +41,8 @@ properties:
maxItems: 2
clocks:
minItems: 1
maxItems: 2
description: |
Core can use up to two clocks, depending on part used:
- "adc" clock: for the analog circuitry, common to all ADCs.

View file

@ -47,6 +47,7 @@ properties:
description: an optional 3x3 mounting rotation matrix.
reset-gpios:
maxItems: 1
description: |
an optional pin needed for AK09911 to set the reset state. This should
be usually active low

View file

@ -25,6 +25,7 @@ properties:
maxItems: 1
reset-gpios:
maxItems: 1
description:
Active low signal to the AD5272 RESET input.

View file

@ -29,6 +29,7 @@ properties:
description: touchscreen can be used as a wakeup source.
reset-gpios:
maxItems: 1
description: reset gpio the chip is connected to.
vcc33-supply:

View file

@ -31,7 +31,7 @@ properties:
The 1st cell is hw interrupt number, the 2nd cell is channel index.
clocks:
description: ipg clock.
maxItems: 1
clock-names:
const: ipg

View file

@ -36,6 +36,8 @@ properties:
Reference to a phandle of a hardware spinlock provider node.
interrupts:
minItems: 1
maxItems: 96
description:
Interrupts references to primary interrupt controller

View file

@ -53,6 +53,7 @@ properties:
maxItems: 1
memory-region:
maxItems: 1
description:
CMA pool to use for buffers allocation instead of the default
CMA pool.

View file

@ -40,6 +40,7 @@ properties:
Digital core voltage supply, 1.2 volts
reset-gpios:
maxItems: 1
description: |-
Reference to the GPIO connected to the xclr pin, if any.
Must be released (set high) after all supplies are applied.

View file

@ -28,6 +28,8 @@ properties:
const: 1
ranges:
minItems: 1
maxItems: 4
description: |
Reflects the memory layout with four integer values per bank. Format:
<bank-number> 0 <parent address of bank> <size>

View file

@ -15,6 +15,7 @@ properties:
const: "fsl,dpaa2-console"
reg:
maxItems: 1
description: A standard property. Specifies the region where the MCFBA
(MC firmware base address) register can be found.

View file

@ -40,6 +40,7 @@ properties:
There is no card detection available; polling must be used.
cd-gpios:
maxItems: 1
description:
The card detection will be done using the GPIO provided.
@ -104,6 +105,7 @@ properties:
line. Not used in combination with eMMC or SDIO.
wp-gpios:
maxItems: 1
description:
GPIO to use for the write-protect detection.

View file

@ -66,6 +66,7 @@ properties:
dma-coherent: true
clocks:
maxItems: 1
description: CPSW2G NUSS functional clock
clock-names:

View file

@ -59,6 +59,7 @@ properties:
- const: cpts
clocks:
maxItems: 1
description: CPTS reference clock
clock-names:

View file

@ -51,9 +51,11 @@ properties:
- const: usb2_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -50,9 +50,11 @@ properties:
- const: usb1_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -50,9 +50,11 @@ properties:
- const: usb3_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -45,9 +45,11 @@ properties:
- const: usb1_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -54,9 +54,11 @@ properties:
- const: usb2_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -50,9 +50,11 @@ properties:
- const: usb1_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -56,9 +56,11 @@ properties:
- const: usb2_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -62,9 +62,11 @@ properties:
- const: usb3_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -56,9 +56,11 @@ properties:
- const: usb2_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -42,9 +42,11 @@ properties:
const: usb0_reset
usb0_id_det-gpios:
maxItems: 1
description: GPIO to the USB OTG ID pin
usb0_vbus_det-gpios:
maxItems: 1
description: GPIO to the USB OTG VBUS detect pin
usb0_vbus_power-supply:

View file

@ -22,7 +22,8 @@ properties:
clocks:
anyOf:
- description: Main PHY Clock
- maxItems: 1
description: Main PHY Clock
- items:
- description: Main PHY clock
@ -39,20 +40,16 @@ properties:
- const: hsic_480M
resets:
anyOf:
minItems: 1
items:
- description: Normal USB PHY reset
- items:
- description: Normal USB PHY reset
- description: HSIC Reset
- description: HSIC Reset
reset-names:
oneOf:
minItems: 1
items:
- const: phy
- items:
- const: phy
- const: hsic
- const: hsic
phy_type:
const: hsic

View file

@ -20,7 +20,7 @@ properties:
- socionext,uniphier-pxs3-ahci-phy
reg:
description: PHY register region (offset and length)
maxItems: 1
"#phy-cells":
const: 0

View file

@ -21,7 +21,7 @@ properties:
- socionext,uniphier-pxs3-pcie-phy
reg:
description: PHY register region (offset and length)
maxItems: 1
"#phy-cells":
const: 0

View file

@ -24,7 +24,7 @@ properties:
- socionext,uniphier-pxs3-usb3-hsphy
reg:
description: PHY register region (offset and length)
maxItems: 1
"#phy-cells":
const: 0

View file

@ -25,7 +25,7 @@ properties:
- socionext,uniphier-pxs3-usb3-ssphy
reg:
description: PHY register region (offset and length)
maxItems: 1
"#phy-cells":
const: 0

View file

@ -55,7 +55,7 @@ properties:
- ti,am654-phy-gmii-sel
reg:
description: Address and length of the register set for the device
maxItems: 1
'#phy-cells': true

View file

@ -23,8 +23,7 @@ properties:
compatible:
const: aspeed,ast2400-pinctrl
reg:
description: |
A hint for the memory regions associated with the pin-controller
maxItems: 2
patternProperties:
'^.*$':

View file

@ -24,8 +24,8 @@ properties:
compatible:
const: aspeed,ast2500-pinctrl
reg:
description: |
A hint for the memory regions associated with the pin-controller
maxItems: 2
aspeed,external-nodes:
minItems: 2
maxItems: 2

View file

@ -70,6 +70,7 @@ properties:
description: Enables bypass mode at boot time
interrupts:
maxItems: 1
description: |
Indicates that the device state has changed.

View file

@ -44,7 +44,7 @@ properties:
- const: vpu
interrupts:
description: VPU hardware interrupt
maxItems: 1
required:
- compatible

View file

@ -70,10 +70,13 @@ properties:
the firmware image.
clocks:
maxItems: 1
description: |
Main functional clock for the remote processor
resets:
minItems: 1
maxItems: 2
description: |
Reset handles for the remote processor

View file

@ -63,6 +63,7 @@ properties:
next-level-cache: true
memory-region:
maxItems: 1
description: |
The reference to the reserved-memory for the L2 Loosely Integrated Memory region.
The reserved memory node should be defined as per the bindings in reserved-memory.txt.

View file

@ -81,6 +81,8 @@ properties:
maxItems: 1
dmas:
minItems: 2
maxItems: 4
description:
Must contain a list of pairs of references to DMA specifiers, one for
transmission, and one for reception.

View file

@ -120,6 +120,8 @@ properties:
maxItems: 1
dmas:
minItems: 2
maxItems: 4
description:
Must contain a list of pairs of references to DMA specifiers, one for
transmission, and one for reception.

View file

@ -55,6 +55,8 @@ properties:
maxItems: 1
dmas:
minItems: 2
maxItems: 4
description:
Must contain a list of pairs of references to DMA specifiers, one for
transmission, and one for reception.

View file

@ -55,6 +55,8 @@ properties:
maxItems: 1
dmas:
minItems: 2
maxItems: 4
description:
Must contain a list of pairs of references to DMA specifiers, one for
transmission, and one for reception.

View file

@ -88,6 +88,7 @@ properties:
description: Phandle to the codec analog controls in the PRCM
allwinner,pa-gpios:
maxItems: 1
description: GPIO to enable the external amplifier
required:

View file

@ -55,6 +55,7 @@ patternProperties:
maxItems: 1
reg:
maxItems: 1
description: dai link address.
cpu:

View file

@ -62,12 +62,15 @@ properties:
description: Supply for the micbias on the headset mic
earpath-sel-gpios:
maxItems: 1
description: GPIO for switching between tv-out and mic paths
headset-detect-gpios:
maxItems: 1
description: GPIO for detection of headset insertion
headset-key-gpios:
maxItems: 1
description: GPIO for detection of headset key press
io-channels:

View file

@ -53,9 +53,11 @@ properties:
description: Supply for the micbias on the Sub microphone
fm-sel-gpios:
maxItems: 1
description: GPIO pin for FM selection
lineout-sel-gpios:
maxItems: 1
description: GPIO pin for line out selection
required:

View file

@ -36,10 +36,12 @@ properties:
I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
shut-down-gpios:
maxItems: 1
description: GPIO used to control the state of the device.
deprecated: true
shutdown-gpios:
maxItems: 1
description: GPIO used to control the state of the device.
interrupts:

View file

@ -27,9 +27,11 @@ properties:
I2C address of the device can be between 0x41 to 0x48.
reset-gpio:
maxItems: 1
description: GPIO used to reset the device.
shutdown-gpios:
maxItems: 1
description: GPIO used to control the state of the device.
interrupts:

View file

@ -35,6 +35,7 @@ properties:
I2C addresss of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
reset-gpios:
maxItems: 1
description: |
GPIO used for hardware reset.

View file

@ -68,6 +68,8 @@ properties:
maxItems: 1
dmas:
minItems: 2
maxItems: 4
description:
Must contain a list of pairs of references to DMA specifiers, one for
transmission, and one for reception.

View file

@ -35,6 +35,7 @@ properties:
maxItems: 1
clocks:
maxItems: 1
description:
A list of phandle and clock specifier pair that controls the single
SRAM clock.
@ -46,6 +47,7 @@ properties:
const: 1
ranges:
maxItems: 1
description:
Should translate from local addresses within the sram to bus addresses.

View file

@ -22,6 +22,8 @@ properties:
maxItems: 1
interrupts:
minItems: 2
maxItems: 6
description:
List of timers interrupts

View file

@ -18,7 +18,7 @@ properties:
- const: intel,ixp4xx-timer
reg:
description: Should contain registers location and length
maxItems: 1
interrupts:
minItems: 1

View file

@ -39,7 +39,7 @@ properties:
maxItems: 1
phys:
description: PHY specifier for the OTG PHY
maxItems: 1
phy-names:
const: usb

View file

@ -22,6 +22,8 @@ properties:
description: Interrupt for signals mirrored to out-gpios.
in-gpios:
minItems: 1
maxItems: 2
description: Array of one or two GPIO pins used for input signals.
brcm,in-functions:
@ -33,6 +35,7 @@ properties:
description: Array of enable and mask pairs, one per gpio in-gpios.
out-gpios:
maxItems: 1
description: Array of one GPIO pin used for output signals.
brcm,out-functions:

View file

@ -83,7 +83,7 @@ properties:
Phandle of a companion.
phys:
description: PHY specifier for the USB PHY
maxItems: 1
phy-names:
const: usb

View file

@ -71,7 +71,7 @@ properties:
Overrides the detected port count
phys:
description: PHY specifier for the USB PHY
maxItems: 1
phy-names:
const: usb

View file

@ -40,7 +40,7 @@ properties:
- const: mc
phys:
description: PHY specifier for the USB PHY
maxItems: 1
usb-role-switch:
type: boolean

View file

@ -68,6 +68,7 @@ properties:
Integer to use BUSWAIT register.
renesas,enable-gpio:
maxItems: 1
description: |
gpio specifier to check GPIO determining if USB function should be
enabled.

View file

@ -15,13 +15,14 @@ properties:
- const: ti,j721e-usb
reg:
description: module registers
maxItems: 1
power-domains:
description:
PM domain provider node and an args specifier containing
the USB device id value. See,
Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
maxItems: 1
clocks:
description: Clock phandles to usb2_refclk and lpm_clk

View file

@ -43,12 +43,14 @@ properties:
maxItems: 2
power-domains:
maxItems: 1
description: Should contain a phandle to a PM domain provider node
and an args specifier containing the USB device id
value. This property is as per the binding,
Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
phys:
maxItems: 1
description:
PHY specifier for the USB3.0 PHY. Some SoCs need the USB3.0 PHY
to be turned on before the controller.