[PATCH 2/8] dt-bindings: clock: stm32mp1: describes clocks if "st,stm32mp1-rcc-secure"

Alexandre TORGUE alexandre.torgue at foss.st.com
Mon May 9 05:55:55 PDT 2022


On 5/9/22 14:36, Rob Herring wrote:
> On Fri, May 6, 2022 at 11:21 AM Rob Herring <robh+dt at kernel.org> wrote:
>>
>> On Fri, May 6, 2022 at 5:02 AM Alexandre TORGUE
>> <alexandre.torgue at foss.st.com> wrote:
>>>
>>> Hi Rob
>>>
>>> On 5/5/22 16:11, Rob Herring wrote:
>>>> On Fri, Apr 22, 2022 at 10:10 AM Alexandre Torgue
>>>> <alexandre.torgue at foss.st.com> wrote:
>>>>>
>>>>> In case of "st,stm32mp1-rcc-secure" (stm32mp1 clock driver with RCC
>>>>> security support hardened), "clocks" and "clock-names" describe oscillators
>>>>> and are required.
>>>>>
>>>>> Signed-off-by: Alexandre Torgue <alexandre.torgue at foss.st.com>
>>>>
>>>> This is now failing in linux-next:
>>>>
>>>> make[1]: *** Deleting file
>>>> 'Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts'
>>>> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml: found
>>>> duplicate key "clocks" with value "{}" (original value: "True")
>>>> make[1]: *** [Documentation/devicetree/bindings/Makefile:26:
>>>> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dts]
>>>> Error 1
>>>> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:64:3:
>>>> [error] duplication of key "clocks" in mapping (key-duplicates)
>>>> ./Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml:69:3:
>>>> [error] duplication of key "clock-names" in mapping (key-duplicates)
>>>> Traceback (most recent call last):
>>>>     File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
>>>>       testtree = dtschema.load(filename, line_number=line_number)
>>>>     File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line
>>>> 914, in load
>>>>       return yaml.load(f.read())
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py",
>>>> line 434, in load
>>>>       return constructor.get_single_data()
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 121, in get_single_data
>>>>       return self.construct_document(node)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 131, in construct_document
>>>>       for _dummy in generator:
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 674, in construct_yaml_map
>>>>       value = self.construct_mapping(node)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 445, in construct_mapping
>>>>       return BaseConstructor.construct_mapping(self, node, deep=deep)
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 263, in construct_mapping
>>>>       if self.check_mapping_key(node, key_node, mapping, key, value):
>>>>     File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/constructor.py",
>>>> line 294, in check_mapping_key
>>>>       raise DuplicateKeyError(*args)
>>>> ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
>>>>     in "<unicode string>", line 49, column 3
>>>> found duplicate key "clocks" with value "{}" (original value: "True")
>>>>     in "<unicode string>", line 64, column 3
>>>> To suppress this check see:
>>>>       http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
>>>> During handling of the above exception, another exception occurred:
>>>> Traceback (most recent call last):
>>>>     File "/usr/local/bin/dt-doc-validate", line 74, in <module>
>>>>       ret = check_doc(f)
>>>>     File "/usr/local/bin/dt-doc-validate", line 30, in check_doc
>>>>       print(filename + ":", exc.path[-1], exc.message, file=sys.stderr)
>>>> AttributeError: 'DuplicateKeyError' object has no attribute 'path'
>>>
>>> It seems that we have a merge issue between:
>>>
>>> patch "dt-bindings: rcc: Add optional external ethernet RX clock properties"
>>> https://lore.kernel.org/r/20220410220514.21779-1-marex@denx.de
>>>
>>> and this one (dt-bindings: clock: stm32mp1: describes clocks if
>>> "st,stm32mp1-rcc-secure)
>>>
>>> On linux-next following part remains and creates issue above:
>>>
>>>     clocks:
>>>       description:
>>>         Specifies the external RX clock for ethernet MAC.
>>>       maxItems: 1
>>>
>>>     clock-names:
>>>       const: ETH_RX_CLK/ETH_REF_CLK
>>>
>>> I don't know why this part is remaining. In my tree, I took care to take
>>> Marek patch first to avoid this kind of issue.
>>>
>>> Btw, how to fix that ?
>>
>> Looks like I applied "dt-bindings: rcc: Add optional external ethernet
>> RX clock properties" too. I've reverted it in my tree.
> 
> Now with it reverted in today's next:
> 
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
> rcc at 50000000: 'clocks' is a required property
>   From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.example.dtb:
> rcc at 50000000: 'clock-names' is a required property
>   From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml
> 
> The example needs updating.

Sure, I send an update.

Alex

> 
> Rob




More information about the linux-arm-kernel mailing list