* [PATCH v2 0/2] watchdog: Exynos990 WDT enablement
@ 2025-02-17 19:57 Igor Belwon
2025-02-17 19:57 ` [PATCH v2 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible Igor Belwon
2025-02-17 19:57 ` [PATCH v2 2/2] watchdog: s3c2410_wdt: Add exynos990-wdt compatible data Igor Belwon
0 siblings, 2 replies; 5+ messages in thread
From: Igor Belwon @ 2025-02-17 19:57 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Krzysztof Kozlowski, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-samsung-soc, Igor Belwon
Hi all!
This series enables the two clusters of the Exynos990 watchdog timer
to be used. Weirdly enough, this SoC is missing the cl1 cluster, it has
the cl0 cluster and then jumps over to cl2. As such, new cluster index
code has been added to accomodate this oddity.
Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
Changes in v2:
- bindings: Fix cluster-index limiting
- Link to v1: https://lore.kernel.org/r/20250217-exynos990-wdt-v1-0-9b49df5256b0@mentallysanemainliners.org
---
Igor Belwon (2):
dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible
watchdog: s3c2410_wdt: Add exynos990-wdt compatible data
.../devicetree/bindings/watchdog/samsung-wdt.yaml | 11 +++---
drivers/watchdog/s3c2410_wdt.c | 39 +++++++++++++++++++++-
2 files changed, 45 insertions(+), 5 deletions(-)
---
base-commit: 253c82b3a2cec22bf9db65645f934fbe095899a3
change-id: 20250217-exynos990-wdt-0e9100ec5f99
Best regards,
--
Igor Belwon <igor.belwon@mentallysanemainliners.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible
2025-02-17 19:57 [PATCH v2 0/2] watchdog: Exynos990 WDT enablement Igor Belwon
@ 2025-02-17 19:57 ` Igor Belwon
2025-02-23 9:54 ` Krzysztof Kozlowski
2025-02-17 19:57 ` [PATCH v2 2/2] watchdog: s3c2410_wdt: Add exynos990-wdt compatible data Igor Belwon
1 sibling, 1 reply; 5+ messages in thread
From: Igor Belwon @ 2025-02-17 19:57 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Krzysztof Kozlowski, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-samsung-soc, Igor Belwon
Add a dt-binding compatible for the Exynos990 Watchdog timer.
This watchdog is compatible with the GS101/Exynos850 design, as
such it requires the cluster-index and syscon-phandle properties
to be present. It also contains a cl2 cluster, as such the
cluster-index property has been expanded.
Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
index d175ae9683366d33b1f9d9d820501d1e7c5964bd..53fc64f5b56d33f910395d32b35e0905b8b9aa53 100644
--- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
@@ -25,6 +25,7 @@ properties:
- samsung,exynos5420-wdt # for Exynos5420
- samsung,exynos7-wdt # for Exynos7
- samsung,exynos850-wdt # for Exynos850
+ - samsung,exynos990-wdt # for Exynos990
- samsung,exynosautov9-wdt # for Exynosautov9
- samsung,exynosautov920-wdt # for Exynosautov920
- items:
@@ -49,14 +50,14 @@ properties:
samsung,cluster-index:
$ref: /schemas/types.yaml#/definitions/uint32
description:
- Index of CPU cluster on which watchdog is running (in case of Exynos850
- or Google gs101).
+ Index of CPU cluster on which watchdog is running (in case of Exynos850,
+ Exynos990 or Google gs101).
samsung,syscon-phandle:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to the PMU system controller node (in case of Exynos5250,
- Exynos5420, Exynos7, Exynos850 and gs101).
+ Exynos5420, Exynos7, Exynos850, Exynos990 and gs101).
required:
- compatible
@@ -77,6 +78,7 @@ allOf:
- samsung,exynos5420-wdt
- samsung,exynos7-wdt
- samsung,exynos850-wdt
+ - samsung,exynos990-wdt
- samsung,exynosautov9-wdt
- samsung,exynosautov920-wdt
then:
@@ -89,6 +91,7 @@ allOf:
enum:
- google,gs101-wdt
- samsung,exynos850-wdt
+ - samsung,exynos990-wdt
- samsung,exynosautov9-wdt
- samsung,exynosautov920-wdt
then:
@@ -102,7 +105,7 @@ allOf:
- const: watchdog
- const: watchdog_src
samsung,cluster-index:
- enum: [0, 1]
+ enum: [0, 1, 2]
required:
- samsung,cluster-index
else:
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] watchdog: s3c2410_wdt: Add exynos990-wdt compatible data
2025-02-17 19:57 [PATCH v2 0/2] watchdog: Exynos990 WDT enablement Igor Belwon
2025-02-17 19:57 ` [PATCH v2 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible Igor Belwon
@ 2025-02-17 19:57 ` Igor Belwon
2025-02-23 9:54 ` Krzysztof Kozlowski
1 sibling, 1 reply; 5+ messages in thread
From: Igor Belwon @ 2025-02-17 19:57 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Krzysztof Kozlowski, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-samsung-soc, Igor Belwon
The Exynos990 has two watchdog clusters - cl0 and cl2. Add new
driver data for these two clusters, making it possible to use the
watchdog timer on this SoC.
Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
drivers/watchdog/s3c2410_wdt.c | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 30450e99e5e9d40b5596e2f87cc47c80ccbd2ddd..8f406e08d848646348dafabced5bc0f2bbcf49df 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -80,6 +80,10 @@
#define GS_CLUSTER2_NONCPU_INT_EN 0x1644
#define GS_RST_STAT_REG_OFFSET 0x3B44
+#define EXYNOS990_CLUSTER2_NONCPU_OUT 0x1620
+#define EXYNOS990_CLUSTER2_NONCPU_INT_EN 0x1644
+#define EXYNOS990_CLUSTER2_WDTRESET_BIT 23
+
/**
* DOC: Quirk flags for different Samsung watchdog IP-cores
*
@@ -257,6 +261,32 @@ static const struct s3c2410_wdt_variant drv_data_exynos850_cl1 = {
QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN,
};
+static const struct s3c2410_wdt_variant drv_data_exynos990_cl0 = {
+ .mask_reset_reg = GS_CLUSTER0_NONCPU_INT_EN,
+ .mask_bit = 2,
+ .mask_reset_inv = true,
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
+ .rst_stat_bit = EXYNOS850_CLUSTER0_WDTRESET_BIT,
+ .cnt_en_reg = EXYNOSAUTOV920_CLUSTER0_NONCPU_OUT,
+ .cnt_en_bit = 7,
+ .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
+ QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN |
+ QUIRK_HAS_DBGACK_BIT,
+};
+
+static const struct s3c2410_wdt_variant drv_data_exynos990_cl2 = {
+ .mask_reset_reg = EXYNOS990_CLUSTER2_NONCPU_INT_EN,
+ .mask_bit = 2,
+ .mask_reset_inv = true,
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
+ .rst_stat_bit = EXYNOS990_CLUSTER2_WDTRESET_BIT,
+ .cnt_en_reg = EXYNOS990_CLUSTER2_NONCPU_OUT,
+ .cnt_en_bit = 7,
+ .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
+ QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN |
+ QUIRK_HAS_DBGACK_BIT,
+};
+
static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl0 = {
.mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN,
.mask_bit = 2,
@@ -348,6 +378,8 @@ static const struct of_device_id s3c2410_wdt_match[] = {
.data = &drv_data_exynos7 },
{ .compatible = "samsung,exynos850-wdt",
.data = &drv_data_exynos850_cl0 },
+ { .compatible = "samsung,exynos990-wdt",
+ .data = &drv_data_exynos990_cl0 },
{ .compatible = "samsung,exynosautov9-wdt",
.data = &drv_data_exynosautov9_cl0 },
{ .compatible = "samsung,exynosautov920-wdt",
@@ -676,7 +708,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt)
if (variant == &drv_data_exynos850_cl0 ||
variant == &drv_data_exynosautov9_cl0 ||
variant == &drv_data_gs101_cl0 ||
- variant == &drv_data_exynosautov920_cl0) {
+ variant == &drv_data_exynosautov920_cl0 ||
+ variant == &drv_data_exynos990_cl0) {
u32 index;
int err;
@@ -698,6 +731,10 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt)
else if (variant == &drv_data_exynosautov920_cl0)
variant = &drv_data_exynosautov920_cl1;
break;
+ case 2:
+ if (variant == &drv_data_exynos990_cl0)
+ variant = &drv_data_exynos990_cl2;
+ break;
default:
return dev_err_probe(dev, -EINVAL, "wrong cluster index: %u\n", index);
}
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] watchdog: s3c2410_wdt: Add exynos990-wdt compatible data
2025-02-17 19:57 ` [PATCH v2 2/2] watchdog: s3c2410_wdt: Add exynos990-wdt compatible data Igor Belwon
@ 2025-02-23 9:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-23 9:54 UTC (permalink / raw)
To: Igor Belwon, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
Cc: linux-watchdog, devicetree, linux-kernel, linux-arm-kernel,
linux-samsung-soc
On 17/02/2025 20:57, Igor Belwon wrote:
> The Exynos990 has two watchdog clusters - cl0 and cl2. Add new
> driver data for these two clusters, making it possible to use the
> watchdog timer on this SoC.
>
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible
2025-02-17 19:57 ` [PATCH v2 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible Igor Belwon
@ 2025-02-23 9:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-23 9:54 UTC (permalink / raw)
To: Igor Belwon, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
Cc: linux-watchdog, devicetree, linux-kernel, linux-arm-kernel,
linux-samsung-soc
On 17/02/2025 20:57, Igor Belwon wrote:
> Add a dt-binding compatible for the Exynos990 Watchdog timer.
> This watchdog is compatible with the GS101/Exynos850 design, as
> such it requires the cluster-index and syscon-phandle properties
> to be present. It also contains a cl2 cluster, as such the
> cluster-index property has been expanded.
>
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-23 9:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 19:57 [PATCH v2 0/2] watchdog: Exynos990 WDT enablement Igor Belwon
2025-02-17 19:57 ` [PATCH v2 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos990-wdt compatible Igor Belwon
2025-02-23 9:54 ` Krzysztof Kozlowski
2025-02-17 19:57 ` [PATCH v2 2/2] watchdog: s3c2410_wdt: Add exynos990-wdt compatible data Igor Belwon
2025-02-23 9:54 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).