* [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls.
@ 2020-02-21 5:38 Evan Benn
2020-02-21 5:38 ` [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog Evan Benn
0 siblings, 1 reply; 6+ messages in thread
From: Evan Benn @ 2020-02-21 5:38 UTC (permalink / raw)
To: LKML
Cc: jwerner, Evan Benn, Anson Huang, Catalin Marinas,
Clément Péron, David S. Miller, Dinh Nguyen,
Greg Kroah-Hartman, Guenter Roeck, Jonathan Cameron,
Leonard Crestez, Marcin Juszkiewicz, Mark Rutland,
Matthias Brugger, Mauro Carvalho Chehab, Olof Johansson,
Rob Herring, Rob Herring, Shawn Guo, Will Deacon,
Wim Van Sebroeck, devicetree, linux-arm-kernel, linux-mediatek,
linux-watchdog
This is currently supported in firmware deployed on oak, hana and elm mt8173
chromebook devices. The kernel driver is written to be a generic SMC
watchdog driver.
Arm Trusted Firmware upstreaming review:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405
Patch to add oak, hana, elm device tree:
https://lore.kernel.org/linux-arm-kernel/20200110073730.213789-1-hsinyi@chromium.org/
I would like to add the device tree support after the above patch is
accepted.
Changes in v2:
- Change name arm > mt8173
- use watchdog_stop_on_reboot
- use watchdog_stop_on_unregister
- use devm_watchdog_register_device
- remove smcwd_shutdown, smcwd_remove
- change error codes
Evan Benn (1):
dt-bindings: watchdog: Add mt8173,smc-wdt watchdog
Julius Werner (1):
watchdog: Add new mt8173_smc_wdt watchdog driver
.../bindings/watchdog/mt8173,smc-wdt.yaml | 30 ++++
MAINTAINERS | 7 +
arch/arm64/configs/defconfig | 1 +
drivers/watchdog/Kconfig | 13 ++
drivers/watchdog/Makefile | 1 +
drivers/watchdog/mt8173_smc_wdt.c | 160 ++++++++++++++++++
6 files changed, 212 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
create mode 100644 drivers/watchdog/mt8173_smc_wdt.c
--
2.25.0.265.gbab2e86ba0-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog
2020-02-21 5:38 [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls Evan Benn
@ 2020-02-21 5:38 ` Evan Benn
2020-02-21 22:11 ` Rob Herring
0 siblings, 1 reply; 6+ messages in thread
From: Evan Benn @ 2020-02-21 5:38 UTC (permalink / raw)
To: LKML
Cc: jwerner, Evan Benn, David S. Miller, Greg Kroah-Hartman,
Guenter Roeck, Jonathan Cameron, Mark Rutland, Matthias Brugger,
Mauro Carvalho Chehab, Rob Herring, Wim Van Sebroeck, devicetree,
linux-arm-kernel, linux-mediatek, linux-watchdog
This watchdog can be used on ARM systems with a Secure
Monitor firmware to forward watchdog operations to
firmware via a Secure Monitor Call.
Signed-off-by: Evan Benn <evanbenn@chromium.org>
---
Changes in v2:
- Change name arm > mt8173
.../bindings/watchdog/mt8173,smc-wdt.yaml | 30 +++++++++++++++++++
MAINTAINERS | 6 ++++
2 files changed, 36 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
new file mode 100644
index 0000000000000..ff45e13bc548b
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/mt8173,smc-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM Secure Monitor Call based watchdog
+
+allOf:
+ - $ref: "watchdog.yaml#"
+
+maintainers:
+ - Julius Werner <jwerner@chromium.org>
+
+properties:
+ compatible:
+ enum:
+ - mt8173,smc-wdt
+
+required:
+ - compatible
+
+examples:
+ - |
+ watchdog {
+ compatible = "mt8173,smc-wdt";
+ timeout-sec = <15>;
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index e48ab79879ace..59e8779363c12 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1421,6 +1421,12 @@ S: Maintained
F: Documentation/devicetree/bindings/interrupt-controller/amazon,al-fic.txt
F: drivers/irqchip/irq-al-fic.c
+ARM SMC WATCHDOG DRIVER
+M: Julius Werner <jwerner@chromium.org>
+R: Evan Benn <evanbenn@chromium.org>
+S: Maintained
+F: devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
+
ARM SMMU DRIVERS
M: Will Deacon <will@kernel.org>
R: Robin Murphy <robin.murphy@arm.com>
--
2.25.0.265.gbab2e86ba0-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog
2020-02-21 5:38 ` [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog Evan Benn
@ 2020-02-21 22:11 ` Rob Herring
2020-02-26 0:15 ` Evan Benn
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2020-02-21 22:11 UTC (permalink / raw)
To: Evan Benn
Cc: LKML, Julius Werner, David S. Miller, Greg Kroah-Hartman,
Guenter Roeck, Jonathan Cameron, Mark Rutland, Matthias Brugger,
Mauro Carvalho Chehab, Wim Van Sebroeck, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
moderated list:ARM/Mediatek SoC support, LINUX-WATCHDOG
On Thu, Feb 20, 2020 at 11:38 PM Evan Benn <evanbenn@chromium.org> wrote:
>
> This watchdog can be used on ARM systems with a Secure
> Monitor firmware to forward watchdog operations to
> firmware via a Secure Monitor Call.
>
> Signed-off-by: Evan Benn <evanbenn@chromium.org>
> ---
>
> Changes in v2:
> - Change name arm > mt8173
>
> .../bindings/watchdog/mt8173,smc-wdt.yaml | 30 +++++++++++++++++++
> MAINTAINERS | 6 ++++
> 2 files changed, 36 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
> new file mode 100644
> index 0000000000000..ff45e13bc548b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
> @@ -0,0 +1,30 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/mt8173,smc-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ARM Secure Monitor Call based watchdog
> +
> +allOf:
> + - $ref: "watchdog.yaml#"
> +
> +maintainers:
> + - Julius Werner <jwerner@chromium.org>
> +
> +properties:
> + compatible:
> + enum:
> + - mt8173,smc-wdt
compatible strings are in the form <vendor>,<device>. 'mt8173' is not a vendor.
> +
> +required:
> + - compatible
> +
> +examples:
> + - |
> + watchdog {
This should be a child of some Mediatek firmware node. I assume
watchdog is not the *only* function.
> + compatible = "mt8173,smc-wdt";
> + timeout-sec = <15>;
> + };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e48ab79879ace..59e8779363c12 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1421,6 +1421,12 @@ S: Maintained
> F: Documentation/devicetree/bindings/interrupt-controller/amazon,al-fic.txt
> F: drivers/irqchip/irq-al-fic.c
>
> +ARM SMC WATCHDOG DRIVER
> +M: Julius Werner <jwerner@chromium.org>
> +R: Evan Benn <evanbenn@chromium.org>
> +S: Maintained
> +F: devicetree/bindings/watchdog/mt8173,smc-wdt.yaml
> +
> ARM SMMU DRIVERS
> M: Will Deacon <will@kernel.org>
> R: Robin Murphy <robin.murphy@arm.com>
> --
> 2.25.0.265.gbab2e86ba0-goog
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog
2020-02-21 22:11 ` Rob Herring
@ 2020-02-26 0:15 ` Evan Benn
2020-02-26 14:29 ` Rob Herring
0 siblings, 1 reply; 6+ messages in thread
From: Evan Benn @ 2020-02-26 0:15 UTC (permalink / raw)
To: Rob Herring
Cc: LKML, Julius Werner, David S. Miller, Greg Kroah-Hartman,
Guenter Roeck, Jonathan Cameron, Mark Rutland, Matthias Brugger,
Mauro Carvalho Chehab, Wim Van Sebroeck, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
moderated list:ARM/Mediatek SoC support, LINUX-WATCHDOG
Thanks Rob
> This should be a child of some Mediatek firmware node. I assume
> watchdog is not the *only* function.
I am not quite sure what you mean, do you intend this:
firmware {
watchdog {
...
}
}
I do not have a deep understanding of devicetree yet, can you point me
to anything that will help me understand
the consequences of that change?
Thanks
Evan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog
2020-02-26 0:15 ` Evan Benn
@ 2020-02-26 14:29 ` Rob Herring
2020-02-26 19:30 ` Julius Werner
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2020-02-26 14:29 UTC (permalink / raw)
To: Evan Benn
Cc: LKML, Julius Werner, David S. Miller, Greg Kroah-Hartman,
Guenter Roeck, Jonathan Cameron, Mark Rutland, Matthias Brugger,
Mauro Carvalho Chehab, Wim Van Sebroeck, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
moderated list:ARM/Mediatek SoC support, LINUX-WATCHDOG
On Tue, Feb 25, 2020 at 6:15 PM Evan Benn <evanbenn@chromium.org> wrote:
>
> Thanks Rob
>
> > This should be a child of some Mediatek firmware node. I assume
> > watchdog is not the *only* function.
>
> I am not quite sure what you mean, do you intend this:
>
> firmware {
> watchdog {
Not quite. /firmware is generic container. I'd expect another layer in
the middle for the overall set of Mediatek firmware behind smc calls.
Look at 'xlnx,zynqmp-firmware' for an example.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog
2020-02-26 14:29 ` Rob Herring
@ 2020-02-26 19:30 ` Julius Werner
0 siblings, 0 replies; 6+ messages in thread
From: Julius Werner @ 2020-02-26 19:30 UTC (permalink / raw)
To: Rob Herring
Cc: Evan Benn, LKML, Julius Werner, David S. Miller,
Greg Kroah-Hartman, Guenter Roeck, Jonathan Cameron,
Mark Rutland, Matthias Brugger, Mauro Carvalho Chehab,
Wim Van Sebroeck, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
moderated list:ARM/Mediatek SoC support, LINUX-WATCHDOG
> Not quite. /firmware is generic container. I'd expect another layer in
> the middle for the overall set of Mediatek firmware behind smc calls.
> Look at 'xlnx,zynqmp-firmware' for an example.
There are no other MediaTek firmware interfaces described in the
device tree on those platforms. Is it okay if we just call it
/firmware/watchdog in that case?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-02-26 19:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 5:38 [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls Evan Benn
2020-02-21 5:38 ` [PATCH v2 1/2] dt-bindings: watchdog: Add mt8173,smc-wdt watchdog Evan Benn
2020-02-21 22:11 ` Rob Herring
2020-02-26 0:15 ` Evan Benn
2020-02-26 14:29 ` Rob Herring
2020-02-26 19:30 ` Julius Werner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).