Re: [PATCH v4 1/6] dt-bindings: i3c: Convert controller description to yaml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

> > +      reg:
> > +        items:
> > +          - description: |
> > +              1st cell
> > +              ========
> > +
> > +              I2C address. 10 bit addressing is not supported. Devices with
> > +              10-bit address can't be properly passed through DEFSLVS command.
> > +
> > +              2nd cell
> > +              ========
> > +
> > +              Should be 0.
> > +
> > +              3rd cell
> > +              ========
> > +
> > +              Shall encode the I3C LVR (Legacy Virtual Register):
> > +              bit[31:8]: unused/ignored
> > +              bit[7:5]: I2C device index. Possible values:
> > +                * 0: I2C device has a 50 ns spike filter
> > +                * 1: I2C device does not have a 50 ns spike filter but supports
> > +                     high frequency on SCL
> > +                * 2: I2C device does not have a 50 ns spike filter and is not
> > +                     tolerant to high frequencies
> > +                * 3-7: reserved
> > +              bit[4]: tell whether the device operates in FM (Fast Mode) or
> > +                      FM+ mode:
> > +                * 0: FM+ mode
> > +                * 1: FM mode
> > +              bit[3:0]: device type
> > +                * 0-15: reserved  
> 
> We can do a bit better:
> 
> reg:
>   items:
>     - items:  # Note: drop the '-' if we support more than 1 entry
>         - description: I2C address...
>           maximum: 0x7f  # Not sure this works, do we support the high 
>                          # flag bits here?
>         - const: 0
>         - description: I3C LVR (Legacy Virtual Register)...

I definitely think that it is a good move to properly define the fact
that we can accept only a single reg entry with three cells -and their
content, overall-, but this syntax does not work and I really don't find
the right way to describe it.

The error I get is:

---8<---
       reg:
         items:
           - items:
               - description: first item
               - description: second item
--->8---

schemas/i3c/i3c.yaml: ignoring, error in schema: patternProperties: @[0-9a-f]+$: properties: reg
<path>/i3c.yaml: patternProperties:@[0-9a-f]+$:properties:reg: 'anyOf' conditional failed, one must be fixed:
	'maxItems' is a required property
	'items' is not one of ['maxItems', 'description', 'deprecated']
	'items' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'default', '$ref']
	<path>/i3c.yaml: patternProperties:@[0-9a-f]+$:properties:reg:items: 'oneOf' conditional failed, one must be fixed:
		[{'items': [{'description': 'first item'}, {'description': 'second item'}]}] is not of type 'object'
		'items' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'default', '$ref']

I tried defining a phandle array, playing with the dashes, using allOf,
adding maxItems, none of it worked so far so any advice will be highly
appreciated!

Thanks,
Miquèl



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux