Skip to contentSkip to conversation

aspeed: Add support for MSX4

PATCH Superseded Marc Olberding 1 participant 3 messages Dec 17, 2025

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover aspeed: Add support for MSX4

Add a device tree flag for the FMC_WDT2 to be disabled. Also add a device tree for MSX4 that uses the aforementioned flag. The MSX4 is a granite rapids based reference hardware platform module for the CX8 SuperNIC Switchboard. It uses the AST2600 BMC SoC for out of band management.

Patch 1 adds support for the aspeed_spi.c driver to disable the FMC_WDT2 via a device tree flag, aspeed,watchdog-disable.

Example usage is as such:

```
&fmc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fmcquad_default>;
        aspeed,watchdog-disable;
        status = "okay";

};
``` 

Patch 2 adds the devicetree for this board.

Reference architecture for the msx4:
https://developer.nvidia.com/blog/nvidia-connectx-8-supernics-advance-ai-platform-architecture-with-pcie-gen6-connectivity/

There was also some discussion of breaking
out espi_init into a seperate function so it can be reused between different board files. That will be split out into a seperate, follow-on patch series, since we're no longer creating a new board file.

---
Changes in v3:
- whitespace fixup in the Makefile changes per Andrew Jeffrey
- cleanup boolean assignment for disabling the fmc wdt2
- cleanup whitespace in changes to spi driver
- keep consistent ordering for status in dts
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Switched from using a board file to adding support for disabling FMC_WDT2 to aspeed driver
- Added the new device-tree flag to the MSX4 dts
- Dropped board file for the MSX4
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Marc Olberding (2):
drivers: spi: Add support for disabling FMC_WDT2 for aspeed
arch: arm: dts: Add dts for the nvidia msx4 board

 arch/arm/dts/Makefile                    |   1 +
 arch/arm/dts/ast2600-msx4-bmc-nvidia.dts | 112 +++++++++++++++++++++++++++++++
 drivers/spi/aspeed_spi.c                 |  17 +++--
 3 files changed, 126 insertions(+), 4 deletions(-)

---
base-commit: 8e15f5c0b1e7b11296ae6c88b686e65d509237d0
change-id: 20251107-msx4-cad1e2e4fa39

Best regards,

Signature · 1 line
Marc Olberding <[email protected]>
#1 lore raw

PATCH v3 1/2 drivers: spi: Add support for disabling FMC_WDT2 for aspeed

Adds support for disabling the ast2600 FMC_WDT2 through a device tree entry in the fmc node.
Set aspeed,watchdog-disable in your device tree to have the driver disable it.

---
 drivers/spi/aspeed_spi.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/spi/aspeed_spi.c +13 -4
index 54520122f1c48c8b2052b4b1e47445a9b990d25e..24fb465066543c1659c7d4a05c7b3f0e59c39265 100644
@@ -30,14 +30,16 @@ struct aspeed_spi_regs {
 					/* 0x30 .. 0x38 Segment Address */
 	u32 _reserved1[5];		/* .. */
 	u32 soft_rst_cmd_ctrl;	/* 0x50 Auto Soft-Reset Command Control */
-	u32 _reserved2[11];		/* .. */
+	u32 _reserved2[4];		/* .. */
+	u32 wdt2_ctrl;			/* 0x64 FMC_WDT2 control */
+	u32 _reserved3[6];		/* .. */
 	u32 dma_ctrl;			/* 0x80 DMA Control/Status */
 	u32 dma_flash_addr;		/* 0x84 DMA Flash Side Address */
 	u32 dma_dram_addr;		/* 0x88 DMA DRAM Side Address */
 	u32 dma_len;			/* 0x8c DMA Length Register */
 	u32 dma_checksum;		/* 0x90 Checksum Calculation Result */
 	u32 timings;			/* 0x94 Read Timing Compensation */
-	u32 _reserved3[1];
+	u32 _reserved4[1];
 	/* not used */
 	u32 soft_strap_status;		/* 0x9c Software Strap Status */
 	u32 write_cmd_filter_ctrl;	/* 0xa0 Write Command Filter Control */
@@ -45,7 +47,7 @@ struct aspeed_spi_regs {
 	u32 lock_ctrl_reset;		/* 0xa8 Lock Control (SRST#) */
 	u32 lock_ctrl_wdt;		/* 0xac Lock Control (Watchdog) */
 	u32 write_addr_filter[8];	/* 0xb0 Write Address Filter */
-	u32 _reserved4[12];
+	u32 _reserved5[12];
 	u32 fully_qualified_cmd[20];	/* 0x100 Fully Qualified Command */
 	u32 addr_qualified_cmd[12];	/* 0x150 Address Qualified Command */
 };
@@ -163,7 +165,8 @@ struct aspeed_spi_regs {
 #define SPI_3B_AUTO_CLR_REG   0x1e6e2510
 #define SPI_3B_AUTO_CLR       BIT(9)
 
-
+/* FMC_WDT2 control register */
+#define WDT2_ENABLE		BIT(0)
 /*
  * flash related info
  */
@@ -267,6 +270,7 @@ struct aspeed_spi_priv {
 	ulong hclk_rate; /* AHB clock rate */
 	u8 num_cs;
 	bool is_fmc;
+	bool disable_wdt;
 
 	struct aspeed_spi_flash flashes[ASPEED_SPI_MAX_CS];
 	u32 flash_count;
@@ -683,6 +687,9 @@ static int aspeed_spi_controller_init(struct aspeed_spi_priv *priv)
 	setbits_le32(&priv->regs->conf,
 		     CONF_ENABLE_W2 | CONF_ENABLE_W1 | CONF_ENABLE_W0);
 
+	if (priv->is_fmc && priv->disable_wdt)
+		clrbits_le32(&priv->regs->wdt2_ctrl, WDT2_ENABLE);
+
 	/*
 	 * Set safe default settings for each device. These will be
 	 * tuned after the SPI flash devices are probed.
@@ -1907,6 +1914,8 @@ static int aspeed_spi_probe(struct udevice *bus)
 	 * SPI controllers
 	 */
 	priv->is_fmc = dev_get_driver_data(bus);
+	priv->disable_wdt = device_is_compatible(bus, "aspeed,ast2600-fmc") &&
+	    dev_read_bool(bus, "aspeed,watchdog-disable");
 
 	ret = aspeed_spi_controller_init(priv);
 	if (ret)
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 2/2 arch: arm: dts: Add dts for the nvidia msx4 board

In reply to Marc Olberding

Adds a dts for the nvidia msx4 board, a granite rapids based motherboard

---
 arch/arm/dts/Makefile                    |   1 +
 arch/arm/dts/ast2600-msx4-bmc-nvidia.dts | 112 +++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)
arch/arm/dts/Makefile +1 -0
index dbb2fafc4f4c13302a02875cd678477ab95334cb..5141c3dc3aa025e2f5c9b2bb98216ee5c72cdf70 100755
@@ -689,6 +689,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	ast2600-facebook.dtb \
 	ast2600-fpga.dtb \
 	ast2600-gb200nvl-bmc-nvidia.dtb \
+	ast2600-msx4-bmc-nvidia.dtb \
 	ast2600-greatlakes.dtb \
 	ast2600-intel.dtb \
 	ast2600-intel.dtb \
arch/arm/dts/ast2600-msx4-bmc-nvidia.dts new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
2.34.1