All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Add watchdog support for Amlogic-T7 SoCs
@ 2023-07-26 11:21 ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Based on the original Amlogic-GXBB watchdog driver, support
for Amlogic-T7 watchdog is added.

Huqiang Qin (4):
  dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
  watchdog: Add a new struct for Amlogic-GXBB driver
  watchdog: Add support for Amlogic-T7 SoCs
  arm64: dts: Add watchdog node for Amlogic-T7 SoCs

 .../watchdog/amlogic,meson-gxbb-wdt.yaml      |  1 +
 arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi   |  6 ++++++
 drivers/watchdog/meson_gxbb_wdt.c             | 21 ++++++++++++++++---
 3 files changed, 25 insertions(+), 3 deletions(-)

-- 
2.37.1


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

* [PATCH 0/4] Add watchdog support for Amlogic-T7 SoCs
@ 2023-07-26 11:21 ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Based on the original Amlogic-GXBB watchdog driver, support
for Amlogic-T7 watchdog is added.

Huqiang Qin (4):
  dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
  watchdog: Add a new struct for Amlogic-GXBB driver
  watchdog: Add support for Amlogic-T7 SoCs
  arm64: dts: Add watchdog node for Amlogic-T7 SoCs

 .../watchdog/amlogic,meson-gxbb-wdt.yaml      |  1 +
 arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi   |  6 ++++++
 drivers/watchdog/meson_gxbb_wdt.c             | 21 ++++++++++++++++---
 3 files changed, 25 insertions(+), 3 deletions(-)

-- 
2.37.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 1/4] dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
  2023-07-26 11:21 ` Huqiang Qin
@ 2023-07-26 11:21   ` Huqiang Qin
  -1 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Update dt-binding document for watchdog of Amlogic-T7 SoCs.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 .../devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
index f5cc7aa1b93b..443e2e7ab467 100644
--- a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
@@ -17,6 +17,7 @@ properties:
   compatible:
     enum:
       - amlogic,meson-gxbb-wdt
+      - amlogic,t7-wdt
 
   reg:
     maxItems: 1
-- 
2.37.1


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

* [PATCH 1/4] dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
@ 2023-07-26 11:21   ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Update dt-binding document for watchdog of Amlogic-T7 SoCs.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 .../devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
index f5cc7aa1b93b..443e2e7ab467 100644
--- a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
@@ -17,6 +17,7 @@ properties:
   compatible:
     enum:
       - amlogic,meson-gxbb-wdt
+      - amlogic,t7-wdt
 
   reg:
     maxItems: 1
-- 
2.37.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
  2023-07-26 11:21 ` Huqiang Qin
@ 2023-07-26 11:21   ` Huqiang Qin
  -1 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Add a new structure wdt_params to describe the watchdog difference
of different chips.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 drivers/watchdog/meson_gxbb_wdt.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index 35d80cb39856..a6c0d743b607 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -22,7 +22,6 @@
 
 #define GXBB_WDT_CTRL_CLKDIV_EN			BIT(25)
 #define GXBB_WDT_CTRL_CLK_EN			BIT(24)
-#define GXBB_WDT_CTRL_EE_RESET			BIT(21)
 #define GXBB_WDT_CTRL_EN			BIT(18)
 #define GXBB_WDT_CTRL_DIV_MASK			(BIT(18) - 1)
 
@@ -45,6 +44,10 @@ struct meson_gxbb_wdt {
 	struct clk *clk;
 };
 
+struct wdt_params {
+	u8 rst_shift;
+};
+
 static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
 {
 	struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
@@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
 };
 
+static const struct wdt_params gxbb_params = {
+	.rst_shift = 21,
+};
+
 static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
-	 { .compatible = "amlogic,meson-gxbb-wdt", },
+	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
 	 { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
@@ -150,6 +157,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct meson_gxbb_wdt *data;
+	struct wdt_params *params;
 	u32 ctrl_reg;
 
 	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
@@ -164,6 +172,8 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 	if (IS_ERR(data->clk))
 		return PTR_ERR(data->clk);
 
+	params = (struct wdt_params *)of_device_get_match_data(dev);
+
 	platform_set_drvdata(pdev, data);
 
 	data->wdt_dev.parent = dev;
@@ -191,7 +201,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 	/* Setup with 1ms timebase */
 	ctrl_reg |= ((clk_get_rate(data->clk) / 1000) &
 			GXBB_WDT_CTRL_DIV_MASK) |
-			GXBB_WDT_CTRL_EE_RESET |
+			BIT(params->rst_shift) |
 			GXBB_WDT_CTRL_CLK_EN |
 			GXBB_WDT_CTRL_CLKDIV_EN;
 
-- 
2.37.1


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

* [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-07-26 11:21   ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Add a new structure wdt_params to describe the watchdog difference
of different chips.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 drivers/watchdog/meson_gxbb_wdt.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index 35d80cb39856..a6c0d743b607 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -22,7 +22,6 @@
 
 #define GXBB_WDT_CTRL_CLKDIV_EN			BIT(25)
 #define GXBB_WDT_CTRL_CLK_EN			BIT(24)
-#define GXBB_WDT_CTRL_EE_RESET			BIT(21)
 #define GXBB_WDT_CTRL_EN			BIT(18)
 #define GXBB_WDT_CTRL_DIV_MASK			(BIT(18) - 1)
 
@@ -45,6 +44,10 @@ struct meson_gxbb_wdt {
 	struct clk *clk;
 };
 
+struct wdt_params {
+	u8 rst_shift;
+};
+
 static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
 {
 	struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
@@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
 };
 
+static const struct wdt_params gxbb_params = {
+	.rst_shift = 21,
+};
+
 static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
-	 { .compatible = "amlogic,meson-gxbb-wdt", },
+	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
 	 { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
@@ -150,6 +157,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct meson_gxbb_wdt *data;
+	struct wdt_params *params;
 	u32 ctrl_reg;
 
 	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
@@ -164,6 +172,8 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 	if (IS_ERR(data->clk))
 		return PTR_ERR(data->clk);
 
+	params = (struct wdt_params *)of_device_get_match_data(dev);
+
 	platform_set_drvdata(pdev, data);
 
 	data->wdt_dev.parent = dev;
@@ -191,7 +201,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 	/* Setup with 1ms timebase */
 	ctrl_reg |= ((clk_get_rate(data->clk) / 1000) &
 			GXBB_WDT_CTRL_DIV_MASK) |
-			GXBB_WDT_CTRL_EE_RESET |
+			BIT(params->rst_shift) |
 			GXBB_WDT_CTRL_CLK_EN |
 			GXBB_WDT_CTRL_CLKDIV_EN;
 
-- 
2.37.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 3/4] watchdog: Add support for Amlogic-T7 SoCs
  2023-07-26 11:21 ` Huqiang Qin
@ 2023-07-26 11:21   ` Huqiang Qin
  -1 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Compared with the previous Amlogic-GXBB, the watchdog of Amlogic-T7
has a different reset enable bit.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 drivers/watchdog/meson_gxbb_wdt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index a6c0d743b607..dc48b0a332c3 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -147,8 +147,13 @@ static const struct wdt_params gxbb_params = {
 	.rst_shift = 21,
 };
 
+static const struct wdt_params t7_params = {
+	.rst_shift = 22,
+};
+
 static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
 	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
+	 { .compatible = "amlogic,t7-wdt", .data = &t7_params, },
 	 { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
-- 
2.37.1


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

* [PATCH 3/4] watchdog: Add support for Amlogic-T7 SoCs
@ 2023-07-26 11:21   ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Compared with the previous Amlogic-GXBB, the watchdog of Amlogic-T7
has a different reset enable bit.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 drivers/watchdog/meson_gxbb_wdt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index a6c0d743b607..dc48b0a332c3 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -147,8 +147,13 @@ static const struct wdt_params gxbb_params = {
 	.rst_shift = 21,
 };
 
+static const struct wdt_params t7_params = {
+	.rst_shift = 22,
+};
+
 static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
 	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
+	 { .compatible = "amlogic,t7-wdt", .data = &t7_params, },
 	 { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
-- 
2.37.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 4/4] arm64: dts: Add watchdog node for Amlogic-T7 SoCs
  2023-07-26 11:21 ` Huqiang Qin
@ 2023-07-26 11:21   ` Huqiang Qin
  -1 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Add watchdog device.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 1423d4a79156..6e34d11214b7 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -143,6 +143,12 @@ apb4: bus@fe000000 {
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
 
+			watchdog@2100 {
+				compatible = "amlogic,t7-wdt";
+				reg = <0x0 0x2100 0x0 0x10>;
+				clocks = <&xtal>;
+			};
+
 			uart_a: serial@78000 {
 				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
 				reg = <0x0 0x78000 0x0 0x18>;
-- 
2.37.1


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

* [PATCH 4/4] arm64: dts: Add watchdog node for Amlogic-T7 SoCs
@ 2023-07-26 11:21   ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-07-26 11:21 UTC (permalink / raw)
  To: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, Huqiang Qin

Add watchdog device.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 1423d4a79156..6e34d11214b7 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -143,6 +143,12 @@ apb4: bus@fe000000 {
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
 
+			watchdog@2100 {
+				compatible = "amlogic,t7-wdt";
+				reg = <0x0 0x2100 0x0 0x10>;
+				clocks = <&xtal>;
+			};
+
 			uart_a: serial@78000 {
 				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
 				reg = <0x0 0x78000 0x0 0x18>;
-- 
2.37.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 1/4] dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
  2023-07-26 11:21   ` Huqiang Qin
@ 2023-07-26 18:27     ` Conor Dooley
  -1 siblings, 0 replies; 24+ messages in thread
From: Conor Dooley @ 2023-07-26 18:27 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

On Wed, Jul 26, 2023 at 07:21:43PM +0800, Huqiang Qin wrote:
> Update dt-binding document for watchdog of Amlogic-T7 SoCs.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  .../devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml     | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
> index f5cc7aa1b93b..443e2e7ab467 100644
> --- a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
> @@ -17,6 +17,7 @@ properties:
>    compatible:
>      enum:
>        - amlogic,meson-gxbb-wdt
> +      - amlogic,t7-wdt
>  
>    reg:
>      maxItems: 1
> -- 
> 2.37.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 1/4] dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
@ 2023-07-26 18:27     ` Conor Dooley
  0 siblings, 0 replies; 24+ messages in thread
From: Conor Dooley @ 2023-07-26 18:27 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 929 bytes --]

On Wed, Jul 26, 2023 at 07:21:43PM +0800, Huqiang Qin wrote:
> Update dt-binding document for watchdog of Amlogic-T7 SoCs.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  .../devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml     | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
> index f5cc7aa1b93b..443e2e7ab467 100644
> --- a/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
> @@ -17,6 +17,7 @@ properties:
>    compatible:
>      enum:
>        - amlogic,meson-gxbb-wdt
> +      - amlogic,t7-wdt
>  
>    reg:
>      maxItems: 1
> -- 
> 2.37.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
  2023-07-26 11:21   ` Huqiang Qin
  (?)
@ 2023-07-28  7:15     ` Dmitry Rokosov
  -1 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-07-28  7:15 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

Hello Huqiang,

Thank you for the patch series!

Please include a cover letter in future patch submissions if possible.
It will help to better understand the theme of the patch series and
group all patch sets together in one email thread.

On Wed, Jul 26, 2023 at 07:21:44PM +0800, Huqiang Qin wrote:
> Add a new structure wdt_params to describe the watchdog difference
> of different chips.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
> ---
>  drivers/watchdog/meson_gxbb_wdt.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> index 35d80cb39856..a6c0d743b607 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -22,7 +22,6 @@
>  
>  #define GXBB_WDT_CTRL_CLKDIV_EN			BIT(25)
>  #define GXBB_WDT_CTRL_CLK_EN			BIT(24)
> -#define GXBB_WDT_CTRL_EE_RESET			BIT(21)
>  #define GXBB_WDT_CTRL_EN			BIT(18)
>  #define GXBB_WDT_CTRL_DIV_MASK			(BIT(18) - 1)
>  
> @@ -45,6 +44,10 @@ struct meson_gxbb_wdt {
>  	struct clk *clk;
>  };
>  
> +struct wdt_params {
> +	u8 rst_shift;
> +};
> +
>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
>  {
>  	struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
>  	SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
>  };
>  
> +static const struct wdt_params gxbb_params = {
> +	.rst_shift = 21,

Maybe it's better to declare rst with the BIT() macro already applied,
and use it in wdt_probe() as is. And name 'rst' without 'shift' is
looking more brief.

> +};
> +
>  static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
> -	 { .compatible = "amlogic,meson-gxbb-wdt", },
> +	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
>  	 { /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
> @@ -150,6 +157,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct meson_gxbb_wdt *data;
> +	struct wdt_params *params;
>  	u32 ctrl_reg;
>  
>  	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> @@ -164,6 +172,8 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	if (IS_ERR(data->clk))
>  		return PTR_ERR(data->clk);
>  
> +	params = (struct wdt_params *)of_device_get_match_data(dev);
> +
>  	platform_set_drvdata(pdev, data);
>  
>  	data->wdt_dev.parent = dev;
> @@ -191,7 +201,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	/* Setup with 1ms timebase */
>  	ctrl_reg |= ((clk_get_rate(data->clk) / 1000) &
>  			GXBB_WDT_CTRL_DIV_MASK) |
> -			GXBB_WDT_CTRL_EE_RESET |
> +			BIT(params->rst_shift) |
>  			GXBB_WDT_CTRL_CLK_EN |
>  			GXBB_WDT_CTRL_CLKDIV_EN;
>  
> -- 
> 2.37.1
> 
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Thank you,
Dmitry

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-07-28  7:15     ` Dmitry Rokosov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-07-28  7:15 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

Hello Huqiang,

Thank you for the patch series!

Please include a cover letter in future patch submissions if possible.
It will help to better understand the theme of the patch series and
group all patch sets together in one email thread.

On Wed, Jul 26, 2023 at 07:21:44PM +0800, Huqiang Qin wrote:
> Add a new structure wdt_params to describe the watchdog difference
> of different chips.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
> ---
>  drivers/watchdog/meson_gxbb_wdt.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> index 35d80cb39856..a6c0d743b607 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -22,7 +22,6 @@
>  
>  #define GXBB_WDT_CTRL_CLKDIV_EN			BIT(25)
>  #define GXBB_WDT_CTRL_CLK_EN			BIT(24)
> -#define GXBB_WDT_CTRL_EE_RESET			BIT(21)
>  #define GXBB_WDT_CTRL_EN			BIT(18)
>  #define GXBB_WDT_CTRL_DIV_MASK			(BIT(18) - 1)
>  
> @@ -45,6 +44,10 @@ struct meson_gxbb_wdt {
>  	struct clk *clk;
>  };
>  
> +struct wdt_params {
> +	u8 rst_shift;
> +};
> +
>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
>  {
>  	struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
>  	SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
>  };
>  
> +static const struct wdt_params gxbb_params = {
> +	.rst_shift = 21,

Maybe it's better to declare rst with the BIT() macro already applied,
and use it in wdt_probe() as is. And name 'rst' without 'shift' is
looking more brief.

> +};
> +
>  static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
> -	 { .compatible = "amlogic,meson-gxbb-wdt", },
> +	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
>  	 { /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
> @@ -150,6 +157,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct meson_gxbb_wdt *data;
> +	struct wdt_params *params;
>  	u32 ctrl_reg;
>  
>  	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> @@ -164,6 +172,8 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	if (IS_ERR(data->clk))
>  		return PTR_ERR(data->clk);
>  
> +	params = (struct wdt_params *)of_device_get_match_data(dev);
> +
>  	platform_set_drvdata(pdev, data);
>  
>  	data->wdt_dev.parent = dev;
> @@ -191,7 +201,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	/* Setup with 1ms timebase */
>  	ctrl_reg |= ((clk_get_rate(data->clk) / 1000) &
>  			GXBB_WDT_CTRL_DIV_MASK) |
> -			GXBB_WDT_CTRL_EE_RESET |
> +			BIT(params->rst_shift) |
>  			GXBB_WDT_CTRL_CLK_EN |
>  			GXBB_WDT_CTRL_CLKDIV_EN;
>  
> -- 
> 2.37.1
> 
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Thank you,
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-07-28  7:15     ` Dmitry Rokosov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-07-28  7:15 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

Hello Huqiang,

Thank you for the patch series!

Please include a cover letter in future patch submissions if possible.
It will help to better understand the theme of the patch series and
group all patch sets together in one email thread.

On Wed, Jul 26, 2023 at 07:21:44PM +0800, Huqiang Qin wrote:
> Add a new structure wdt_params to describe the watchdog difference
> of different chips.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
> ---
>  drivers/watchdog/meson_gxbb_wdt.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> index 35d80cb39856..a6c0d743b607 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -22,7 +22,6 @@
>  
>  #define GXBB_WDT_CTRL_CLKDIV_EN			BIT(25)
>  #define GXBB_WDT_CTRL_CLK_EN			BIT(24)
> -#define GXBB_WDT_CTRL_EE_RESET			BIT(21)
>  #define GXBB_WDT_CTRL_EN			BIT(18)
>  #define GXBB_WDT_CTRL_DIV_MASK			(BIT(18) - 1)
>  
> @@ -45,6 +44,10 @@ struct meson_gxbb_wdt {
>  	struct clk *clk;
>  };
>  
> +struct wdt_params {
> +	u8 rst_shift;
> +};
> +
>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
>  {
>  	struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
>  	SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
>  };
>  
> +static const struct wdt_params gxbb_params = {
> +	.rst_shift = 21,

Maybe it's better to declare rst with the BIT() macro already applied,
and use it in wdt_probe() as is. And name 'rst' without 'shift' is
looking more brief.

> +};
> +
>  static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
> -	 { .compatible = "amlogic,meson-gxbb-wdt", },
> +	 { .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
>  	 { /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
> @@ -150,6 +157,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct meson_gxbb_wdt *data;
> +	struct wdt_params *params;
>  	u32 ctrl_reg;
>  
>  	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> @@ -164,6 +172,8 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	if (IS_ERR(data->clk))
>  		return PTR_ERR(data->clk);
>  
> +	params = (struct wdt_params *)of_device_get_match_data(dev);
> +
>  	platform_set_drvdata(pdev, data);
>  
>  	data->wdt_dev.parent = dev;
> @@ -191,7 +201,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	/* Setup with 1ms timebase */
>  	ctrl_reg |= ((clk_get_rate(data->clk) / 1000) &
>  			GXBB_WDT_CTRL_DIV_MASK) |
> -			GXBB_WDT_CTRL_EE_RESET |
> +			BIT(params->rst_shift) |
>  			GXBB_WDT_CTRL_CLK_EN |
>  			GXBB_WDT_CTRL_CLKDIV_EN;
>  
> -- 
> 2.37.1
> 
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Thank you,
Dmitry

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 4/4] arm64: dts: Add watchdog node for Amlogic-T7 SoCs
  2023-07-26 11:21   ` Huqiang Qin
  (?)
@ 2023-07-28  7:17     ` Dmitry Rokosov
  -1 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-07-28  7:17 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

On Wed, Jul 26, 2023 at 07:21:46PM +0800, Huqiang Qin wrote:
> Add watchdog device.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>

Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>

> ---
>  arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> index 1423d4a79156..6e34d11214b7 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> @@ -143,6 +143,12 @@ apb4: bus@fe000000 {
>  			#size-cells = <2>;
>  			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
>  
> +			watchdog@2100 {
> +				compatible = "amlogic,t7-wdt";
> +				reg = <0x0 0x2100 0x0 0x10>;
> +				clocks = <&xtal>;
> +			};
> +
>  			uart_a: serial@78000 {
>  				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
>  				reg = <0x0 0x78000 0x0 0x18>;
> -- 
> 2.37.1
> 
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Thank you,
Dmitry

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

* Re: [PATCH 4/4] arm64: dts: Add watchdog node for Amlogic-T7 SoCs
@ 2023-07-28  7:17     ` Dmitry Rokosov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-07-28  7:17 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

On Wed, Jul 26, 2023 at 07:21:46PM +0800, Huqiang Qin wrote:
> Add watchdog device.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>

Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>

> ---
>  arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> index 1423d4a79156..6e34d11214b7 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> @@ -143,6 +143,12 @@ apb4: bus@fe000000 {
>  			#size-cells = <2>;
>  			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
>  
> +			watchdog@2100 {
> +				compatible = "amlogic,t7-wdt";
> +				reg = <0x0 0x2100 0x0 0x10>;
> +				clocks = <&xtal>;
> +			};
> +
>  			uart_a: serial@78000 {
>  				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
>  				reg = <0x0 0x78000 0x0 0x18>;
> -- 
> 2.37.1
> 
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Thank you,
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 4/4] arm64: dts: Add watchdog node for Amlogic-T7 SoCs
@ 2023-07-28  7:17     ` Dmitry Rokosov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-07-28  7:17 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

On Wed, Jul 26, 2023 at 07:21:46PM +0800, Huqiang Qin wrote:
> Add watchdog device.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>

Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>

> ---
>  arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> index 1423d4a79156..6e34d11214b7 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> @@ -143,6 +143,12 @@ apb4: bus@fe000000 {
>  			#size-cells = <2>;
>  			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
>  
> +			watchdog@2100 {
> +				compatible = "amlogic,t7-wdt";
> +				reg = <0x0 0x2100 0x0 0x10>;
> +				clocks = <&xtal>;
> +			};
> +
>  			uart_a: serial@78000 {
>  				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
>  				reg = <0x0 0x78000 0x0 0x18>;
> -- 
> 2.37.1
> 
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Thank you,
Dmitry

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
  2023-07-28  7:15     ` Dmitry Rokosov
  (?)
@ 2023-08-01 12:51       ` Huqiang Qin
  -1 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-08-01 12:51 UTC (permalink / raw)
  To: Dmitry Rokosov
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

Hi Dmitry,

On 2023/7/28 15:15, Dmitry Rokosov wrote:
> [ EXTERNAL EMAIL ]
> 
> Hello Huqiang,
> 
> Thank you for the patch series!
> 
> Please include a cover letter in future patch submissions if possible.
> It will help to better understand the theme of the patch series and
> group all patch sets together in one email thread.

Thank you for your suggestion. In fact, this patch series contains
a cover letter. It may be due to network reasons that it was not
sent to your mailbox correctly :)

...
>>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
>>  {
>>       struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
>> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
>>       SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
>>  };
>>
>> +static const struct wdt_params gxbb_params = {
>> +     .rst_shift = 21,
> 
> Maybe it's better to declare rst with the BIT() macro already applied,
> and use it in wdt_probe() as is. And name 'rst' without 'shift' is
> looking more brief.

Okay, I will change it in the next version.


Thanks

Best Regards,
Huqiang Qin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-08-01 12:51       ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-08-01 12:51 UTC (permalink / raw)
  To: Dmitry Rokosov
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

Hi Dmitry,

On 2023/7/28 15:15, Dmitry Rokosov wrote:
> [ EXTERNAL EMAIL ]
> 
> Hello Huqiang,
> 
> Thank you for the patch series!
> 
> Please include a cover letter in future patch submissions if possible.
> It will help to better understand the theme of the patch series and
> group all patch sets together in one email thread.

Thank you for your suggestion. In fact, this patch series contains
a cover letter. It may be due to network reasons that it was not
sent to your mailbox correctly :)

...
>>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
>>  {
>>       struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
>> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
>>       SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
>>  };
>>
>> +static const struct wdt_params gxbb_params = {
>> +     .rst_shift = 21,
> 
> Maybe it's better to declare rst with the BIT() macro already applied,
> and use it in wdt_probe() as is. And name 'rst' without 'shift' is
> looking more brief.

Okay, I will change it in the next version.


Thanks

Best Regards,
Huqiang Qin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-08-01 12:51       ` Huqiang Qin
  0 siblings, 0 replies; 24+ messages in thread
From: Huqiang Qin @ 2023-08-01 12:51 UTC (permalink / raw)
  To: Dmitry Rokosov
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

Hi Dmitry,

On 2023/7/28 15:15, Dmitry Rokosov wrote:
> [ EXTERNAL EMAIL ]
> 
> Hello Huqiang,
> 
> Thank you for the patch series!
> 
> Please include a cover letter in future patch submissions if possible.
> It will help to better understand the theme of the patch series and
> group all patch sets together in one email thread.

Thank you for your suggestion. In fact, this patch series contains
a cover letter. It may be due to network reasons that it was not
sent to your mailbox correctly :)

...
>>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
>>  {
>>       struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
>> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
>>       SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
>>  };
>>
>> +static const struct wdt_params gxbb_params = {
>> +     .rst_shift = 21,
> 
> Maybe it's better to declare rst with the BIT() macro already applied,
> and use it in wdt_probe() as is. And name 'rst' without 'shift' is
> looking more brief.

Okay, I will change it in the next version.


Thanks

Best Regards,
Huqiang Qin

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
  2023-08-01 12:51       ` Huqiang Qin
  (?)
@ 2023-08-02  7:34         ` Dmitry Rokosov
  -1 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-08-02  7:34 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

On Tue, Aug 01, 2023 at 08:51:30PM +0800, Huqiang Qin wrote:
> Hi Dmitry,
> 
> On 2023/7/28 15:15, Dmitry Rokosov wrote:
> > [ EXTERNAL EMAIL ]
> > 
> > Hello Huqiang,
> > 
> > Thank you for the patch series!
> > 
> > Please include a cover letter in future patch submissions if possible.
> > It will help to better understand the theme of the patch series and
> > group all patch sets together in one email thread.
> 
> Thank you for your suggestion. In fact, this patch series contains
> a cover letter. It may be due to network reasons that it was not
> sent to your mailbox correctly :)
> 

Ah, sorry, you are right... Now I see your cover letter on the
lore.kernel.org... My mail server makes a magic...

> ...
> >>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
> >>  {
> >>       struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
> >> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
> >>       SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
> >>  };
> >>
> >> +static const struct wdt_params gxbb_params = {
> >> +     .rst_shift = 21,
> > 
> > Maybe it's better to declare rst with the BIT() macro already applied,
> > and use it in wdt_probe() as is. And name 'rst' without 'shift' is
> > looking more brief.
> 
> Okay, I will change it in the next version.
> 
> 
> Thanks
> 
> Best Regards,
> Huqiang Qin

-- 
Thank you,
Dmitry

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-08-02  7:34         ` Dmitry Rokosov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-08-02  7:34 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

On Tue, Aug 01, 2023 at 08:51:30PM +0800, Huqiang Qin wrote:
> Hi Dmitry,
> 
> On 2023/7/28 15:15, Dmitry Rokosov wrote:
> > [ EXTERNAL EMAIL ]
> > 
> > Hello Huqiang,
> > 
> > Thank you for the patch series!
> > 
> > Please include a cover letter in future patch submissions if possible.
> > It will help to better understand the theme of the patch series and
> > group all patch sets together in one email thread.
> 
> Thank you for your suggestion. In fact, this patch series contains
> a cover letter. It may be due to network reasons that it was not
> sent to your mailbox correctly :)
> 

Ah, sorry, you are right... Now I see your cover letter on the
lore.kernel.org... My mail server makes a magic...

> ...
> >>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
> >>  {
> >>       struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
> >> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
> >>       SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
> >>  };
> >>
> >> +static const struct wdt_params gxbb_params = {
> >> +     .rst_shift = 21,
> > 
> > Maybe it's better to declare rst with the BIT() macro already applied,
> > and use it in wdt_probe() as is. And name 'rst' without 'shift' is
> > looking more brief.
> 
> Okay, I will change it in the next version.
> 
> 
> Thanks
> 
> Best Regards,
> Huqiang Qin

-- 
Thank you,
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver
@ 2023-08-02  7:34         ` Dmitry Rokosov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Rokosov @ 2023-08-02  7:34 UTC (permalink / raw)
  To: Huqiang Qin
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	neil.armstrong, khilman, jbrunet, martin.blumenstingl,
	linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel

On Tue, Aug 01, 2023 at 08:51:30PM +0800, Huqiang Qin wrote:
> Hi Dmitry,
> 
> On 2023/7/28 15:15, Dmitry Rokosov wrote:
> > [ EXTERNAL EMAIL ]
> > 
> > Hello Huqiang,
> > 
> > Thank you for the patch series!
> > 
> > Please include a cover letter in future patch submissions if possible.
> > It will help to better understand the theme of the patch series and
> > group all patch sets together in one email thread.
> 
> Thank you for your suggestion. In fact, this patch series contains
> a cover letter. It may be due to network reasons that it was not
> sent to your mailbox correctly :)
> 

Ah, sorry, you are right... Now I see your cover letter on the
lore.kernel.org... My mail server makes a magic...

> ...
> >>  static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev)
> >>  {
> >>       struct meson_gxbb_wdt *data = watchdog_get_drvdata(wdt_dev);
> >> @@ -140,8 +143,12 @@ static const struct dev_pm_ops meson_gxbb_wdt_pm_ops = {
> >>       SET_SYSTEM_SLEEP_PM_OPS(meson_gxbb_wdt_suspend, meson_gxbb_wdt_resume)
> >>  };
> >>
> >> +static const struct wdt_params gxbb_params = {
> >> +     .rst_shift = 21,
> > 
> > Maybe it's better to declare rst with the BIT() macro already applied,
> > and use it in wdt_probe() as is. And name 'rst' without 'shift' is
> > looking more brief.
> 
> Okay, I will change it in the next version.
> 
> 
> Thanks
> 
> Best Regards,
> Huqiang Qin

-- 
Thank you,
Dmitry

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2023-08-02  7:35 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 11:21 [PATCH 0/4] Add watchdog support for Amlogic-T7 SoCs Huqiang Qin
2023-07-26 11:21 ` Huqiang Qin
2023-07-26 11:21 ` [PATCH 1/4] dt-bindings: watchdog: Add " Huqiang Qin
2023-07-26 11:21   ` Huqiang Qin
2023-07-26 18:27   ` Conor Dooley
2023-07-26 18:27     ` Conor Dooley
2023-07-26 11:21 ` [PATCH 2/4] watchdog: Add a new struct for Amlogic-GXBB driver Huqiang Qin
2023-07-26 11:21   ` Huqiang Qin
2023-07-28  7:15   ` Dmitry Rokosov
2023-07-28  7:15     ` Dmitry Rokosov
2023-07-28  7:15     ` Dmitry Rokosov
2023-08-01 12:51     ` Huqiang Qin
2023-08-01 12:51       ` Huqiang Qin
2023-08-01 12:51       ` Huqiang Qin
2023-08-02  7:34       ` Dmitry Rokosov
2023-08-02  7:34         ` Dmitry Rokosov
2023-08-02  7:34         ` Dmitry Rokosov
2023-07-26 11:21 ` [PATCH 3/4] watchdog: Add support for Amlogic-T7 SoCs Huqiang Qin
2023-07-26 11:21   ` Huqiang Qin
2023-07-26 11:21 ` [PATCH 4/4] arm64: dts: Add watchdog node " Huqiang Qin
2023-07-26 11:21   ` Huqiang Qin
2023-07-28  7:17   ` Dmitry Rokosov
2023-07-28  7:17     ` Dmitry Rokosov
2023-07-28  7:17     ` Dmitry Rokosov

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.