From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-i3c@lists.infradead.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Conor Culhane <conor.culhane@silvaco.com>,
Rajeev Huralikoppi <rajeev.huralikoppi@silvaco.com>,
Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH v4 1/6] dt-bindings: i3c: Convert controller description to yaml
Date: Mon, 18 Jan 2021 16:25:08 +0100 [thread overview]
Message-ID: <20210118162508.2f2079da@xps13> (raw)
In-Reply-To: <20210115170312.GA1434283@robh.at.kernel.org>
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
next prev parent reply other threads:[~2021-01-18 15:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 17:55 [PATCH v4 0/6] Silvaco I3C master driver Miquel Raynal
2021-01-14 17:55 ` [PATCH v4 1/6] dt-bindings: i3c: Convert controller description to yaml Miquel Raynal
2021-01-15 17:03 ` Rob Herring
2021-01-18 15:25 ` Miquel Raynal [this message]
2021-01-18 17:21 ` Miquel Raynal
2021-01-14 17:55 ` [PATCH v4 2/6] dt-bindings: i3c: mipi-hci: Include the bus binding Miquel Raynal
2021-01-14 22:54 ` Rob Herring
2021-01-14 17:55 ` [PATCH v4 3/6] dt-bindings: Add vendor prefix for Silvaco Miquel Raynal
2021-01-14 17:55 ` [PATCH v4 4/6] dt-bindings: i3c: Describe Silvaco master binding Miquel Raynal
2021-01-15 17:08 ` Rob Herring
2021-01-14 17:55 ` [PATCH v4 5/6] i3c: master: svc: Add Silvaco I3C master driver Miquel Raynal
2021-01-14 17:55 ` [PATCH v4 6/6] MAINTAINERS: Add Silvaco I3C master Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210118162508.2f2079da@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=conor.culhane@silvaco.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-i3c@lists.infradead.org \
--cc=nico@fluxnic.net \
--cc=rajeev.huralikoppi@silvaco.com \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).