support watchdog for exynosautov920
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): CGME20241010111835epcas2p298d37f8b2ce4769b33a56c276c4f9d1f@epcas2p2.samsung.com
v2 cover support watchdog for exynosautov920
Add support for the ExynosAutoV920 SoC. Basically this is almost similar to ExynosAuto V9 or Exynos850 such as two watchdog instance for each cluster but some CPU configuration are quite different. Therefore device tree, compatibles and drvdata should be added.
---
Changes in v2:
- Add a space before }
- Fix worng variant condition (cl1 -> cl0)
- Move the location declaring watchdog node
to the correct location that fits the DTS coding rules
---
Byoungtae Cho (3):
dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
watchdog: s3c2410_wdt: add support for exynosautov920 SoC
arm64: dts: exynosautov920: add watchdog DT node
.../bindings/watchdog/samsung-wdt.yaml | 3 ++ .../arm64/boot/dts/exynos/exynosautov920.dtsi | 20 ++++++++++ drivers/watchdog/s3c2410_wdt.c | 37 ++++++++++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-)
Signature · 1 line
2.46.0
PATCH v2 1/3 dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
From: Byoungtae Cho <[email protected]>
Add "samsung-exynosautov920-wdt" compatible to the dt-schema document. ExynosAutoV920 is new SoC for automotive, similar to exynosautov9 but some CPU configurations are quite different.
--- Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml +3 -0
@@ -26,6 +26,7 @@ properties: - samsung,exynos7-wdt # for Exynos7 - samsung,exynos850-wdt # for Exynos850 - samsung,exynosautov9-wdt # for Exynosautov9 + - samsung,exynosautov920-wdt # for Exynosautov920 - items: - enum: - tesla,fsd-wdt
@@ -77,6 +78,7 @@ allOf: - samsung,exynos7-wdt - samsung,exynos850-wdt - samsung,exynosautov9-wdt + - samsung,exynosautov920-wdt then: required: - samsung,syscon-phandle
@@ -88,6 +90,7 @@ allOf: - google,gs101-wdt - samsung,exynos850-wdt - samsung,exynosautov9-wdt + - samsung,exynosautov920-wdt then: properties: clocks:
Signature · 1 line
2.46.0
Krzysztof Kozlowski
maintainerRe: [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
Quoted 8 lines · Taewan Kim
From: Byoungtae Cho <[email protected]>
Add "samsung-exynosautov920-wdt" compatible to the dt-schema document. ExynosAutoV920 is new SoC for automotive, similar to exynosautov9 but some CPU configurations are quite different.
Signed-off-by Byoungtae Cho <[email protected]>Signed-off-by Taewan Kim <[email protected]>
Shall we do the work twice?
<form letter>
This is a friendly reminder during the review process.
It looks like you received a tag and forgot to add it.
If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.
https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
If a tag was not added on purpose, please state why and what changed. </form letter>
Best regards,
Krzysztof
RE: [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
Quoted 16 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Thursday, October 10, 2024 8:47 PM
To: Taewan Kim <[email protected]>; Wim Van Sebroeck <wim@linux- watchdog.org>; Guenter Roeck <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Alim Akhtar <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; Byoungtae Cho <[email protected]>
Subject: Re: [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindingsQuoted 2 lines · Taewan Kim
From: Byoungtae Cho <[email protected]>
Quoted 8 lines
Quoted 6 lines
Add "samsung-exynosautov920-wdt" compatible to the dt-schema document. ExynosAutoV920 is new SoC for automotive, similar to exynosautov9 but some CPU configurations are quite different.
Signed-off-by Byoungtae Cho <[email protected]>Signed-off-by Taewan Kim <[email protected]>Shall we do the work twice?
I missed it by mistake, I'm sorry.
I will push v3 with tags.
Quoted 24 lines
<form letter>
This is a friendly reminder during the review process.It looks like you received a tag and forgot to add it.
If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.https://protect2.fireeye.com/v1/url?k=19c96b19-46525206-19c8e056-
000babdfecba-8f51e01dd01bb666&q=1&e=eb401f36-1904-4376-adea- 9688adb1d657&u=https%3A%2F%2Felixir.bootlin.com%2Flinux%2Fv6.5- rc3%2Fsource%2FDocumentation%2Fprocess%2Fsubmitting-patches.rst%23L577If a tag was not added on purpose, please state why and what changed. </form letter>
Best regards,
Krzysztof
PATCH v2 2/3 watchdog: s3c2410_wdt: add support for exynosautov920 SoC
In reply to Taewan KimFrom: Byoungtae Cho <[email protected]>
Adds the compatibles and drvdata for the ExynosAuto V920 SoC. This SoC is almost similar to ExynosAutoV9, but some CPU configurations are quite different, so it should be added. Plus it also support DBGACK like as GS101 SoC.
--- drivers/watchdog/s3c2410_wdt.c | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-)
drivers/watchdog/s3c2410_wdt.c +36 -1
@@ -63,6 +63,10 @@#define EXYNOS850_CLUSTER1_NONCPU_INT_EN 0x1644#define EXYNOSAUTOV9_CLUSTER1_NONCPU_OUT 0x1520#define EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN 0x1544 +#define EXYNOSAUTOV920_CLUSTER0_NONCPU_OUT 0x1420 +#define EXYNOSAUTOV920_CLUSTER0_NONCPU_INT_EN 0x1444 +#define EXYNOSAUTOV920_CLUSTER1_NONCPU_OUT 0x1720 +#define EXYNOSAUTOV920_CLUSTER1_NONCPU_INT_EN 0x1744#define EXYNOS850_CLUSTER0_WDTRESET_BIT 24#define EXYNOS850_CLUSTER1_WDTRESET_BIT 23
@@ -303,6 +307,32 @@ static const struct s3c2410_wdt_variant drv_data_gs101_cl1 = { QUIRK_HAS_DBGACK_BIT, }; +static const struct s3c2410_wdt_variant drv_data_exynosautov920_cl0 = { + .mask_reset_reg =EXYNOSAUTOV920_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 =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_exynosautov920_cl1 = { + .mask_reset_reg =EXYNOSAUTOV920_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 =EXYNOSAUTOV920_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 | +QUIRK_HAS_DBGACK_BIT , +}; +static const struct of_device_id s3c2410_wdt_match[] = { { .compatible ="google,gs101-wdt" , .data = &drv_data_gs101_cl0 },
@@ -320,6 +350,8 @@ static const struct of_device_id s3c2410_wdt_match[] = { .data = &drv_data_exynos850_cl0 }, { .compatible = "samsung,exynosautov9-wdt", .data = &drv_data_exynosautov9_cl0 }, + { .compatible = "samsung,exynosautov920-wdt", + .data = &drv_data_exynosautov920_cl0 }, {}, };MODULE_DEVICE_TABLE (of, s3c2410_wdt_match);
@@ -643,7 +675,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt)/* Choose Exynos850/ExynosAutov9 driver data w.r.t. cluster index */ if (variant == &drv_data_exynos850_cl0 || variant == &drv_data_exynosautov9_cl0 || - variant == &drv_data_gs101_cl0) { + variant == &drv_data_gs101_cl0 || + variant == &drv_data_exynosautov920_cl0) {u32 index;int err;
@@ -662,6 +695,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt) variant = &drv_data_exynosautov9_cl1; else if (variant == &drv_data_gs101_cl0) variant = &drv_data_gs101_cl1; + else if (variant == &drv_data_exynosautov920_cl0) + variant = &drv_data_exynosautov920_cl1;break ;default :return dev_err_probe (dev, -EINVAL ,"wrong cluster index: %u\n" , index);
Signature · 1 line
2.46.0
PATCH v2 3/3 arm64: dts: exynosautov920: add watchdog DT node
In reply to Taewan KimFrom: Byoungtae Cho <[email protected]>
Adds two watchdog devices for ExynosAutoV920 SoC.
--- .../arm64/boot/dts/exynos/exynosautov920.dtsi | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm64/boot/dts/exynos/exynosautov920.dtsi +20 -0
@@ -182,6 +182,26 @@ chipid@10000000 { reg = <0x10000000 0x24>; }; + watchdog_cl0: watchdog@10060000 { + compatible = "samsung,exynosautov920-wdt"; + reg = <0x10060000 0x100>; + interrupts = <GIC_SPI 953 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&xtcxo>, <&xtcxo>; + clock-names = "watchdog", "watchdog_src"; + samsung,syscon-phandle = <&pmu_system_controller>; + samsung,cluster-index = <0>; + }; + + watchdog_cl1: watchdog@10070000 { + compatible = "samsung,exynosautov920-wdt"; + reg = <0x10070000 0x100>; + interrupts = <GIC_SPI 952 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&xtcxo>, <&xtcxo>; + clock-names = "watchdog", "watchdog_src"; + samsung,syscon-phandle = <&pmu_system_controller>; + samsung,cluster-index = <1>; + }; + gic: interrupt-controller@10400000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>;
Signature · 1 line
2.46.0