Add i.MX8QXP system controller watchdog support
v2 cover Add i.MX8QXP system controller watchdog support
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.
Below are the patch dependency:
The dt-binding and imx8qxp.dtsi patch are based on my thermal patch series as below:
https://patchwork.kernel.org/patch/10800699/
Anson Huang (4):
dt-bindings: fsl: scu: add watchdog binding
watchdog: imx_sc: Add i.MX system controller watchdog support
arm64: defconfig: add support for i.MX system controller watchdog
arm64: dts: freescale: imx8qxp: add watchdog support
.../devicetree/bindings/arm/freescale/fsl,scu.txt | 10 + arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 + arch/arm64/configs/defconfig | 1 + drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_sc_wdt.c | 210 +++++++++++++++++++++ 6 files changed, 239 insertions(+) create mode 100644 drivers/watchdog/imx_sc_wdt.c
Signature · 1 line
2.7.4
PATCH v2 1/4 dt-bindings: fsl: scu: add watchdog binding
Add i.MX8QXP system controller watchdog binding.
---
Note: this patch is based on my thermal patch series: https://patchwork.kernel.org/patch/10800699/
--- Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 10 ++++++++++ 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +10 -0
@@ -136,6 +136,12 @@ Required properties: resource id for thermal driver to get temperature via SCU IPC. +Watchdog bindings based on SCU Message Protocol +------------------------------------------------------------ + +Required properties: +- compatible: should be "fsl,imx8qxp-sc-wdt"; + Example (imx8qxp): ------------- lsio_mu1: mailbox@5d1c0000 {
@@ -188,6 +194,10 @@ firmware { tsens-num = <1>; #thermal-sensor-cells = <1>; }; + + watchdog: watchdog { + compatible = "fsl,imx8qxp-sc-wdt"; + }; }; };
Signature · 7 lines
2.7.4 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 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.
--- drivers/watchdog/Kconfig | 13 +++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_sc_wdt.c | 187 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 drivers/watchdog/imx_sc_wdt.c
drivers/watchdog/Kconfig +13 -0
@@ -625,6 +625,19 @@ 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 ARCH_MXC || COMPILE_TEST + select WATCHDOG_CORE + help + This is the driver for the system controller watchdog + on the NXP i.MX SoCs with system controller inside. + 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 +187 -0
187 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 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.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -427,6 +427,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 · 7 lines
2.7.4 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 4/4 arm64: dts: freescale: imx8qxp: add watchdog support
In reply to Anson HuangAdd i.MX8QXP system controller watchdog support.
---
Note: this patch is based on my thermal patch series: https://patchwork.kernel.org/patch/10800699/
--- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/freescale/imx8qxp.dtsi +4 -0
@@ -123,6 +123,10 @@ tsens-num = <1>; #thermal-sensor-cells = <1>; }; + + watchdog: watchdog { + compatible = "fsl,imx8qxp-sc-wdt"; + }; }; timer {
Signature · 1 line
2.7.4
Guenter Roeck
maintainerQuoted 8 lines · Anson Huang
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.
And you expect I'll spend the time comparing this version of the patch series against version 1 and figure out myself what exactly changed ?
Guenter
Below are the patch dependency:
Quoted 19 lines
The dt-binding and
imx8qxp.dtsipatch are based on my thermal patch series as below:
https://patchwork.kernel.org/patch/10800699/Anson Huang (4):
dt-bindings: fsl: scu: add watchdog binding
watchdog:imx_sc: Add i.MX system controller watchdog support
arm64: defconfig: add support for i.MX system controller watchdog
arm64: dts: freescale: imx8qxp: add watchdog support.../devicetree/bindings/arm/freescale/fsl,scu.txt | 10 + arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 + arch/arm64/configs/defconfig | 1 + drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_sc_wdt.c | 210 +++++++++++++++++++++ 6 files changed, 239 insertions(+)create mode 100644
drivers/watchdog/imx_sc_wdt.c
Hi, Guenter
Best Regards!
Anson Huang
Quoted 26 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]] On Behalf Of Guenter Roeck
Sent: 2019年2月18日 13:16
To: Anson Huang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; [email protected]; Daniel Baluta <[email protected]>; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: Re: [PATCH V2 0/4] Add i.MX8QXP system controller watchdog supportQuoted 6 lines · Anson Huang
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
Quoted 7 lines
watchdog operation via IPC.
Quoted 2 lines
And you expect I'll spend the time comparing this version of the patch series against version 1 and figure out myself what exactly changed ?
Guenter
Sorry, I planned to reply your review mail but forgot, I addressed all your comments in V2 patch set, I will add the change log in V2 watchdog driver patch and resend.
Anson.
Quoted 23 lines
Below are the patch dependency:
Quoted 2 lines
The dt-binding and
imx8qxp.dtsipatch are based on my thermal patchseries as below:
Quoted 1 line
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat
Quoted 1 line
chwork.kernel.org%2Fpatch%2F10800699%2F&data=02%7C01%7Canso n.huang
Quoted 1 line
%40nxp.com%7C630e6c5d7ed04a912f7708d695603cb2%7C686ea1d3bc2b4
c6fa92cd9Quoted 1 line
9c5c301635%7C0%7C0%7C636860637903984268&sdata=a25qJs%2Fb4e 2a9Ey77U
Quoted 8 lines
gTNKAGCQ8IWRcUKb4G0lK%2Bkjc%3D&reserved=0
Anson Huang (4):
dt-bindings: fsl: scu: add watchdog binding
watchdog:imx_sc: Add i.MX system controller watchdog support
arm64: defconfig: add support for i.MX system controller watchdog
arm64: dts: freescale: imx8qxp: add watchdog support
Quoted 10 lines
Quoted 6 lines
.../devicetree/bindings/arm/freescale/fsl,scu.txt | 10 + arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 + arch/arm64/configs/defconfig | 1 + drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_sc_wdt.c | 210+++++++++++++++++++++
Quoted 3 lines
6 files changed, 239 insertions(+)create mode 100644
drivers/watchdog/imx_sc_wdt.c
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel