lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <70231f99-5b41-4be4-8046-c73e32c68841@collabora.com>
Date: Mon, 14 Apr 2025 13:20:02 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: frank-w@...lic-files.de, Frank Wunderlich <linux@...web.de>,
 Matthias Brugger <matthias.bgg@...il.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-mediatek@...ts.infradead.org, devicetree@...r.kernel.org,
 Daniel Golle <daniel@...rotopia.org>
Subject: Re: [PATCH v2] arm64: dts: mediatek: mt7988a-bpi-r4: allow hw
 variants of bpi-r4

Il 14/04/25 12:19, Frank Wunderlich ha scritto:
> Am 14. April 2025 11:27:23 MESZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>:
>> Il 12/04/25 12:21, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@...lic-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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ