[Letux-kernel] X1600 upstreaming efforts
H. Nikolaus Schaller
hns at goldelico.com
Fri Mar 28 17:09:50 CET 2025
Hi,
> Am 28.03.2025 um 16:23 schrieb Andreas Kemnade <andreas at kemnade.info>:
>
> Hallo Nikolaus,
>
> Am Fri, 28 Mar 2025 08:06:29 +0100
> schrieb "H. Nikolaus Schaller" <hns at goldelico.com>:
>
>> Hi,
>>
>>> Am 27.03.2025 um 22:15 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>>
>>> Am Wed, 26 Mar 2025 18:15:17 +0100
>>> schrieb "H. Nikolaus Schaller" <hns at goldelico.com>:
>>>
>>>> Hi,
>>>> I hope with 6.14.0 rolled out, I now have a little time to work on more x1600 upstreaming.
>>>>
>>>> I have started with the x1600 USB PHY
>>>>
>>>> There were some glitches in formatting of old and new macros, but otherwise it is fine.
>>>>
>>>> But checkpatch complained about a missing bindings.yaml.
>>>>
>>>> The is simple to add ingenic,x1600-phy except that we now must allow/require two register values.
>>>>
>>>> So we need to make the maxItems value depend on the compatible enum.
>>>> This is beyond my knowledge of the YAML programming language.
>>>>
>>>> So is there a good description how we can make this conditional?
>>>>
>>> maybe:
>>>
>>> soc/mediatek/mediatek,pwrap.yaml
>>>
>>> It is about minItems depending on compatible, but that should be also
>>> interesting.
>>
>> So something like
>>
>> diff --git a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> index 30b42008db063..cc6aa69b24e48 100644
>> --- a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> +++ b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> @@ -20,11 +20,15 @@ properties:
>> - ingenic,jz4775-phy
>> - ingenic,jz4780-phy
>> - ingenic,x1000-phy
>> + - ingenic,x1600-phy
>> - ingenic,x1830-phy
>> - ingenic,x2000-phy
>> reg:
>> maxItems: 1
>> + items:
>> + - description: CGU register set (@0x10000000)
>> + - description: x1600 extended register set (@0x10078000)
>> clocks:
>> maxItems: 1
>> @@ -42,6 +46,18 @@ required:
>> - vcc-supply
>> - '#phy-cells'
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: ingenic,x1600-phy
>> + then:
>> + properties:
>> + reg:
>> + minItems: 2
>> + maxItems: 2
>> +
>> additionalProperties: false
>>
>> What I am not sure is if it is allowed to have two "- description" for maxItems: 1
>> or if the additional description should go into the "then:" section.
>>
> yes, something like that.
Great.
> maybe having one description line in the main area and two lines in the
> if area.
Or maybe no description in the main area (because there was none before).
I have found how to call my dtbscheck but it complains:
gsort: -:2: disorder: 2022.3.2
ERROR: dtschema minimum version is v2023.9
Google wasn't very helpful how to update the dtschema file...
I tried this:
pip3 install dtschema
=>
Successfully installed attrs-25.3.0 dtschema-2025.2 jsonschema-4.17.3 pylibfdt-1.7.2 pyrsistent-0.20.0 rfc3987-1.3.8 ruamel.yaml-0.18.10 ruamel.yaml.clib-0.2.12
and
sudo pip3 install --upgrade git+https://github.com/devicetree-org/dt-schema.git@master
No change.
I know why I love Python, YAML and friends :)
It works fine if you do not have to rely on code written and installed by others.
BR,
Nikolaus
More information about the Letux-kernel
mailing list