2019-10-07 10:26:45

by Alexandre Torgue

[permalink] [raw]
Subject: [PATCH 0/3] Fixes for dt-bindings verification

Using "make dt_binding_check" on top v5.4-rc1 some errors are
reported in several schemas. Those 3 patches allow to execute
"make dt_binding_check" without issues. Most probably those patches
have alread been sent.

regards
Alexandre


Alexandre Torgue (3):
dt-bindings: media: Fix id path for sun4i-a10-csi
dt-bindings: net: adi: Fix yaml verification issue
dt-bindings: regulator: Fix yaml verification for fixed-regulator
schema

.../bindings/media/allwinner,sun4i-a10-csi.yaml | 2 +-
Documentation/devicetree/bindings/net/adi,adin.yaml | 6 ++++++
.../devicetree/bindings/regulator/fixed-regulator.yaml | 10 +++++++---
3 files changed, 14 insertions(+), 4 deletions(-)

--
2.17.1


2019-10-07 10:26:46

by Alexandre Torgue

[permalink] [raw]
Subject: [PATCH 3/3] dt-bindings: regulator: Fix yaml verification for fixed-regulator schema

This commit fixes an issue seen during yaml check ("make dt_binding_check").
Compatible didn't seem to be seen as a string.

Reported issue:
"properties:compatible:enum:0: {'const': 'regulator-fixed'}
is not of type 'string'"
And
"properties:compatible:enum:1: {'const': 'regulator-fixed-clock'}
is not of type 'string'"

Fixes: 9c86d003d620 ("dt-bindings: regulator: add regulator-fixed-clock binding")
Signed-off-by: Alexandre Torgue <[email protected]>

diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
index a78150c47aa2..7725cedf1538 100644
--- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
@@ -22,16 +22,20 @@ allOf:
if:
properties:
compatible:
+ allOf:
+ - $ref: "/schemas/types.yaml#/definitions/string"
contains:
- const: regulator-fixed-clock
+ const: "regulator-fixed-clock"
required:
- clocks

properties:
compatible:
+ allOf:
+ - $ref: "/schemas/types.yaml#/definitions/string"
enum:
- - const: regulator-fixed
- - const: regulator-fixed-clock
+ - "regulator-fixed"
+ - "regulator-fixed-clock"

regulator-name: true

--
2.17.1

2019-10-07 10:27:05

by Alexandre Torgue

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: net: adi: Fix yaml verification issue

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 <[email protected]>

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 ]
--
2.17.1

2019-10-07 10:30:50

by Alexandre Torgue

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: media: Fix id path for sun4i-a10-csi

This commit fixes id path of allwinner,sun4i-a10-csi.yaml location.

Fixes: c5e8f4ccd775 ("media: dt-bindings: media: Add Allwinner A10 CSI binding")
Signed-off-by: Alexandre Torgue <[email protected]>

diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
index 27f38eed389e..5dd1cf490cd9 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: http://devicetree.org/schemas/arm/allwinner,sun4i-a10-csi.yaml#
+$id: http://devicetree.org/schemas/media/allwinner,sun4i-a10-csi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
--
2.17.1

2019-10-07 11:01:28

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: media: Fix id path for sun4i-a10-csi

Hi Alexandre,

On Mon, Oct 07, 2019 at 12:25:50PM +0200, Alexandre Torgue wrote:
> This commit fixes id path of allwinner,sun4i-a10-csi.yaml location.
>
> Fixes: c5e8f4ccd775 ("media: dt-bindings: media: Add Allwinner A10 CSI binding")
> Signed-off-by: Alexandre Torgue <[email protected]>

I just merged a patch addressing the same issue earlier today.

Thanks!
Maxime


Attachments:
(No filename) (388.00 B)
signature.asc (235.00 B)
Download all attachments

2019-10-07 13:10:32

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 3/3] dt-bindings: regulator: Fix yaml verification for fixed-regulator schema

On Mon, Oct 7, 2019 at 5:26 AM Alexandre Torgue <[email protected]> wrote:
>
> This commit fixes an issue seen during yaml check ("make dt_binding_check").
> Compatible didn't seem to be seen as a string.
>
> Reported issue:
> "properties:compatible:enum:0: {'const': 'regulator-fixed'}
> is not of type 'string'"
> And
> "properties:compatible:enum:1: {'const': 'regulator-fixed-clock'}
> is not of type 'string'"
>
> Fixes: 9c86d003d620 ("dt-bindings: regulator: add regulator-fixed-clock binding")
> Signed-off-by: Alexandre Torgue <[email protected]>

There's already a fix queued up.

Rob

2019-10-07 13:56:58

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: net: adi: Fix yaml verification issue

On Mon, Oct 7, 2019 at 5:26 AM Alexandre Torgue <[email protected]> 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

2019-10-07 14:09:05

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: net: adi: Fix yaml verification issue

Hi Rob

On 10/7/19 3:56 PM, Rob Herring wrote:
> On Mon, Oct 7, 2019 at 5:26 AM Alexandre Torgue <[email protected]> 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
>

2019-10-07 14:11:49

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: media: Fix id path for sun4i-a10-csi



On 10/7/19 1:00 PM, Maxime Ripard wrote:
> Hi Alexandre,
>
> On Mon, Oct 07, 2019 at 12:25:50PM +0200, Alexandre Torgue wrote:
>> This commit fixes id path of allwinner,sun4i-a10-csi.yaml location.
>>
>> Fixes: c5e8f4ccd775 ("media: dt-bindings: media: Add Allwinner A10 CSI binding")
>> Signed-off-by: Alexandre Torgue <[email protected]>
>
> I just merged a patch addressing the same issue earlier today.
>

Ok. Thanks Maxime.

Regards
Alex

> Thanks!
> Maxime
>