Skip to content

Commit becfaa1

Browse files
edtanouslegoater
authored andcommitted
hw/arm/aspeed: Add GB200 BMC target
GB200nvl72 is a system for for accelerated compute. This is a model for the BMC target within the system. This is based on the device tree aspeed-bmc-nvidia-gb200nvl-bmc.dts from: [1] https://github.com/openbmc/linux/blob/dev-6.6/arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200nvl-bmc.dts Signed-off-by: Ed Tanous <etanous@nvidia.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250703144249.3348879-4-etanous@nvidia.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
1 parent ad8e0e8 commit becfaa1

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed

hw/arm/aspeed.c

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ struct AspeedMachineState {
201201
#define BLETCHLEY_BMC_HW_STRAP1 0x00002000
202202
#define BLETCHLEY_BMC_HW_STRAP2 0x00000801
203203

204+
/* GB200NVL hardware value */
205+
#define GB200NVL_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
206+
#define GB200NVL_BMC_HW_STRAP2 AST2600_EVB_HW_STRAP2
207+
204208
/* Qualcomm DC-SCM hardware value */
205209
#define QCOM_DC_SCM_V1_BMC_HW_STRAP1 0x00000000
206210
#define QCOM_DC_SCM_V1_BMC_HW_STRAP2 0x00000041
@@ -647,6 +651,12 @@ static void create_pca9552(AspeedSoCState *soc, int bus_id, int addr)
647651
TYPE_PCA9552, addr);
648652
}
649653

654+
static I2CSlave *create_pca9554(AspeedSoCState *soc, int bus_id, int addr)
655+
{
656+
return i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, bus_id),
657+
TYPE_PCA9554, addr);
658+
}
659+
650660
static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)
651661
{
652662
AspeedSoCState *soc = bmc->soc;
@@ -1226,6 +1236,45 @@ static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
12261236
i2c_slave_create_simple(i2c[12], TYPE_PCA9552, 0x67);
12271237
}
12281238

1239+
1240+
static void gb200nvl_bmc_i2c_init(AspeedMachineState *bmc)
1241+
{
1242+
AspeedSoCState *soc = bmc->soc;
1243+
I2CBus *i2c[15] = {};
1244+
DeviceState *dev;
1245+
for (int i = 0; i < sizeof(i2c) / sizeof(i2c[0]); i++) {
1246+
if ((i == 11) || (i == 12) || (i == 13)) {
1247+
continue;
1248+
}
1249+
i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
1250+
}
1251+
1252+
/* Bus 5 Expander */
1253+
create_pca9554(soc, 4, 0x21);
1254+
1255+
/* Mux I2c Expanders */
1256+
i2c_slave_create_simple(i2c[5], "pca9546", 0x71);
1257+
i2c_slave_create_simple(i2c[5], "pca9546", 0x72);
1258+
i2c_slave_create_simple(i2c[5], "pca9546", 0x73);
1259+
i2c_slave_create_simple(i2c[5], "pca9546", 0x75);
1260+
i2c_slave_create_simple(i2c[5], "pca9546", 0x76);
1261+
i2c_slave_create_simple(i2c[5], "pca9546", 0x77);
1262+
1263+
/* Bus 10 */
1264+
dev = DEVICE(create_pca9554(soc, 9, 0x20));
1265+
1266+
/* Set FPGA_READY */
1267+
object_property_set_str(OBJECT(dev), "pin1", "high", &error_fatal);
1268+
1269+
create_pca9554(soc, 9, 0x21);
1270+
at24c_eeprom_init(i2c[9], 0x50, 64 * KiB);
1271+
at24c_eeprom_init(i2c[9], 0x51, 64 * KiB);
1272+
1273+
/* Bus 11 */
1274+
at24c_eeprom_init_rom(i2c[10], 0x50, 256, gb200nvl_bmc_fruid,
1275+
gb200nvl_bmc_fruid_len);
1276+
}
1277+
12291278
static void fby35_i2c_init(AspeedMachineState *bmc)
12301279
{
12311280
AspeedSoCState *soc = bmc->soc;
@@ -1782,6 +1831,31 @@ static void aspeed_machine_catalina_class_init(ObjectClass *oc,
17821831
aspeed_machine_ast2600_class_emmc_init(oc);
17831832
}
17841833

1834+
#define GB200NVL_BMC_RAM_SIZE ASPEED_RAM_SIZE(1 * GiB)
1835+
1836+
static void aspeed_machine_gb200nvl_class_init(ObjectClass *oc,
1837+
const void *data)
1838+
{
1839+
MachineClass *mc = MACHINE_CLASS(oc);
1840+
AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
1841+
1842+
mc->desc = "Nvidia GB200NVL BMC (Cortex-A7)";
1843+
amc->soc_name = "ast2600-a3";
1844+
amc->hw_strap1 = GB200NVL_BMC_HW_STRAP1;
1845+
amc->hw_strap2 = GB200NVL_BMC_HW_STRAP2;
1846+
amc->fmc_model = "mx66u51235f";
1847+
amc->spi_model = "mx66u51235f";
1848+
amc->num_cs = 2;
1849+
1850+
amc->spi2_model = "mx66u51235f";
1851+
amc->num_cs2 = 1;
1852+
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
1853+
amc->i2c_init = gb200nvl_bmc_i2c_init;
1854+
mc->default_ram_size = GB200NVL_BMC_RAM_SIZE;
1855+
aspeed_machine_class_init_cpus_defaults(mc);
1856+
aspeed_machine_ast2600_class_emmc_init(oc);
1857+
}
1858+
17851859
static void fby35_reset(MachineState *state, ResetType type)
17861860
{
17871861
AspeedMachineState *bmc = ASPEED_MACHINE(state);
@@ -2074,6 +2148,10 @@ static const TypeInfo aspeed_machine_types[] = {
20742148
.name = MACHINE_TYPE_NAME("bletchley-bmc"),
20752149
.parent = TYPE_ASPEED_MACHINE,
20762150
.class_init = aspeed_machine_bletchley_class_init,
2151+
}, {
2152+
.name = MACHINE_TYPE_NAME("gb200nvl-bmc"),
2153+
.parent = TYPE_ASPEED_MACHINE,
2154+
.class_init = aspeed_machine_gb200nvl_class_init,
20772155
}, {
20782156
.name = MACHINE_TYPE_NAME("catalina-bmc"),
20792157
.parent = TYPE_ASPEED_MACHINE,

hw/arm/aspeed_eeprom.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,31 @@ const uint8_t rainier_bmc_fruid[] = {
162162
0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
163163
};
164164

165+
const uint8_t gb200nvl_bmc_fruid[] = {
166+
0x01, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x00, 0xf3, 0x01, 0x0a, 0x19, 0x1f,
167+
0x0f, 0xe6, 0xc6, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0xc5, 0x50, 0x33,
168+
0x38, 0x30, 0x39, 0xcd, 0x31, 0x35, 0x38, 0x33, 0x33, 0x32, 0x34, 0x38,
169+
0x30, 0x30, 0x31, 0x35, 0x30, 0xd2, 0x36, 0x39, 0x39, 0x2d, 0x31, 0x33,
170+
0x38, 0x30, 0x39, 0x2d, 0x30, 0x34, 0x30, 0x34, 0x2d, 0x36, 0x30, 0x30,
171+
0xc0, 0x01, 0x01, 0xd6, 0x4d, 0x41, 0x43, 0x3a, 0x20, 0x33, 0x43, 0x3a,
172+
0x36, 0x44, 0x3a, 0x36, 0x36, 0x3a, 0x31, 0x34, 0x3a, 0x43, 0x38, 0x3a,
173+
0x37, 0x41, 0xc1, 0x3b, 0x01, 0x09, 0x19, 0xc6, 0x4e, 0x56, 0x49, 0x44,
174+
0x49, 0x41, 0xc9, 0x50, 0x33, 0x38, 0x30, 0x39, 0x2d, 0x42, 0x4d, 0x43,
175+
0xd2, 0x36, 0x39, 0x39, 0x2d, 0x31, 0x33, 0x38, 0x30, 0x39, 0x2d, 0x30,
176+
0x34, 0x30, 0x34, 0x2d, 0x36, 0x30, 0x30, 0xc4, 0x41, 0x45, 0x2e, 0x31,
177+
0xcd, 0x31, 0x35, 0x38, 0x33, 0x33, 0x32, 0x34, 0x38, 0x30, 0x30, 0x31,
178+
0x35, 0x30, 0xc0, 0xc4, 0x76, 0x30, 0x2e, 0x31, 0xc1, 0x00, 0x00, 0x00,
179+
0x00, 0x00, 0x00, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
180+
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
181+
182+
};
183+
165184
const size_t tiogapass_bmc_fruid_len = sizeof(tiogapass_bmc_fruid);
166185
const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
167186
const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
168187
const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
169188
const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
170189
const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
171190
const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
191+
const size_t gb200nvl_bmc_fruid_len = sizeof(gb200nvl_bmc_fruid);
192+

hw/arm/aspeed_eeprom.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ extern const size_t rainier_bb_fruid_len;
2626
extern const uint8_t rainier_bmc_fruid[];
2727
extern const size_t rainier_bmc_fruid_len;
2828

29+
extern const uint8_t gb200nvl_bmc_fruid[];
30+
extern const size_t gb200nvl_bmc_fruid_len;
31+
2932
#endif

0 commit comments

Comments
 (0)