[PATCH 1/2] hw/arm: add eeproms to quanta-q7l1 board

Yubin Zou posted 2 patches 1 month, 4 weeks ago
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>
[PATCH 1/2] hw/arm: add eeproms to quanta-q7l1 board
Posted by Yubin Zou 1 month, 4 weeks ago
From: Patrick Venture <venture@google.com>

Adds eeprom init for aspeed helper method and adds 24c64 eeproms to the
quanta-q71l bmc board.

Tested: Booted quanta-q71l bmc firmware to userspace.
Signed-off-by: Patrick Venture <venture@google.com>
---
 hw/arm/aspeed.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index c31bbe7701381f6980e874f9fca51805ff9fb9b4..bae59ae7394882e3fc93863049a37ff5a8737ff8 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -561,14 +561,17 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
     i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4e);
     i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4f);
 
-    /* TODO: i2c-1: Add baseboard FRU eeprom@54 24c64 */
-    /* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */
+    /* Baseboard FRU */
+    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x54, 8192);
+    /* Frontpanel FRU */
+    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x57, 8192);
     /* TODO: Add Memory Riser i2c mux and eeproms. */
 
     i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9546", 0x74);
     i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9548", 0x77);
 
-    /* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */
+    /* Add BIOS FRU */
+    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 3), 0x56, 8192);
 
     /* i2c-7 */
     i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9546", 0x70);
@@ -577,8 +580,10 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
     /*        - i2c@2: pmbus@58 */
     /*        - i2c@3: pmbus@59 */
 
-    /* TODO: i2c-7: Add PDB FRU eeprom@52 */
-    /* TODO: i2c-8: Add BMC FRU eeprom@50 */
+    /* PDB FRU */
+    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 7), 0x52, 8192);
+    /* BMC FRU */
+    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50, 8192);
 }
 
 static void ast2500_evb_i2c_init(AspeedMachineState *bmc)

-- 
2.51.0.384.g4c02a37b29-goog
Re: [PATCH 1/2] hw/arm: add eeproms to quanta-q7l1 board
Posted by Cédric Le Goater 1 month, 4 weeks ago
Hi,

On 9/16/25 19:50, Yubin Zou wrote:
> From: Patrick Venture <venture@google.com>
> 
> Adds eeprom init for aspeed helper method and adds 24c64 eeproms to the
> quanta-q71l bmc board.
> 
> Tested: Booted quanta-q71l bmc firmware to userspace.

Could you please provide a FW image and functional test for the
quanta-q7l1 board ?

Thanks,

C.

  
> Signed-off-by: Patrick Venture <venture@google.com>
> ---
>   hw/arm/aspeed.c | 15 ++++++++++-----
>   1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index c31bbe7701381f6980e874f9fca51805ff9fb9b4..bae59ae7394882e3fc93863049a37ff5a8737ff8 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -561,14 +561,17 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
>       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4e);
>       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4f);
>   
> -    /* TODO: i2c-1: Add baseboard FRU eeprom@54 24c64 */
> -    /* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */
> +    /* Baseboard FRU */
> +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x54, 8192);
> +    /* Frontpanel FRU */
> +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x57, 8192);
>       /* TODO: Add Memory Riser i2c mux and eeproms. */
>   
>       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9546", 0x74);
>       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9548", 0x77);
>   
> -    /* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */
> +    /* Add BIOS FRU */
> +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 3), 0x56, 8192);
>   
>       /* i2c-7 */
>       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9546", 0x70);
> @@ -577,8 +580,10 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
>       /*        - i2c@2: pmbus@58 */
>       /*        - i2c@3: pmbus@59 */
>   
> -    /* TODO: i2c-7: Add PDB FRU eeprom@52 */
> -    /* TODO: i2c-8: Add BMC FRU eeprom@50 */
> +    /* PDB FRU */
> +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 7), 0x52, 8192);
> +    /* BMC FRU */
> +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50, 8192);
>   }
>   
>   static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
>
Re: [PATCH 1/2] hw/arm: add eeproms to quanta-q7l1 board
Posted by Yubin Zou 1 month, 2 weeks ago
Hi Cedric

Could you clarify what functional test you are referring to?

Thanks
Yubin

On Tue, Sep 16, 2025 at 11:10 PM Cédric Le Goater <clg@kaod.org> wrote:

> Hi,
>
> On 9/16/25 19:50, Yubin Zou wrote:
> > From: Patrick Venture <venture@google.com>
> >
> > Adds eeprom init for aspeed helper method and adds 24c64 eeproms to the
> > quanta-q71l bmc board.
> >
> > Tested: Booted quanta-q71l bmc firmware to userspace.
>
> Could you please provide a FW image and functional test for the
> quanta-q7l1 board ?
>
> Thanks,
>
> C.
>
>
> > Signed-off-by: Patrick Venture <venture@google.com>
> > ---
> >   hw/arm/aspeed.c | 15 ++++++++++-----
> >   1 file changed, 10 insertions(+), 5 deletions(-)
> >
> > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> > index
> c31bbe7701381f6980e874f9fca51805ff9fb9b4..bae59ae7394882e3fc93863049a37ff5a8737ff8
> 100644
> > --- a/hw/arm/aspeed.c
> > +++ b/hw/arm/aspeed.c
> > @@ -561,14 +561,17 @@ static void
> quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
> >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1),
> "tmp105", 0x4e);
> >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1),
> "tmp105", 0x4f);
> >
> > -    /* TODO: i2c-1: Add baseboard FRU eeprom@54 24c64 */
> > -    /* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */
> > +    /* Baseboard FRU */
> > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x54, 8192);
> > +    /* Frontpanel FRU */
> > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x57, 8192);
> >       /* TODO: Add Memory Riser i2c mux and eeproms. */
> >
> >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2),
> "pca9546", 0x74);
> >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2),
> "pca9548", 0x77);
> >
> > -    /* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */
> > +    /* Add BIOS FRU */
> > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 3), 0x56, 8192);
> >
> >       /* i2c-7 */
> >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7),
> "pca9546", 0x70);
> > @@ -577,8 +580,10 @@ static void
> quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
> >       /*        - i2c@2: pmbus@58 */
> >       /*        - i2c@3: pmbus@59 */
> >
> > -    /* TODO: i2c-7: Add PDB FRU eeprom@52 */
> > -    /* TODO: i2c-8: Add BMC FRU eeprom@50 */
> > +    /* PDB FRU */
> > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 7), 0x52, 8192);
> > +    /* BMC FRU */
> > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50, 8192);
> >   }
> >
> >   static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
> >
>
>
Re: [PATCH 1/2] hw/arm: add eeproms to quanta-q7l1 board
Posted by Cédric Le Goater 1 month, 2 weeks ago
Hello Yubin,

On 9/30/25 21:25, Yubin Zou wrote:
> Hi Cedric
> 
> Could you clarify what functional test you are referring to?


It's a small python test downloading a FW image and booting
the machine, possibly also testing that expected services are
up and running, network, I2C devices, etc. This last part is
optional.

See the test_aspeed_*.py files under :

   https://gitlab.com/qemu-project/qemu/-/tree/master/tests/functional/arm?ref_type=heads

test_aspeed_bletchley.py is minimum
test_aspeed_ast2600.py is complex

Thanks,

C.


> 
> Thanks
> Yubin
> 
> On Tue, Sep 16, 2025 at 11:10 PM Cédric Le Goater <clg@kaod.org <mailto:clg@kaod.org>> wrote:
> 
>     Hi,
> 
>     On 9/16/25 19:50, Yubin Zou wrote:
>      > From: Patrick Venture <venture@google.com <mailto:venture@google.com>>
>      >
>      > Adds eeprom init for aspeed helper method and adds 24c64 eeproms to the
>      > quanta-q71l bmc board.
>      >
>      > Tested: Booted quanta-q71l bmc firmware to userspace.
> 
>     Could you please provide a FW image and functional test for the
>     quanta-q7l1 board ?
> 
>     Thanks,
> 
>     C.
> 
> 
>      > Signed-off-by: Patrick Venture <venture@google.com <mailto:venture@google.com>>
>      > ---
>      >   hw/arm/aspeed.c | 15 ++++++++++-----
>      >   1 file changed, 10 insertions(+), 5 deletions(-)
>      >
>      > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>      > index c31bbe7701381f6980e874f9fca51805ff9fb9b4..bae59ae7394882e3fc93863049a37ff5a8737ff8 100644
>      > --- a/hw/arm/aspeed.c
>      > +++ b/hw/arm/aspeed.c
>      > @@ -561,14 +561,17 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
>      >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4e);
>      >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4f);
>      >
>      > -    /* TODO: i2c-1: Add baseboard FRU eeprom@54 24c64 */
>      > -    /* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */
>      > +    /* Baseboard FRU */
>      > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x54, 8192);
>      > +    /* Frontpanel FRU */
>      > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 1), 0x57, 8192);
>      >       /* TODO: Add Memory Riser i2c mux and eeproms. */
>      >
>      >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9546", 0x74);
>      >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9548", 0x77);
>      >
>      > -    /* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */
>      > +    /* Add BIOS FRU */
>      > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 3), 0x56, 8192);
>      >
>      >       /* i2c-7 */
>      >       i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9546", 0x70);
>      > @@ -577,8 +580,10 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
>      >       /*        - i2c@2: pmbus@58 */
>      >       /*        - i2c@3: pmbus@59 */
>      >
>      > -    /* TODO: i2c-7: Add PDB FRU eeprom@52 */
>      > -    /* TODO: i2c-8: Add BMC FRU eeprom@50 */
>      > +    /* PDB FRU */
>      > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 7), 0x52, 8192);
>      > +    /* BMC FRU */
>      > +    at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50, 8192);
>      >   }
>      >
>      >   static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
>      >
>