dt-bindings: Fix properties without any type
authorRob Herring <robh@kernel.org>
Thu, 19 May 2022 21:14:11 +0000 (16:14 -0500)
committerRob Herring <robh@kernel.org>
Mon, 23 May 2022 16:53:30 +0000 (11:53 -0500)
Now that the schema tools can extract type information for all
properties (in order to decode dtb files), finding properties missing
any type definition is fairly trivial though not yet automated.

Fix the various property schemas which are missing a type. Most of these
tend to be device specific properties which don't have a vendor prefix.
A vendor prefix is how we normally ensure a type is defined.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org> # for everything in .../bindings/display/
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220519211411.2200720-1-robh@kernel.org
24 files changed:
Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
Documentation/devicetree/bindings/display/panel/panel-timing.yaml
Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml
Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.yaml
Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
Documentation/devicetree/bindings/media/i2c/adv7604.yaml
Documentation/devicetree/bindings/mux/reg-mux.yaml
Documentation/devicetree/bindings/net/cdns,macb.yaml
Documentation/devicetree/bindings/net/ingenic,mac.yaml
Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml
Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
Documentation/devicetree/bindings/pinctrl/canaan,k210-fpioa.yaml
Documentation/devicetree/bindings/power/avs/qcom,cpr.yaml
Documentation/devicetree/bindings/power/supply/battery.yaml
Documentation/devicetree/bindings/power/supply/charger-manager.yaml
Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
Documentation/devicetree/bindings/serial/8250.yaml
Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
Documentation/devicetree/bindings/sound/imx-audio-hdmi.yaml
Documentation/devicetree/bindings/usb/smsc,usb3503.yaml

index 7378159e61df99892659443ab6eeda6f77140d15..483caf0ce25b908fd64d728036d990c94f80f90c 100644 (file)
@@ -17,14 +17,15 @@ properties:
       - const: hisilicon,hip04-bootwrapper
 
   boot-method:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
     description: |
       Address and size of boot method.
       [0]: bootwrapper physical address
       [1]: bootwrapper size
       [2]: relocation physical address
       [3]: relocation size
-    minItems: 1
-    maxItems: 2
+    minItems: 2
+    maxItems: 4
 
 required:
   - compatible
index 3bd670b8e5cd9d4586ee0429eeb732fedb323117..0b6f5bef120f8b3deaa753bc70f0dfd04ae48a83 100644 (file)
@@ -58,6 +58,7 @@ properties:
 
             properties:
               data-lines:
+                $ref: /schemas/types.yaml#/definitions/uint32
                 enum: [ 16, 18, 24 ]
 
       port@1:
index 7749de95ee405f7d35af13b6c6034b8db95ceb0e..229e3b36ee29aa4bca1ad8990e3743e1a9b74521 100644 (file)
@@ -146,6 +146,7 @@ properties:
       Horizontal sync pulse.
       0 selects active low, 1 selects active high.
       If omitted then it is not used by the hardware
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [0, 1]
 
   vsync-active:
@@ -153,6 +154,7 @@ properties:
       Vertical sync pulse.
       0 selects active low, 1 selects active high.
       If omitted then it is not used by the hardware
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [0, 1]
 
   de-active:
@@ -160,6 +162,7 @@ properties:
       Data enable.
       0 selects active low, 1 selects active high.
       If omitted then it is not used by the hardware
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [0, 1]
 
   pixelclk-active:
@@ -169,6 +172,7 @@ properties:
       sample data on rising edge.
       Use 1 to drive pixel data on rising edge and
       sample data on falling edge
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [0, 1]
 
   syncclk-active:
@@ -179,6 +183,7 @@ properties:
       sample sync on rising edge of pixel clock.
       Use 1 to drive sync on rising edge and
       sample sync on falling edge of pixel clock
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [0, 1]
 
   interlaced:
index 745dd247c409ba95f5c2ab37bb3b3449dd4edb43..617aa8c8c03a728960c2faed42f40866510f64bc 100644 (file)
@@ -24,6 +24,7 @@ properties:
 
   dsi-lanes:
     description: Number of DSI lanes to be used must be <3> or <4>
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [3, 4]
 
   v3p3-supply:
index ca959451557e08fc1e45802f9048f94eb48550de..1cdc91b3439f3f622aab4328faa060b72f0ff3a8 100644 (file)
@@ -36,6 +36,7 @@ properties:
 
   init-delay:
     description: delay after initialization sequence [ms]
+    $ref: /schemas/types.yaml#/definitions/uint32
 
   panel-width-mm:
     description: physical panel width [mm]
index 5fe19fa5f67c551f7a59fdf53a101a96b3e14370..a99e7842ca1739e2507134dee1aa66166334a7fd 100644 (file)
@@ -26,6 +26,7 @@ properties:
     const: 2
 
   registers-number:
+    $ref: /schemas/types.yaml#/definitions/uint32
     description: Number of daisy-chained shift registers
 
   enable-gpios:
index e8f137abb03c9a830d8b7a282445a7f5d6cfcadd..aa61fe64be63ccb99976584d1851b19b2a6cd777 100644 (file)
@@ -31,6 +31,7 @@ properties:
     type: boolean
 
   function-row-physmap:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
     minItems: 1
     maxItems: 15
     description: |
index c19d8391e2d593588d24ca1f5f32e9e587531194..7589d377c686450bb0065de94091f9f6678b9413 100644 (file)
@@ -60,7 +60,8 @@ properties:
       enables hot-plug detection.
 
   default-input:
-    maxItems: 1
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1 ]
     description:
       Select which input is selected after reset.
 
index 60d5746eb39dea8281e65bab439d984c1783caa7..3b030b8fb47c45cf564266c97ce7ba48c70fb5cd 100644 (file)
@@ -25,8 +25,12 @@ properties:
     const: 1
 
   mux-reg-masks:
-    description: an array of register offset and pre-shifted bitfield mask
-      pairs, each describing a single mux control.
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    items:
+      items:
+        - description: register offset
+        - description: pre-shifted bitfield mask
+    description: Each entry pair describes a single mux control.
 
   idle-states: true
 
index 6cd3d853dcba42cce0a7e09481e84e8bef9090d9..59fe2789fa4485dac5daaa9f393209eb84effe01 100644 (file)
@@ -129,6 +129,7 @@ patternProperties:
       reset-gpios: true
 
       magic-packet:
+        type: boolean
         description:
           Indicates that the hardware supports waking up via magic packet.
 
index 8e52b2e683b8ebe67fa7e6ec2d3a9380c4a101d6..93b3e991d209ade19086caaf2c5abe9f8cba4e7d 100644 (file)
@@ -37,6 +37,7 @@ properties:
     const: stmmaceth
 
   mode-reg:
+    $ref: /schemas/types.yaml#/definitions/phandle
     description: An extra syscon register that control ethernet interface and timing delay
 
   rx-clk-delay-ps:
index 6f44f9516c3647dedcc684ca45c338be366d7f87..a339202c5e8e600e64a17dad4cae620aa46cad9f 100644 (file)
@@ -34,6 +34,7 @@ properties:
     maxItems: 1
 
   bus_freq:
+    $ref: /schemas/types.yaml#/definitions/uint32
     maximum: 2500000
     description: MDIO Bus frequency
 
index 8dd164d10290082a85ba02c5de3bb231c2c00d18..d68bb2ec1f7ef30a6c204bf9e0c7faa8ab137884 100644 (file)
@@ -54,9 +54,11 @@ properties:
 
 
   ref-clock-frequency:
+    $ref: /schemas/types.yaml#/definitions/uint32
     description: Reference clock frequency.
 
   tcxo-clock-frequency:
+    $ref: /schemas/types.yaml#/definitions/uint32
     description: TCXO clock frequency.
 
   clock-xtal:
index e59059ab5be0b91a3f9a26dfb86f74e7e170ae9a..b78535040f04c6d7ce37058649949f818137f7f0 100644 (file)
@@ -55,13 +55,15 @@ properties:
       Translation Unit) registers.
 
   num-ib-windows:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 256
     description: number of inbound address translation windows
-    maxItems: 1
     deprecated: true
 
   num-ob-windows:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 256
     description: number of outbound address translation windows
-    maxItems: 1
     deprecated: true
 
 required:
index a5345c494744d6ae1a6d31bdd89ec80e6591eac0..c90e5e2d25f6125e96ca908d9d7e8b075d14a820 100644 (file)
@@ -68,6 +68,8 @@ properties:
       Translation Unit) registers.
 
   num-viewport:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 256
     description: |
       number of view ports configured in hardware. If a platform
       does not specify it, the driver autodetects it.
index 53e963e090f20902ddb4cdf691dea6c05bac9f43..533b4cfe33d2d72a4a407af8307868936b7da58e 100644 (file)
@@ -120,6 +120,7 @@ patternProperties:
       input-schmitt-disable: true
 
       input-polarity-invert:
+        type: boolean
         description:
           Enable or disable pin input polarity inversion.
 
@@ -132,6 +133,7 @@ patternProperties:
       output-low: true
 
       output-polarity-invert:
+        type: boolean
         description:
           Enable or disable pin output polarity inversion.
 
index 3301fa0c2653748d7372ade1ff6468588470c19b..301db7daf8706a21266b1309cd2950fced7fc50a 100644 (file)
@@ -51,6 +51,7 @@ properties:
       supported by the CPR power domain.
 
   acc-syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle
     description: A phandle to the syscon used for writing ACC settings.
 
   nvmem-cells:
index d56ac484fec50bc35e70e54e74691afb7fbaaa86..491488e7b970397b409c248fb0c2a524301686a9 100644 (file)
@@ -85,8 +85,13 @@ properties:
     description: battery factory internal resistance
 
   resistance-temp-table:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    items:
+      items:
+        - description: the temperature in degree Celsius
+        - description: battery internal resistance percent
     description: |
-      An array providing the temperature in degree Celsius
+      A table providing the temperature in degree Celsius
       and corresponding battery internal resistance percent, which is used to
       look up the resistance percent according to current temperature to get an
       accurate batterty internal resistance in different temperatures.
index c863cfa67865f712f0999df74debe514999ec216..fbb2204769aa8e8eadd1fb26a76c47685cd6b5ae 100644 (file)
@@ -36,6 +36,7 @@ properties:
 
   cm-poll-mode:
     description: polling mode
+    $ref: /schemas/types.yaml#/definitions/uint32
     default: 0
     enum:
       - 0 # disabled
index 9a6e4eaf4d3ce2a70174ababcddf86c6f79fa3af..fcd86f822a9ce4675ec409b411bbc0a1f93abe2d 100644 (file)
@@ -27,6 +27,7 @@ properties:
     maxItems: 1
 
   clock-error-detect:
+    type: boolean
     description: If set enable the clock detection management
 
 required:
index 3bab2f27b970f122ff34281d6934ba8f1b0c5ea1..5f6b113d378f998a56aa83e3f0c77731494ef829 100644 (file)
@@ -138,6 +138,7 @@ properties:
     description: The current active speed of the UART.
 
   reg-offset:
+    $ref: /schemas/types.yaml#/definitions/uint32
     description: |
       Offset to apply to the mapbase from the start of the registers.
 
index f7e94b1e0e4b02f48a834906481d2724b897a067..7416067c945e3d5c672e6b9fae7c74d204326986 100644 (file)
@@ -24,10 +24,13 @@ properties:
       connection's sink, the second being the connection's source.
     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
   multi:
+    type: object
     description: Multi-CPU/Codec node
   dpcm:
+    type: object
     description: DPCM node
   codec2codec:
+    type: object
     description: Codec to Codec node
 
 required:
index d5474f83ac2caaaaeee678b8e6665c54f40fcccb..e7e7bb65c366fa6c7f57c733690c51b7534ece5b 100644 (file)
@@ -20,9 +20,11 @@ properties:
     description: User specified audio sound card name
 
   audio-cpu:
+    $ref: /schemas/types.yaml#/definitions/phandle
     description: The phandle of an CPU DAI controller
 
   hdmi-out:
+    type: boolean
     description: |
       This is a boolean property. If present, the transmitting function
       of HDMI will be enabled, indicating there's a physical HDMI out
@@ -30,6 +32,7 @@ properties:
       block, such as an HDMI encoder or display-controller.
 
   hdmi-in:
+    type: boolean
     description: |
       This is a boolean property. If present, the receiving function of
       HDMI will be enabled, indicating there is a physical HDMI in
index b9e219829801faa33d524f2b5cb6ed74ffe76c3a..321b6f166197344475fa8da45f3581434cda58d3 100644 (file)
@@ -45,6 +45,7 @@ properties:
       property if all ports have to be enabled.
 
   initial-mode:
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum: [1, 2]
     description: >
       Specifies initial mode. 1 for Hub mode, 2 for standby mode.