public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] support watchdog for exynosautov920
       [not found] <CGME20241010111835epcas2p298d37f8b2ce4769b33a56c276c4f9d1f@epcas2p2.samsung.com>
@ 2024-10-10 11:18 ` Taewan Kim
  2024-10-10 11:18   ` [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings Taewan Kim
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Taewan Kim @ 2024-10-10 11:18 UTC (permalink / raw)
  To: 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, Taewan Kim

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(-)

-- 
2.46.0


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

* [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
  2024-10-10 11:18 ` [PATCH v2 0/3] support watchdog for exynosautov920 Taewan Kim
@ 2024-10-10 11:18   ` Taewan Kim
  2024-10-10 11:47     ` Krzysztof Kozlowski
  2024-10-10 11:18   ` [PATCH v2 2/3] watchdog: s3c2410_wdt: add support for exynosautov920 SoC Taewan Kim
  2024-10-10 11:18   ` [PATCH v2 3/3] arm64: dts: exynosautov920: add watchdog DT node Taewan Kim
  2 siblings, 1 reply; 6+ messages in thread
From: Taewan Kim @ 2024-10-10 11:18 UTC (permalink / raw)
  To: 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, Byoungtae Cho, Taewan Kim

From: Byoungtae Cho <bt.cho@samsung.com>

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 <bt.cho@samsung.com>
Signed-off-by: Taewan Kim <trunixs.kim@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 77a5ddd0426e..d175ae968336 100644
--- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
@@ -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:
-- 
2.46.0


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

* [PATCH v2 2/3] watchdog: s3c2410_wdt: add support for exynosautov920 SoC
  2024-10-10 11:18 ` [PATCH v2 0/3] support watchdog for exynosautov920 Taewan Kim
  2024-10-10 11:18   ` [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings Taewan Kim
@ 2024-10-10 11:18   ` Taewan Kim
  2024-10-10 11:18   ` [PATCH v2 3/3] arm64: dts: exynosautov920: add watchdog DT node Taewan Kim
  2 siblings, 0 replies; 6+ messages in thread
From: Taewan Kim @ 2024-10-10 11:18 UTC (permalink / raw)
  To: 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, Byoungtae Cho, Taewan Kim

From: Byoungtae Cho <bt.cho@samsung.com>

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.

Signed-off-by: Byoungtae Cho <bt.cho@samsung.com>
Signed-off-by: Taewan Kim <trunixs.kim@samsung.com>
---
 drivers/watchdog/s3c2410_wdt.c | 37 +++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 686cf544d0ae..aa128099c47d 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -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);
-- 
2.46.0


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

* [PATCH v2 3/3] arm64: dts: exynosautov920: add watchdog DT node
  2024-10-10 11:18 ` [PATCH v2 0/3] support watchdog for exynosautov920 Taewan Kim
  2024-10-10 11:18   ` [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings Taewan Kim
  2024-10-10 11:18   ` [PATCH v2 2/3] watchdog: s3c2410_wdt: add support for exynosautov920 SoC Taewan Kim
@ 2024-10-10 11:18   ` Taewan Kim
  2 siblings, 0 replies; 6+ messages in thread
From: Taewan Kim @ 2024-10-10 11:18 UTC (permalink / raw)
  To: 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, Byoungtae Cho, Taewan Kim

From: Byoungtae Cho <bt.cho@samsung.com>

Adds two watchdog devices for ExynosAutoV920 SoC.

Signed-off-by: Byoungtae Cho <bt.cho@samsung.com>
Signed-off-by: Taewan Kim <trunixs.kim@samsung.com>
---
 .../arm64/boot/dts/exynos/exynosautov920.dtsi | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
index c1c8566d74f5..3b541d0e9d25 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
@@ -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>;
-- 
2.46.0


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

* Re: [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
  2024-10-10 11:18   ` [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings Taewan Kim
@ 2024-10-10 11:47     ` Krzysztof Kozlowski
  2024-10-21  6:05       ` 김태완
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-10 11:47 UTC (permalink / raw)
  To: Taewan Kim, 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, Byoungtae Cho

On 10/10/2024 13:18, Taewan Kim wrote:
> From: Byoungtae Cho <bt.cho@samsung.com>
> 
> 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 <bt.cho@samsung.com>
> Signed-off-by: Taewan Kim <trunixs.kim@samsung.com>

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


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

* RE: [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings
  2024-10-10 11:47     ` Krzysztof Kozlowski
@ 2024-10-21  6:05       ` 김태완
  0 siblings, 0 replies; 6+ messages in thread
From: 김태완 @ 2024-10-21  6:05 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', '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, 'Byoungtae Cho'

> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Thursday, October 10, 2024 8:47 PM
> To: Taewan Kim <trunixs.kim@samsung.com>; Wim Van Sebroeck <wim@linux-
> watchdog.org>; Guenter Roeck <linux@roeck-us.net>; Rob Herring
> <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley
> <conor+dt@kernel.org>; Alim Akhtar <alim.akhtar@samsung.com>
> Cc: linux-watchdog@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; Byoungtae Cho <bt.cho@samsung.com>
> Subject: Re: [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920
> watchdog bindings
> 
> On 10/10/2024 13:18, Taewan Kim wrote:
> > From: Byoungtae Cho <bt.cho@samsung.com>
> >
> > 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 <bt.cho@samsung.com>
> > Signed-off-by: Taewan Kim <trunixs.kim@samsung.com>
> 
> Shall we do the work twice?

I missed it by mistake, I'm sorry.
I will push v3 with tags.
> 
> <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%23L577
> 
> If a tag was not added on purpose, please state why and what changed.
> </form letter>
> 
> Best regards,
> Krzysztof



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

end of thread, other threads:[~2024-10-21  6:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20241010111835epcas2p298d37f8b2ce4769b33a56c276c4f9d1f@epcas2p2.samsung.com>
2024-10-10 11:18 ` [PATCH v2 0/3] support watchdog for exynosautov920 Taewan Kim
2024-10-10 11:18   ` [PATCH v2 1/3] dt-bindings: watchdog: Document ExynosAutoV920 watchdog bindings Taewan Kim
2024-10-10 11:47     ` Krzysztof Kozlowski
2024-10-21  6:05       ` 김태완
2024-10-10 11:18   ` [PATCH v2 2/3] watchdog: s3c2410_wdt: add support for exynosautov920 SoC Taewan Kim
2024-10-10 11:18   ` [PATCH v2 3/3] arm64: dts: exynosautov920: add watchdog DT node Taewan Kim

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