Message ID | 20250424121315.144549-4-heinrich.schuchardt@canonical.com |
---|---|
State | Accepted, archived |
Commit | c5e8f3476936b56cf908e592e97bbf485f66e564 |
Delegated to: | Andes |
Headers | show |
Series | board: starfive: DeepComputing FML13V01 | expand |
In a different series I suggest removal of this fdtfile setting code, but now is more important to get this variant added to VF2 board target in U-Boot as done here. On 4/24/25 05:13, Heinrich Schuchardt wrote: > We support all JH7110 boards with starfive_visionfive2_defconfig. > The relevant device-tree is selected at runtime based on EEPROM data. > > Support setting $fdtfile to the file name of the DeepComputing Framework > motherboard (FML13V01) device-tree. > > Reviewed-by: Hal Feng <hal.feng@starfivetech.com> > Reviewed-by: Matthias Brugger <mbrugger@suse.com> > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> > --- > v4: > no change > v3: > rebased upon Mars CM removal patch > v2: > no change > --- > board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c > index b8cd509bc89..5fe888d4072 100644 > --- a/board/starfive/visionfive2/starfive_visionfive2.c > +++ b/board/starfive/visionfive2/starfive_visionfive2.c > @@ -17,6 +17,8 @@ > DECLARE_GLOBAL_DATA_PTR; > #define JH7110_L2_PREFETCHER_BASE_ADDR 0x2030000 > #define JH7110_L2_PREFETCHER_HART_OFFSET 0x2000 > +#define FDTFILE_FML13V01 \ > + "starfive/jh7110-deepcomputing-fml13v01.dtb" > #define FDTFILE_MILK_V_MARS \ > "starfive/jh7110-milkv-mars.dtb" > #define FDTFILE_VISIONFIVE2_1_2A \ > @@ -63,7 +65,9 @@ static void set_fdtfile(void) > log_err("Can't read EEPROM\n"); > return; > } > - if (!strncmp(product_id, "MARS", 4)) { > + if (!strncmp(product_id, "FML13V01", 8)) { > + fdtfile = FDTFILE_FML13V01; > + } else if (!strncmp(product_id, "MARS", 4)) { > fdtfile = FDTFILE_MILK_V_MARS; > } else if (!strncmp(product_id, "VF7110", 6)) { > version = get_pcb_revision_from_eeprom(); Reviewed-by: E Shattow <e@freeshell.de>
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index b8cd509bc89..5fe888d4072 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -17,6 +17,8 @@ DECLARE_GLOBAL_DATA_PTR; #define JH7110_L2_PREFETCHER_BASE_ADDR 0x2030000 #define JH7110_L2_PREFETCHER_HART_OFFSET 0x2000 +#define FDTFILE_FML13V01 \ + "starfive/jh7110-deepcomputing-fml13v01.dtb" #define FDTFILE_MILK_V_MARS \ "starfive/jh7110-milkv-mars.dtb" #define FDTFILE_VISIONFIVE2_1_2A \ @@ -63,7 +65,9 @@ static void set_fdtfile(void) log_err("Can't read EEPROM\n"); return; } - if (!strncmp(product_id, "MARS", 4)) { + if (!strncmp(product_id, "FML13V01", 8)) { + fdtfile = FDTFILE_FML13V01; + } else if (!strncmp(product_id, "MARS", 4)) { fdtfile = FDTFILE_MILK_V_MARS; } else if (!strncmp(product_id, "VF7110", 6)) { version = get_pcb_revision_from_eeprom();