From: Aurelien Jarno <aurelien@aurel32.net>
To: u-boot@lists.denx.de, Yanhong Wang <yanhong.wang@starfivetech.com>
Subject: Re: [PATCH] board: starfive: handle compatible property in dynamic DT configuration
Date: Mon, 22 Jan 2024 22:02:35 +0100 [thread overview]
Message-ID: <Za7X6xFQqRnKVC3V@aurel32.net> (raw)
In-Reply-To: <20240110201757.983435-1-aurelien@aurel32.net>
Gentle ping. Note that the maintainer address bounces, I am not sure it
is still valid. Thanks
On 2024-01-10 21:17, Aurelien Jarno wrote:
> The difference between the StarFive VisionFive 2 1.2A and 1.3B boards is
> handled dynamically by looking at the PCB version in the EEPROM in order
> to have a single u-boot version for both versions of the board. While
> the "model" property is correctly handled, the "compatible" one is
> always the the one of version 1.3b.
>
> This patch add support for dynamically configuring that property.
>
> Fixes: 9b7060bd15e7 ("riscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3B")
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> board/starfive/visionfive2/spl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
> index 336f0cdfc9..911add429d 100644
> --- a/board/starfive/visionfive2/spl.c
> +++ b/board/starfive/visionfive2/spl.c
> @@ -61,11 +61,13 @@ static const struct starfive_vf2_pro starfive_verb[] = {
>
> void spl_fdt_fixup_version_a(void *fdt)
> {
> + static const char compat[] = "starfive,visionfive-2-v1.2a\0starfive,jh7110";
> u32 phandle;
> u8 i;
> int offset;
> int ret;
>
> + fdt_setprop(fdt, fdt_path_offset(fdt, "/"), "compatible", compat, sizeof(compat));
> fdt_setprop_string(fdt, fdt_path_offset(fdt, "/"), "model",
> "StarFive VisionFive 2 v1.2A");
>
> @@ -106,11 +108,13 @@ void spl_fdt_fixup_version_a(void *fdt)
>
> void spl_fdt_fixup_version_b(void *fdt)
> {
> + static const char compat[] = "starfive,visionfive-2-v1.3b\0starfive,jh7110";
> u32 phandle;
> u8 i;
> int offset;
> int ret;
>
> + fdt_setprop(fdt, fdt_path_offset(fdt, "/"), "compatible", compat, sizeof(compat));
> fdt_setprop_string(fdt, fdt_path_offset(fdt, "/"), "model",
> "StarFive VisionFive 2 v1.3B");
>
> --
> 2.42.0
>
>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
next prev parent reply other threads:[~2024-01-22 21:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 20:17 [PATCH] board: starfive: handle compatible property in dynamic DT configuration Aurelien Jarno
2024-01-22 21:02 ` Aurelien Jarno [this message]
2024-01-31 2:56 ` Leo Liang
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=Za7X6xFQqRnKVC3V@aurel32.net \
--to=aurelien@aurel32.net \
--cc=u-boot@lists.denx.de \
--cc=yanhong.wang@starfivetech.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.