Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Add missing (unevaluated|additional)Properties on child node schemas

Just as unevaluatedProperties or additionalProperties are required at
the top level of schemas, they should (and will) also be required for
child node schemas. That ensures only documented properties are
present.

Add unevaluatedProperties or additionalProperties as appropriate, and
then add any missing properties flagged by the addition.

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230124230228.372305-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

+63 -8
+1
Documentation/devicetree/bindings/arm/arm,vexpress-juno.yaml
··· 144 144 it is stricter and always has two compatibles. 145 145 type: object 146 146 $ref: '/schemas/simple-bus.yaml' 147 + unevaluatedProperties: false 147 148 148 149 properties: 149 150 compatible:
+3 -2
Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
··· 30 30 31 31 clocks: 32 32 type: object 33 + additionalProperties: false 33 34 34 35 properties: 35 36 compatible: ··· 48 47 49 48 reset: 50 49 type: object 50 + additionalProperties: false 51 51 52 52 properties: 53 53 compatible: ··· 65 63 66 64 pwm: 67 65 type: object 66 + additionalProperties: false 68 67 69 68 properties: 70 69 compatible: ··· 78 75 required: 79 76 - compatible 80 77 - "#pwm-cells" 81 - 82 - additionalProperties: false 83 78 84 79 required: 85 80 - compatible
+4
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml
··· 234 234 patternProperties: 235 235 "^[a-z0-9]+$": 236 236 type: object 237 + additionalProperties: false 237 238 238 239 properties: 239 240 clocks: ··· 252 251 Must contain an entry for each reset required by the PMC 253 252 for controlling a power-gate. 254 253 See ../reset/reset.txt for more details. 254 + 255 + power-domains: 256 + maxItems: 1 255 257 256 258 '#power-domain-cells': 257 259 const: 0
+1
Documentation/devicetree/bindings/bus/allwinner,sun50i-a64-de2.yaml
··· 46 46 # All other properties should be child nodes with unit-address and 'reg' 47 47 "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$": 48 48 type: object 49 + additionalProperties: true 49 50 properties: 50 51 reg: 51 52 maxItems: 1
+1
Documentation/devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml
··· 45 45 patternProperties: 46 46 "^.*@[0-9a-fA-F]+$": 47 47 type: object 48 + additionalProperties: true 48 49 properties: 49 50 reg: 50 51 maxItems: 1
+1
Documentation/devicetree/bindings/bus/palmbus.yaml
··· 36 36 # All other properties should be child nodes with unit-address and 'reg' 37 37 "@[0-9a-f]+$": 38 38 type: object 39 + additionalProperties: true 39 40 properties: 40 41 reg: 41 42 maxItems: 1
+4
Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
··· 101 101 patternProperties: 102 102 "^display-controller@[1-9a-f][0-9a-f]*$": 103 103 type: object 104 + additionalProperties: true 104 105 properties: 105 106 compatible: 106 107 contains: ··· 109 108 110 109 "^dsi@[1-9a-f][0-9a-f]*$": 111 110 type: object 111 + additionalProperties: true 112 112 properties: 113 113 compatible: 114 114 contains: ··· 117 115 118 116 "^phy@[1-9a-f][0-9a-f]*$": 119 117 type: object 118 + additionalProperties: true 120 119 properties: 121 120 compatible: 122 121 enum: ··· 135 132 136 133 "^hdmi-tx@[1-9a-f][0-9a-f]*$": 137 134 type: object 135 + additionalProperties: true 138 136 properties: 139 137 compatible: 140 138 enum:
+2
Documentation/devicetree/bindings/example-schema.yaml
··· 176 176 description: Child nodes are just another property from a json-schema 177 177 perspective. 178 178 type: object # DT nodes are json objects 179 + # Child nodes also need additionalProperties or unevaluatedProperties 180 + additionalProperties: false 179 181 properties: 180 182 vendor,a-child-node-property: 181 183 description: Child node properties have all the same schema
+1
Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
··· 35 35 patternProperties: 36 36 "^.*-pins?$": 37 37 $ref: /schemas/pinctrl/pinmux-node.yaml# 38 + additionalProperties: false 38 39 39 40 properties: 40 41 pins:
+1
Documentation/devicetree/bindings/hwmon/adi,ltc2992.yaml
··· 32 32 patternProperties: 33 33 "^channel@([0-1])$": 34 34 type: object 35 + additionalProperties: false 35 36 description: | 36 37 Represents the two supplies to be monitored. 37 38
+1
Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
··· 66 66 patternProperties: 67 67 '^interconnect-[a-z0-9]+$': 68 68 type: object 69 + additionalProperties: false 69 70 description: 70 71 snoc-mm is a child of snoc, sharing snoc's register address space. 71 72
+2
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
··· 133 133 134 134 ppi-partitions: 135 135 type: object 136 + additionalProperties: false 136 137 description: 137 138 PPI affinity can be expressed as a single "ppi-partitions" node, 138 139 containing a set of sub-nodes. 139 140 patternProperties: 140 141 "^interrupt-partition-[0-9]+$": 141 142 type: object 143 + additionalProperties: false 142 144 properties: 143 145 affinity: 144 146 $ref: /schemas/types.yaml#/definitions/phandle-array
+1
Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
··· 72 72 '^mailbox@[0-9a-f]+$': 73 73 description: Internal ipi mailbox node 74 74 type: object # DT nodes are json objects 75 + additionalProperties: false 75 76 properties: 76 77 xlnx,ipi-id: 77 78 description:
+7
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
··· 156 156 patternProperties: 157 157 "^i2c@[0-3]$": 158 158 type: object 159 + additionalProperties: false 159 160 description: | 160 161 Child node of the i2c bus multiplexer which represents a GMSL link. 161 162 Each serializer device on the GMSL link remote end is represented with ··· 167 166 reg: 168 167 description: The index of the GMSL channel. 169 168 maxItems: 1 169 + 170 + '#address-cells': 171 + const: 1 172 + 173 + '#size-cells': 174 + const: 0 170 175 171 176 patternProperties: 172 177 "^camera@[a-f0-9]+$":
+1
Documentation/devicetree/bindings/memory-controllers/arm,pl35x-smc.yaml
··· 73 73 patternProperties: 74 74 "@[0-7],[a-f0-9]+$": 75 75 type: object 76 + additionalProperties: true 76 77 description: | 77 78 The child device node represents the controller connected to the SMC 78 79 bus. The controller can be a NAND controller or a pair of any memory
+1
Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml
··· 38 38 patternProperties: 39 39 "^.*@[0-3],[a-f0-9]+$": 40 40 type: object 41 + additionalProperties: true 41 42 description: 42 43 The actual device nodes should be added as subnodes to the SROMc node. 43 44 These subnodes, in addition to regular device specification, should
+1
Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion-bus-controller.yaml
··· 57 57 subnodes. 58 58 type: object 59 59 $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml# 60 + additionalProperties: true 60 61 61 62 required: 62 63 - compatible
+1
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.yaml
··· 50 50 patternProperties: 51 51 "^emc-timings-[0-9]+$": 52 52 type: object 53 + additionalProperties: false 53 54 properties: 54 55 nvidia,ram-code: 55 56 $ref: /schemas/types.yaml#/definitions/uint32
+1
Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi.yaml
··· 47 47 48 48 patternProperties: 49 49 "^.*@[0-4],[a-f0-9]+$": 50 + additionalProperties: true 50 51 type: object 51 52 $ref: mc-peripheral-props.yaml# 52 53
+1
Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
··· 46 46 rtc: 47 47 type: object 48 48 $ref: /schemas/rtc/rtc.yaml# 49 + unevaluatedProperties: false 49 50 description: 50 51 MT6357 Real Time Clock. 51 52 properties:
+2
Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
··· 35 35 36 36 adc: 37 37 type: object 38 + additionalProperties: false 38 39 description: | 39 40 Provides 9 channels for system monitoring, including VBUSDIV5 (lower 40 41 accuracy, higher measure range), VBUSDIV2 (higher accuracy, lower ··· 74 73 75 74 regulators: 76 75 type: object 76 + additionalProperties: false 77 77 description: | 78 78 List all supported regulators, which support the control for DisplayBias 79 79 voltages and one general purpose LDO which commonly used to drive the
+1
Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
··· 42 42 "^sdhci@[0-9a-f]+$": 43 43 type: object 44 44 $ref: mmc-controller.yaml 45 + unevaluatedProperties: false 45 46 46 47 properties: 47 48 compatible:
+1
Documentation/devicetree/bindings/mtd/mtd.yaml
··· 44 44 45 45 "^otp(-[0-9]+)?$": 46 46 $ref: ../nvmem/nvmem.yaml# 47 + unevaluatedProperties: false 47 48 48 49 description: | 49 50 An OTP memory region. Some flashes provide a one-time-programmable
+1
Documentation/devicetree/bindings/power/supply/ti,lp8727.yaml
··· 28 28 patternProperties: 29 29 '^(ac|usb)$': 30 30 type: object 31 + additionalProperties: false 31 32 description: USB/AC charging parameters 32 33 properties: 33 34 charger-type:
+2
Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
··· 157 157 158 158 mba: 159 159 type: object 160 + additionalProperties: false 160 161 description: 161 162 MBA reserved region (prefer using memory-region with two items) 162 163 properties: ··· 168 167 169 168 mpss: 170 169 type: object 170 + additionalProperties: false 171 171 description: 172 172 MPSS reserved region (prefer using memory-region with two items) 173 173 properties:
+2 -1
Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
··· 38 38 39 39 patternProperties: 40 40 "power-domain@[0-9a-f]+$": 41 - 42 41 type: object 42 + additionalProperties: false 43 + 43 44 properties: 44 45 compatible: 45 46 items:
+1
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
··· 54 54 "^timer@[0-2]$": 55 55 description: The timer block channels that are used as timers or counters. 56 56 type: object 57 + additionalProperties: false 57 58 properties: 58 59 compatible: 59 60 items:
+1
Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
··· 130 130 PRU-ICSS configuration space. CFG sub-module represented as a SysCon. 131 131 132 132 type: object 133 + additionalProperties: false 133 134 134 135 properties: 135 136 compatible:
+1
Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml
··· 60 60 properties: 61 61 endpoint: 62 62 type: object 63 + additionalProperties: true 63 64 64 65 properties: 65 66 dai-format:
+1
Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
··· 134 134 patternProperties: 135 135 "^.*@[0-9a-f]+$": 136 136 type: object 137 + additionalProperties: true 137 138 description: | 138 139 WCD934x subnode for each slave devices. Bindings of each subnodes 139 140 depends on the specific driver providing the functionality and
+2
Documentation/devicetree/bindings/sound/samsung,odroid.yaml
··· 35 35 36 36 cpu: 37 37 type: object 38 + additionalProperties: false 38 39 properties: 39 40 sound-dai: 40 41 description: phandles to the I2S controllers 41 42 42 43 codec: 43 44 type: object 45 + additionalProperties: false 44 46 properties: 45 47 sound-dai: 46 48 minItems: 1
+1
Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml
··· 200 200 patternProperties: 201 201 "^.*@[0-9a-f],[0-9a-f]$": 202 202 type: object 203 + additionalProperties: true 203 204 description: 204 205 Child nodes for a standalone audio codec or speaker amplifier IC. 205 206 It has RX and TX Soundwire secondary devices.
+1
Documentation/devicetree/bindings/spi/allwinner,sun4i-a10-spi.yaml
··· 51 51 patternProperties: 52 52 "^.*@[0-9a-f]+": 53 53 type: object 54 + additionalProperties: true 54 55 properties: 55 56 reg: 56 57 items:
+1
Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
··· 63 63 patternProperties: 64 64 "^.*@[0-9a-f]+": 65 65 type: object 66 + additionalProperties: true 66 67 properties: 67 68 reg: 68 69 items:
+1
Documentation/devicetree/bindings/spi/spi-controller.yaml
··· 94 94 "^.*@[0-9a-f]+$": 95 95 type: object 96 96 $ref: spi-peripheral-props.yaml 97 + additionalProperties: true 97 98 98 99 properties: 99 100 spi-3wire:
+5 -5
Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
··· 57 57 58 58 patternProperties: 59 59 "^sram@[a-z0-9]+": 60 - type: object 61 - 62 - properties: 63 - compatible: 64 - const: mmio-sram 60 + $ref: /schemas/sram/sram.yaml# 61 + unevaluatedProperties: false 65 62 66 63 patternProperties: 67 64 "^sram-section?@[a-f0-9]+$": 68 65 type: object 66 + additionalProperties: false 69 67 70 68 properties: 69 + reg: true 70 + 71 71 compatible: 72 72 oneOf: 73 73 - const: allwinner,sun4i-a10-sram-a3-a4
+1
Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
··· 61 61 patternProperties: 62 62 "-sram@[0-9a-f]+$": 63 63 type: object 64 + additionalProperties: false 64 65 description: A region of reserved memory. 65 66 66 67 properties:
+1
Documentation/devicetree/bindings/thermal/thermal-zones.yaml
··· 171 171 172 172 cooling-maps: 173 173 type: object 174 + additionalProperties: false 174 175 description: 175 176 This node describes the action to be taken when a thermal zone 176 177 crosses one of the temperature thresholds described in the trips
+1
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
··· 121 121 patternProperties: 122 122 "^usb@[0-9a-f]+$": 123 123 $ref: snps,dwc3.yaml# 124 + unevaluatedProperties: false 124 125 125 126 properties: 126 127 wakeup-source: false