Re: [RFC 10/10] board: starfive: visionfive2: Add VisionFive 2 Lite fdt selection

Heinrich Schuchardt
2025-09-03T04:34:38Z

E Shattow <e@freeshell.de> schrieb am Mi., 3. Sept. 2025, 02:26:

>
>
> On 8/28/25 23:09, Hal Feng wrote:
> > Set $fdtfile to the VisionFive 2 Lite DTB if the board is matched.
> >
> > Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
> > ---
> > board/starfive/visionfive2/starfive_visionfive2.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/board/starfive/visionfive2/starfive_visionfive2.c
> b/board/starfive/visionfive2/starfive_visionfive2.c
> > index f38433e94ac..912e8cb967a 100644
> > --- a/board/starfive/visionfive2/starfive_visionfive2.c
> > +++ b/board/starfive/visionfive2/starfive_visionfive2.c
> > @@ -65,6 +65,8 @@ static void set_fdtfile(void)
> > } else if (!strncmp(get_product_id_from_eeprom(), "VF7110B", 7) ||
> > !strncmp(get_product_id_from_eeprom(), "VF7110b", 7)) {
> > fdtfile =
> "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb";
> > + } else if (!strncmp(get_product_id_from_eeprom(), "VF7110SL", 8)) {
> > + fdtfile =
> "starfive/jh7110s-starfive-visionfive-2-lite.dtb";
> > } else {
> > log_err("Unknown product\n");
> > return;
>
> I continue to think it is silly we are setting $fdtfile env variable
> past the moment since adopting OF_UPSTREAM. That is a discussion for
> somewhere else, however.
>

Do not expect an old kernel to boot with a newer dtb. Linux broke such
expectations repeatedly.

Do not assume that users upgrade U-Boot to keep it in sync with the kernel
they use.

Debian/Ubuntu packages flash-kernel and u-boot-menu rely on $fdtfile being
present.

Best regards

Heinrich

> Anyhow the sorting is correct and new code follows the existing code
> pattern.
>
> Reviewed-by: E Shattow <e@freeshell.de>
>