All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
@ 2021-12-02  9:32 ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

From: Stefan Christ <s.christ@phytec.de>

Make the config register CONFIG_I writable to change the watchdog mode.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Chnages in v4:
 - no changes

Changes in v3:
 - no chagnes

Changes in v2:
 - no changes
---
 drivers/mfd/da9062-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index 01f8e10dfa55..7041ba53efb4 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -556,6 +556,7 @@ static const struct regmap_range da9062_aa_writeable_ranges[] = {
 	regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
 	regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
 	regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
+	regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
 	regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
 };
 
-- 
2.25.1


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

* [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
@ 2021-12-02  9:32 ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

From: Stefan Christ <s.christ@phytec.de>

Make the config register CONFIG_I writable to change the watchdog mode.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Chnages in v4:
 - no changes

Changes in v3:
 - no chagnes

Changes in v2:
 - no changes
---
 drivers/mfd/da9062-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index 01f8e10dfa55..7041ba53efb4 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -556,6 +556,7 @@ static const struct regmap_range da9062_aa_writeable_ranges[] = {
 	regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
 	regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
 	regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
+	regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
 	regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
 };
 
-- 
2.25.1


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

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

* [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
  2021-12-02  9:32 ` Andrej Picej
@ 2021-12-02  9:32   ` Andrej Picej
  -1 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

Implement a method to change watchdog timeout configuration based on DT
binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour
of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
clearing it enables POWERDOWN mode on watchdog timeout.

If no DT binding is specified the WATCHDOG_SD bit stays in default
configuration, not breaking behaviour of devices which might depend on
default fuse configuration.

Note: This patch requires that the config register CONFIG_I is
configured as writable in the da9062 multi function device.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Chnages in v4:
 - move the code to probe function

Changes in v3:
 - no changes

Changes in v2:
 - don't force the "reset" for all da9062-watchdog users, instead add DT
   binding where the behavior can be selected
---
 drivers/watchdog/da9062_wdt.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
index f02cbd530538..bd85f84b0fd4 100644
--- a/drivers/watchdog/da9062_wdt.c
+++ b/drivers/watchdog/da9062_wdt.c
@@ -195,8 +195,11 @@ static int da9062_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	unsigned int timeout;
+	unsigned int mask;
 	struct da9062 *chip;
 	struct da9062_watchdog *wdt;
+	int ret;
+	u32 val;
 
 	chip = dev_get_drvdata(dev->parent);
 	if (!chip)
@@ -236,6 +239,30 @@ static int da9062_wdt_probe(struct platform_device *pdev)
 		set_bit(WDOG_HW_RUNNING, &wdt->wdtdev.status);
 	}
 
+	/*
+	 * Configure what happens on watchdog timeout. Can be specified with
+	 * "dlg,wdt-sd" dt-binding (0 -> POWERDOWN, 1 -> SHUTDOWN).
+	 * If "dlg,wdt-sd" dt-binding is NOT set use the default.
+	 */
+	ret = device_property_read_u32(dev, "dlg,wdt-sd", &val);
+	if (!ret) {
+		if (val)
+			/* Use da9062's SHUTDOWN mode */
+			mask = DA9062AA_WATCHDOG_SD_MASK;
+		else
+			/* Use da9062's POWERDOWN mode. */
+			mask = 0x0;
+
+		ret = regmap_update_bits(wdt->hw->regmap,
+						DA9062AA_CONFIG_I,
+						DA9062AA_WATCHDOG_SD_MASK,
+						mask);
+
+		if (ret)
+			dev_err(dev, "failed to set wdt reset mode: %d\n",
+				ret);
+	}
+
 	return devm_watchdog_register_device(dev, &wdt->wdtdev);
 }
 
-- 
2.25.1


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

* [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
@ 2021-12-02  9:32   ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

Implement a method to change watchdog timeout configuration based on DT
binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour
of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
clearing it enables POWERDOWN mode on watchdog timeout.

If no DT binding is specified the WATCHDOG_SD bit stays in default
configuration, not breaking behaviour of devices which might depend on
default fuse configuration.

Note: This patch requires that the config register CONFIG_I is
configured as writable in the da9062 multi function device.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Chnages in v4:
 - move the code to probe function

Changes in v3:
 - no changes

Changes in v2:
 - don't force the "reset" for all da9062-watchdog users, instead add DT
   binding where the behavior can be selected
---
 drivers/watchdog/da9062_wdt.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
index f02cbd530538..bd85f84b0fd4 100644
--- a/drivers/watchdog/da9062_wdt.c
+++ b/drivers/watchdog/da9062_wdt.c
@@ -195,8 +195,11 @@ static int da9062_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	unsigned int timeout;
+	unsigned int mask;
 	struct da9062 *chip;
 	struct da9062_watchdog *wdt;
+	int ret;
+	u32 val;
 
 	chip = dev_get_drvdata(dev->parent);
 	if (!chip)
@@ -236,6 +239,30 @@ static int da9062_wdt_probe(struct platform_device *pdev)
 		set_bit(WDOG_HW_RUNNING, &wdt->wdtdev.status);
 	}
 
+	/*
+	 * Configure what happens on watchdog timeout. Can be specified with
+	 * "dlg,wdt-sd" dt-binding (0 -> POWERDOWN, 1 -> SHUTDOWN).
+	 * If "dlg,wdt-sd" dt-binding is NOT set use the default.
+	 */
+	ret = device_property_read_u32(dev, "dlg,wdt-sd", &val);
+	if (!ret) {
+		if (val)
+			/* Use da9062's SHUTDOWN mode */
+			mask = DA9062AA_WATCHDOG_SD_MASK;
+		else
+			/* Use da9062's POWERDOWN mode. */
+			mask = 0x0;
+
+		ret = regmap_update_bits(wdt->hw->regmap,
+						DA9062AA_CONFIG_I,
+						DA9062AA_WATCHDOG_SD_MASK,
+						mask);
+
+		if (ret)
+			dev_err(dev, "failed to set wdt reset mode: %d\n",
+				ret);
+	}
+
 	return devm_watchdog_register_device(dev, &wdt->wdtdev);
 }
 
-- 
2.25.1


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

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

* [PATCH v4 3/4] dt-bindings: watchdog: da9062: add watchdog timeout mode
  2021-12-02  9:32 ` Andrej Picej
@ 2021-12-02  9:32   ` Andrej Picej
  -1 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

Document the watchdog timeout mode property. If this property is used
the user can select what happens on watchdog timeout. Set this property
to 1 to enable SHUTDOWN (the device resets), set it to 0 and the device
will go to POWERDOWN on watchdog timeout.

If this property is not set, don't touch the WATCHDOG_SD bit and leave
the configuration to OTP. This way backward compatibility is not broken.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Changes in v4:
 - no changes

Changes in v3:
 - add note about using the default OTP setting if this DT binding is
   not specified

Changes in v2:
 - new patch, document new DT binding
---
 Documentation/devicetree/bindings/watchdog/da9062-wdt.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt b/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
index 950e4fba8dbc..354314d854ef 100644
--- a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
@@ -10,6 +10,12 @@ Optional properties:
 - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
 	Only use this option if you can't use the watchdog automatic suspend
 	function during a suspend (see register CONTROL_B).
+- dlg,wdt-sd: Set what happens on watchdog timeout. If this bit is set the
+	watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
+	POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
+	default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
+	set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
+	chip's OTP settings.
 
 Example: DA9062
 
-- 
2.25.1


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

* [PATCH v4 3/4] dt-bindings: watchdog: da9062: add watchdog timeout mode
@ 2021-12-02  9:32   ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

Document the watchdog timeout mode property. If this property is used
the user can select what happens on watchdog timeout. Set this property
to 1 to enable SHUTDOWN (the device resets), set it to 0 and the device
will go to POWERDOWN on watchdog timeout.

If this property is not set, don't touch the WATCHDOG_SD bit and leave
the configuration to OTP. This way backward compatibility is not broken.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Changes in v4:
 - no changes

Changes in v3:
 - add note about using the default OTP setting if this DT binding is
   not specified

Changes in v2:
 - new patch, document new DT binding
---
 Documentation/devicetree/bindings/watchdog/da9062-wdt.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt b/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
index 950e4fba8dbc..354314d854ef 100644
--- a/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/da9062-wdt.txt
@@ -10,6 +10,12 @@ Optional properties:
 - dlg,use-sw-pm: Add this property to disable the watchdog during suspend.
 	Only use this option if you can't use the watchdog automatic suspend
 	function during a suspend (see register CONTROL_B).
+- dlg,wdt-sd: Set what happens on watchdog timeout. If this bit is set the
+	watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
+	POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
+	default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
+	set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
+	chip's OTP settings.
 
 Example: DA9062
 
-- 
2.25.1


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

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

* [PATCH v4 4/4] ARM: dts: imx6: phycore-som: set watchdog timeout mode to shutdown
  2021-12-02  9:32 ` Andrej Picej
@ 2021-12-02  9:32   ` Andrej Picej
  -1 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

Enable system restart when the watchdog timeout occurs.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Chnages in v4:
 - no changes

Changes in v3:
 - no changes

Changes in v2:
 - new patch, enable shutdown mode for phytec-phycore (da9062 user)
---
 arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi
index a80aa08a37cb..743343e525cf 100644
--- a/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi
@@ -111,6 +111,7 @@ da9062_onkey: onkey {
 		watchdog {
 			compatible = "dlg,da9062-watchdog";
 			dlg,use-sw-pm;
+			dlg,wdt-sd = <1>;
 		};
 
 		regulators {
-- 
2.25.1


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

* [PATCH v4 4/4] ARM: dts: imx6: phycore-som: set watchdog timeout mode to shutdown
@ 2021-12-02  9:32   ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02  9:32 UTC (permalink / raw)
  To: support.opensource, linux, linux-watchdog
  Cc: andrej.picej, wim, linux-kernel, robh+dt, devicetree, shawnguo,
	s.hauer, kernel, festevam, linux-imx, linux-arm-kernel

Enable system restart when the watchdog timeout occurs.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
---
Chnages in v4:
 - no changes

Changes in v3:
 - no changes

Changes in v2:
 - new patch, enable shutdown mode for phytec-phycore (da9062 user)
---
 arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi
index a80aa08a37cb..743343e525cf 100644
--- a/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-phytec-phycore-som.dtsi
@@ -111,6 +111,7 @@ da9062_onkey: onkey {
 		watchdog {
 			compatible = "dlg,da9062-watchdog";
 			dlg,use-sw-pm;
+			dlg,wdt-sd = <1>;
 		};
 
 		regulators {
-- 
2.25.1


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

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

* RE: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
  2021-12-02  9:32 ` Andrej Picej
@ 2021-12-02 12:14   ` Adam Thomson
  -1 siblings, 0 replies; 25+ messages in thread
From: Adam Thomson @ 2021-12-02 12:14 UTC (permalink / raw)
  To: Andrej Picej, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 02 December 2021 09:32, Andrej Picej wrote:

> From: Stefan Christ <s.christ@phytec.de>
> 
> Make the config register CONFIG_I writable to change the watchdog mode.
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

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

* RE: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
@ 2021-12-02 12:14   ` Adam Thomson
  0 siblings, 0 replies; 25+ messages in thread
From: Adam Thomson @ 2021-12-02 12:14 UTC (permalink / raw)
  To: Andrej Picej, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 02 December 2021 09:32, Andrej Picej wrote:

> From: Stefan Christ <s.christ@phytec.de>
> 
> Make the config register CONFIG_I writable to change the watchdog mode.
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

_______________________________________________
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] 25+ messages in thread

* RE: [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
  2021-12-02  9:32   ` Andrej Picej
@ 2021-12-02 12:18     ` Adam Thomson
  -1 siblings, 0 replies; 25+ messages in thread
From: Adam Thomson @ 2021-12-02 12:18 UTC (permalink / raw)
  To: Andrej Picej, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 02 December 2021 09:32, Andrej Picej wrote:

> Implement a method to change watchdog timeout configuration based on DT
> binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour

behaviour?

> of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
> clearing it enables POWERDOWN mode on watchdog timeout.
> 
> If no DT binding is specified the WATCHDOG_SD bit stays in default
> configuration, not breaking behaviour of devices which might depend on
> default fuse configuration.
> 
> Note: This patch requires that the config register CONFIG_I is
> configured as writable in the da9062 multi function device.
> 
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
> ---

Spelling aside:

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

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

* RE: [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
@ 2021-12-02 12:18     ` Adam Thomson
  0 siblings, 0 replies; 25+ messages in thread
From: Adam Thomson @ 2021-12-02 12:18 UTC (permalink / raw)
  To: Andrej Picej, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 02 December 2021 09:32, Andrej Picej wrote:

> Implement a method to change watchdog timeout configuration based on DT
> binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour

behaviour?

> of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
> clearing it enables POWERDOWN mode on watchdog timeout.
> 
> If no DT binding is specified the WATCHDOG_SD bit stays in default
> configuration, not breaking behaviour of devices which might depend on
> default fuse configuration.
> 
> Note: This patch requires that the config register CONFIG_I is
> configured as writable in the da9062 multi function device.
> 
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
> ---

Spelling aside:

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

_______________________________________________
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] 25+ messages in thread

* RE: [PATCH v4 3/4] dt-bindings: watchdog: da9062: add watchdog timeout mode
  2021-12-02  9:32   ` Andrej Picej
@ 2021-12-02 12:19     ` Adam Thomson
  -1 siblings, 0 replies; 25+ messages in thread
From: Adam Thomson @ 2021-12-02 12:19 UTC (permalink / raw)
  To: Andrej Picej, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 02 December 2021 09:32, Andrej Picej wrote:

> Document the watchdog timeout mode property. If this property is used
> the user can select what happens on watchdog timeout. Set this property
> to 1 to enable SHUTDOWN (the device resets), set it to 0 and the device
> will go to POWERDOWN on watchdog timeout.
> 
> If this property is not set, don't touch the WATCHDOG_SD bit and leave
> the configuration to OTP. This way backward compatibility is not broken.
> 
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

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

* RE: [PATCH v4 3/4] dt-bindings: watchdog: da9062: add watchdog timeout mode
@ 2021-12-02 12:19     ` Adam Thomson
  0 siblings, 0 replies; 25+ messages in thread
From: Adam Thomson @ 2021-12-02 12:19 UTC (permalink / raw)
  To: Andrej Picej, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 02 December 2021 09:32, Andrej Picej wrote:

> Document the watchdog timeout mode property. If this property is used
> the user can select what happens on watchdog timeout. Set this property
> to 1 to enable SHUTDOWN (the device resets), set it to 0 and the device
> will go to POWERDOWN on watchdog timeout.
> 
> If this property is not set, don't touch the WATCHDOG_SD bit and leave
> the configuration to OTP. This way backward compatibility is not broken.
> 
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

_______________________________________________
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] 25+ messages in thread

* Re: [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
  2021-12-02 12:18     ` Adam Thomson
@ 2021-12-02 12:25       ` Andrej Picej
  -1 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02 12:25 UTC (permalink / raw)
  To: Adam Thomson, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel



On 2. 12. 21 13:18, Adam Thomson wrote:
> On 02 December 2021 09:32, Andrej Picej wrote:
> 
>> Implement a method to change watchdog timeout configuration based on DT
>> binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour
> 
> behaviour?

Of course.

> 
>> of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
>> clearing it enables POWERDOWN mode on watchdog timeout.
>>
>> If no DT binding is specified the WATCHDOG_SD bit stays in default
>> configuration, not breaking behaviour of devices which might depend on
>> default fuse configuration.
>>
>> Note: This patch requires that the config register CONFIG_I is
>> configured as writable in the da9062 multi function device.
>>
>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>> ---
> 
> Spelling aside:
> 
> Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> 

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

* Re: [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
@ 2021-12-02 12:25       ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-02 12:25 UTC (permalink / raw)
  To: Adam Thomson, Support Opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel



On 2. 12. 21 13:18, Adam Thomson wrote:
> On 02 December 2021 09:32, Andrej Picej wrote:
> 
>> Implement a method to change watchdog timeout configuration based on DT
>> binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour
> 
> behaviour?

Of course.

> 
>> of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
>> clearing it enables POWERDOWN mode on watchdog timeout.
>>
>> If no DT binding is specified the WATCHDOG_SD bit stays in default
>> configuration, not breaking behaviour of devices which might depend on
>> default fuse configuration.
>>
>> Note: This patch requires that the config register CONFIG_I is
>> configured as writable in the da9062 multi function device.
>>
>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>> ---
> 
> Spelling aside:
> 
> Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> 

_______________________________________________
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] 25+ messages in thread

* Re: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
  2021-12-02  9:32 ` Andrej Picej
@ 2021-12-02 14:40   ` Guenter Roeck
  -1 siblings, 0 replies; 25+ messages in thread
From: Guenter Roeck @ 2021-12-02 14:40 UTC (permalink / raw)
  To: Andrej Picej
  Cc: support.opensource, linux-watchdog, wim, linux-kernel, robh+dt,
	devicetree, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel

On Thu, Dec 02, 2021 at 10:32:27AM +0100, Andrej Picej wrote:
> From: Stefan Christ <s.christ@phytec.de>
> 
> Make the config register CONFIG_I writable to change the watchdog mode.
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Chnages in v4:
>  - no changes
> 
> Changes in v3:
>  - no chagnes
> 
> Changes in v2:
>  - no changes
> ---
>  drivers/mfd/da9062-core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
> index 01f8e10dfa55..7041ba53efb4 100644
> --- a/drivers/mfd/da9062-core.c
> +++ b/drivers/mfd/da9062-core.c
> @@ -556,6 +556,7 @@ static const struct regmap_range da9062_aa_writeable_ranges[] = {
>  	regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>  	regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>  	regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
> +	regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>  	regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>  };
>  
> -- 
> 2.25.1
> 

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

* Re: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
@ 2021-12-02 14:40   ` Guenter Roeck
  0 siblings, 0 replies; 25+ messages in thread
From: Guenter Roeck @ 2021-12-02 14:40 UTC (permalink / raw)
  To: Andrej Picej
  Cc: support.opensource, linux-watchdog, wim, linux-kernel, robh+dt,
	devicetree, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel

On Thu, Dec 02, 2021 at 10:32:27AM +0100, Andrej Picej wrote:
> From: Stefan Christ <s.christ@phytec.de>
> 
> Make the config register CONFIG_I writable to change the watchdog mode.
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Chnages in v4:
>  - no changes
> 
> Changes in v3:
>  - no chagnes
> 
> Changes in v2:
>  - no changes
> ---
>  drivers/mfd/da9062-core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
> index 01f8e10dfa55..7041ba53efb4 100644
> --- a/drivers/mfd/da9062-core.c
> +++ b/drivers/mfd/da9062-core.c
> @@ -556,6 +556,7 @@ static const struct regmap_range da9062_aa_writeable_ranges[] = {
>  	regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>  	regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>  	regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
> +	regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>  	regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>  };
>  
> -- 
> 2.25.1
> 

_______________________________________________
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] 25+ messages in thread

* Re: [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
  2021-12-02  9:32   ` Andrej Picej
@ 2021-12-02 14:41     ` Guenter Roeck
  -1 siblings, 0 replies; 25+ messages in thread
From: Guenter Roeck @ 2021-12-02 14:41 UTC (permalink / raw)
  To: Andrej Picej
  Cc: support.opensource, linux-watchdog, wim, linux-kernel, robh+dt,
	devicetree, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel

On Thu, Dec 02, 2021 at 10:32:28AM +0100, Andrej Picej wrote:
> Implement a method to change watchdog timeout configuration based on DT
> binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour
> of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
> clearing it enables POWERDOWN mode on watchdog timeout.
> 
> If no DT binding is specified the WATCHDOG_SD bit stays in default
> configuration, not breaking behaviour of devices which might depend on
> default fuse configuration.
> 
> Note: This patch requires that the config register CONFIG_I is
> configured as writable in the da9062 multi function device.
> 
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Chnages in v4:
>  - move the code to probe function
> 
> Changes in v3:
>  - no changes
> 
> Changes in v2:
>  - don't force the "reset" for all da9062-watchdog users, instead add DT
>    binding where the behavior can be selected
> ---
>  drivers/watchdog/da9062_wdt.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
> index f02cbd530538..bd85f84b0fd4 100644
> --- a/drivers/watchdog/da9062_wdt.c
> +++ b/drivers/watchdog/da9062_wdt.c
> @@ -195,8 +195,11 @@ static int da9062_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	unsigned int timeout;
> +	unsigned int mask;
>  	struct da9062 *chip;
>  	struct da9062_watchdog *wdt;
> +	int ret;
> +	u32 val;
>  
>  	chip = dev_get_drvdata(dev->parent);
>  	if (!chip)
> @@ -236,6 +239,30 @@ static int da9062_wdt_probe(struct platform_device *pdev)
>  		set_bit(WDOG_HW_RUNNING, &wdt->wdtdev.status);
>  	}
>  
> +	/*
> +	 * Configure what happens on watchdog timeout. Can be specified with
> +	 * "dlg,wdt-sd" dt-binding (0 -> POWERDOWN, 1 -> SHUTDOWN).
> +	 * If "dlg,wdt-sd" dt-binding is NOT set use the default.
> +	 */
> +	ret = device_property_read_u32(dev, "dlg,wdt-sd", &val);
> +	if (!ret) {
> +		if (val)
> +			/* Use da9062's SHUTDOWN mode */
> +			mask = DA9062AA_WATCHDOG_SD_MASK;
> +		else
> +			/* Use da9062's POWERDOWN mode. */
> +			mask = 0x0;
> +
> +		ret = regmap_update_bits(wdt->hw->regmap,
> +						DA9062AA_CONFIG_I,
> +						DA9062AA_WATCHDOG_SD_MASK,
> +						mask);
> +
> +		if (ret)
> +			dev_err(dev, "failed to set wdt reset mode: %d\n",
> +				ret);
> +	}
> +
>  	return devm_watchdog_register_device(dev, &wdt->wdtdev);
>  }
>  
> -- 
> 2.25.1
> 

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

* Re: [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout
@ 2021-12-02 14:41     ` Guenter Roeck
  0 siblings, 0 replies; 25+ messages in thread
From: Guenter Roeck @ 2021-12-02 14:41 UTC (permalink / raw)
  To: Andrej Picej
  Cc: support.opensource, linux-watchdog, wim, linux-kernel, robh+dt,
	devicetree, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel

On Thu, Dec 02, 2021 at 10:32:28AM +0100, Andrej Picej wrote:
> Implement a method to change watchdog timeout configuration based on DT
> binding ("dlg,wdt-sd"). There is a possibility to change the bahaviour
> of watchdog reset. Setting WATCHDOG_SD bit enables SHUTDOWN mode, and
> clearing it enables POWERDOWN mode on watchdog timeout.
> 
> If no DT binding is specified the WATCHDOG_SD bit stays in default
> configuration, not breaking behaviour of devices which might depend on
> default fuse configuration.
> 
> Note: This patch requires that the config register CONFIG_I is
> configured as writable in the da9062 multi function device.
> 
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Chnages in v4:
>  - move the code to probe function
> 
> Changes in v3:
>  - no changes
> 
> Changes in v2:
>  - don't force the "reset" for all da9062-watchdog users, instead add DT
>    binding where the behavior can be selected
> ---
>  drivers/watchdog/da9062_wdt.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
> index f02cbd530538..bd85f84b0fd4 100644
> --- a/drivers/watchdog/da9062_wdt.c
> +++ b/drivers/watchdog/da9062_wdt.c
> @@ -195,8 +195,11 @@ static int da9062_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	unsigned int timeout;
> +	unsigned int mask;
>  	struct da9062 *chip;
>  	struct da9062_watchdog *wdt;
> +	int ret;
> +	u32 val;
>  
>  	chip = dev_get_drvdata(dev->parent);
>  	if (!chip)
> @@ -236,6 +239,30 @@ static int da9062_wdt_probe(struct platform_device *pdev)
>  		set_bit(WDOG_HW_RUNNING, &wdt->wdtdev.status);
>  	}
>  
> +	/*
> +	 * Configure what happens on watchdog timeout. Can be specified with
> +	 * "dlg,wdt-sd" dt-binding (0 -> POWERDOWN, 1 -> SHUTDOWN).
> +	 * If "dlg,wdt-sd" dt-binding is NOT set use the default.
> +	 */
> +	ret = device_property_read_u32(dev, "dlg,wdt-sd", &val);
> +	if (!ret) {
> +		if (val)
> +			/* Use da9062's SHUTDOWN mode */
> +			mask = DA9062AA_WATCHDOG_SD_MASK;
> +		else
> +			/* Use da9062's POWERDOWN mode. */
> +			mask = 0x0;
> +
> +		ret = regmap_update_bits(wdt->hw->regmap,
> +						DA9062AA_CONFIG_I,
> +						DA9062AA_WATCHDOG_SD_MASK,
> +						mask);
> +
> +		if (ret)
> +			dev_err(dev, "failed to set wdt reset mode: %d\n",
> +				ret);
> +	}
> +
>  	return devm_watchdog_register_device(dev, &wdt->wdtdev);
>  }
>  
> -- 
> 2.25.1
> 

_______________________________________________
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] 25+ messages in thread

* RE: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
  2021-12-02  9:32 ` Andrej Picej
                   ` (5 preceding siblings ...)
  (?)
@ 2021-12-02 15:18 ` Christoph Niedermaier
  2021-12-03  8:59     ` Andrej Picej
  -1 siblings, 1 reply; 25+ messages in thread
From: Christoph Niedermaier @ 2021-12-02 15:18 UTC (permalink / raw)
  To: Andrej Picej, support.opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

From: Andrej Picej
Sent: Thursday, December 2, 2021 10:32 AM
> From: Stefan Christ <s.christ@phytec.de>
> 
> Make the config register CONFIG_I writable to change the watchdog mode.
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
> ---
> Chnages in v4:
>  - no changes
> 
> Changes in v3:
>  - no chagnes
> 
> Changes in v2:
>  - no changes
> ---
>  drivers/mfd/da9062-core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
> index 01f8e10dfa55..7041ba53efb4 100644
> --- a/drivers/mfd/da9062-core.c
> +++ b/drivers/mfd/da9062-core.c
> @@ -556,6 +556,7 @@ static const struct regmap_range
> da9062_aa_writeable_ranges[] = {
>         regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>         regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>         regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
> +       regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>         regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>  };

Hi Andrej,

Could you also include the CONFIG_I for the DA9061?
So I can test it on my system.

Thanks a lot and regards
Christoph
_______________________________________________
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] 25+ messages in thread

* Re: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
  2021-12-02 15:18 ` Christoph Niedermaier
@ 2021-12-03  8:59     ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-03  8:59 UTC (permalink / raw)
  To: Christoph Niedermaier, support.opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel



On 2. 12. 21 16:18, Christoph Niedermaier wrote:
> From: Andrej Picej
> Sent: Thursday, December 2, 2021 10:32 AM
>> From: Stefan Christ <s.christ@phytec.de>
>>
>> Make the config register CONFIG_I writable to change the watchdog mode.
>>
>> Signed-off-by: Stefan Christ <s.christ@phytec.de>
>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>> ---
>> Chnages in v4:
>>   - no changes
>>
>> Changes in v3:
>>   - no chagnes
>>
>> Changes in v2:
>>   - no changes
>> ---
>>   drivers/mfd/da9062-core.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
>> index 01f8e10dfa55..7041ba53efb4 100644
>> --- a/drivers/mfd/da9062-core.c
>> +++ b/drivers/mfd/da9062-core.c
>> @@ -556,6 +556,7 @@ static const struct regmap_range
>> da9062_aa_writeable_ranges[] = {
>>          regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>>          regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>>          regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
>> +       regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>>          regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>>   };

> Could you also include the CONFIG_I for the DA9061?
> So I can test it on my system.
> 

Yes, I don't see the problem here.
@Maintainers, should I send a new version with this (then I would also 
fix the minor spelling mistake in commit message of 2/4), or do you 
prefer a separate patch?

Thanks,
Andrej.

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

* Re: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
@ 2021-12-03  8:59     ` Andrej Picej
  0 siblings, 0 replies; 25+ messages in thread
From: Andrej Picej @ 2021-12-03  8:59 UTC (permalink / raw)
  To: Christoph Niedermaier, support.opensource, linux, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel



On 2. 12. 21 16:18, Christoph Niedermaier wrote:
> From: Andrej Picej
> Sent: Thursday, December 2, 2021 10:32 AM
>> From: Stefan Christ <s.christ@phytec.de>
>>
>> Make the config register CONFIG_I writable to change the watchdog mode.
>>
>> Signed-off-by: Stefan Christ <s.christ@phytec.de>
>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>> ---
>> Chnages in v4:
>>   - no changes
>>
>> Changes in v3:
>>   - no chagnes
>>
>> Changes in v2:
>>   - no changes
>> ---
>>   drivers/mfd/da9062-core.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
>> index 01f8e10dfa55..7041ba53efb4 100644
>> --- a/drivers/mfd/da9062-core.c
>> +++ b/drivers/mfd/da9062-core.c
>> @@ -556,6 +556,7 @@ static const struct regmap_range
>> da9062_aa_writeable_ranges[] = {
>>          regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>>          regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>>          regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
>> +       regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>>          regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>>   };

> Could you also include the CONFIG_I for the DA9061?
> So I can test it on my system.
> 

Yes, I don't see the problem here.
@Maintainers, should I send a new version with this (then I would also 
fix the minor spelling mistake in commit message of 2/4), or do you 
prefer a separate patch?

Thanks,
Andrej.

_______________________________________________
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] 25+ messages in thread

* Re: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
  2021-12-03  8:59     ` Andrej Picej
@ 2021-12-03 15:04       ` Guenter Roeck
  -1 siblings, 0 replies; 25+ messages in thread
From: Guenter Roeck @ 2021-12-03 15:04 UTC (permalink / raw)
  To: Andrej Picej, Christoph Niedermaier, support.opensource, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 12/3/21 12:59 AM, Andrej Picej wrote:
> 
> 
> On 2. 12. 21 16:18, Christoph Niedermaier wrote:
>> From: Andrej Picej
>> Sent: Thursday, December 2, 2021 10:32 AM
>>> From: Stefan Christ <s.christ@phytec.de>
>>>
>>> Make the config register CONFIG_I writable to change the watchdog mode.
>>>
>>> Signed-off-by: Stefan Christ <s.christ@phytec.de>
>>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>>> ---
>>> Chnages in v4:
>>>   - no changes
>>>
>>> Changes in v3:
>>>   - no chagnes
>>>
>>> Changes in v2:
>>>   - no changes
>>> ---
>>>   drivers/mfd/da9062-core.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
>>> index 01f8e10dfa55..7041ba53efb4 100644
>>> --- a/drivers/mfd/da9062-core.c
>>> +++ b/drivers/mfd/da9062-core.c
>>> @@ -556,6 +556,7 @@ static const struct regmap_range
>>> da9062_aa_writeable_ranges[] = {
>>>          regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>>>          regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>>>          regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
>>> +       regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>>>          regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>>>   };
> 
>> Could you also include the CONFIG_I for the DA9061?
>> So I can test it on my system.
>>
> 
> Yes, I don't see the problem here.
> @Maintainers, should I send a new version with this (then I would also fix the minor spelling mistake in commit message of 2/4), or do you prefer a separate patch?
> 

Either way is fine, with a slight preference on sending a new version.

Guenter

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

* Re: [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable
@ 2021-12-03 15:04       ` Guenter Roeck
  0 siblings, 0 replies; 25+ messages in thread
From: Guenter Roeck @ 2021-12-03 15:04 UTC (permalink / raw)
  To: Andrej Picej, Christoph Niedermaier, support.opensource, linux-watchdog
  Cc: wim, linux-kernel, robh+dt, devicetree, shawnguo, s.hauer,
	kernel, festevam, linux-imx, linux-arm-kernel

On 12/3/21 12:59 AM, Andrej Picej wrote:
> 
> 
> On 2. 12. 21 16:18, Christoph Niedermaier wrote:
>> From: Andrej Picej
>> Sent: Thursday, December 2, 2021 10:32 AM
>>> From: Stefan Christ <s.christ@phytec.de>
>>>
>>> Make the config register CONFIG_I writable to change the watchdog mode.
>>>
>>> Signed-off-by: Stefan Christ <s.christ@phytec.de>
>>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>>> ---
>>> Chnages in v4:
>>>   - no changes
>>>
>>> Changes in v3:
>>>   - no chagnes
>>>
>>> Changes in v2:
>>>   - no changes
>>> ---
>>>   drivers/mfd/da9062-core.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
>>> index 01f8e10dfa55..7041ba53efb4 100644
>>> --- a/drivers/mfd/da9062-core.c
>>> +++ b/drivers/mfd/da9062-core.c
>>> @@ -556,6 +556,7 @@ static const struct regmap_range
>>> da9062_aa_writeable_ranges[] = {
>>>          regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
>>>          regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>>>          regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
>>> +       regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>>>          regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
>>>   };
> 
>> Could you also include the CONFIG_I for the DA9061?
>> So I can test it on my system.
>>
> 
> Yes, I don't see the problem here.
> @Maintainers, should I send a new version with this (then I would also fix the minor spelling mistake in commit message of 2/4), or do you prefer a separate patch?
> 

Either way is fine, with a slight preference on sending a new version.

Guenter

_______________________________________________
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] 25+ messages in thread

end of thread, other threads:[~2021-12-03 15:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02  9:32 [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable Andrej Picej
2021-12-02  9:32 ` Andrej Picej
2021-12-02  9:32 ` [PATCH v4 2/4] watchdog: da9062: reset board on watchdog timeout Andrej Picej
2021-12-02  9:32   ` Andrej Picej
2021-12-02 12:18   ` Adam Thomson
2021-12-02 12:18     ` Adam Thomson
2021-12-02 12:25     ` Andrej Picej
2021-12-02 12:25       ` Andrej Picej
2021-12-02 14:41   ` Guenter Roeck
2021-12-02 14:41     ` Guenter Roeck
2021-12-02  9:32 ` [PATCH v4 3/4] dt-bindings: watchdog: da9062: add watchdog timeout mode Andrej Picej
2021-12-02  9:32   ` Andrej Picej
2021-12-02 12:19   ` Adam Thomson
2021-12-02 12:19     ` Adam Thomson
2021-12-02  9:32 ` [PATCH v4 4/4] ARM: dts: imx6: phycore-som: set watchdog timeout mode to shutdown Andrej Picej
2021-12-02  9:32   ` Andrej Picej
2021-12-02 12:14 ` [PATCH v4 1/4] mfd: da9062: make register CONFIG_I writable Adam Thomson
2021-12-02 12:14   ` Adam Thomson
2021-12-02 14:40 ` Guenter Roeck
2021-12-02 14:40   ` Guenter Roeck
2021-12-02 15:18 ` Christoph Niedermaier
2021-12-03  8:59   ` Andrej Picej
2021-12-03  8:59     ` Andrej Picej
2021-12-03 15:04     ` Guenter Roeck
2021-12-03 15:04       ` Guenter Roeck

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.