* [Qemu-devel] [PATCH qemu] aspeed: Add support for the swift-bmc board
@ 2019-06-03 19:10 Adriana Kobylak
2019-06-03 23:37 ` Joel Stanley
0 siblings, 1 reply; 5+ messages in thread
From: Adriana Kobylak @ 2019-06-03 19:10 UTC (permalink / raw)
To: clg, peter.maydell, andrew, joel, qemu-arm; +Cc: Adriana Kobylak, qemu-devel
From: Adriana Kobylak <anoo@us.ibm.com>
The Swift board is an OpenPOWER system hosting POWER processors.
Add support for their BMC including the I2C devices as found on HW.
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
---
hw/arm/aspeed.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 33070a6..cd95b3c 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -73,6 +73,9 @@ struct AspeedBoardState {
SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
+/* TODO: Swift hardware value: ? (use romulus definition for now) */
+#define SWIFT_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
+
/* Witherspoon hardware value: 0xF10AD216 (but use romulus definition) */
#define WITHERSPOON_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
@@ -287,6 +290,35 @@ static void romulus_bmc_i2c_init(AspeedBoardState *bmc)
i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32);
}
+static void swift_bmc_i2c_init(AspeedBoardState *bmc)
+{
+ AspeedSoCState *soc = &bmc->soc;
+
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552", 0x60);
+
+ /* The swift board expects a TMP275 but a TMP105 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105", 0x48);
+ /* The swift board expects a pca9551 but a pca9552 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "pca9552", 0x60);
+
+ /* The swift board expects an Epson RX8900 RTC but a ds1338 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "ds1338", 0x32);
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "pca9552", 0x60);
+
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp423", 0x4c);
+ /* The swift board expects a pca9539 but a pca9552 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "pca9552", 0x74);
+
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "tmp423", 0x4c);
+ /* The swift board expects a pca9539 but a pca9552 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "pca9552",
+ 0x74);
+
+ /* The swift board expects a TMP275 but a TMP105 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x48);
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x4a);
+}
+
static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)
{
AspeedSoCState *soc = &bmc->soc;
@@ -378,6 +410,16 @@ static const AspeedBoardConfig aspeed_boards[] = {
.i2c_init = romulus_bmc_i2c_init,
.ram = 512 * MiB,
}, {
+ .name = MACHINE_TYPE_NAME("swift-bmc"),
+ .desc = "OpenPOWER Swift BMC (ARM1176)",
+ .soc_name = "ast2500-a1",
+ .hw_strap1 = SWIFT_BMC_HW_STRAP1,
+ .fmc_model = "mx66l1g45g",
+ .spi_model = "mx66l1g45g",
+ .num_cs = 2,
+ .i2c_init = swift_bmc_i2c_init,
+ .ram = 512 * MiB,
+ }, {
.name = MACHINE_TYPE_NAME("witherspoon-bmc"),
.desc = "OpenPOWER Witherspoon BMC (ARM1176)",
.soc_name = "ast2500-a1",
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] aspeed: Add support for the swift-bmc board
2019-06-03 19:10 [Qemu-devel] [PATCH qemu] aspeed: Add support for the swift-bmc board Adriana Kobylak
@ 2019-06-03 23:37 ` Joel Stanley
2019-06-04 2:32 ` Andrew Jeffery
0 siblings, 1 reply; 5+ messages in thread
From: Joel Stanley @ 2019-06-03 23:37 UTC (permalink / raw)
To: Adriana Kobylak
Cc: Peter Maydell, Andrew Jeffery, Adriana Kobylak, QEMU Developers,
qemu-arm, Cédric Le Goater
On Mon, 3 Jun 2019 at 19:11, Adriana Kobylak <anoo@linux.ibm.com> wrote:
>
> From: Adriana Kobylak <anoo@us.ibm.com>
>
> The Swift board is an OpenPOWER system hosting POWER processors.
> Add support for their BMC including the I2C devices as found on HW.
>
> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> ---
> hw/arm/aspeed.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 33070a6..cd95b3c 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -73,6 +73,9 @@ struct AspeedBoardState {
> SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
> SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
>
> +/* TODO: Swift hardware value: ? (use romulus definition for now) */
> +#define SWIFT_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
I got this from hardware: 0xF11AD206
The rest looks okay.
Reviewed-by: Joel Stanley <joel@jms.id.au>
> +
> /* Witherspoon hardware value: 0xF10AD216 (but use romulus definition) */
> #define WITHERSPOON_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
>
> @@ -287,6 +290,35 @@ static void romulus_bmc_i2c_init(AspeedBoardState *bmc)
> i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32);
> }
>
> +static void swift_bmc_i2c_init(AspeedBoardState *bmc)
> +{
> + AspeedSoCState *soc = &bmc->soc;
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552", 0x60);
> +
> + /* The swift board expects a TMP275 but a TMP105 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105", 0x48);
> + /* The swift board expects a pca9551 but a pca9552 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "pca9552", 0x60);
> +
> + /* The swift board expects an Epson RX8900 RTC but a ds1338 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "ds1338", 0x32);
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "pca9552", 0x60);
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp423", 0x4c);
> + /* The swift board expects a pca9539 but a pca9552 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "pca9552", 0x74);
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "tmp423", 0x4c);
> + /* The swift board expects a pca9539 but a pca9552 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "pca9552",
> + 0x74);
> +
> + /* The swift board expects a TMP275 but a TMP105 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x48);
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x4a);
> +}
> +
> static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)
> {
> AspeedSoCState *soc = &bmc->soc;
> @@ -378,6 +410,16 @@ static const AspeedBoardConfig aspeed_boards[] = {
> .i2c_init = romulus_bmc_i2c_init,
> .ram = 512 * MiB,
> }, {
> + .name = MACHINE_TYPE_NAME("swift-bmc"),
> + .desc = "OpenPOWER Swift BMC (ARM1176)",
> + .soc_name = "ast2500-a1",
> + .hw_strap1 = SWIFT_BMC_HW_STRAP1,
> + .fmc_model = "mx66l1g45g",
> + .spi_model = "mx66l1g45g",
> + .num_cs = 2,
> + .i2c_init = swift_bmc_i2c_init,
> + .ram = 512 * MiB,
> + }, {
> .name = MACHINE_TYPE_NAME("witherspoon-bmc"),
> .desc = "OpenPOWER Witherspoon BMC (ARM1176)",
> .soc_name = "ast2500-a1",
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] aspeed: Add support for the swift-bmc board
2019-06-03 23:37 ` Joel Stanley
@ 2019-06-04 2:32 ` Andrew Jeffery
2019-06-10 20:53 ` [Qemu-devel] [PATCH qemu v2] " Adriana Kobylak
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Jeffery @ 2019-06-04 2:32 UTC (permalink / raw)
To: Joel Stanley, Adriana Kobylak
Cc: Peter Maydell, qemu-arm, Cédric Le Goater, Adriana Kobylak,
QEMU Developers
On Tue, 4 Jun 2019, at 09:07, Joel Stanley wrote:
> On Mon, 3 Jun 2019 at 19:11, Adriana Kobylak <anoo@linux.ibm.com> wrote:
> >
> > From: Adriana Kobylak <anoo@us.ibm.com>
> >
> > The Swift board is an OpenPOWER system hosting POWER processors.
> > Add support for their BMC including the I2C devices as found on HW.
> >
> > Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
> > Reviewed-by: Cédric Le Goater <clg@kaod.org>
> > ---
> > hw/arm/aspeed.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 42 insertions(+)
> >
> > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> > index 33070a6..cd95b3c 100644
> > --- a/hw/arm/aspeed.c
> > +++ b/hw/arm/aspeed.c
> > @@ -73,6 +73,9 @@ struct AspeedBoardState {
> > SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
> > SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
> >
> > +/* TODO: Swift hardware value: ? (use romulus definition for now) */
> > +#define SWIFT_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
>
> I got this from hardware: 0xF11AD206
There are two differences from the value noted in the comment below:
1. Bit 4 is clear in your value
2. Bit 20 is set in your value
Bit 4 is reserved, so not sure if we should care about the difference.
Bit 20 is the SuperIO decode disable bit. I don't think we care much
about it at the moment, but we may as we model more of the LPC
interface in the future.
Andrew
>
> The rest looks okay.
>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
>
> > +
> > /* Witherspoon hardware value: 0xF10AD216 (but use romulus definition) */
> > #define WITHERSPOON_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
> >
> > @@ -287,6 +290,35 @@ static void romulus_bmc_i2c_init(AspeedBoardState *bmc)
> > i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32);
> > }
> >
> > +static void swift_bmc_i2c_init(AspeedBoardState *bmc)
> > +{
> > + AspeedSoCState *soc = &bmc->soc;
> > +
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552", 0x60);
> > +
> > + /* The swift board expects a TMP275 but a TMP105 is compatible */
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105", 0x48);
> > + /* The swift board expects a pca9551 but a pca9552 is compatible */
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "pca9552", 0x60);
> > +
> > + /* The swift board expects an Epson RX8900 RTC but a ds1338 is compatible */
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "ds1338", 0x32);
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "pca9552", 0x60);
> > +
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp423", 0x4c);
> > + /* The swift board expects a pca9539 but a pca9552 is compatible */
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "pca9552", 0x74);
> > +
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "tmp423", 0x4c);
> > + /* The swift board expects a pca9539 but a pca9552 is compatible */
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "pca9552",
> > + 0x74);
> > +
> > + /* The swift board expects a TMP275 but a TMP105 is compatible */
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x48);
> > + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x4a);
> > +}
> > +
> > static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)
> > {
> > AspeedSoCState *soc = &bmc->soc;
> > @@ -378,6 +410,16 @@ static const AspeedBoardConfig aspeed_boards[] = {
> > .i2c_init = romulus_bmc_i2c_init,
> > .ram = 512 * MiB,
> > }, {
> > + .name = MACHINE_TYPE_NAME("swift-bmc"),
> > + .desc = "OpenPOWER Swift BMC (ARM1176)",
> > + .soc_name = "ast2500-a1",
> > + .hw_strap1 = SWIFT_BMC_HW_STRAP1,
> > + .fmc_model = "mx66l1g45g",
> > + .spi_model = "mx66l1g45g",
> > + .num_cs = 2,
> > + .i2c_init = swift_bmc_i2c_init,
> > + .ram = 512 * MiB,
> > + }, {
> > .name = MACHINE_TYPE_NAME("witherspoon-bmc"),
> > .desc = "OpenPOWER Witherspoon BMC (ARM1176)",
> > .soc_name = "ast2500-a1",
> > --
> > 1.8.3.1
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH qemu v2] aspeed: Add support for the swift-bmc board
2019-06-04 2:32 ` Andrew Jeffery
@ 2019-06-10 20:53 ` Adriana Kobylak
2019-06-11 6:20 ` Cédric Le Goater
0 siblings, 1 reply; 5+ messages in thread
From: Adriana Kobylak @ 2019-06-10 20:53 UTC (permalink / raw)
To: clg, peter.maydell, andrew, joel, qemu-arm; +Cc: Adriana Kobylak, qemu-devel
From: Adriana Kobylak <anoo@us.ibm.com>
The Swift board is an OpenPOWER system hosting POWER processors.
Add support for their BMC including the I2C devices as found on HW.
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
---
hw/arm/aspeed.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 33070a6..7fd0e0c 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -73,6 +73,17 @@ struct AspeedBoardState {
SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
+/* Swift hardware value: 0xF11AD206 */
+#define SWIFT_BMC_HW_STRAP1 ( \
+ AST2500_HW_STRAP1_DEFAULTS | \
+ SCU_AST2500_HW_STRAP_SPI_AUTOFETCH_ENABLE | \
+ SCU_AST2500_HW_STRAP_GPIO_STRAP_ENABLE | \
+ SCU_AST2500_HW_STRAP_UART_DEBUG | \
+ SCU_AST2500_HW_STRAP_DDR4_ENABLE | \
+ SCU_H_PLL_BYPASS_EN | \
+ SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
+ SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
+
/* Witherspoon hardware value: 0xF10AD216 (but use romulus definition) */
#define WITHERSPOON_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
@@ -287,6 +298,35 @@ static void romulus_bmc_i2c_init(AspeedBoardState *bmc)
i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32);
}
+static void swift_bmc_i2c_init(AspeedBoardState *bmc)
+{
+ AspeedSoCState *soc = &bmc->soc;
+
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552", 0x60);
+
+ /* The swift board expects a TMP275 but a TMP105 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105", 0x48);
+ /* The swift board expects a pca9551 but a pca9552 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "pca9552", 0x60);
+
+ /* The swift board expects an Epson RX8900 RTC but a ds1338 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "ds1338", 0x32);
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "pca9552", 0x60);
+
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp423", 0x4c);
+ /* The swift board expects a pca9539 but a pca9552 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "pca9552", 0x74);
+
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "tmp423", 0x4c);
+ /* The swift board expects a pca9539 but a pca9552 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "pca9552",
+ 0x74);
+
+ /* The swift board expects a TMP275 but a TMP105 is compatible */
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x48);
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x4a);
+}
+
static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)
{
AspeedSoCState *soc = &bmc->soc;
@@ -378,6 +418,16 @@ static const AspeedBoardConfig aspeed_boards[] = {
.i2c_init = romulus_bmc_i2c_init,
.ram = 512 * MiB,
}, {
+ .name = MACHINE_TYPE_NAME("swift-bmc"),
+ .desc = "OpenPOWER Swift BMC (ARM1176)",
+ .soc_name = "ast2500-a1",
+ .hw_strap1 = SWIFT_BMC_HW_STRAP1,
+ .fmc_model = "mx66l1g45g",
+ .spi_model = "mx66l1g45g",
+ .num_cs = 2,
+ .i2c_init = swift_bmc_i2c_init,
+ .ram = 512 * MiB,
+ }, {
.name = MACHINE_TYPE_NAME("witherspoon-bmc"),
.desc = "OpenPOWER Witherspoon BMC (ARM1176)",
.soc_name = "ast2500-a1",
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH qemu v2] aspeed: Add support for the swift-bmc board
2019-06-10 20:53 ` [Qemu-devel] [PATCH qemu v2] " Adriana Kobylak
@ 2019-06-11 6:20 ` Cédric Le Goater
0 siblings, 0 replies; 5+ messages in thread
From: Cédric Le Goater @ 2019-06-11 6:20 UTC (permalink / raw)
To: Adriana Kobylak, peter.maydell, andrew, joel, qemu-arm
Cc: Adriana Kobylak, qemu-devel
Hello Adriana,
On 10/06/2019 22:53, Adriana Kobylak wrote:
> From: Adriana Kobylak <anoo@us.ibm.com>
>
> The Swift board is an OpenPOWER system hosting POWER processors.
> Add support for their BMC including the I2C devices as found on HW.
>
> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
I pushed this patch in my tree for the moment as the patchset :
"aspeed: machine extensions and fixes" patchwork.ozlabs.org/cover/1105343/
still needs some more reviews.
Thanks,
C.
> ---
> hw/arm/aspeed.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 33070a6..7fd0e0c 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -73,6 +73,17 @@ struct AspeedBoardState {
> SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
> SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
>
> +/* Swift hardware value: 0xF11AD206 */
> +#define SWIFT_BMC_HW_STRAP1 ( \
> + AST2500_HW_STRAP1_DEFAULTS | \
> + SCU_AST2500_HW_STRAP_SPI_AUTOFETCH_ENABLE | \
> + SCU_AST2500_HW_STRAP_GPIO_STRAP_ENABLE | \
> + SCU_AST2500_HW_STRAP_UART_DEBUG | \
> + SCU_AST2500_HW_STRAP_DDR4_ENABLE | \
> + SCU_H_PLL_BYPASS_EN | \
> + SCU_AST2500_HW_STRAP_ACPI_ENABLE | \
> + SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_MASTER))
> +
> /* Witherspoon hardware value: 0xF10AD216 (but use romulus definition) */
> #define WITHERSPOON_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1
>
> @@ -287,6 +298,35 @@ static void romulus_bmc_i2c_init(AspeedBoardState *bmc)
> i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32);
> }
>
> +static void swift_bmc_i2c_init(AspeedBoardState *bmc)
> +{
> + AspeedSoCState *soc = &bmc->soc;
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552", 0x60);
> +
> + /* The swift board expects a TMP275 but a TMP105 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105", 0x48);
> + /* The swift board expects a pca9551 but a pca9552 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "pca9552", 0x60);
> +
> + /* The swift board expects an Epson RX8900 RTC but a ds1338 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "ds1338", 0x32);
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 8), "pca9552", 0x60);
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp423", 0x4c);
> + /* The swift board expects a pca9539 but a pca9552 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "pca9552", 0x74);
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "tmp423", 0x4c);
> + /* The swift board expects a pca9539 but a pca9552 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 10), "pca9552",
> + 0x74);
> +
> + /* The swift board expects a TMP275 but a TMP105 is compatible */
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x48);
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 12), "tmp105", 0x4a);
> +}
> +
> static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)
> {
> AspeedSoCState *soc = &bmc->soc;
> @@ -378,6 +418,16 @@ static const AspeedBoardConfig aspeed_boards[] = {
> .i2c_init = romulus_bmc_i2c_init,
> .ram = 512 * MiB,
> }, {
> + .name = MACHINE_TYPE_NAME("swift-bmc"),
> + .desc = "OpenPOWER Swift BMC (ARM1176)",
> + .soc_name = "ast2500-a1",
> + .hw_strap1 = SWIFT_BMC_HW_STRAP1,
> + .fmc_model = "mx66l1g45g",
> + .spi_model = "mx66l1g45g",
> + .num_cs = 2,
> + .i2c_init = swift_bmc_i2c_init,
> + .ram = 512 * MiB,
> + }, {
> .name = MACHINE_TYPE_NAME("witherspoon-bmc"),
> .desc = "OpenPOWER Witherspoon BMC (ARM1176)",
> .soc_name = "ast2500-a1",
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-11 6:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-03 19:10 [Qemu-devel] [PATCH qemu] aspeed: Add support for the swift-bmc board Adriana Kobylak
2019-06-03 23:37 ` Joel Stanley
2019-06-04 2:32 ` Andrew Jeffery
2019-06-10 20:53 ` [Qemu-devel] [PATCH qemu v2] " Adriana Kobylak
2019-06-11 6:20 ` Cédric Le Goater
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).