[Letux-kernel] X1600 upstreaming efforts

H. Nikolaus Schaller hns at goldelico.com
Fri Mar 28 08:06:29 CET 2025


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.

Looks as if I have to remove dust from the dtbscheck things to get some insights on that.

And the yaml-mantainers will complain anyways :)

BR and thanks,
Nikolaus


More information about the Letux-kernel mailing list