{"id":2221415,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2221415/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20260408-hpe-gsc-upstream-v1-4-2be1fb7cbbfc@hpe.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260408-hpe-gsc-upstream-v1-4-2be1fb7cbbfc@hpe.com>","list_archive_url":null,"date":"2026-04-08T19:24:16","name":"[4/9] watchdog: Add HPE GSC watchdog driver","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"daddd64442996aa434cdcf86f0e460aed6298458","submitter":{"id":93099,"url":"http://patchwork.ozlabs.org/api/1.2/people/93099/?format=json","name":"Jorge Cisneros","email":"jorge.cisneros@hpe.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/1.2/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20260408-hpe-gsc-upstream-v1-4-2be1fb7cbbfc@hpe.com/mbox/","series":[{"id":499288,"url":"http://patchwork.ozlabs.org/api/1.2/series/499288/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=499288","date":"2026-04-08T19:24:17","name":"arm: hpe: Add HPE GSC (Gen12) BMC SoC support","version":1,"mbox":"http://patchwork.ozlabs.org/series/499288/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2221415/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2221415/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=hpe.com header.i=@hpe.com header.a=rsa-sha256\n header.s=pps0720 header.b=nSVqmSya;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=hpe.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=hpe.com header.i=@hpe.com header.b=\"nSVqmSya\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=hpe.com","phobos.denx.de;\n spf=pass smtp.mailfrom=jorge.cisneros@hpe.com"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fs0TJ5MP7z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 23:02:28 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 91404841CD;\n\tThu,  9 Apr 2026 15:00:55 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 1AC7684118; Wed,  8 Apr 2026 21:25:08 +0200 (CEST)","from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com\n [148.163.147.86])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0CADB84120\n for <u-boot@lists.denx.de>; Wed,  8 Apr 2026 21:25:02 +0200 (CEST)","from pps.filterd (m0134422.ppops.net [127.0.0.1])\n by mx0b-002e3701.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 638F2jWq1851674; Wed, 8 Apr 2026 19:24:23 GMT","from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204])\n by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 4ddnu8e096-1\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Wed, 08 Apr 2026 19:24:22 +0000 (GMT)","from p1lg14886.dc01.its.hpecorp.net (unknown [10.119.18.237])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by p1lg14878.it.hpe.com (Postfix) with ESMTPS id 0E41C2BACC;\n Wed,  8 Apr 2026 19:24:22 +0000 (UTC)","from [127.0.1.1] (unknown [16.231.227.39])\n by p1lg14886.dc01.its.hpecorp.net (Postfix) with ESMTP id E4CF8805E61;\n Wed,  8 Apr 2026 19:24:20 +0000 (UTC)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=cc\n :content-transfer-encoding:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=pps0720; bh=Fa\n dC60KT/B5h2aPSJuhItBgpnUYaL6NRPb8xrgcRRh8=; b=nSVqmSya2A0Pnu4wyx\n FSPjEPuuXT1F34a9yVpsPBBsjMPs1EABXbiokpyowPDwZ5q2UK6c8AKweuunylHb\n DTQ9p1RLhicLGQnP33oPWk0fOCm2Afs16sOzJ6SH4Lh0pcgzK4crp4vW3zrEcpt+\n CX1vhLmR9pgvAicVsFMrQyCF3njWbweQ+tf28eyq3tKOeDFJ90QJNPmmjs5hKpZ5\n rFe++uGPjlO0Ocip4x/Nk6vrgOPiynp+s8yahBzSfgxtk6UUd8e7kf4u0zi5aEmQ\n YBqokpkwr4Czr3IU7D3zB34/aRXStIRt1gQyVy4S5cNDWvwDHsEj07hqLkI1VVkN\n ygqw==","From":"Jorge Cisneros <jorge.cisneros@hpe.com>","Date":"Wed, 08 Apr 2026 19:24:16 +0000","Subject":"[PATCH 4/9] watchdog: Add HPE GSC watchdog driver","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260408-hpe-gsc-upstream-v1-4-2be1fb7cbbfc@hpe.com>","References":"<20260408-hpe-gsc-upstream-v1-0-2be1fb7cbbfc@hpe.com>","In-Reply-To":"<20260408-hpe-gsc-upstream-v1-0-2be1fb7cbbfc@hpe.com>","To":"u-boot@lists.denx.de","Cc":"Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,\n Tom Rini <trini@konsulko.com>, Jean-Marie Verdun <verdun@hpe.com>,\n Nick Hawkins <nick.hawkins@hpe.com>,\n Casey Connolly <casey.connolly@linaro.org>, Anshul Dalal <anshuld@ti.com>,\n Tien Fong Chee <tien.fong.chee@altera.com>, Peng Fan <peng.fan@nxp.com>,\n Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>,\n Tingting Meng <tingting.meng@altera.com>, Alice Guo <alice.guo@nxp.com>,\n Quentin Schulz <quentin.schulz@cherry.de>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Tony Dinh <mibodhi@gmail.com>,\n Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Stefan Roese <stefan.roese@mailbox.org>,\n Svyatoslav Ryhel <clamor95@gmail.com>,\n Patrice Chotard <patrice.chotard@foss.st.com>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Shmuel Leib Melamud <smelamud@redhat.com>,\n Lukasz Majewski <lukma@nabladev.com>,\n Sumit Garg <sumit.garg@oss.qualcomm.com>,\n Chen-Yu Tsai <wens@kernel.org>, Justin Klaassen <justin@tidylabs.net>,\n Neha Malcom Francis <n-francis@ti.com>,\n Jamie Gibbons <jamie.gibbons@microchip.com>,\n Leo Yu-Chi Liang <ycliang@andestech.com>,\n Jerome Forissier <jerome.forissier@arm.com>,\n Simon Glass <sjg@chromium.org>,\n Neil Armstrong <neil.armstrong@linaro.org>, Yao Zi <me@ziyao.cc>,\n Kuan-Wei Chiu <visitorckw@gmail.com>,\n \"Kory Maincent (TI.com)\" <kory.maincent@bootlin.com>,\n Raymond Mao <raymond.mao@riscstar.com>,\n Philip Molloy <philip.molloy@analog.com>,\n Jorge Cisneros <jorge.cisneros@hpe.com>","X-Mailer":"b4 0.15.1","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDA4MDE4MSBTYWx0ZWRfX6HI9+/9pRAMS\n mtCO+wpgfdpANqGeT7hM7AkBTZlrF/svLpDC4DQ1m1BToGrRurbplkZX3uX9th0c88xHpxR7QYs\n MVdX1HDsM6za7XmXxtBJ83aCQPrskghpH67Lk09MVqACeZ8/rLh5jKZ6EAcovTb3DeDl3z4Vpwu\n VYRMrytF5dTTFViFpnivxhJDweUoMiCevFocej+kCyaxzj2XiM2O1mImTDaA+70ykN3EwgvSjCg\n oXanF/PBmkjVn5VNDXi4SqKsIQLS+LbpT/lBnRiPEg3MEHP85nwLOzD25YD7yMSrrMe1lEQVdaH\n xIp3X6/l7fy02JpF8qLtwCvJojl42IvJ2bryfCdhlhSBZwlGNx4Awd3lfhAwwSCSurqXpDWg2zP\n kgsiutxJIy0YH1m4r32HJYXOmZOW2B0RyjzyROGGZXq65H8pUoJXXY3GRa/5C2We31KRtibm1Qy\n KbjlUb+tkdvO3/0y3nQ==","X-Authority-Analysis":"v=2.4 cv=LJhWhpW9 c=1 sm=1 tr=0 ts=69d6ab66 cx=c_pps\n a=UObrlqRbTUrrdMEdGJ+KZA==:117 a=UObrlqRbTUrrdMEdGJ+KZA==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=gQcMVamqm3wCPoSYhaRC:22 a=ModqzXLkJJ0tFyq98apW:22 a=MvuuwTCpAAAA:8\n a=NIagIq1R15lFhUNdsw8A:9 a=QEXdDO2ut3YA:10","X-Proofpoint-GUID":"GOkdmUhvl5-SIBKz1gmSGi8_W8FEy_ry","X-Proofpoint-ORIG-GUID":"GOkdmUhvl5-SIBKz1gmSGi8_W8FEy_ry","X-HPE-SCL":"-1","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-08_05,2026-04-08_01,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 clxscore=1015\n lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080181","X-Mailman-Approved-At":"Thu, 09 Apr 2026 15:00:51 +0200","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"Add watchdog driver for the HPE GSC SoC. The GSC watchdog uses two\nseparate register regions: a counter register and a control register.\nWriting the counter value resets the watchdog timer, while writing to\nthe control register enables or disables the watchdog.\n\nSupported operations: start, stop, reset, and expire_now.\n\nSigned-off-by: Jorge Cisneros <jorge.cisneros@hpe.com>\n---\n drivers/watchdog/Kconfig   |   7 +++\n drivers/watchdog/Makefile  |   1 +\n drivers/watchdog/gsc_wdt.c | 110 +++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 118 insertions(+)","diff":"diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig\nindex 35ae7d106b1..692a7eb4304 100644\n--- a/drivers/watchdog/Kconfig\n+++ b/drivers/watchdog/Kconfig\n@@ -195,6 +195,13 @@ config WDT_DAVINCI\n \t  Select this to enable the watchdog timer for DaVinci SoCs such as the\n \t  OMAP-L138.\n \n+config WDT_GSC\n+\tbool \"HPE GSC watchdog support\"\n+\tdepends on WDT\n+\thelp\n+\t  Enable support for the watchdog timer in HPE GSC BMC SoC\n+\t  used in HPE Gen12 servers.\n+\n config WDT_GPIO\n \tbool \"External gpio watchdog support\"\n \tdepends on WDT\ndiff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile\nindex 02e2674f8af..f7397e03527 100644\n--- a/drivers/watchdog/Makefile\n+++ b/drivers/watchdog/Makefile\n@@ -32,6 +32,7 @@ obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o\n obj-$(CONFIG_WDT_DA9063) += da9063-wdt.o\n obj-$(CONFIG_WDT_DAVINCI) += davinci_wdt.o\n obj-$(CONFIG_WDT_FTWDT010) += ftwdt010_wdt.o\n+obj-$(CONFIG_WDT_GSC) += gsc_wdt.o\n obj-$(CONFIG_$(SPL_TPL_)WDT_GPIO) += gpio_wdt.o\n obj-$(CONFIG_WDT_MAX6370) += max6370_wdt.o\n obj-$(CONFIG_WDT_MCF) += mcf_wdt.o\ndiff --git a/drivers/watchdog/gsc_wdt.c b/drivers/watchdog/gsc_wdt.c\nnew file mode 100644\nindex 00000000000..b535f47e052\n--- /dev/null\n+++ b/drivers/watchdog/gsc_wdt.c\n@@ -0,0 +1,110 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/* Copyright (C) 2022-2025 Hewlett Packard Enterprise Development LP */\n+\n+#include <dm.h>\n+#include <errno.h>\n+#include <log.h>\n+#include <wdt.h>\n+#include <asm/io.h>\n+#include <linux/err.h>\n+\n+#define MASK_WDGCS_ENABLE\tBIT(0)\n+#define MASK_WDGCS_RELOAD\tBIT(2)\n+#define MASK_WDGCS_NMIEN\tBIT(3)\n+#define MASK_WDGCS_WARN\t\tBIT(7)\n+\n+#define WDT_MAX_TIMEOUT_MS\t655350\n+#define SECS_TO_WDOG_TICKS(x)\t((x) * 100)\n+\n+struct gsc_wdt_priv {\n+\tvoid __iomem *counter;\n+\tvoid __iomem *control;\n+};\n+\n+static int gsc_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)\n+{\n+\tstruct gsc_wdt_priv *priv = dev_get_priv(dev);\n+\tu8 val;\n+\tu16 timeout_secs;\n+\n+\tif (timeout_ms > WDT_MAX_TIMEOUT_MS)\n+\t\ttimeout_ms = WDT_MAX_TIMEOUT_MS;\n+\telse if (timeout_ms == 0)\n+\t\ttimeout_ms = CONFIG_WATCHDOG_TIMEOUT_MSECS;\n+\n+\ttimeout_secs = timeout_ms / 1000;\n+\twritew(SECS_TO_WDOG_TICKS(timeout_secs), priv->counter);\n+\n+\tval = readb(priv->control);\n+\tval |= MASK_WDGCS_ENABLE;\n+\twriteb(val, priv->control);\n+\n+\treturn 0;\n+}\n+\n+static int gsc_wdt_stop(struct udevice *dev)\n+{\n+\tstruct gsc_wdt_priv *priv = dev_get_priv(dev);\n+\tu8 val;\n+\n+\tval = readb(priv->control);\n+\tval &= ~MASK_WDGCS_ENABLE;\n+\twriteb(val, priv->control);\n+\n+\treturn 0;\n+}\n+\n+static int gsc_wdt_reset(struct udevice *dev)\n+{\n+\tstruct gsc_wdt_priv *priv = dev_get_priv(dev);\n+\tu8 val;\n+\n+\tval = readb(priv->control);\n+\tval |= MASK_WDGCS_RELOAD;\n+\twriteb(val, priv->control);\n+\n+\treturn 0;\n+}\n+\n+static int gsc_wdt_expire_now(struct udevice *dev, ulong flags)\n+{\n+\treturn gsc_wdt_start(dev, 1, flags);\n+}\n+\n+static const struct wdt_ops gsc_wdt_ops = {\n+\t.start = gsc_wdt_start,\n+\t.reset = gsc_wdt_reset,\n+\t.stop = gsc_wdt_stop,\n+\t.expire_now = gsc_wdt_expire_now,\n+};\n+\n+static const struct udevice_id gsc_wdt_ids[] = {\n+\t{ .compatible = \"hpe,gsc-wdt\" },\n+\t{ }\n+};\n+\n+static int gsc_wdt_probe(struct udevice *dev)\n+{\n+\tstruct gsc_wdt_priv *priv = dev_get_priv(dev);\n+\n+\tpriv->counter = dev_remap_addr_index(dev, 0);\n+\tif (!priv->counter)\n+\t\treturn -EINVAL;\n+\n+\tpriv->control = dev_remap_addr_index(dev, 1);\n+\tif (!priv->control)\n+\t\treturn -EINVAL;\n+\n+\tgsc_wdt_stop(dev);\n+\n+\treturn 0;\n+}\n+\n+U_BOOT_DRIVER(gsc_wdt) = {\n+\t.name = \"gsc_wdt\",\n+\t.id = UCLASS_WDT,\n+\t.of_match = gsc_wdt_ids,\n+\t.probe = gsc_wdt_probe,\n+\t.priv_auto = sizeof(struct gsc_wdt_priv),\n+\t.ops = &gsc_wdt_ops,\n+};\n","prefixes":["4/9"]}