* [PATCH v2 0/3] support watchdog for exynosautov9
[not found] <CGME20220523113900epcas2p1479e12a846dc27cfc7c0835e5dc0179a@epcas2p1.samsung.com>
@ 2022-05-23 11:39 ` Chanho Park
[not found] ` <CGME20220523113901epcas2p3373d84386a309ea2cebc364dbf876bf2@epcas2p3.samsung.com>
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chanho Park @ 2022-05-23 11:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski
Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc,
devicetree, Chanho Park
This adds to support watchdog and its device tree nodes for Exynos Auto
v9 SoC. Like exynos850, the SoC has two cpu watchdog devices but they
have different CPU configurations compared with exynos850. So, we need
to add separate configurations for Exynos Auto v9 SoC.
Changes from v1:
- Add Krzysztof's RB tags for #1, #2 patch.
- Drop "status" property of exynosautov9.dtsi and drop #4 patch.
Chanho Park (3):
dt-bindings: watchdog: add exynosautov9 compatible
watchdog: s3c2410_wdt: support exynosautov9 watchdog
arm64: dts: exynosautov9: add watchdog DT nodes
.../bindings/watchdog/samsung-wdt.yaml | 3 ++
arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 20 +++++++++
drivers/watchdog/s3c2410_wdt.c | 41 +++++++++++++++++--
3 files changed, 60 insertions(+), 4 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] dt-bindings: watchdog: add exynosautov9 compatible
[not found] ` <CGME20220523113901epcas2p3373d84386a309ea2cebc364dbf876bf2@epcas2p3.samsung.com>
@ 2022-05-23 11:39 ` Chanho Park
0 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2022-05-23 11:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski
Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc,
devicetree, Chanho Park, Krzysztof Kozlowski
Adds "samsung,exynosautov9-wdt" to samsung-wdt compatible. This has two
cpu watchdogs like exynos850.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
index b08373336b16..8fb6656ba0c2 100644
--- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
@@ -23,6 +23,7 @@ properties:
- samsung,exynos5420-wdt # for Exynos5420
- samsung,exynos7-wdt # for Exynos7
- samsung,exynos850-wdt # for Exynos850
+ - samsung,exynosautov9-wdt # for Exynosautov9
reg:
maxItems: 1
@@ -67,6 +68,7 @@ allOf:
- samsung,exynos5420-wdt
- samsung,exynos7-wdt
- samsung,exynos850-wdt
+ - samsung,exynosautov9-wdt
then:
required:
- samsung,syscon-phandle
@@ -76,6 +78,7 @@ allOf:
contains:
enum:
- samsung,exynos850-wdt
+ - samsung,exynosautov9-wdt
then:
properties:
clocks:
--
2.36.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] watchdog: s3c2410_wdt: support exynosautov9 watchdog
[not found] ` <CGME20220523113901epcas2p4f53c733b0cf740b0d5687895856f40b0@epcas2p4.samsung.com>
@ 2022-05-23 11:39 ` Chanho Park
0 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2022-05-23 11:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski
Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc,
devicetree, Chanho Park, Krzysztof Kozlowski
Like exynos850, exynosautov9 SoC also has two cpu watchdogs.
Unfortunately, some configurations are slightly different so we need to
add samsung,exynosautov9-wdt and separate drv data for those watchdogs.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
drivers/watchdog/s3c2410_wdt.c | 41 ++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 6db22f2e3a4f..0dbb3ec9c29c 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -60,9 +60,13 @@
#define EXYNOS850_CLUSTER0_NONCPU_INT_EN 0x1244
#define EXYNOS850_CLUSTER1_NONCPU_OUT 0x1620
#define EXYNOS850_CLUSTER1_NONCPU_INT_EN 0x1644
+#define EXYNOSAUTOV9_CLUSTER1_NONCPU_OUT 0x1520
+#define EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN 0x1544
#define EXYNOS850_CLUSTER0_WDTRESET_BIT 24
#define EXYNOS850_CLUSTER1_WDTRESET_BIT 23
+#define EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT 25
+#define EXYNOSAUTOV9_CLUSTER1_WDTRESET_BIT 24
/**
* DOC: Quirk flags for different Samsung watchdog IP-cores
@@ -236,6 +240,30 @@ 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_exynosautov9_cl0 = {
+ .mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN,
+ .mask_bit = 2,
+ .mask_reset_inv = true,
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
+ .rst_stat_bit = EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT,
+ .cnt_en_reg = EXYNOS850_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,
+};
+
+static const struct s3c2410_wdt_variant drv_data_exynosautov9_cl1 = {
+ .mask_reset_reg = EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN,
+ .mask_bit = 2,
+ .mask_reset_inv = true,
+ .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
+ .rst_stat_bit = EXYNOSAUTOV9_CLUSTER1_WDTRESET_BIT,
+ .cnt_en_reg = EXYNOSAUTOV9_CLUSTER1_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,
+};
+
static const struct of_device_id s3c2410_wdt_match[] = {
{ .compatible = "samsung,s3c2410-wdt",
.data = &drv_data_s3c2410 },
@@ -249,6 +277,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,exynosautov9-wdt",
+ .data = &drv_data_exynosautov9_cl0 },
{},
};
MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
@@ -630,8 +660,9 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev)
}
#ifdef CONFIG_OF
- /* Choose Exynos850 driver data w.r.t. cluster index */
- if (variant == &drv_data_exynos850_cl0) {
+ /* Choose Exynos850/ExynosAutov9 driver data w.r.t. cluster index */
+ if (variant == &drv_data_exynos850_cl0 ||
+ variant == &drv_data_exynosautov9_cl0) {
u32 index;
int err;
@@ -644,9 +675,11 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev)
switch (index) {
case 0:
- return &drv_data_exynos850_cl0;
+ return variant;
case 1:
- return &drv_data_exynos850_cl1;
+ return (variant == &drv_data_exynos850_cl0) ?
+ &drv_data_exynos850_cl1 :
+ &drv_data_exynosautov9_cl1;
default:
dev_err(dev, "wrong cluster index: %u\n", index);
return NULL;
--
2.36.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] arm64: dts: exynosautov9: add watchdog DT nodes
[not found] ` <CGME20220523113901epcas2p2ff6ea3954cbd5c3450798a359ab363fe@epcas2p2.samsung.com>
@ 2022-05-23 11:39 ` Chanho Park
2022-06-06 9:22 ` (subset) " Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Chanho Park @ 2022-05-23 11:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski
Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc,
devicetree, Chanho Park
Adds two cpu watchdog devices for ExynosAutov9 SoC.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
index 3e23db8f09d9..1b76943cb382 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
@@ -400,6 +400,26 @@ ufs_0: ufs0@17e00000 {
samsung,sysreg = <&syscon_fsys2 0x710>;
status = "disabled";
};
+
+ watchdog_cl0: watchdog@10050000 {
+ compatible = "samsung,exynosautov9-wdt";
+ reg = <0x10050000 0x100>;
+ interrupts = <GIC_SPI 476 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cmu_peris CLK_GOUT_WDT_CLUSTER0>, <&xtcxo>;
+ clock-names = "watchdog", "watchdog_src";
+ samsung,syscon-phandle = <&pmu_system_controller>;
+ samsung,cluster-index = <0>;
+ };
+
+ watchdog_cl1: watchdog@10060000 {
+ compatible = "samsung,exynosautov9-wdt";
+ reg = <0x10060000 0x100>;
+ interrupts = <GIC_SPI 475 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cmu_peris CLK_GOUT_WDT_CLUSTER1>, <&xtcxo>;
+ clock-names = "watchdog", "watchdog_src";
+ samsung,syscon-phandle = <&pmu_system_controller>;
+ samsung,cluster-index = <1>;
+ };
};
};
--
2.36.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH v2 3/3] arm64: dts: exynosautov9: add watchdog DT nodes
2022-05-23 11:39 ` [PATCH v2 3/3] arm64: dts: exynosautov9: add watchdog DT nodes Chanho Park
@ 2022-06-06 9:22 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-06 9:22 UTC (permalink / raw)
To: Chanho Park, Krzysztof Kozlowski, Rob Herring
Cc: Krzysztof Kozlowski, linux-samsung-soc, devicetree,
Sam Protsenko, Alim Akhtar, Chanwoo Choi
On Mon, 23 May 2022 20:39:19 +0900, Chanho Park wrote:
> Adds two cpu watchdog devices for ExynosAutov9 SoC.
>
>
Applied, thanks!
[3/3] arm64: dts: exynosautov9: add watchdog DT nodes
https://git.kernel.org/krzk/linux/c/d742e8e2912131ee2df1fe217a6c9e6ee8337b4a
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-06 9:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220523113900epcas2p1479e12a846dc27cfc7c0835e5dc0179a@epcas2p1.samsung.com>
2022-05-23 11:39 ` [PATCH v2 0/3] support watchdog for exynosautov9 Chanho Park
[not found] ` <CGME20220523113901epcas2p3373d84386a309ea2cebc364dbf876bf2@epcas2p3.samsung.com>
2022-05-23 11:39 ` [PATCH v2 1/3] dt-bindings: watchdog: add exynosautov9 compatible Chanho Park
[not found] ` <CGME20220523113901epcas2p4f53c733b0cf740b0d5687895856f40b0@epcas2p4.samsung.com>
2022-05-23 11:39 ` [PATCH v2 2/3] watchdog: s3c2410_wdt: support exynosautov9 watchdog Chanho Park
[not found] ` <CGME20220523113901epcas2p2ff6ea3954cbd5c3450798a359ab363fe@epcas2p2.samsung.com>
2022-05-23 11:39 ` [PATCH v2 3/3] arm64: dts: exynosautov9: add watchdog DT nodes Chanho Park
2022-06-06 9:22 ` (subset) " Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.