[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251007083650.2155317-4-chin-ting_kuo@aspeedtech.com>
Date: Tue, 7 Oct 2025 16:36:50 +0800
From: Chin-Ting Kuo <chin-ting_kuo@...eedtech.com>
To: <wim@...ux-watchdog.org>, <linux@...ck-us.net>, <robh@...nel.org>,
<krzk+dt@...nel.org>, <conor+dt@...nel.org>, <joel@....id.au>,
<andrew@...econstruct.com.au>, <linux-watchdog@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-aspeed@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<BMC-SW@...eedtech.com>
Subject: [PATCH 3/3] watchdog: aspeed: Add support for AST2700 platform
Add AST2700 platform support to the ASPEED watchdog driver. This includes
a new per-platform configuration with SCU reset status register at
SCU1_070 and support for 5 reset mask registers.
Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@...eedtech.com>
---
drivers/watchdog/aspeed_wdt.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index e15f70c5e416..f2245a28ac10 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -84,10 +84,24 @@ static const struct aspeed_wdt_config ast2600_config = {
.num_reset_masks = 2,
};
+static const struct aspeed_wdt_config ast2700_config = {
+ .ext_pulse_width_mask = 0xfffff,
+ .irq_shift = 0,
+ .irq_mask = GENMASK(31, 10),
+ .scu = {
+ .compatible = "aspeed,ast2700-scu0",
+ .reset_status_reg = 0x70,
+ .wdt_reset_mask = 0xf,
+ .wdt_reset_mask_shift = 0,
+ },
+ .num_reset_masks = 5,
+};
+
static const struct of_device_id aspeed_wdt_of_table[] = {
{ .compatible = "aspeed,ast2400-wdt", .data = &ast2400_config },
{ .compatible = "aspeed,ast2500-wdt", .data = &ast2500_config },
{ .compatible = "aspeed,ast2600-wdt", .data = &ast2600_config },
+ { .compatible = "aspeed,ast2700-wdt", .data = &ast2700_config },
{ },
};
MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table);
@@ -484,8 +498,9 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
}
if ((of_device_is_compatible(np, "aspeed,ast2500-wdt")) ||
- (of_device_is_compatible(np, "aspeed,ast2600-wdt"))) {
- u32 reset_mask[2];
+ (of_device_is_compatible(np, "aspeed,ast2600-wdt")) ||
+ (of_device_is_compatible(np, "aspeed,ast2700-wdt"))) {
+ u32 reset_mask[5];
size_t nrstmask = wdt->cfg->num_reset_masks;
u32 reg = readl(wdt->base + WDT_RESET_WIDTH);
int i;
--
2.34.1
Powered by blists - more mailing lists