All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julius Werner <jwerner@chromium.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Julius Werner <jwerner@chromium.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Dmitry Osipenko <digetx@gmail.com>, Jian-Jia Su <jjsu@google.com>,
	Doug Anderson <dianders@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Nikola Milosavljevic <mnidza@outlook.com>
Subject: Re: [RFC] Correct memory layout reporting for "jedec,lpddr2" and related bindings
Date: Wed, 27 Jul 2022 17:22:42 -0700	[thread overview]
Message-ID: <CAODwPW_tcAAqKE66B+RbvMn-=favT07i3EK3TnAspVsWTAeJ4Q@mail.gmail.com> (raw)
In-Reply-To: <86b9c6d6-e8e5-7f6d-0970-460baf9b6fcc@linaro.org>

> > By "use case" I mean our particular platform and firmware requirements
> > -- or rather, the realities of building devices with widely
> > multi-sourced LPDDR parts. One cannot efficiently build firmware that
> > can pass an exact vendor-and-part-specific compatible string to Linux
> > for this binding for every single LPDDR part used on such a platform.
>
> Why cannot? You want to pass them as numerical values which directly map
> to vendor ID and some part, don't they?

Yes, but the current compatible string format also requires the exact
part number, of which there are many thousands and it's impossible to
build a list in advance. Even for vendors, hardcoding 255 strings in a
tight firmware space would be an unnecessary burden. There's also an
update problem -- firmware may be built and signed and burned into ROM
long before the assembly of the final mainboard. Board manufacturers
want to be able to just drop-in replace a newly-sourced LPDDR part in
their existing production line without having to worry if the existing
(and possibly no longer changeable) firmware contains a string table
entry for this part.

If you just want the compatible string to be unique, encoding the
numbers like Doug suggested (e.g. jedec,lpddr3-ff-0100) would work for
us.

> If we talk about standard, then DT purpose is not for autodetectable
> pieces. These values are autodetectable, so such properties should not
> be encoded in DT.

But the DT is the only interface that we have to pass information from
firmware to kernel and userspace. Where else should these properties
be encoded? They are auto-detectable, but not for the kernel itself
(only for memory-training firmware running in SRAM). Maybe the usual
rules of thumb don't apply here, because unlike all other peripheral
controllers the memory controller is special in that the kernel cannot
simply reinitialize it and get the same information from the original
source again.

  parent reply	other threads:[~2022-07-28  0:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15  2:25 [RFC] Correct memory layout reporting for "jedec,lpddr2" and related bindings Julius Werner
2022-06-15  2:28 ` Julius Werner
2022-06-15 19:33   ` Doug Anderson
2022-06-15 21:27     ` Julius Werner
2022-06-15 22:33       ` Doug Anderson
2022-06-15 23:24         ` Julius Werner
2022-06-18  2:17   ` Krzysztof Kozlowski
2022-06-24  9:45   ` Krzysztof Kozlowski
2022-06-30  1:03     ` Julius Werner
2022-06-30  8:05       ` Krzysztof Kozlowski
2022-07-01  0:52         ` Julius Werner
2022-07-01  6:57           ` Krzysztof Kozlowski
2022-07-08  1:20             ` Julius Werner
2022-07-10 15:06               ` Krzysztof Kozlowski
2022-07-20 23:42                 ` Julius Werner
2022-07-27  8:47                   ` Krzysztof Kozlowski
2022-07-27 14:07                     ` Doug Anderson
2022-07-28  7:35                       ` Krzysztof Kozlowski
2022-07-28  0:22                     ` Julius Werner [this message]
2022-07-28  7:38                       ` Krzysztof Kozlowski
2022-07-04  8:22 ` Dmitry Osipenko

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='CAODwPW_tcAAqKE66B+RbvMn-=favT07i3EK3TnAspVsWTAeJ4Q@mail.gmail.com' \
    --to=jwerner@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=digetx@gmail.com \
    --cc=jjsu@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mnidza@outlook.com \
    --cc=robh+dt@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.