From: Rob Herring <robh@kernel.org>
To: Julius Werner <jwerner@chromium.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Dmitry Osipenko <digetx@gmail.com>,
Doug Anderson <dianders@chromium.org>,
Jian-Jia Su <jjsu@google.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings
Date: Fri, 2 Sep 2022 15:24:53 -0500 [thread overview]
Message-ID: <20220902202453.GA338977-robh@kernel.org> (raw)
In-Reply-To: <CAODwPW_70kdn4XTCs_vhbWwjEXS8E8zC9MTa6-szb5SayvcSag@mail.gmail.com>
On Wed, Aug 31, 2022 at 06:10:51PM -0700, Julius Werner wrote:
> > > diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
> > > index 0c7d2feafd77c8..e1182e75ca1a3f 100644
> > > --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
> > > +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
> > > @@ -53,9 +53,13 @@ properties:
> > > - 512
> > > - 1024
> > > - 2048
> > > + - 3072
> > > - 4096
> > > + - 6144
> > > - 8192
> > > + - 12288
> > > - 16384
> > > + - 24576
> > > - 32768
> >
> > Either you limit now LPDDR2 and LPDDR3 to old values or instead add this
> > bigger list to LPDDR4 and LPDDR5 (if it works that way).
>
> The problem is that each spec has its own set of valid values, e.g.
> LPDDR3 only defines 4GB, 8GB, 16GB and 32GB, and then LPDDR4 inserted
> the 6GB, 12GB and 24GB options in between there. I don't think there's
> a way to exactly describe the valid values for each version without
> having a whole separate enum list for each. Do you think checking for
> that is important enough to be worth having all that extra duplication
> between the schemas? I don't think it adds that much (e.g. a value for
> an individual memory part can still be wrong even if it is one of the
> valid values for that type, so how much use is this validation
> anyway?), but I can split it out if you want to.
I tend to agree with you that it isn't worth the complexity.
> > > + serial-id:
> > > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > > + description:
> > > + Serial IDs read from Mode Registers 47 through 54. One byte per uint32
> > > + cell (i.e. <MR47 MR48 MR49 MR50 MR51 MR52 MR53 MR54>).
> > > + minItems: 8
> >
> > No need for minItems.
>
> Can you explain why? I'm okay with taking these out, but it is a real
> constraint so I'm not sure why we shouldn't be describing it here?
> (The serial ID always has exactly 8 bytes, an ID with less than 8
> would not be valid and probably a typo.)
Because if minItems is not specified, then it defaults to same as
maxItems value. This is a departure from json-schema, but we almost
always need a fixed number here and I didn't want to be specifying
minItems/maxItems everywhere. We really need a 'numItems' or something.
Rob
next prev parent reply other threads:[~2022-09-02 20:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 1:33 [PATCH 0/4] dt-bindings: memory: Describing LPDDR topology Julius Werner
2022-08-31 1:33 ` [PATCH 1/4] dt-bindings: memory: Factor out common properties of LPDDR bindings Julius Werner
2022-08-31 6:18 ` Krzysztof Kozlowski
2022-09-01 1:09 ` Julius Werner
2022-09-05 12:32 ` Krzysztof Kozlowski
2022-08-31 6:30 ` Krzysztof Kozlowski
2022-08-31 1:33 ` [PATCH 2/4] dt-bindings: memory: Add numeric LPDDR compatible string variant Julius Werner
2022-08-31 6:23 ` Krzysztof Kozlowski
2022-08-31 1:33 ` [PATCH 3/4] dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings Julius Werner
2022-08-31 6:28 ` Krzysztof Kozlowski
2022-09-01 1:10 ` Julius Werner
2022-09-02 20:24 ` Rob Herring [this message]
2022-08-31 1:33 ` [PATCH 4/4] dt-bindings: memory: Add jedec,lpddrX-channel binding Julius Werner
2022-08-31 6:55 ` Krzysztof Kozlowski
2022-09-01 1:11 ` Julius Werner
2022-09-08 13:56 ` Krzysztof Kozlowski
2022-09-09 23:36 ` Julius Werner
2022-08-31 6:34 ` [PATCH 0/4] dt-bindings: memory: Describing LPDDR topology Krzysztof Kozlowski
2022-09-01 1:05 ` Julius Werner
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=20220902202453.GA338977-robh@kernel.org \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=digetx@gmail.com \
--cc=jjsu@google.com \
--cc=jwerner@chromium.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.