Add i.MX8QXP system controller watchdog
v9 cover Add i.MX8QXP system controller watchdog
i.MX8QXP is an ARMv8 Cortex-A35 SoC with a Cortex-M4 system controller inside, the system controller manages overall power, clock, secure RTC and watchdog etc., so Linux kernel running on A35 needs to communicate with system controller for watchdog operation, this system controller watchdog will call SMC to trap to EL3 secure world ARM-Trusted-Firmware and then it will request system controller to do the watchdog operation via IPC.
Changes since V8:
- change the timeout value to be from DT instead of from module parameter, and also update the binding doc and dts to add timeout property.
Anson Huang (4):
dt-bindings: watchdog: add i.MX system controller watchdog
watchdog: imx_sc: Add i.MX system controller watchdog support
arm64: defconfig: add support for i.MX system controller watchdog
arm64: dts: imx8qxp: add system controller watchdog support
.../bindings/watchdog/fsl-imx-sc-wdt.txt | 24 +++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 5 + arch/arm64/configs/defconfig | 1 + drivers/watchdog/Kconfig | 16 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_sc_wdt.c | 177 +++++++++++++++++++++ 6 files changed, 224 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt create mode 100644 drivers/watchdog/imx_sc_wdt.c
Signature · 1 line
2.7.4
PATCH v9 1/4 dt-bindings: watchdog: add i.MX system controller watchdog
Add i.MX system controller watchdog binding doc.
---
Changes since V8:
- add optional property "timeout-sec" according to driver change.
--- .../bindings/watchdog/fsl-imx-sc-wdt.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt
Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt new file +24 -0
@@ -0,0 +1,24 @@ +* Freescale i.MX System Controller Watchdog + +i.MX system controller watchdog is for i.MX SoCs with system controller inside, +the watchdog is managed by system controller, users can ONLY communicate with +system controller from secure mode for watchdog operations, so Linux i.MX system +controller watchdog driver will call ARM SMC API and trap into ARM-Trusted-Firmware +for watchdog operations, ARM-Trusted-Firmware is running at secure EL3 mode and +it will request system controller to execute the watchdog operation passed from +Linux kernel. + +Required properties: +- compatible: Should be : + "fsl,imx8qxp-sc-wdt" + followed by "fsl,imx-sc-wdt"; + +Optional properties: +- timeout-sec : Contains the watchdog timeout in seconds. + +Examples: + +watchdog { + compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt"; + timeout-sec = <60>; +};
Signature · 1 line
2.7.4
Re: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdog
Quoted 10 lines · Anson Huang
Add i.MX system controller watchdog binding doc.
Signed-off-by Anson Huang <[email protected]>---
Changes since V8:
- add optional property "timeout-sec" according to driver change.--- .../bindings/watchdog/fsl-imx-sc-wdt.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt
I still think what's in ATF should be discoverable, but:
RE: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdog
Hi, Guenter/Shawn
Since DT has been acked, would you pick up this patch series if no additional comments?
Best Regards!
Anson Huang
Quoted 28 lines
-----Original Message-----
From: Rob Herring [mailto:[email protected]]
Sent: 2019年3月26日 4:37
To: Anson Huang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; linux-arm- [email protected]; [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdogQuoted 8 lines · Anson Huang
Add i.MX system controller watchdog binding doc.
Signed-off-by Anson Huang <[email protected]>---
Changes since V8:
- add optional property "timeout-sec" according to driver change.--- .../bindings/watchdog/fsl-imx-sc-wdt.txt | 24
Quoted 8 lines
++++++++++++++++++++++
Quoted 2 lines
1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt
I still think what's in ATF should be discoverable, but:
Acked-by Rob Herring <[email protected]>
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Guenter Roeck
maintainerRe: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdog
Quoted 3 lines · Anson Huang
Hi, Guenter/Shawn
Since DT has been acked, would you pick up this patch series if no additional comments?
I added patch 1 and 2 of the series to my watchdog-next tree. Wim usually picks it up from there.
Guenter
Quoted 39 lines
Best Regards!
Anson HuangQuoted 36 lines
-----Original Message-----
From: Rob Herring [mailto:[email protected]]
Sent: 2019年3月26日 4:37
To: Anson Huang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; Daniel Baluta <[email protected]>; [email protected]; [email protected]; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; linux-arm- [email protected]; [email protected]; dl-linux-imx <[email protected]>
Subject: Re: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdogQuoted 8 lines · Anson Huang
Add i.MX system controller watchdog binding doc.
Signed-off-by Anson Huang <[email protected]>---
Changes since V8:
- add optional property "timeout-sec" according to driver change.--- .../bindings/watchdog/fsl-imx-sc-wdt.txt | 24++++++++++++++++++++++
Quoted 2 lines
1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt
I still think what's in ATF should be discoverable, but:
Acked-by Rob Herring <[email protected]>
Shawn Guo
AppliedRe: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdog
In reply to Anson HuangQuoted 3 lines · Anson Huang
Hi, Guenter/Shawn
Since DT has been acked, would you pick up this patch series if no additional comments?
Applied patch #3 and #4, thanks.
PATCH v9 2/4 watchdog: imx_sc: Add i.MX system controller watchdog support
In reply to Anson Huangi.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and watchdog etc..
This patch adds i.MX system controller watchdog driver support, watchdog operation needs to be done in secure EL3 mode via ARM-Trusted-Firmware, using SMC call, CPU will trap into ARM-Trusted-Firmware and then it will request system controller to do watchdog operation via IPC.
---
Changes since V8:
- change timeout value to be from DT instead of from module parameter.
--- drivers/watchdog/Kconfig | 16 ++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_sc_wdt.c | 177 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+) create mode 100644 drivers/watchdog/imx_sc_wdt.c
drivers/watchdog/Kconfig +16 -0
@@ -641,6 +641,22 @@ config IMX2_WDT To compile this driver as a module, choose M here: the module will be called imx2_wdt. +config IMX_SC_WDT + tristate "IMX SC Watchdog" + depends on HAVE_ARM_SMCCC + select WATCHDOG_CORE + help + This is the driver for the system controller watchdog + on the NXP i.MX SoCs with system controller inside, the + watchdog driver will call ARM SMC API and trap into + ARM-Trusted-Firmware for operations, ARM-Trusted-Firmware + will request system controller to execute the operations. + If you have one of these processors and wish to have + watchdog support enabled, say Y, otherwise say N. + + To compile this driver as a module, choose M here: the + module will be called imx_sc_wdt. + config UX500_WATCHDOG tristate "ST-Ericsson Ux500 watchdog" depends on MFD_DB8500_PRCMU
drivers/watchdog/Makefile +1 -0
@@ -68,6 +68,7 @@ obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o obj-$(CONFIG_TS4800_WATCHDOG) += ts4800_wdt.o obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o +obj-$(CONFIG_IMX_SC_WDT) += imx_sc_wdt.o obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o
drivers/watchdog/imx_sc_wdt.c new file +177 -0
177 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v9 3/4 arm64: defconfig: add support for i.MX system controller watchdog
In reply to Anson HuangEnable CONFIG_IMX_SC_WDT as module to support i.MX system controller watchdog.
---
no changes.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -429,6 +429,7 @@ CONFIG_WATCHDOG=y CONFIG_ARM_SP805_WATCHDOG=y CONFIG_S3C2410_WATCHDOG=y CONFIG_IMX2_WDT=y +CONFIG_IMX_SC_WDT=m CONFIG_MESON_GXBB_WATCHDOG=m CONFIG_MESON_WATCHDOG=m CONFIG_RENESAS_WDT=y
Signature · 1 line
2.7.4
PATCH v9 4/4 arm64: dts: imx8qxp: add system controller watchdog support
In reply to Anson HuangAdd i.MX8QXP system controller watchdog support.
---
Changes since V8:
- add timeout property.
--- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/freescale/imx8qxp.dtsi +5 -0
@@ -473,4 +473,9 @@ power-domains = <&pd IMX_SC_R_GPIO_7>; }; }; + + watchdog { + compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt"; + timeout-sec = <60>; + }; };
Signature · 1 line
2.7.4