Commit 6fdc6e23 authored by Rob Herring's avatar Rob Herring

dt-bindings: Add missing 'unevaluatedProperties'

This doesn't yet do anything in the tools, but make it explicit so we can
check either 'unevaluatedProperties' or 'additionalProperties' is present
in schemas.

'unevaluatedProperties' is appropriate when including another schema (via
'$ref') and all possible properties and/or child nodes are not
explicitly listed in the schema with the '$ref'.

This is in preparation to add a meta-schema to check for missing
'unevaluatedProperties' or 'additionalProperties'. This has been a
constant source of review issues.
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarWolfram Sang <wsa@kernel.org>
Acked-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-By: default avatarVinod Koul <vkoul@kernel.org>
Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20201005183830.486085-2-robh@kernel.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent 5f3ae016
......@@ -220,6 +220,8 @@ then:
required:
- cpu
unevaluatedProperties: false
examples:
# minimum CTI definition. DEVID register used to set number of triggers.
- |
......
......@@ -50,6 +50,8 @@ required:
- '#size-cells'
- dma-ranges
unevaluatedProperties: false
examples:
- |
mlahb: ahb@38000000 {
......
......@@ -64,6 +64,8 @@ allOf:
required:
- sata
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -44,6 +44,8 @@ properties:
required:
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -72,6 +72,8 @@ required:
- spi-max-frequency
- port
unevaluatedProperties: false
examples:
- |+
spi {
......
......@@ -62,6 +62,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/jz4780-cgu.h>
......
......@@ -81,6 +81,8 @@ required:
- clocks
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -33,6 +33,8 @@ required:
- reg
- dma-masters
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -84,6 +84,8 @@ required:
- clocks
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -141,6 +141,8 @@ then:
required:
- ti,udma-atype
unevaluatedProperties: false
examples:
- |+
cbass_main {
......
......@@ -36,6 +36,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
i2c@c8100500 {
......
......@@ -44,6 +44,8 @@ required:
- clocks
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -70,4 +70,6 @@ required:
- sda-gpios
- scl-gpios
unevaluatedProperties: false
...
......@@ -117,6 +117,8 @@ then:
required:
- rockchip,grf
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/rk3188-cru-common.h>
......
......@@ -37,6 +37,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
i2c0: i2c@58780000 {
......
......@@ -37,6 +37,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
i2c0: i2c@58400000 {
......
......@@ -94,6 +94,8 @@ required:
- resets
- clocks
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/mfd/stm32f7-rcc.h>
......
......@@ -36,6 +36,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
axi_iic_0: i2c@40800000 {
......
......@@ -30,6 +30,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -40,6 +40,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -30,6 +30,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -108,6 +108,8 @@ patternProperties:
- reg
- diff-channels
unevaluatedProperties: false
examples:
- |
spi {
......
......@@ -92,6 +92,8 @@ required:
- spi-cpol
- spi-cpha
unevaluatedProperties: false
examples:
- |
spi0 {
......
......@@ -63,6 +63,8 @@ patternProperties:
required:
- reg
unevaluatedProperties: false
examples:
- |
spi {
......
......@@ -102,6 +102,8 @@ required:
- interrupts
- adi,conversion-start-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -47,6 +47,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
spi {
......
......@@ -45,6 +45,8 @@ required:
- vdd-supply
- vref-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -130,6 +130,8 @@ required:
- channel@4
- channel@5
unevaluatedProperties: false
examples:
- |
spi {
......
......@@ -46,6 +46,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
spi0 {
......
......@@ -33,6 +33,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -116,6 +116,8 @@ allOf:
dependencies:
adi,sync-mode: [ clocks ]
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -50,6 +50,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
// Example for I2C
......
......@@ -40,6 +40,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -48,6 +48,8 @@ required:
- vdd-supply
- linux,keycodes
unevaluatedProperties: false
examples:
- |
// Example with interrupts
......
......@@ -41,6 +41,8 @@ required:
- interrupt-controller
- '#interrupt-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -67,6 +67,8 @@ required:
- 'loongson,parent_int_map'
unevaluatedProperties: false
examples:
- |
iointc: interrupt-controller@3ff01400 {
......
......@@ -61,6 +61,8 @@ patternProperties:
- cfi-flash
- jedec,spi-nor
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/renesas-cpg-mssr.h>
......
......@@ -50,6 +50,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -117,6 +117,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
emmc: mmc@5a000000 {
......
......@@ -56,6 +56,8 @@ required:
- dmas
- dma-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/jz4780-cgu.h>
......
......@@ -43,6 +43,8 @@ required:
- dmas
- dma-names
unevaluatedProperties: false
examples:
- |
mmc0: mmc@e0330000 {
......
......@@ -102,6 +102,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/rk3288-cru.h>
......
......@@ -73,6 +73,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/berlin2.h>
......
......@@ -77,6 +77,8 @@ required:
- reset-names
- resets
unevaluatedProperties: false
examples:
- |
sd: mmc@5a400000 {
......
......@@ -42,6 +42,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
mmc@12200000 {
......
......@@ -128,6 +128,8 @@ required:
- clock-names
- clocks
unevaluatedProperties: false
examples:
- |
nand-controller@ff900000 {
......
......@@ -51,6 +51,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/jz4780-cgu.h>
......
......@@ -94,6 +94,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -36,6 +36,8 @@ properties:
enum: [ 4, 8, 12, 16, 20, 24 ]
default: 8
unevaluatedProperties: false
examples:
- |
ethernet {
......
......@@ -120,6 +120,8 @@ required:
- clock-names
- phy-mode
unevaluatedProperties: false
examples:
- |
ethmac: ethernet@c9410000 {
......
......@@ -30,6 +30,8 @@ required:
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
mdio0: mdio@1e650000 {
......
......@@ -35,6 +35,8 @@ required:
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
/* USB host controller */
......
......@@ -61,6 +61,8 @@ required:
- mediatek,pericfg
- phy-handle
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -34,6 +34,8 @@ patternProperties:
required:
- reg
unevaluatedProperties: false
examples:
- |
mdio {
......
......@@ -72,6 +72,8 @@ required:
- resets
- reset-names
unevaluatedProperties: false
examples:
# Lager board
- |
......
......@@ -59,6 +59,8 @@ properties:
regulator to VDDIO.
$ref: /schemas/regulator/regulator.yaml
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/net/qca-ar803x.h>
......
......@@ -31,6 +31,8 @@ required:
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
mdio@90000 {
......
......@@ -33,6 +33,8 @@ required:
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-ipq806x.h>
......
......@@ -88,6 +88,8 @@ required:
- clock-names
- st,syscon
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -58,6 +58,8 @@ required:
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
davinci_mdio: mdio@4a101000 {
......
......@@ -109,6 +109,8 @@ properties:
required:
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/net/ti-dp83867.h>
......
......@@ -79,6 +79,8 @@ properties:
required:
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/net/ti-dp83869.h>
......
......@@ -76,6 +76,8 @@ patternProperties:
additionalProperties: false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/imx6sx-clock.h>
......
......@@ -49,6 +49,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sc7180.h>
......
......@@ -66,6 +66,8 @@ patternProperties:
additionalProperties: false
unevaluatedProperties: false
examples:
- |
sdam_1: nvram@b000 {
......
......@@ -51,6 +51,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/rk3288-cru.h>
......
......@@ -42,6 +42,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
efuse@1fff7800 {
......
......@@ -29,6 +29,8 @@ required:
- reg
- reg-names
unevaluatedProperties: false
examples:
- |
bus {
......
......@@ -31,6 +31,8 @@ required:
- reg
- reg-names
unevaluatedProperties: false
examples:
- |
bus {
......
......@@ -137,6 +137,8 @@ allOf:
reg:
maxItems: 1
unevaluatedProperties: false
examples:
- |
......
......@@ -39,6 +39,8 @@ required:
- reg
- ranges
unevaluatedProperties: false
examples:
- |
......
......@@ -63,6 +63,8 @@ required:
- phys
- phy-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/soc/ti,sci_pm_domain.h>
......
......@@ -72,6 +72,8 @@ required:
- phys
- phy-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/soc/ti,sci_pm_domain.h>
......
......@@ -48,6 +48,8 @@ required:
- interrupt-map
- interrupt-map-mask
unevaluatedProperties: false
examples:
- |
pci@10001000 {
......
......@@ -49,6 +49,8 @@ required:
- "#power-domain-cells"
- reg
unevaluatedProperties: false
examples:
- |
lcd0_pd: power-domain@10023c80 {
......
......@@ -73,6 +73,8 @@ required:
- compatible
- regulator-name
unevaluatedProperties: false
examples:
- |
reg_1v8: regulator-1v8 {
......
......@@ -28,6 +28,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
spi0 {
......
......@@ -91,6 +91,8 @@ required:
- gpios
- states
unevaluatedProperties: false
examples:
- |
gpio-regulator {
......
......@@ -34,6 +34,8 @@ required:
- st,syscfg
- vdda-supply
unevaluatedProperties: false
examples:
- |
regulator-booster {
......
......@@ -36,6 +36,8 @@ required:
- clocks
- vdda-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/stm32mp1-clks.h>
......
......@@ -28,6 +28,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
regulator@1948000 {
......
......@@ -68,6 +68,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/jz4740-cgu.h>
......
......@@ -74,6 +74,8 @@ allOf:
items:
- const: rtc
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/exynos5420.h>
......
......@@ -9,6 +9,9 @@ title: Ingenic SoCs UART controller devicetree bindings
maintainers:
- Paul Cercueil <paul@crapouillou.net>
allOf:
- $ref: /schemas/serial.yaml#
properties:
$nodename:
pattern: "^serial@[0-9a-f]+$"
......@@ -64,6 +67,8 @@ required:
- dmas
- dma-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/jz4780-cgu.h>
......
......@@ -100,6 +100,8 @@ required:
- clock-names
- power-domains
unevaluatedProperties: false
if:
properties:
compatible:
......
......@@ -54,6 +54,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
aliases {
......
......@@ -149,6 +149,8 @@ then:
required:
- resets
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r8a7791-cpg-mssr.h>
......
......@@ -75,6 +75,8 @@ required:
- clock-names
- power-domains
unevaluatedProperties: false
if:
properties:
compatible:
......
......@@ -75,6 +75,8 @@ required:
- clock-names
- power-domains
unevaluatedProperties: false
if:
properties:
compatible:
......
......@@ -101,6 +101,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
serial@80230000 {
......
......@@ -77,6 +77,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
spi@c1108d80 {
......
......@@ -35,6 +35,8 @@ required:
- reg
- clocks
unevaluatedProperties: false
examples:
- |
spi@c1108c80 {
......
......@@ -24,6 +24,8 @@ required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
spi: spi@1f000000 {
......
......@@ -29,6 +29,8 @@ required:
- '#address-cells'
- '#size-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/ath79-clk.h>
......
......@@ -56,6 +56,8 @@ required:
- clock-names
- clocks
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
......
......@@ -40,6 +40,8 @@ required:
- '#address-cells'
- '#size-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r8a7778-clock.h>
......
......@@ -123,6 +123,8 @@ allOf:
required:
- resets
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r8a7791-cpg-mssr.h>
......
......@@ -140,6 +140,8 @@ required:
- '#address-cells'
- '#size-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r8a7791-clock.h>
......
......@@ -44,6 +44,8 @@ required:
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
spi0: spi@54006000 {
......
......@@ -53,6 +53,8 @@ required:
- num-chipselects
- sck-gpios
unevaluatedProperties: false
examples:
- |
spi {
......
......@@ -48,6 +48,8 @@ required:
- spi-max-frequency
- mux-controls
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -128,6 +128,8 @@ required:
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
spi@e0100000 {
......
......@@ -85,6 +85,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/rk3188-cru-common.h>
......
......@@ -66,6 +66,8 @@ required:
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
spi: spi@10040000 {
......
......@@ -53,6 +53,8 @@ required:
- clocks
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -76,6 +76,8 @@ required:
- clocks
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -31,6 +31,8 @@ required:
- reg
- clocks
unevaluatedProperties: false
examples:
- |
watchdog@98d0 {
......
......@@ -25,6 +25,8 @@ properties:
required:
- compatible
unevaluatedProperties: false
examples:
- |
watchdog {
......
......@@ -38,6 +38,8 @@ required:
- reg
- clocks
unevaluatedProperties: false
examples:
- |
watchdog@208a038 {
......
......@@ -62,6 +62,8 @@ allOf:
required:
- samsung,syscon-phandle
unevaluatedProperties: false
examples:
- |
watchdog@101d0000 {
......
......@@ -43,6 +43,8 @@ required:
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/stm32mp1-clks.h>
......
......@@ -46,6 +46,8 @@ required:
- clocks
- power-domains
unevaluatedProperties: false
examples:
- |
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment