Commit 7f464532 authored by Rob Herring's avatar Rob Herring

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: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: default avatarBenjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Stephen Boyd <sboyd@kernel.org> # clock
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
parent 0d9a302d
......@@ -21,6 +21,8 @@ properties:
required:
- compatible
additionalProperties: false
examples:
- |
clkmgr@ffd04000 {
......
......@@ -43,6 +43,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
ao-secure@140 {
......
......@@ -43,6 +43,8 @@ required:
- reg-names
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -27,6 +27,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
prr: chipid@ff000044 {
......
......@@ -30,6 +30,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
chipid@10000000 {
......
......@@ -89,6 +89,8 @@ required:
- clock-names
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos5250.h>
......
......@@ -23,6 +23,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
firmware@203f000 {
......
......@@ -29,6 +29,8 @@ required:
- reg
- clocks
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/stm32mp1-clks.h>
......
......@@ -44,6 +44,8 @@ required:
- clocks
- '#clock-cells'
additionalProperties: false
examples:
# Display PIXEL Clock node:
- |
......
......@@ -52,6 +52,8 @@ required:
- clock-names
- '#clock-cells'
additionalProperties: false
examples:
# Clock Control Module node:
- |
......
......@@ -52,6 +52,8 @@ required:
- clock-names
- '#clock-cells'
additionalProperties: false
examples:
# Clock Control Module node:
- |
......
......@@ -35,6 +35,8 @@ required:
- clocks
- '#clock-cells'
additionalProperties: false
examples:
# Clock controller node:
- |
......
......@@ -68,6 +68,8 @@ required:
- nvmem-cell-names
- '#thermal-sensor-cells'
additionalProperties: false
examples:
- |
clock-controller@900000 {
......
......@@ -40,6 +40,8 @@ required:
- '#clock-cells'
- '#reset-cells'
additionalProperties: false
examples:
- |
clock-controller@1800000 {
......
......@@ -56,6 +56,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
clock-controller@300000 {
......
......@@ -66,6 +66,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmcc.h>
......
......@@ -40,6 +40,8 @@ required:
- '#clock-cells'
- '#reset-cells'
additionalProperties: false
examples:
- |
clock-controller@1800000 {
......
......@@ -58,6 +58,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
......
......@@ -56,6 +56,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
......
......@@ -74,6 +74,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
# Example for GCC for MSM8960:
- |
......
......@@ -74,6 +74,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
if:
properties:
compatible:
......
......@@ -50,6 +50,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-msm8998.h>
......
......@@ -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.
......
......@@ -58,6 +58,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sc7180.h>
......
......@@ -52,6 +52,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sc7180.h>
......
......@@ -48,6 +48,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
......
......@@ -67,6 +67,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
......
......@@ -52,6 +52,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
......
......@@ -48,6 +48,8 @@ required:
- '#reset-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
......
......@@ -107,6 +107,8 @@ required:
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
vpu: vpu@d0100000 {
......
......@@ -43,6 +43,8 @@ required:
- interrupts
- '#dma-cells'
additionalProperties: false
examples:
- |
dma@3000000 {
......
......@@ -68,6 +68,8 @@ required:
- mbox-names
- memory-region
additionalProperties: false
examples:
- |
#include <dt-bindings/firmware/imx/rsrc.h>
......
......@@ -172,6 +172,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -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>;
};
...
......@@ -47,6 +47,8 @@ required:
- "#gpio-cells"
- gpio-controller
additionalProperties: false
dependencies:
interrupt-controller: [ interrupts ]
......
......@@ -49,6 +49,8 @@ required:
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
logicvc: logicvc@43c00000 {
......
......@@ -53,6 +53,8 @@ required:
- interrupt-names
- clocks
additionalProperties: false
allOf:
- if:
properties:
......
......@@ -94,6 +94,8 @@ required:
- interrupt-names
- clocks
additionalProperties: false
allOf:
- if:
properties:
......
......@@ -115,6 +115,8 @@ required:
- clocks
- clock-names
additionalProperties: false
allOf:
- if:
properties:
......
......@@ -36,6 +36,8 @@ required:
- clocks
- clock-names
additionalProperties: false
examples:
- |
rotator@12810000 {
......
......@@ -47,6 +47,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -87,6 +87,8 @@ required:
- reg
additionalProperties: false
examples:
- |
spi {
......
......@@ -32,6 +32,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -76,6 +76,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -36,6 +36,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -67,6 +67,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -53,6 +53,8 @@ required:
- dout-gpios
- avdd-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -32,6 +32,8 @@ required:
- vref-supply
- reg
additionalProperties: false
examples:
- |
spi {
......
......@@ -52,6 +52,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
spi {
......
......@@ -69,6 +69,8 @@ required:
- "#address-cells"
- "#size-cells"
additionalProperties: false
patternProperties:
"^filter@[0-9]+$":
type: object
......
......@@ -38,6 +38,8 @@ required:
- compatible
- vcc-supply
additionalProperties: false
examples:
- |
serial {
......
......@@ -24,6 +24,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -34,6 +34,8 @@ required:
- reg
- vref-supply
additionalProperties: false
examples:
- |
spi {
......
......@@ -28,6 +28,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -28,6 +28,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -38,6 +38,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -29,6 +29,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -30,6 +30,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -32,6 +32,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
......
......@@ -62,6 +62,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -45,6 +45,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -33,6 +33,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -52,6 +52,8 @@ required:
- vddd-supply
- vdda-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -56,6 +56,8 @@ required:
- trig-gpios
- echo-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -42,6 +42,8 @@ required:
- compatible
- ping-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -398,6 +398,8 @@ required:
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -26,6 +26,8 @@ required:
- compatible
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -33,3 +33,6 @@ properties:
required:
- compatible
additionalProperties: false
...
......@@ -44,6 +44,8 @@ required:
- interrupt-controller
- '#interrupt-cells'
additionalProperties: false
examples:
- |
intcon: interrupt-controller@c8003000 {
......
......@@ -80,6 +80,8 @@ required:
- clock-names
- "#iommu-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos5250.h>
......
......@@ -49,3 +49,6 @@ required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
...
......@@ -50,3 +50,6 @@ patternProperties:
required:
- compatible
additionalProperties: false
...
......@@ -41,6 +41,8 @@ required:
- interrupts
- "#mbox-cells"
additionalProperties: false
examples:
- |
mailbox@c883c404 {
......
......@@ -124,6 +124,8 @@ required:
- amlogic,ao-sysctrl
- amlogic,canvas
additionalProperties: false
examples:
- |
vdec: video-decoder@c8820000 {
......
......@@ -82,6 +82,8 @@ required:
- clocks
- clock-names
additionalProperties: false
examples:
- |
cec_AO: cec@100 {
......
......@@ -59,6 +59,8 @@ required:
- interrupts
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
......
......@@ -73,6 +73,8 @@ required:
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -77,6 +77,8 @@ required:
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -38,6 +38,8 @@ required:
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -167,6 +167,8 @@ required:
- '#address-cells'
- '#size-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
......
......@@ -34,6 +34,8 @@ required:
- resets
- "#phy-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/sun50i-h6-ccu.h>
......
......@@ -44,6 +44,8 @@ required:
- reset-names
- "#phy-cells"
additionalProperties: false
examples:
- |
phy@46000 {
......
......@@ -40,6 +40,8 @@ required:
- reg
- clocks
additionalProperties: false
examples:
- |
sysconf: chiptop@e0200000 {
......
......@@ -31,6 +31,8 @@ required:
- reset-gpios
- "#phy-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
......
......@@ -159,6 +159,8 @@ required:
- "#reset-cells"
- ranges
additionalProperties: false
examples:
- |
#include <dt-bindings/soc/ti,sci_pm_domain.h>
......
......@@ -57,6 +57,8 @@ patternProperties:
required:
- compatible
additionalProperties: false
examples:
- |
syscon: scu@1e6e2000 {
......
......@@ -70,6 +70,8 @@ required:
- compatible
- aspeed,external-nodes
additionalProperties: false
examples:
- |
apb {
......
......@@ -92,6 +92,8 @@ patternProperties:
required:
- compatible
additionalProperties: false
examples:
- |
syscon: scu@1e6e2000 {
......
......@@ -194,6 +194,8 @@ required:
- ranges
- pins-are-numbered
additionalProperties: false
examples:
- |
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
......
......@@ -68,6 +68,8 @@ required:
- "#power-domain-cells"
- amlogic,ao-sysctrl
additionalProperties: false
examples:
- |
pwrc: power-controller {
......
......@@ -41,6 +41,8 @@ required:
- regmap
- offset
additionalProperties: false
allOf:
- if:
not:
......
......@@ -41,6 +41,8 @@ required:
- regmap
- offset
additionalProperties: false
allOf:
- if:
not:
......
......@@ -32,3 +32,6 @@ properties:
required:
- compatible
additionalProperties: false
...
......@@ -55,6 +55,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c@1 {
......
......@@ -29,3 +29,6 @@ patternProperties:
required:
- compatible
additionalProperties: false
...
......@@ -29,6 +29,8 @@ required:
- reg
- "#reset-cells"
additionalProperties: false
examples:
- |
reset-controller@c884404 {
......
......@@ -28,6 +28,8 @@ required:
- reg
- "#reset-cells"
additionalProperties: false
examples:
- |
reset-controller@8b2c800 {
......
......@@ -29,6 +29,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
rng@c8834000 {
......
......@@ -35,6 +35,8 @@ required:
- compatible
- reg
additionalProperties: false
examples:
- |
rng {
......
......@@ -51,6 +51,8 @@ required:
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/r7s72100-clock.h>
......
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