diff mbox series

[13/18] dt-bindings: fix jz4780-nemc issue as reported by dtbscheck

Message ID 84adfe6237cd4cfd52cb9723416f69926e556e55.1649443080.git.hns@goldelico.com
State New
Headers show
Series MIPS: DTS: fix some findings by "make ci20_defconfig dt_binding_check dtbs_check" | expand

Commit Message

H. Nikolaus Schaller April 8, 2022, 6:37 p.m. UTC
jz4780-nemc needs to be compatible to simple-mfd as well or we get

arch/mips/boot/dts/ingenic/ci20.dtb: memory-controller@13410000: compatible: 'oneOf' conditional failed, one must be fixed:
	['ingenic,jz4780-nemc', 'simple-mfd'] is too long
	'ingenic,jz4725b-nemc' was expected
	'ingenic,jz4740-nemc' was expected
	From schema: Documentation/devicetree/bindings/memory-controllers/ingenic,nemc.yaml

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 .../devicetree/bindings/memory-controllers/ingenic,nemc.yaml    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

H. Nikolaus Schaller April 10, 2022, 7:13 p.m. UTC | #1
Hi,

> Am 10.04.2022 um 17:35 schrieb Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:
> 
> On 09/04/2022 15:18, Krzysztof Kozlowski wrote:
>> On 09/04/2022 15:09, H. Nikolaus Schaller wrote:
> 
> (...)
> 
>>>>> @@ -17,7 +17,7 @@ properties:
>>>>>    oneOf:
>>>>>      - enum:
>>>>>          - 
>>>>> -          - ingenic,jz4780-nemc
>>>>> +          - [ , simple-mfd ]
>>>> 
>>>> This is not correct representation. If you really need simple-mfd, then
>>>> this should be a separate item below oneOf.
>>> 
>>> Well, it is valid YAML syntax and seems to be accepted by dtbscheck.
> 
> Minor update:
> Well, it is not a valid schema. Rob's checker now confirmed. If you run
> dt_bindings_check by yourself you will see the error:

I did run dt_bindings_check. Otherwise I wouldn't have seen that there is a problem
at all, before suggesting these changes...

> 
>   properties:compatible:oneOf:0:enum:1: ['ingenic', 'jz4780-nemc',
> 'simple-mfd'] is not of type 'string'
> 
> Probably because enum expects string, not another enum (so enum inside
> enum is not correct).
> 
> If you do not see the error, you might be missing some packages
> (mentioned in writing-schema + yamllint for a different issue) or your
> dtschema is old.

Neither.

yamllint etc. are all the most recent versions. Updated just two days ago.

But my filter looking for ci20.dtb did not catch it because the report
doesn't mention that file.

So Rob's robot is more mature than mine...

BR,
Nikolaus
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/memory-controllers/ingenic,nemc.yaml b/Documentation/devicetree/bindings/memory-controllers/ingenic,nemc.yaml
index 24f9e19820282..3b1116588de3d 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ingenic,nemc.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/ingenic,nemc.yaml
@@ -17,7 +17,7 @@  properties:
     oneOf:
       - enum:
           - ingenic,jz4740-nemc
-          - ingenic,jz4780-nemc
+          - [ ingenic,jz4780-nemc, simple-mfd ]
       - items:
           - const: ingenic,jz4725b-nemc
           - const: ingenic,jz4740-nemc