diff mbox series

[2/3] dt-bindings: net: adi: Fix yaml verification issue

Message ID 20191007102552.19808-3-alexandre.torgue@st.com (mailing list archive)
State New, archived
Headers show
Series Fixes for dt-bindings verification | expand

Commit Message

Alexandre TORGUE Oct. 7, 2019, 10:25 a.m. UTC
This commit fixes an issue seen during yaml check ("make dt_binding_check").
Each enum were not declared as uint32.

"Documentation/devicetree/bindings/net/adi,adin.yaml:
properties:adi,rx-internal-delay-ps:
..., 'enum': [1600, 1800, 2000, 2200, 2400], 'default': 2000}
is not valid under any of the given schemas"

Fixes: 767078132ff9 ("dt-bindings: net: add bindings for ADIN PHY driver")
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>

Comments

Rob Herring Oct. 7, 2019, 1:56 p.m. UTC | #1
On Mon, Oct 7, 2019 at 5:26 AM Alexandre Torgue <alexandre.torgue@st.com> wrote:
>
> This commit fixes an issue seen during yaml check ("make dt_binding_check").
> Each enum were not declared as uint32.
>
> "Documentation/devicetree/bindings/net/adi,adin.yaml:
> properties:adi,rx-internal-delay-ps:
> ..., 'enum': [1600, 1800, 2000, 2200, 2400], 'default': 2000}
> is not valid under any of the given schemas"

You need to update dtschema. I fixed this in the meta-schema last
week. Any property with a standard property unit suffix has a defined
type already, so we don't need to define it again here.

I also added '-bits' to standard units.

Rob
Alexandre TORGUE Oct. 7, 2019, 2:07 p.m. UTC | #2
Hi Rob

On 10/7/19 3:56 PM, Rob Herring wrote:
> On Mon, Oct 7, 2019 at 5:26 AM Alexandre Torgue <alexandre.torgue@st.com> wrote:
>>
>> This commit fixes an issue seen during yaml check ("make dt_binding_check").
>> Each enum were not declared as uint32.
>>
>> "Documentation/devicetree/bindings/net/adi,adin.yaml:
>> properties:adi,rx-internal-delay-ps:
>> ..., 'enum': [1600, 1800, 2000, 2200, 2400], 'default': 2000}
>> is not valid under any of the given schemas"
> 
> You need to update dtschema. I fixed this in the meta-schema last
> week. Any property with a standard property unit suffix has a defined
> type already, so we don't need to define it again here.
> 
> I also added '-bits' to standard units.

Nice, I'm going to update my tools.

thanks
Alex

> 
> Rob
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/adi,adin.yaml b/Documentation/devicetree/bindings/net/adi,adin.yaml
index d95cc691a65f..23e8597acda6 100644
--- a/Documentation/devicetree/bindings/net/adi,adin.yaml
+++ b/Documentation/devicetree/bindings/net/adi,adin.yaml
@@ -17,6 +17,8 @@  allOf:
 
 properties:
   adi,rx-internal-delay-ps:
+    allOf:
+      - $ref: "/schemas/types.yaml#/definitions/uint32"
     description: |
       RGMII RX Clock Delay used only when PHY operates in RGMII mode with
       internal delay (phy-mode is 'rgmii-id' or 'rgmii-rxid') in pico-seconds.
@@ -24,6 +26,8 @@  properties:
     default: 2000
 
   adi,tx-internal-delay-ps:
+    allOf:
+      - $ref: "/schemas/types.yaml#/definitions/uint32"
     description: |
       RGMII TX Clock Delay used only when PHY operates in RGMII mode with
       internal delay (phy-mode is 'rgmii-id' or 'rgmii-txid') in pico-seconds.
@@ -31,6 +35,8 @@  properties:
     default: 2000
 
   adi,fifo-depth-bits:
+    allOf:
+      - $ref: "/schemas/types.yaml#/definitions/uint32"
     description: |
       When operating in RMII mode, this option configures the FIFO depth.
     enum: [ 4, 8, 12, 16, 20, 24 ]