From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: frank-w@public-files.de, Frank Wunderlich <linux@fw-web.de>,
Matthias Brugger <matthias.bgg@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
Daniel Golle <daniel@makrotopia.org>
Subject: Re: [PATCH v2] arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4
Date: Mon, 14 Apr 2025 13:20:02 +0200 [thread overview]
Message-ID: <70231f99-5b41-4be4-8046-c73e32c68841@collabora.com> (raw)
In-Reply-To: <4469DD7C-1C73-4767-867B-729819C2E1B4@public-files.de>
Il 14/04/25 12:19, Frank Wunderlich ha scritto:
> Am 14. April 2025 11:27:23 MESZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>> Il 12/04/25 12:21, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
> snip
>> This should at least have some different compatible, if not probably also a
>> different model string - as it's a different device.
>>
>> compatible = "bananapi,bpi-r4-2g5", "bananapi,bpi-r4", "mediatek,mt7988a";
>> model = "Banana Pi BPI-R4 (2.5GbE)";
>> chassis-type = "embedded";
>>
>> ..snip..
>>
>> a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
>>> new file mode 100644
>>> index 000000000000..1ab09ed2f151
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
>>> @@ -0,0 +1,403 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
>>> +
>>> +#include "mt7988a.dtsi"
>>> +
>>> +/ {
>>> + compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
>>> + model = "Banana Pi BPI-R4";
>>> + chassis-type = "embedded";
>>
>> Please keep compatible/model/chassis-type in dts files.
>
> Ok, should i add specific compatible to existing board (like 2sfp)? Just thinking how binding should look like.
>
No, the existing board compatibles should not be touched.
I would imagine the bootloader reading the compatibles of all DTs and:
- On the 2G5 device, prefer a devicetree having that machine compatible;
- 2G5: If no 2G5 specific DT exists, fall back to using bananapi,bpi-r4
- On the 2sfp device, use DT that has bananapi,bpi-r4 but not the 2g5 compat.
So all of the DTs can be present, and the bootloader chooses the right one for
whatever device it is running on.
If it's not possible for the bootloader to do so... well, that still doesn't
change anything: you need two different DTS with a difference in machine compatible
because those are two different machines :-)
> Else is there an example for adding optional compatible without adding a complete block in binding?
I'm not sure if you can nest oneOf statements in bindings... but that anyway
doesn't really solve anything, so just add a full block....
Just to be sure, though:
krzk/Rob/Conor, am I right on this?
Thanks!>
>> Cheers,
>> Angelo
>
>
> regards Frank
next prev parent reply other threads:[~2025-04-14 11:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 10:21 Frank Wunderlich
2025-04-14 9:27 ` AngeloGioacchino Del Regno
2025-04-14 10:19 ` Frank Wunderlich
2025-04-14 11:20 ` AngeloGioacchino Del Regno [this message]
2025-04-14 12:32 ` Daniel Golle
2025-04-15 7:36 ` AngeloGioacchino Del Regno
2025-04-15 8:07 ` Frank Wunderlich
2025-04-15 9:56 ` AngeloGioacchino Del Regno
2025-04-15 10:30 ` Frank Wunderlich
2025-04-15 10:57 ` AngeloGioacchino Del Regno
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=70231f99-5b41-4be4-8046-c73e32c68841@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=devicetree@vger.kernel.org \
--cc=frank-w@public-files.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@fw-web.de \
--cc=matthias.bgg@gmail.com \
--cc=robh@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
all inboxes | Powered by JetHome®