dt-bindings: Add missing 'additionalProperties: false'

Setting 'additionalProperties: false' is frequently omitted, but is
important in order to check that there aren't extra undocumented
properties in a binding.

Ideally, we'd just add this automatically and make this the default, but
there's some cases where it doesn't work. For example, if a common
schema is referenced, then properties in the common schema aren't part
of what's considered for 'additionalProperties'. Also, sometimes there
are bus specific properties such as 'spi-max-frequency' that go into
bus child nodes, but aren't defined in the child node's schema.

So let's stick with the json-schema defined default and add
'additionalProperties: false' where needed. This will be a continual
review comment and game of wack-a-mole.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Stephen Boyd <sboyd@kernel.org> # clock
Acked-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Rob Herring 2020-03-25 16:05:41 -06:00
parent 0d9a302da0
commit 7f464532b0
116 changed files with 238 additions and 0 deletions

View File

@ -21,6 +21,8 @@ properties:
required:
- compatible
additionalProperties: false
examples:
- |
clkmgr@ffd04000 {

View File

@ -43,6 +43,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
ao-secure@140 {

View File

@ -43,6 +43,8 @@ required:
- reg-names
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>

View File

@ -27,6 +27,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
prr: chipid@ff000044 {

View File

@ -30,6 +30,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
chipid@10000000 {

View File

@ -89,6 +89,8 @@ required:
- clock-names
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos5250.h>

View File

@ -23,6 +23,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
firmware@203f000 {

View File

@ -29,6 +29,8 @@ required:
- reg
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/stm32mp1-clks.h>

View File

@ -44,6 +44,8 @@ required:
- clocks
- '#clock-cells'
additionalProperties: false
examples:
# Display PIXEL Clock node:
- |

View File

@ -52,6 +52,8 @@ required:
- clock-names
- '#clock-cells'
additionalProperties: false
examples:
# Clock Control Module node:
- |

View File

@ -52,6 +52,8 @@ required:
- clock-names
- '#clock-cells'
additionalProperties: false
examples:
# Clock Control Module node:
- |

View File

@ -35,6 +35,8 @@ required:
- clocks
- '#clock-cells'
additionalProperties: false
examples:
# Clock controller node:
- |

View File

@ -68,6 +68,8 @@ required:
- nvmem-cell-names
- '#thermal-sensor-cells'
additionalProperties: false
examples:
- |
clock-controller@900000 {

View File

@ -40,6 +40,8 @@ required:
- '#clock-cells'
- '#reset-cells'
additionalProperties: false
examples:
- |
clock-controller@1800000 {

View File

@ -56,6 +56,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
clock-controller@300000 {

View File

@ -66,6 +66,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmcc.h>

View File

@ -40,6 +40,8 @@ required:
- '#clock-cells'
- '#reset-cells'
additionalProperties: false
examples:
- |
clock-controller@1800000 {

View File

@ -58,6 +58,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>

View File

@ -56,6 +56,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>

View File

@ -74,6 +74,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
# Example for GCC for MSM8960:
- |

View File

@ -74,6 +74,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
if:
properties:
compatible:

View File

@ -50,6 +50,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-msm8998.h>

View File

@ -35,6 +35,8 @@ required:
- compatible
- '#clock-cells'
additionalProperties: false
examples:
# Example for GCC for SDM845: The below node should be defined inside
# &apps_rsc node.

View File

@ -58,6 +58,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sc7180.h>

View File

@ -52,6 +52,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sc7180.h>

View File

@ -48,6 +48,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>

View File

@ -67,6 +67,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sdm845.h>

View File

@ -52,6 +52,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sdm845.h>

View File

@ -48,6 +48,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>

View File

@ -107,6 +107,8 @@ required:
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
vpu: vpu@d0100000 {

View File

@ -43,6 +43,8 @@ required:
- interrupts
- '#dma-cells'
additionalProperties: false
examples:
- |
dma@3000000 {

View File

@ -68,6 +68,8 @@ required:
- mbox-names
- memory-region
additionalProperties: false
examples:
- |
#include <dt-bindings/firmware/imx/rsrc.h>

View File

@ -172,6 +172,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -34,9 +34,12 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
npe@c8006000 {
compatible = "intel,ixp4xx-network-processing-engine";
reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>;
};
...

View File

@ -47,6 +47,8 @@ required:
- "#gpio-cells"
- gpio-controller
additionalProperties: false
dependencies:
interrupt-controller: [ interrupts ]

View File

@ -49,6 +49,8 @@ required:
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
logicvc: logicvc@43c00000 {

View File

@ -53,6 +53,8 @@ required:
- interrupt-names
- clocks
additionalProperties: false
allOf:
- if:
properties:

View File

@ -94,6 +94,8 @@ required:
- interrupt-names
- clocks
additionalProperties: false
allOf:
- if:
properties:

View File

@ -115,6 +115,8 @@ required:
- clocks
- clock-names
additionalProperties: false
allOf:
- if:
properties:

View File

@ -36,6 +36,8 @@ required:
- clocks
- clock-names
additionalProperties: false
examples:
- |
rotator@12810000 {

View File

@ -47,6 +47,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -87,6 +87,8 @@ required:
- reg
additionalProperties: false
examples:
- |
spi {

View File

@ -32,6 +32,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -76,6 +76,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -36,6 +36,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -67,6 +67,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -53,6 +53,8 @@ required:
- dout-gpios
- avdd-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -32,6 +32,8 @@ required:
- vref-supply
- reg
additionalProperties: false
examples:
- |
spi {

View File

@ -52,6 +52,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
spi {

View File

@ -69,6 +69,8 @@ required:
- "#address-cells"
- "#size-cells"
additionalProperties: false
patternProperties:
"^filter@[0-9]+$":
type: object

View File

@ -38,6 +38,8 @@ required:
- compatible
- vcc-supply
additionalProperties: false
examples:
- |
serial {

View File

@ -24,6 +24,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -34,6 +34,8 @@ required:
- reg
- vref-supply
additionalProperties: false
examples:
- |
spi {

View File

@ -28,6 +28,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -28,6 +28,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -38,6 +38,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -29,6 +29,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -30,6 +30,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -32,6 +32,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {

View File

@ -62,6 +62,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -45,6 +45,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -33,6 +33,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -52,6 +52,8 @@ required:
- vddd-supply
- vdda-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -56,6 +56,8 @@ required:
- trig-gpios
- echo-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -42,6 +42,8 @@ required:
- compatible
- ping-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -398,6 +398,8 @@ required:
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -26,6 +26,8 @@ required:
- compatible
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -33,3 +33,6 @@ properties:
required:
- compatible
additionalProperties: false
...

View File

@ -44,6 +44,8 @@ required:
- interrupt-controller
- '#interrupt-cells'
additionalProperties: false
examples:
- |
intcon: interrupt-controller@c8003000 {

View File

@ -80,6 +80,8 @@ required:
- clock-names
- "#iommu-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos5250.h>

View File

@ -49,3 +49,6 @@ required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
...

View File

@ -50,3 +50,6 @@ patternProperties:
required:
- compatible
additionalProperties: false
...

View File

@ -41,6 +41,8 @@ required:
- interrupts
- "#mbox-cells"
additionalProperties: false
examples:
- |
mailbox@c883c404 {

View File

@ -124,6 +124,8 @@ required:
- amlogic,ao-sysctrl
- amlogic,canvas
additionalProperties: false
examples:
- |
vdec: video-decoder@c8820000 {

View File

@ -82,6 +82,8 @@ required:
- clocks
- clock-names
additionalProperties: false
examples:
- |
cec_AO: cec@100 {

View File

@ -59,6 +59,8 @@ required:
- interrupts
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>

View File

@ -73,6 +73,8 @@ required:
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -77,6 +77,8 @@ required:
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -38,6 +38,8 @@ required:
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -167,6 +167,8 @@ required:
- '#address-cells'
- '#size-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>

View File

@ -34,6 +34,8 @@ required:
- resets
- "#phy-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/sun50i-h6-ccu.h>

View File

@ -44,6 +44,8 @@ required:
- reset-names
- "#phy-cells"
additionalProperties: false
examples:
- |
phy@46000 {

View File

@ -40,6 +40,8 @@ required:
- reg
- clocks
additionalProperties: false
examples:
- |
sysconf: chiptop@e0200000 {

View File

@ -31,6 +31,8 @@ required:
- reset-gpios
- "#phy-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>

View File

@ -159,6 +159,8 @@ required:
- "#reset-cells"
- ranges
additionalProperties: false
examples:
- |
#include <dt-bindings/soc/ti,sci_pm_domain.h>

View File

@ -57,6 +57,8 @@ patternProperties:
required:
- compatible
additionalProperties: false
examples:
- |
syscon: scu@1e6e2000 {

View File

@ -70,6 +70,8 @@ required:
- compatible
- aspeed,external-nodes
additionalProperties: false
examples:
- |
apb {

View File

@ -92,6 +92,8 @@ patternProperties:
required:
- compatible
additionalProperties: false
examples:
- |
syscon: scu@1e6e2000 {

View File

@ -194,6 +194,8 @@ required:
- ranges
- pins-are-numbered
additionalProperties: false
examples:
- |
#include <dt-bindings/pinctrl/stm32-pinfunc.h>

View File

@ -68,6 +68,8 @@ required:
- "#power-domain-cells"
- amlogic,ao-sysctrl
additionalProperties: false
examples:
- |
pwrc: power-controller {

View File

@ -41,6 +41,8 @@ required:
- regmap
- offset
additionalProperties: false
allOf:
- if:
not:

View File

@ -41,6 +41,8 @@ required:
- regmap
- offset
additionalProperties: false
allOf:
- if:
not:

View File

@ -32,3 +32,6 @@ properties:
required:
- compatible
additionalProperties: false
...

View File

@ -55,6 +55,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c@1 {

View File

@ -29,3 +29,6 @@ patternProperties:
required:
- compatible
additionalProperties: false
...

View File

@ -29,6 +29,8 @@ required:
- reg
- "#reset-cells"
additionalProperties: false
examples:
- |
reset-controller@c884404 {

View File

@ -28,6 +28,8 @@ required:
- reg
- "#reset-cells"
additionalProperties: false
examples:
- |
reset-controller@8b2c800 {

View File

@ -29,6 +29,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
rng@c8834000 {

View File

@ -35,6 +35,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
rng {

View File

@ -51,6 +51,8 @@ required:
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/r7s72100-clock.h>

Some files were not shown because too many files have changed in this diff Show More