devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Rob Herring <robh+dt@kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v4 1/5] dt-bindings: arm: renesas: Document Renesas RZ/G2UL SMARC EVK
Date: Mon, 4 Apr 2022 14:29:24 +0200	[thread overview]
Message-ID: <CAMuHMdVTjHx8St_LxvMy1UfkRqNxZ1Dz0YYNXKMAhqouUxiW0w@mail.gmail.com> (raw)
In-Reply-To: <e3ebc5d0-d2bc-b5a8-1b19-5e0c2f3d7c41@linaro.org>

Hi Krzysztof,

On Sat, Apr 2, 2022 at 10:03 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> On 02/04/2022 21:54, Biju Das wrote:
> >> I understand that carrier board is the same, so the SoM differs.
> >
> > For R9A07G043 case, even SoM is same, only SOC differs.
>
> I assumed that you cannot have same SoMs with different SoCs...
>
> >
> >> In your
> >> model to figure out what type of hardware is it, your choice is to compare
> >> two compatibles:
> >> renesas,smarc-evk + renesas,r9a07g043u11
> >>
> >> If user-space compares only last compatible, it get's only SMARC, so it
> >> does not know on what hardware it runs.
> >
> > But Here user-space can easily identify the H/W with existing scheme. See the logs from user-space.
> >
> > / # for i in machine family soc_id revision; do echo -n "$i: "; cat /sys/devices/soc0/$i;done
> > machine: Renesas SMARC EVK based on r9a07g043u11
> > family: RZ/G2UL
> > soc_id: r9a07g043
> > revision: 0
>
> User-space is one example. We don't limit to this. Anyway, the
> compatible is the main way to check it. Machine is just test, not
> compatible, not part of ABI. soc_id and revision could help, but these
> are separate ABIs. They can be not compiled-in and then you have only
> compatible.
>
> Regardless whether there is another way for user-space to figure out
> hardware, it does not change the fact that such usage of compatibles
> does not look correct with Devicetree spec.
> "...They
>  allow a device to express its compatibility with a family of similar
> devices, potentially allowing a single
>  device driver to match against several devices."
>
> The "renesas,smarc-evk" compatible is not the most specific one, because
> different configurations have it.

From the letter of the spec, this is indeed not valid.
However, we started doing this several years ago, as the various
variants of the Salvator-X(S) and ULCB boards are identical, and just
differ in SoC (actually SiP) mounted.

E.g. arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts has
compatible = "renesas,salvator-xs", "renesas,r8a7795".

While we could add e.g. "renesas,salvator-xs-r8a7791", doing so
would inflate the bindings a lot.

> Again - you intend to use a pair or even a triple of compatibles to
> uniquely identify type of hardware. I don't think it is correct - the
> final, most specific compatible, uniquely identifies the hardware. All
> other compatibles are just for fallback.

And what to do when adding more DT overlays for expansion boards?
This would become unmanageable soon.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2022-04-04 12:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  7:32 [PATCH v4 1/5] dt-bindings: arm: renesas: Document Renesas RZ/G2UL SMARC EVK Biju Das
2022-04-02 16:36 ` Krzysztof Kozlowski
2022-04-02 19:05   ` Biju Das
2022-04-02 19:20     ` Krzysztof Kozlowski
2022-04-02 19:54       ` Biju Das
2022-04-02 20:03         ` Krzysztof Kozlowski
2022-04-02 20:48           ` Biju Das
2022-04-03  7:52             ` Krzysztof Kozlowski
2022-04-04 12:29           ` Geert Uytterhoeven [this message]
2022-04-04 13:00             ` Krzysztof Kozlowski
2022-04-05 11:47               ` Biju Das
2022-04-05 12:05                 ` Krzysztof Kozlowski
2022-04-06 16:29                   ` Rob Herring
2022-04-12 10:28 ` Geert Uytterhoeven

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=CAMuHMdVTjHx8St_LxvMy1UfkRqNxZ1Dz0YYNXKMAhqouUxiW0w@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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 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).