[Letux-kernel] X1600 upstreaming efforts

H. Nikolaus Schaller hns at goldelico.com
Fri Mar 28 17:18:50 CET 2025



> Am 28.03.2025 um 17:09 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> 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.

Looks like a hint:

iMac:Linux hns$ sudo pip3 install --upgrade dtschema
WARNING: The directory '/Users/hns/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Requirement already satisfied: dtschema in /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (2025.3.dev6+gb64c5c3)
Requirement already satisfied: ruamel.yaml>0.15.69 in /Users/hns/Library/Python/3.11/lib/python/site-packages (from dtschema) (0.18.10)
Requirement already satisfied: jsonschema<4.18,>=4.1.2 in /Users/hns/Library/Python/3.11/lib/python/site-packages (from dtschema) (4.17.3)
Requirement already satisfied: rfc3987 in /Users/hns/Library/Python/3.11/lib/python/site-packages (from dtschema) (1.3.8)
Requirement already satisfied: pylibfdt in /Users/hns/Library/Python/3.11/lib/python/site-packages (from dtschema) (1.7.2)
Requirement already satisfied: attrs>=17.4.0 in /Users/hns/Library/Python/3.11/lib/python/site-packages (from jsonschema<4.18,>=4.1.2->dtschema) (25.3.0)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /Users/hns/Library/Python/3.11/lib/python/site-packages (from jsonschema<4.18,>=4.1.2->dtschema) (0.20.0)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /Users/hns/Library/Python/3.11/lib/python/site-packages (from ruamel.yaml>0.15.69->dtschema) (0.2.12)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
iMac:Linux hns$ python --version
Python 3.7.17
iMac:Linux hns$ 
iMac:Linux hns$ which python3.7
/opt/local/bin/python3.7
iMac:Linux hns$ which python3.11
/opt/local/bin/python3.11
iMac:Linux hns$ 

It appears as if pip3 upgrades a local python3.11 installation while the default python on this machine is 3.7.
python 3.7 is good from kernel perspective: https://www.kernel.org/doc/html/v6.11/process/changes.html

But I may have to tell the kernel make which Python interpreter to use...
I know CC= or LD= but what to switch for Python?

BR,
NIkolaus



More information about the Letux-kernel mailing list