devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Biju Das <biju.das.jz@bp.renesas.com>, Rob Herring <robh+dt@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	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: Sat, 2 Apr 2022 22:03:45 +0200	[thread overview]
Message-ID: <e3ebc5d0-d2bc-b5a8-1b19-5e0c2f3d7c41@linaro.org> (raw)
In-Reply-To: <OS0PR01MB5922C1100BCF87341534FC6E86E39@OS0PR01MB5922.jpnprd01.prod.outlook.com>

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.

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.

Best regards,
Krzysztof

  reply	other threads:[~2022-04-02 20:03 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 [this message]
2022-04-02 20:48           ` Biju Das
2022-04-03  7:52             ` Krzysztof Kozlowski
2022-04-04 12:29           ` Geert Uytterhoeven
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=e3ebc5d0-d2bc-b5a8-1b19-5e0c2f3d7c41@linaro.org \
    --to=krzysztof.kozlowski@linaro.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=geert+renesas@glider.be \
    --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).