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

dt-bindings: Explicitly allow additional properties in common schemas

In order to add meta-schema checks for additional/unevaluatedProperties
being present, all schema need to make this explicit. As common/shared
schema are included by other schemas, they should always allow for
additionalProperties.
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarSebastian Reichel <sre@kernel.org>
Acked-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Acked-By: default avatarVinod Koul <vkoul@kernel.org>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20201005183830.486085-5-robh@kernel.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent 4828556d
...@@ -341,6 +341,8 @@ required: ...@@ -341,6 +341,8 @@ required:
dependencies: dependencies:
rockchip,pmu: [enable-method] rockchip,pmu: [enable-method]
additionalProperties: true
examples: examples:
- | - |
cpus { cpus {
......
...@@ -30,6 +30,8 @@ properties: ...@@ -30,6 +30,8 @@ properties:
Specifies the bpmp node that needs to be queried to get Specifies the bpmp node that needs to be queried to get
operating point data for all CPUs. operating point data for all CPUs.
additionalProperties: true
examples: examples:
- | - |
cpus { cpus {
......
...@@ -47,4 +47,6 @@ patternProperties: ...@@ -47,4 +47,6 @@ patternProperties:
The ID number of the drive port, 0 for the master port and 1 for the The ID number of the drive port, 0 for the master port and 1 for the
slave port. slave port.
additionalProperties: true
... ...
...@@ -47,4 +47,6 @@ patternProperties: ...@@ -47,4 +47,6 @@ patternProperties:
multiplier making it possible to connect up to 15 disks to a single multiplier making it possible to connect up to 15 disks to a single
SATA port. SATA port.
additionalProperties: true
... ...
...@@ -61,6 +61,8 @@ anyOf: ...@@ -61,6 +61,8 @@ anyOf:
- required: - required:
- power-domains - power-domains
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/clock/qcom,gcc-msm8996.h> #include <dt-bindings/clock/qcom,gcc-msm8996.h>
......
...@@ -26,6 +26,8 @@ properties: ...@@ -26,6 +26,8 @@ properties:
required: required:
- compatible - compatible
additionalProperties: true #fixme
examples: examples:
- |+ - |+
spi0 { spi0 {
......
...@@ -172,6 +172,8 @@ allOf: ...@@ -172,6 +172,8 @@ allOf:
type: type:
const: micro const: micro
additionalProperties: true
examples: examples:
# Micro-USB connector with HS lines routed via controller (MUIC). # Micro-USB connector with HS lines routed via controller (MUIC).
- | - |
......
...@@ -66,3 +66,5 @@ required: ...@@ -66,3 +66,5 @@ required:
- clocks - clocks
- ports - ports
- reg - reg
additionalProperties: true
...@@ -73,6 +73,8 @@ patternProperties: ...@@ -73,6 +73,8 @@ patternProperties:
required: required:
- reg - reg
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
......
...@@ -112,4 +112,6 @@ oneOf: ...@@ -112,4 +112,6 @@ oneOf:
- required: - required:
- ports - ports
additionalProperties: true
... ...
...@@ -163,4 +163,6 @@ dependencies: ...@@ -163,4 +163,6 @@ dependencies:
width-mm: [ height-mm ] width-mm: [ height-mm ]
height-mm: [ width-mm ] height-mm: [ width-mm ]
additionalProperties: true
... ...
...@@ -49,3 +49,5 @@ properties: ...@@ -49,3 +49,5 @@ properties:
required: required:
- "#dma-cells" - "#dma-cells"
additionalProperties: true
...@@ -17,6 +17,8 @@ properties: ...@@ -17,6 +17,8 @@ properties:
$nodename: $nodename:
pattern: "^dma-controller(@.*)?$" pattern: "^dma-controller(@.*)?$"
additionalProperties: true
examples: examples:
- | - |
dma: dma-controller@48000000 { dma: dma-controller@48000000 {
......
...@@ -36,6 +36,8 @@ required: ...@@ -36,6 +36,8 @@ required:
- "#dma-cells" - "#dma-cells"
- dma-masters - dma-masters
additionalProperties: true
examples: examples:
- | - |
sdma_xbar: dma-router@4a002b78 { sdma_xbar: dma-router@4a002b78 {
......
...@@ -123,3 +123,5 @@ properties: ...@@ -123,3 +123,5 @@ properties:
$ref: "/schemas/types.yaml#/definitions/uint32" $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0 minimum: 0
maximum: 3 maximum: 3
additionalProperties: true
...@@ -46,6 +46,8 @@ properties: ...@@ -46,6 +46,8 @@ properties:
"#io-channel-cells": "#io-channel-cells":
const: 1 const: 1
io-channel-ranges: true
vdd-supply: true vdd-supply: true
samsung,syscon-phandle: samsung,syscon-phandle:
...@@ -68,6 +70,9 @@ required: ...@@ -68,6 +70,9 @@ required:
- "#io-channel-cells" - "#io-channel-cells"
- vdd-supply - vdd-supply
additionalProperties:
type: object
allOf: allOf:
- if: - if:
properties: properties:
......
...@@ -32,4 +32,6 @@ properties: ...@@ -32,4 +32,6 @@ properties:
considered 'near' to the device (an object is near to the considered 'near' to the device (an object is near to the
sensor). sensor).
additionalProperties: true
... ...
...@@ -33,3 +33,5 @@ properties: ...@@ -33,3 +33,5 @@ properties:
power off automatically. Device with key pressed shutdown feature can power off automatically. Device with key pressed shutdown feature can
specify this property. specify this property.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
additionalProperties: true
...@@ -35,6 +35,8 @@ properties: ...@@ -35,6 +35,8 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
description: Number of column lines connected to the keypad controller. description: Number of column lines connected to the keypad controller.
additionalProperties: true
examples: examples:
- | - |
keypad { keypad {
......
...@@ -81,3 +81,5 @@ dependencies: ...@@ -81,3 +81,5 @@ dependencies:
touchscreen-size-y: [ touchscreen-size-x ] touchscreen-size-y: [ touchscreen-size-x ]
touchscreen-x-mm: [ touchscreen-y-mm ] touchscreen-x-mm: [ touchscreen-y-mm ]
touchscreen-y-mm: [ touchscreen-x-mm ] touchscreen-y-mm: [ touchscreen-x-mm ]
additionalProperties: true
...@@ -156,6 +156,8 @@ properties: ...@@ -156,6 +156,8 @@ properties:
Maximum timeout in microseconds after which the flash LED is turned off. Maximum timeout in microseconds after which the flash LED is turned off.
Required for flash LED nodes with configurable timeout. Required for flash LED nodes with configurable timeout.
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
......
...@@ -34,4 +34,7 @@ patternProperties: ...@@ -34,4 +34,7 @@ patternProperties:
required: required:
- color - color
additionalProperties: true
... ...
...@@ -21,4 +21,6 @@ properties: ...@@ -21,4 +21,6 @@ properties:
trigger sources (e.g. a specific USB port). trigger sources (e.g. a specific USB port).
enum: [ 0, 1 ] enum: [ 0, 1 ]
additionalProperties: true
... ...
...@@ -150,3 +150,5 @@ properties: ...@@ -150,3 +150,5 @@ properties:
- rc-x96max - rc-x96max
- rc-xbox-dvd - rc-xbox-dvd
- rc-zx-irdec - rc-zx-irdec
additionalProperties: true
...@@ -71,7 +71,7 @@ required: ...@@ -71,7 +71,7 @@ required:
- compatible - compatible
- reg - reg
unevaluatedProperties: false additionalProperties: true
examples: examples:
- | - |
......
...@@ -349,6 +349,8 @@ dependencies: ...@@ -349,6 +349,8 @@ dependencies:
cd-debounce-delay-ms: [ cd-gpios ] cd-debounce-delay-ms: [ cd-gpios ]
fixed-emmc-driver-type: [ non-removable ] fixed-emmc-driver-type: [ non-removable ]
additionalProperties: true
examples: examples:
- | - |
mmc@ab000000 { mmc@ab000000 {
......
...@@ -62,3 +62,5 @@ properties: ...@@ -62,3 +62,5 @@ properties:
dma-names: dma-names:
const: rx-tx const: rx-tx
additionalProperties: true
...@@ -128,6 +128,8 @@ required: ...@@ -128,6 +128,8 @@ required:
- "#address-cells" - "#address-cells"
- "#size-cells" - "#size-cells"
additionalProperties: true
examples: examples:
- | - |
nand-controller { nand-controller {
......
...@@ -16,3 +16,5 @@ properties: ...@@ -16,3 +16,5 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
description: a positive non 0 value that determines the max speed that CAN/CAN-FD can run. description: a positive non 0 value that determines the max speed that CAN/CAN-FD can run.
minimum: 1 minimum: 1
additionalProperties: true
...@@ -89,4 +89,6 @@ oneOf: ...@@ -89,4 +89,6 @@ oneOf:
- required: - required:
- ethernet-ports - ethernet-ports
additionalProperties: true
... ...
...@@ -205,4 +205,6 @@ properties: ...@@ -205,4 +205,6 @@ properties:
required: required:
- speed - speed
additionalProperties: true
... ...
...@@ -177,6 +177,8 @@ properties: ...@@ -177,6 +177,8 @@ properties:
required: required:
- reg - reg
additionalProperties: true
examples: examples:
- | - |
ethernet { ethernet {
......
...@@ -100,6 +100,8 @@ patternProperties: ...@@ -100,6 +100,8 @@ patternProperties:
required: required:
- reg - reg
additionalProperties: true
examples: examples:
- | - |
davinci_mdio: mdio@5c030000 { davinci_mdio: mdio@5c030000 {
......
...@@ -356,6 +356,8 @@ allOf: ...@@ -356,6 +356,8 @@ allOf:
Enables the TSO feature otherwise it will be managed by Enables the TSO feature otherwise it will be managed by
MAC HW capability register. MAC HW capability register.
additionalProperties: true
examples: examples:
- | - |
stmmac_axi_setup: stmmac-axi-config { stmmac_axi_setup: stmmac-axi-config {
......
...@@ -36,6 +36,8 @@ dependencies: ...@@ -36,6 +36,8 @@ dependencies:
nvmem-names: [ nvmem ] nvmem-names: [ nvmem ]
nvmem-cell-names: [ nvmem-cells ] nvmem-cell-names: [ nvmem-cells ]
additionalProperties: true
examples: examples:
- | - |
tsens { tsens {
......
...@@ -67,6 +67,8 @@ patternProperties: ...@@ -67,6 +67,8 @@ patternProperties:
required: required:
- reg - reg
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
......
...@@ -22,3 +22,5 @@ properties: ...@@ -22,3 +22,5 @@ properties:
required: required:
- cdns,max-outbound-regions - cdns,max-outbound-regions
additionalProperties: true
...@@ -33,3 +33,5 @@ properties: ...@@ -33,3 +33,5 @@ properties:
deprecated: true deprecated: true
msi-parent: true msi-parent: true
additionalProperties: true
...@@ -21,3 +21,5 @@ properties: ...@@ -21,3 +21,5 @@ properties:
items: items:
- const: pcie-phy - const: pcie-phy
# FIXME: names when more than 1 # FIXME: names when more than 1
additionalProperties: true
...@@ -36,3 +36,5 @@ properties: ...@@ -36,3 +36,5 @@ properties:
required: required:
- compatible - compatible
additionalProperties: true
...@@ -120,3 +120,5 @@ properties: ...@@ -120,3 +120,5 @@ properties:
required: required:
- pinctrl-0 - pinctrl-0
- pinctrl-names - pinctrl-names
additionalProperties: true
...@@ -138,3 +138,5 @@ properties: ...@@ -138,3 +138,5 @@ properties:
and the delay before latching a value to an output and the delay before latching a value to an output
pin. Typically indicates how many double-inverters are pin. Typically indicates how many double-inverters are
used to delay the signal. used to delay the signal.
additionalProperties: true
...@@ -129,3 +129,5 @@ properties: ...@@ -129,3 +129,5 @@ properties:
pinctrl-pin-array: pinctrl-pin-array:
$ref: /schemas/types.yaml#/definitions/uint32-array $ref: /schemas/types.yaml#/definitions/uint32-array
additionalProperties: true
...@@ -69,6 +69,8 @@ properties: ...@@ -69,6 +69,8 @@ properties:
required: required:
- "#power-domain-cells" - "#power-domain-cells"
additionalProperties: true
examples: examples:
- | - |
power: power-controller@12340000 { power: power-controller@12340000 {
......
...@@ -16,6 +16,8 @@ properties: ...@@ -16,6 +16,8 @@ properties:
This property is added to a supply in order to list the devices which This property is added to a supply in order to list the devices which
supply it power, referenced by their phandles. supply it power, referenced by their phandles.
additionalProperties: true
examples: examples:
- | - |
power { power {
......
...@@ -20,6 +20,8 @@ properties: ...@@ -20,6 +20,8 @@ properties:
required: required:
- "#pwm-cells" - "#pwm-cells"
additionalProperties: true
examples: examples:
- | - |
pwm: pwm@7000a000 { pwm: pwm@7000a000 {
......
...@@ -188,6 +188,8 @@ patternProperties: ...@@ -188,6 +188,8 @@ patternProperties:
additionalProperties: false additionalProperties: false
additionalProperties: true
examples: examples:
- | - |
xyzreg: regulator { xyzreg: regulator {
......
...@@ -35,3 +35,5 @@ properties: ...@@ -35,3 +35,5 @@ properties:
Initial data for the MICVDD regulator. Initial data for the MICVDD regulator.
$ref: "regulator.yaml#" $ref: "regulator.yaml#"
type: object type: object
additionalProperties: true
...@@ -91,6 +91,8 @@ required: ...@@ -91,6 +91,8 @@ required:
- riscv,isa - riscv,isa
- interrupt-controller - interrupt-controller
additionalProperties: true
examples: examples:
- | - |
// Example 1: SiFive Freedom U540G Development Kit // Example 1: SiFive Freedom U540G Development Kit
......
...@@ -47,4 +47,6 @@ properties: ...@@ -47,4 +47,6 @@ properties:
description: description:
Enables wake up of host system on alarm. Enables wake up of host system on alarm.
additionalProperties: true
... ...
...@@ -45,4 +45,7 @@ properties: ...@@ -45,4 +45,7 @@ properties:
rs485-term-gpios: rs485-term-gpios:
description: GPIO pin to enable RS485 bus termination. description: GPIO pin to enable RS485 bus termination.
maxItems: 1 maxItems: 1
additionalProperties: true
... ...
...@@ -124,6 +124,8 @@ patternProperties: ...@@ -124,6 +124,8 @@ patternProperties:
required: required:
- compatible - compatible
additionalProperties: true
examples: examples:
- | - |
serial@1234 { serial@1234 {
......
...@@ -35,6 +35,8 @@ required: ...@@ -35,6 +35,8 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: true
examples: examples:
- | - |
bus@30000000 { bus@30000000 {
......
...@@ -75,6 +75,8 @@ required: ...@@ -75,6 +75,8 @@ required:
- reg - reg
- resets - resets
additionalProperties: false
examples: examples:
- | - |
#include <dt-bindings/clock/gxbb-clkc.h> #include <dt-bindings/clock/gxbb-clkc.h>
......
...@@ -111,3 +111,5 @@ properties: ...@@ -111,3 +111,5 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32-array $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2 minItems: 2
maxItems: 2 maxItems: 2
additionalProperties: true
...@@ -67,6 +67,9 @@ required: ...@@ -67,6 +67,9 @@ required:
- "#size-cells" - "#size-cells"
- ranges - ranges
additionalProperties:
type: object
examples: examples:
- | - |
#include<dt-bindings/clock/tegra210-car.h> #include<dt-bindings/clock/tegra210-car.h>
......
...@@ -112,3 +112,5 @@ properties: ...@@ -112,3 +112,5 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32-array $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1 minItems: 1
maxItems: 12 maxItems: 12
additionalProperties: true
...@@ -57,6 +57,8 @@ required: ...@@ -57,6 +57,8 @@ required:
- "#address-cells" - "#address-cells"
- "#size-cells" - "#size-cells"
additionalProperties: true
examples: examples:
- | - |
soundwire@c2d0000 { soundwire@c2d0000 {
......
...@@ -140,6 +140,8 @@ patternProperties: ...@@ -140,6 +140,8 @@ patternProperties:
- compatible - compatible
- reg - reg
additionalProperties: true
examples: examples:
- | - |
spi@f00 { spi@f00 {
......
...@@ -55,6 +55,8 @@ patternProperties: ...@@ -55,6 +55,8 @@ patternProperties:
required: required:
- reg - reg
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/spmi/spmi.h> #include <dt-bindings/spmi/spmi.h>
......
...@@ -49,6 +49,8 @@ properties: ...@@ -49,6 +49,8 @@ properties:
and the second cell is the maximum cooling state requested. and the second cell is the maximum cooling state requested.
const: 2 const: 2
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
......
...@@ -36,6 +36,8 @@ properties: ...@@ -36,6 +36,8 @@ properties:
containing several internal sensors. containing several internal sensors.
enum: [0, 1] enum: [0, 1]
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
......
...@@ -32,6 +32,8 @@ required: ...@@ -32,6 +32,8 @@ required:
- interrupts - interrupts
- interrupt-names - interrupt-names
additionalProperties: true
examples: examples:
- | - |
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
......
...@@ -22,6 +22,8 @@ properties: ...@@ -22,6 +22,8 @@ properties:
description: description:
Name specifier for the USB PHY Name specifier for the USB PHY
additionalProperties: true
examples: examples:
- | - |
usb { usb {
......
...@@ -23,4 +23,6 @@ properties: ...@@ -23,4 +23,6 @@ properties:
description: description:
Contains the watchdog timeout in seconds. Contains the watchdog timeout in seconds.
additionalProperties: true
... ...
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