Skip to contentSkip to conversation

aspeed: Add Supermicro X11 SPI machine type

PATCH In review Guenter Roeck 3 participants 8 messages Oct 25, 2022 – Sep 30, 2025 Arm/Aspeed machine support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aspeed: Add Supermicro X11 SPI machine type

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

---
 hw/arm/aspeed.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
hw/arm/aspeed.c +33 -0
index c282ead38f..56d007de5a 100644
@@ -71,6 +71,16 @@ struct AspeedMachineState {
         SCU_HW_STRAP_VGA_SIZE_SET(VGA_16M_DRAM) |                       \
         SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
 
+/* TODO: Find the actual hardware value */
+#define SUPERMICROX11_SPI_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_HW_STRAP_SPI_WIDTH |                                        \
+        SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_M_S_EN))
+
 /* AST2500 evb hardware value: 0xF100C2E6 */
 #define AST2500_EVB_HW_STRAP1 ((                                        \
         AST2500_HW_STRAP1_DEFAULTS |                                    \
@@ -1172,6 +1182,25 @@ static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc,
     mc->default_ram_size = 256 * MiB;
 }
 
+static void aspeed_machine_supermicrox11_spi_bmc_class_init(ObjectClass *oc,
+                                                            void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+    mc->desc       = "Supermicro X11 SPI BMC (ARM1176)";
+    amc->soc_name  = "ast2500-a1";
+    amc->hw_strap1 = SUPERMICROX11_SPI_BMC_HW_STRAP1;
+    amc->fmc_model = "mx25l25635e";
+    amc->spi_model = "mx25l25635e";
+    amc->num_cs    = 1;
+    amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
+    amc->i2c_init  = palmetto_bmc_i2c_init;
+    mc->default_ram_size = 512 * MiB;
+    mc->default_cpus = mc->min_cpus = mc->max_cpus =
+        aspeed_soc_num_cpus(amc->soc_name);
+}
+
 static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
@@ -1546,6 +1575,10 @@ static const TypeInfo aspeed_machine_types[] = {
         .name          = MACHINE_TYPE_NAME("supermicrox11-bmc"),
         .parent        = TYPE_ASPEED_MACHINE,
         .class_init    = aspeed_machine_supermicrox11_bmc_class_init,
+    }, {
+        .name          = MACHINE_TYPE_NAME("supermicrox11-spi-bmc"),
+        .parent        = TYPE_ASPEED_MACHINE,
+        .class_init    = aspeed_machine_supermicrox11_spi_bmc_class_init,
     }, {
         .name          = MACHINE_TYPE_NAME("ast2500-evb"),
         .parent        = TYPE_ASPEED_MACHINE,
Signature · 1 line
2.36.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Quoted 4 lines
---
  hw/arm/aspeed.c | 33 +++++++++++++++++++++++++++++++++
  1 file changed, 33 insertions(+)
#2 lore raw
In reply to Guenter Roeck
Quoted 12 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

Quoted 6 lines

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Hello Guenter

Would it be possible to contribute a functional test for this machine ?

Since this machine contributes little to the Aspeed models, its value lies in the firmware it can run to exercise the models. Without functional tests, I plan to schedule the removal in the QEMU 10.2 cycle.

Thanks,

C.

Quoted 62 lines
---
  hw/arm/aspeed.c | 33 +++++++++++++++++++++++++++++++++
  1 file changed, 33 insertions(+)
hw/arm/aspeed.c +33 -0
index c282ead38f..56d007de5a 100644
@@ -71,6 +71,16 @@ struct AspeedMachineState {
          SCU_HW_STRAP_VGA_SIZE_SET(VGA_16M_DRAM) |                       \
          SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
 
+/* TODO: Find the actual hardware value */
+#define SUPERMICROX11_SPI_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_HW_STRAP_SPI_WIDTH |                                        \
+        SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_M_S_EN))
+
  /* AST2500 evb hardware value: 0xF100C2E6 */
  #define AST2500_EVB_HW_STRAP1 ((                                        \
          AST2500_HW_STRAP1_DEFAULTS |                                    \
@@ -1172,6 +1182,25 @@ static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc,
      mc->default_ram_size = 256 * MiB;
  }
 
+static void aspeed_machine_supermicrox11_spi_bmc_class_init(ObjectClass *oc,
+                                                            void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+    mc->desc       = "Supermicro X11 SPI BMC (ARM1176)";
+    amc->soc_name  = "ast2500-a1";
+    amc->hw_strap1 = SUPERMICROX11_SPI_BMC_HW_STRAP1;
+    amc->fmc_model = "mx25l25635e";
+    amc->spi_model = "mx25l25635e";
+    amc->num_cs    = 1;
+    amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
+    amc->i2c_init  = palmetto_bmc_i2c_init;
+    mc->default_ram_size = 512 * MiB;
+    mc->default_cpus = mc->min_cpus = mc->max_cpus =
+        aspeed_soc_num_cpus(amc->soc_name);
+}
+
  static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *data)
  {
      MachineClass *mc = MACHINE_CLASS(oc);
@@ -1546,6 +1575,10 @@ static const TypeInfo aspeed_machine_types[] = {
          .name          = MACHINE_TYPE_NAME("supermicrox11-bmc"),
          .parent        = TYPE_ASPEED_MACHINE,
          .class_init    = aspeed_machine_supermicrox11_bmc_class_init,
+    }, {
+        .name          = MACHINE_TYPE_NAME("supermicrox11-spi-bmc"),
+        .parent        = TYPE_ASPEED_MACHINE,
+        .class_init    = aspeed_machine_supermicrox11_spi_bmc_class_init,
      }, {
          .name          = MACHINE_TYPE_NAME("ast2500-evb"),
          .parent        = TYPE_ASPEED_MACHINE,
#3 lore raw
Quoted 22 lines · Cédric Le Goater
Quoted 12 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

Quoted 6 lines

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Hello Guenter

Quoted 8 lines

Would it be possible to contribute a functional test for this machine ?

Since this machine contributes little to the Aspeed models, its value lies in the firmware it can run to exercise the models. Without functional tests, I plan to schedule the removal in the QEMU 10.2 cycle.

I use it to test the Linux kernel. Nor worth enough to spend more time on. Just drop it; I'll drop the respective test runs.

Guenter

#4 lore raw
Quoted 26 lines · Guenter Roeck
Quoted 25 lines · Cédric Le Goater
Quoted 12 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

Quoted 6 lines

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Hello Guenter

Would it be possible to contribute a functional test for this machine ?

Quoted 8 lines
Quoted 5 lines

Since this machine contributes little to the Aspeed models, its value lies in the firmware it can run to exercise the models. Without functional tests, I plan to schedule the removal in the QEMU 10.2 cycle.

I use it to test the Linux kernel. Nor worth enough to spend more time on. Just drop it; I'll drop the respective test runs.

Can the FW be downloaded ?

C.

#5 lore raw
Quoted 33 lines · Cédric Le Goater
Quoted 32 lines · Guenter Roeck
Quoted 30 lines · Cédric Le Goater
Quoted 12 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

Quoted 6 lines

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Hello Guenter

Would it be possible to contribute a functional test for this machine ?

Since this machine contributes little to the Aspeed models, its value lies in the firmware it can run to exercise the models. Without functional tests, I plan to schedule the removal in the QEMU 10.2 cycle.

Quoted 4 lines
Quoted 2 lines

I use it to test the Linux kernel. Nor worth enough to spend more time on. Just drop it; I'll drop the respective test runs.

Can the FW be downloaded ?

I have no idea. I only test the Linux kernel (more specifically, the Linux kernel drivers). I already have to work around issues with the board that because the Linux kernel no longer supports the Macronix flash on that board as emulated by qemu. My patch to let me specify the flash model for aspeed boards in qemu was rejected. So I already have to carry a downstream qemu change to support it. Obviously no one else uses/tests it, or they would have reported that problem. So you might as well drop it.

The flash problem is also seen with ast2600-evb, making me wonder if that board could/should be dropped as well.

Guenter

#6 lore raw
Quoted 34 lines · Guenter Roeck
Quoted 33 lines · Cédric Le Goater
Quoted 32 lines · Guenter Roeck
Quoted 30 lines · Cédric Le Goater
Quoted 12 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

Quoted 6 lines

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Hello Guenter

Would it be possible to contribute a functional test for this machine ?

Since this machine contributes little to the Aspeed models, its value lies in the firmware it can run to exercise the models. Without functional tests, I plan to schedule the removal in the QEMU 10.2 cycle.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I use it to test the Linux kernel. Nor worth enough to spend more time on. Just drop it; I'll drop the respective test runs.

Can the FW be downloaded ?

I have no idea. I only test the Linux kernel (more specifically, the Linux kernel drivers).

OK. you boot with -kernel and a custom rootfs I guess. That's OK for a functional test too.

Quoted 3 lines

I already have to work around issues with the board that because the Linux kernel no longer supports the Macronix flash on that board as emulated by qemu.

Ah. I am the kernel maintainer of the spi driver. So interested to know more. Is that related to the fact that there are mx25l25635e and mx25l25635f flash devices with the same device ID but different SFDP tables ? One has 4B support, the other not.

Quoted 2 lines

My patch to let me specify the flash model for aspeed boards in qemu was rejected.

The aspeed machines have these options :

fmc-model=<string> - Change the FMC Flash model
spi-model=<string> - Change the SPI Flash model

Isn't that enough ?

Quoted 1 line

So I already have to carry a downstream qemu change to support it.

I don't see any change under :

https://github.com/groeck/qemu/commits/v10.0.2-local/

May be you are mistaking with the Nuvoton boards ?

Upstream lacks your UHCI proposal. Unfortunately, I don't know any reviewers who could help us merge.

Quoted 2 lines

Obviously no one else uses/tests it, or they would have reported that problem. So you might as well drop it.

Since you are using it for kernel, I probably won't.

Quoted 2 lines

The flash problem is also seen with ast2600-evb, making me wonder if that board could/should be dropped as well.

the ast2600 EVB has numerous firmware images. See

https://github.com/AspeedTech-BMC/openbmc/releases/

It's heavily used and none reported an issue.

buildroot has a defconfig for it too.

Thanks,

C.

#7 lore raw
Quoted 65 lines · Cédric Le Goater
Quoted 34 lines · Guenter Roeck
Quoted 33 lines · Cédric Le Goater
Quoted 32 lines · Guenter Roeck
Quoted 30 lines · Cédric Le Goater
Quoted 12 lines · Guenter Roeck

supermicrox11-bmc is configured with ast2400-a1 SoC. This does not match the Supermicro documentation for X11 BMCs, and it does not match the devicetree file in the Linux kernel.

As it turns out, some Supermicro X11 motherboards use AST2400 SoCs, while others use AST2500.

Introduce new machine type supermicrox11-spi-bmc with AST2500 SoC to match the devicetree description in the Linux kernel. Hardware configuration details for this machine type are guesswork and taken from defaults as well as from the Linux kernel devicetree file.

Quoted 6 lines

The new machine type was tested with aspeed-bmc-supermicro-x11spi.dts from the Linux kernel and with Linux versions 6.0.3 and 6.1-rc2. Linux booted successfully from initrd and from both SPI interfaces. Ethernet interfaces were confirmed to be operational.

Hello Guenter

Would it be possible to contribute a functional test for this machine ?

Since this machine contributes little to the Aspeed models, its value lies in the firmware it can run to exercise the models. Without functional tests, I plan to schedule the removal in the QEMU 10.2 cycle.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I use it to test the Linux kernel. Nor worth enough to spend more time on. Just drop it; I'll drop the respective test runs.

Can the FW be downloaded ?

I have no idea. I only test the Linux kernel (more specifically, the Linux kernel drivers).

OK. you boot with -kernel and a custom rootfs I guess. That's OK for a functional test too.

Quoted 3 lines

I already have to work around issues with the board that because the Linux kernel no longer supports the Macronix flash on that board as emulated by qemu.

Ah. I am the kernel maintainer of the spi driver. So interested to know more. Is that related to the fact that there are mx25l25635e and mx25l25635f flash devices with the same device ID but different SFDP tables ? One has 4B support, the other not.

Quoted 2 lines

My patch to let me specify the flash model for aspeed boards in qemu was rejected.

q
The aspeed machines have these options :

  fmc-model=<string>     - Change the FMC Flash model spi-model=<string>     - Change the SPI Flash model

Isn't that enough ?

Quoted 8 lines
Quoted 1 line

So I already have to carry a downstream qemu change to support it.

I don't see any change under :

   https://github.com/groeck/qemu/commits/v10.0.2-local/

May be you are mistaking with the Nuvoton boards ?

Yes. Sorry, I am confused. That was for quanta-gsj and kudo-bmc where I had the same problem with Macronix flashes.

Quoted 3 lines

Upstream lacks your UHCI proposal. Unfortunately, I don't know any reviewers who could help us merge.

I'll just carry it downstream until I am getting tired of maintaining it.

Thanks,
Guenter