[v3,2/3] dt-bindings: watchdog: fsl-imx: document suspend in wait mode
Commit Message
Property "fsl,suspend-in-wait" suspends watchdog in "WAIT" mode which
corresponds to Linux's Suspend-to-Idle S0 mode. If this property is not
set and the device is put into Suspend-to-Idle mode, the watchdog
triggers a reset after 128 seconds.
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
---
Changes in v3:
- disallow the property for devices which don't support WDW bit
functionality with .yaml DTS allOf:if:then scheme.
Changes in v2:
- add a commit message,
- add a list of devices which support this functionality
---
.../bindings/watchdog/fsl-imx-wdt.yaml | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
Comments
On Thu, 03 Nov 2022 11:03:57 +0100, Andrej Picej wrote:
> Property "fsl,suspend-in-wait" suspends watchdog in "WAIT" mode which
> corresponds to Linux's Suspend-to-Idle S0 mode. If this property is not
> set and the device is put into Suspend-to-Idle mode, the watchdog
> triggers a reset after 128 seconds.
>
> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes in v3:
> - disallow the property for devices which don't support WDW bit
> functionality with .yaml DTS allOf:if:then scheme.
>
> Changes in v2:
> - add a commit message,
> - add a list of devices which support this functionality
> ---
> .../bindings/watchdog/fsl-imx-wdt.yaml | 33 +++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
./Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml:71:1: [error] duplication of key "allOf" in mapping (key-duplicates)
dtschema/dtc warnings/errors:
make[1]: *** Deleting file 'Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.example.dts'
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml:71:1: found duplicate key "allOf" with value "[]" (original value: "[]")
make[1]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
./Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml:71:1: found duplicate key "allOf" with value "[]" (original value: "[]")
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml: ignoring, error parsing file
make: *** [Makefile:1492: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
On 03/11/2022 08:35, Rob Herring wrote:
>
> On Thu, 03 Nov 2022 11:03:57 +0100, Andrej Picej wrote:
>> Property "fsl,suspend-in-wait" suspends watchdog in "WAIT" mode which
>> corresponds to Linux's Suspend-to-Idle S0 mode. If this property is not
>> set and the device is put into Suspend-to-Idle mode, the watchdog
>> triggers a reset after 128 seconds.
>>
>> Signed-off-by: Andrej Picej <andrej.picej@norik.com>
>> Reviewed-by: Fabio Estevam <festevam@gmail.com>
>> ---
>> Changes in v3:
>> - disallow the property for devices which don't support WDW bit
>> functionality with .yaml DTS allOf:if:then scheme.
>>
>> Changes in v2:
>> - add a commit message,
>> - add a list of devices which support this functionality
>> ---
>> .../bindings/watchdog/fsl-imx-wdt.yaml | 33 +++++++++++++++++++
>> 1 file changed, 33 insertions(+)
>>
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
> ./Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml:71:1: [error] duplication of key "allOf" in mapping (key-duplicates)
>
You already have there allOf, so:
1. Move the existing allOf *above* unevaluatedProperties:false (like in
example-schema).
2. Drop the quotes around 'watchdog.yaml', when moving.
3. Add your pieces.
All above in one commit.
Best regards,
Krzysztof
@@ -55,6 +55,12 @@ properties:
If present, the watchdog device is configured to assert its
external reset (WDOG_B) instead of issuing a software reset.
+ fsl,suspend-in-wait:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: |
+ If present, the watchdog device is suspended in WAIT mode
+ (Suspend-to-Idle). Only supported on certain devices.
+
required:
- compatible
- interrupts
@@ -62,6 +68,33 @@ required:
unevaluatedProperties: false
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx25-wdt
+ - fsl,imx35-wdt
+ - fsl,imx50-wdt
+ - fsl,imx51-wdt
+ - fsl,imx53-wdt
+ - fsl,imx6q-wdt
+ - fsl,imx6sl-wdt
+ - fsl,imx6sll-wdt
+ - fsl,imx6sx-wdt
+ - fsl,imx6ul-wdt
+ - fsl,imx7d-wdt
+ - fsl,imx8mm-wdt
+ - fsl,imx8mn-wdt
+ - fsl,imx8mp-wdt
+ - fsl,imx8mq-wdt
+ - fsl,vf610-wdt
+ then:
+ properties:
+ fsl,suspend-in-wait: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>