Devicetree
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Add support for Gunyah Watchdog
@ 2025-10-31 10:18 Hrishabh Rajput via B4 Relay
  2025-10-31 10:18 ` [PATCH v4 1/2] soc: qcom: smem: Register gunyah watchdog device Hrishabh Rajput via B4 Relay
  2025-10-31 10:18 ` [PATCH v4 2/2] watchdog: Add driver for Gunyah Watchdog Hrishabh Rajput via B4 Relay
  0 siblings, 2 replies; 23+ messages in thread
From: Hrishabh Rajput via B4 Relay @ 2025-10-31 10:18 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Wim Van Sebroeck, Guenter Roeck,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-watchdog, devicetree, linux-kernel,
	Pavan Kondeti, Neil Armstrong, Dmitry Baryshkov, Hrishabh Rajput

Gunyah is a Type-I hypervisor which was introduced in the patch series
[1]. It is an open source hypervisor. The source repo is available at
[2].

The Gunyah Hypervisor doesn't allow its Virtual Machines to directly
access the MMIO watchdog. It either provides the fully emulated MMIO
based watchdog interface or the SMC-based watchdog interface depending
on the hypervisor configuration.
The SMC-based watchdog follows ARM's SMC Calling Convention (SMCCC)
version 1.1 and uses Vendor Specific Hypervisor Service Calls space.

This patch series adds support for the SMC-based watchdog interface
provided by the Gunyah Hypervisor.

This series is tested on SM8750 platform.

[1]
https://lore.kernel.org/all/20240222-gunyah-v17-0-1e9da6763d38@quicinc.com/

[2]
https://github.com/quic/gunyah-hypervisor

Signed-off-by: Hrishabh Rajput <hrishabh.rajput@oss.qualcomm.com>
---
Changes in v4:
- Move the contents of gunyah_wdt_init() to qcom_smem_probe() to make
  sure we're registering the watchdog only on the Qualcomm devices.
- Link to v3: https://lore.kernel.org/r/20251028-gunyah_watchdog-v3-1-e6d1ea438b1d@oss.qualcomm.com

Changes in v3:
- Move back to platform driver model. In module init, determine if we're
  running on a Qualcomm device and there is no supported memory-mapped
  watchdog present. Then proceed to register platform device and driver
  for SMC-based Gunyah watchdog.
- To determine if we're running on a Qualcomm device we're checking the
  presence of "qcom,smem" compatible devicetree node. As an alternative,
  we also tried using socinfo for the same purpose. When both
  gunyah_wdt and socinfo drivers were made built-in, it couldn't be
  ensured that the socinfo driver probed successfully before gunyah_wdt
  init was called. Hence, we resorted to the devicetree node approach.
- Limit the errors listed in gunyah_error to the ones that can be
  produced by the driver.
- Link to v2: https://lore.kernel.org/r/20251006-gunyah_watchdog-v2-1-b99d41d45450@oss.qualcomm.com

Changes in v2:
- Move away from platform driver model since the devicetree overlay does
  not happen by default.
  See https://lore.kernel.org/all/91002189-9d9e-48a2-8424-c42705fed3f8@quicinc.com/
- Only when MMIO-based watchdog device is absent in the devicetree,
  proceed to detect SMC-based watchdog using GUNYAH_WDT_STATUS SMC and
  initialize if SMC returns success.
- Implement pm notifiers as gunyah_wdt is no longer a platform driver so
  dev_pm_ops cannot be used.
- Pretimeout IRQ is no longer supported.
- Remove struct gunyah_wdt since it is not required.
- Move the contents of gunyah_errno.h to gunyah_wdt.c.
- Link to v1: https://lore.kernel.org/r/20250903-gunyah_watchdog-v1-0-3ae690530e4b@oss.qualcomm.com

---
Hrishabh Rajput (2):
      soc: qcom: smem: Register gunyah watchdog device
      watchdog: Add driver for Gunyah Watchdog

 MAINTAINERS                   |   1 +
 drivers/soc/qcom/smem.c       |  37 +++++++
 drivers/watchdog/Kconfig      |  14 +++
 drivers/watchdog/Makefile     |   1 +
 drivers/watchdog/gunyah_wdt.c | 249 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 302 insertions(+)
---
base-commit: 038d61fd642278bab63ee8ef722c50d10ab01e8f
change-id: 20250903-gunyah_watchdog-2d2649438e29

Best regards,
-- 
Hrishabh Rajput <hrishabh.rajput@oss.qualcomm.com>



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-11-05 12:11 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 10:18 [PATCH v4 0/2] Add support for Gunyah Watchdog Hrishabh Rajput via B4 Relay
2025-10-31 10:18 ` [PATCH v4 1/2] soc: qcom: smem: Register gunyah watchdog device Hrishabh Rajput via B4 Relay
2025-10-31 14:40   ` Dmitry Baryshkov
2025-10-31 15:24   ` Guenter Roeck
2025-11-01 18:50     ` Bjorn Andersson
2025-11-03  9:53       ` Hrishabh Rajput
2025-11-04  0:38         ` Bjorn Andersson
2025-11-03  9:50     ` Hrishabh Rajput
2025-11-01 18:45   ` Bjorn Andersson
2025-11-03 10:33     ` Hrishabh Rajput
2025-11-04  1:01       ` Bjorn Andersson
2025-11-04  3:30         ` Pavan Kondeti
2025-11-04  3:52           ` Bjorn Andersson
2025-11-04  5:03             ` Pavan Kondeti
2025-11-05 12:11               ` Pavan Kondeti
2025-10-31 10:18 ` [PATCH v4 2/2] watchdog: Add driver for Gunyah Watchdog Hrishabh Rajput via B4 Relay
2025-10-31 11:48   ` Krzysztof Kozlowski
2025-10-31 12:11     ` Pavan Kondeti
2025-10-31 12:39       ` Krzysztof Kozlowski
2025-10-31 13:19         ` Pavan Kondeti
2025-10-31 14:36   ` Dmitry Baryshkov
2025-10-31 15:42     ` Guenter Roeck
2025-11-03 11:25     ` Hrishabh Rajput

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox