From patchwork Thu Mar 21 02:26:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10862807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF80A13B5 for ; Thu, 21 Mar 2019 02:26:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D472A29F9E for ; Thu, 21 Mar 2019 02:26:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C777C29FA4; Thu, 21 Mar 2019 02:26:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6126E29F9E for ; Thu, 21 Mar 2019 02:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727805AbfCUC0o (ORCPT ); Wed, 20 Mar 2019 22:26:44 -0400 Received: from mail-eopbgr140053.outbound.protection.outlook.com ([40.107.14.53]:57794 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726983AbfCUC0n (ORCPT ); Wed, 20 Mar 2019 22:26:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vWxV92mN6du+g2pwfHZrf3e6Z5v/uwHWvEZevZl8wnA=; b=bsapT2oUfdo+OiI3XxTOtfjsNoAZdmYVObO8hKGMfnBuLpIiaLjzWliMcnCAOqjJjYR0ci2VyTl2lm+VqGpe2Q8rCjbrBuYgorREW0j6iZOzRaqsabRzosqFCu0BWR7yOy5YoFyhGYnYD1rIKGJ5xItxhUFODnENwJbuWTW8Di8= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3785.eurprd04.prod.outlook.com (52.134.71.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Thu, 21 Mar 2019 02:26:39 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08%7]) with mapi id 15.20.1730.013; Thu, 21 Mar 2019 02:26:39 +0000 From: Anson Huang To: "wim@linux-watchdog.org" , "linux@roeck-us.net" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng Dong , Daniel Baluta , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "maxime.ripard@bootlin.com" , Andy Gross , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "stefan.wahren@i2se.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "linux-watchdog@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdog Thread-Topic: [PATCH V9 1/4] dt-bindings: watchdog: add i.MX system controller watchdog Thread-Index: AQHU342DB8FETA5RyEWUAGDpn5oqog== Date: Thu, 21 Mar 2019 02:26:38 +0000 Message-ID: <1553134884-1720-2-git-send-email-Anson.Huang@nxp.com> References: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0017.apcprd04.prod.outlook.com (2603:1096:203:36::29) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3f80b7dd-8b6f-489a-bb98-08d6ada4a598 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB3PR0402MB3785; x-ms-traffictypediagnostic: DB3PR0402MB3785: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(136003)(396003)(366004)(199004)(189003)(11346002)(316002)(478600001)(446003)(486006)(2616005)(7736002)(476003)(305945005)(66066001)(8676002)(81156014)(14454004)(386003)(110136005)(6506007)(36756003)(68736007)(6486002)(14444005)(6436002)(256004)(102836004)(52116002)(105586002)(99286004)(76176011)(81166006)(106356001)(26005)(186003)(97736004)(4326008)(50226002)(2501003)(8936002)(25786009)(3846002)(6116002)(6512007)(5660300002)(53936002)(2906002)(86362001)(2201001)(7416002)(71200400001)(71190400001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3785;H:DB3PR0402MB3916.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: vMcUF0pyEhAMUbvTJbGLDQn5CJcxH09hBhUhdD7SXMW75hBZWczI7XtKuDuUS1PfOXaZXNIOLwEpCXDmSkJCuMHslsB2zavflU99+COrAakXK1jP/2F0cfinjjd/X0wKVP4s8avqv/Q7iXtPXVFwgKeD0xXUUHuBM4r+oYBiSK+cnXg7NrcY5FerHj5i8MhNfleOO3ibopdYmOaeorFvWwbx44LHdrnNNaTqvvUzBIf47Qvju7Kg7PqS27Gf0t7lqX1rnYqzWWRH6VAN3M8YV2ABPYabOhAYHY3V3OgHi0IFkKJenk1MoEKxJDXtFSkEznQVYqslCBAwvB6AdgKNoo1D6ESc5UkUFECrXnWU5R3QvJ0/A4nACenup/ScUYVvjyArYp1Bo9fchHJXu94LC5FIkEeI+Y9rnJKNTRviY+0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f80b7dd-8b6f-489a-bb98-08d6ada4a598 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 02:26:38.9029 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3785 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add i.MX system controller watchdog binding doc. Signed-off-by: Anson Huang Acked-by: Rob Herring --- 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 diff --git a/Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt b/Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt new file mode 100644 index 0000000..02b87e9 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/fsl-imx-sc-wdt.txt @@ -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>; +}; From patchwork Thu Mar 21 02:26:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10862813 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E7F031575 for ; Thu, 21 Mar 2019 02:27:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA71529F9F for ; Thu, 21 Mar 2019 02:27:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD8BC29FA7; Thu, 21 Mar 2019 02:27:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C0A729FA6 for ; Thu, 21 Mar 2019 02:27:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbfCUC0z (ORCPT ); Wed, 20 Mar 2019 22:26:55 -0400 Received: from mail-eopbgr20042.outbound.protection.outlook.com ([40.107.2.42]:32536 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726983AbfCUC0z (ORCPT ); Wed, 20 Mar 2019 22:26:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qoD9QI+JNESe7OLYcI3VScfTRX5FeQM8eq21fCsVYoA=; b=daI8QM89n7EqIlNo5Iu38VGVvTCBgH5U8cu1PzD6RZmvnLMMR+LTPILNk5X4qbz6cY7Nm6ElS/QX3NO04yeSUtDSpJgd109N5aOP1UcmgtgESZc16M/L86vhp8i2NU16e2BeV//61WlyFKViUDtMpDmdsrdcmCnT/gVpjyEhxDQ= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3785.eurprd04.prod.outlook.com (52.134.71.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Thu, 21 Mar 2019 02:26:48 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08%7]) with mapi id 15.20.1730.013; Thu, 21 Mar 2019 02:26:48 +0000 From: Anson Huang To: "wim@linux-watchdog.org" , "linux@roeck-us.net" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng Dong , Daniel Baluta , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "maxime.ripard@bootlin.com" , Andy Gross , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "stefan.wahren@i2se.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "linux-watchdog@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V9 2/4] watchdog: imx_sc: Add i.MX system controller watchdog support Thread-Topic: [PATCH V9 2/4] watchdog: imx_sc: Add i.MX system controller watchdog support Thread-Index: AQHU342I9Rv757qUr02eYxv/9nu5tA== Date: Thu, 21 Mar 2019 02:26:47 +0000 Message-ID: <1553134884-1720-3-git-send-email-Anson.Huang@nxp.com> References: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0017.apcprd04.prod.outlook.com (2603:1096:203:36::29) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 271f1e58-5300-429d-adee-08d6ada4ab17 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB3PR0402MB3785; x-ms-traffictypediagnostic: DB3PR0402MB3785: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(136003)(396003)(366004)(199004)(189003)(11346002)(316002)(478600001)(446003)(486006)(2616005)(7736002)(476003)(305945005)(66066001)(8676002)(81156014)(14454004)(386003)(110136005)(6506007)(36756003)(68736007)(6486002)(14444005)(6436002)(256004)(102836004)(52116002)(105586002)(99286004)(76176011)(81166006)(106356001)(26005)(186003)(97736004)(4326008)(50226002)(2501003)(8936002)(25786009)(3846002)(6116002)(6512007)(5660300002)(53936002)(2906002)(86362001)(2201001)(7416002)(71200400001)(71190400001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3785;H:DB3PR0402MB3916.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 0BnA5mGbg5rVNjRiPV1rSNt7sAbRapsFlVmuk7bCUgTJ3mvGVaQlxHMOaxMWZJDQIAqZS8kslosGQKTDuTQzloiquKZ51lXQY9DmNScX6Jt3R4oD2mGQEawkK1dlgd++sjQBYBB204Bebb1tPPCPiO62x/sLZGMZlSo1OQFlI0olgsXOpukVelC0rsxywjZ6FTk+OUgrMk0TJZJV9FQTj7ny8RwZ8cDw3dXohPQKcw6p0oPnQSh5+zDQKIOqKq6ODLoLPXJdBfp2/U50tuOsSt8Pshct9QtmW9QuRhf6/YUmLuOSw1jgwwHEOv7IU9VR39OA3afjbm85YXMMiaYOGA970VpbTvt+141OAb+1LpcisczstO7DAldQqofDaqNRtLA91Wj1EQKgK9XLfRL4/FTheg3k/HNa51QoDf5BWx4= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 271f1e58-5300-429d-adee-08d6ada4ab17 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 02:26:48.0354 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3785 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP i.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. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck --- 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 diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 242eea8..44a3158 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -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 diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index ba930e4..136d9f0 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -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 diff --git a/drivers/watchdog/imx_sc_wdt.c b/drivers/watchdog/imx_sc_wdt.c new file mode 100644 index 0000000..86c2722 --- /dev/null +++ b/drivers/watchdog/imx_sc_wdt.c @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2018-2019 NXP. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_TIMEOUT 60 +/* + * Software timer tick implemented in scfw side, support 10ms to 0xffffffff ms + * in theory, but for normal case, 1s~128s is enough, you can change this max + * value in case it's not enough. + */ +#define MAX_TIMEOUT 128 + +#define IMX_SIP_TIMER 0xC2000002 +#define IMX_SIP_TIMER_START_WDOG 0x01 +#define IMX_SIP_TIMER_STOP_WDOG 0x02 +#define IMX_SIP_TIMER_SET_WDOG_ACT 0x03 +#define IMX_SIP_TIMER_PING_WDOG 0x04 +#define IMX_SIP_TIMER_SET_TIMEOUT_WDOG 0x05 +#define IMX_SIP_TIMER_GET_WDOG_STAT 0x06 +#define IMX_SIP_TIMER_SET_PRETIME_WDOG 0x07 + +#define SC_TIMER_WDOG_ACTION_PARTITION 0 + +static bool nowayout = WATCHDOG_NOWAYOUT; +module_param(nowayout, bool, 0000); +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + +static int imx_sc_wdt_ping(struct watchdog_device *wdog) +{ + struct arm_smccc_res res; + + arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_PING_WDOG, + 0, 0, 0, 0, 0, 0, &res); + + return 0; +} + +static int imx_sc_wdt_start(struct watchdog_device *wdog) +{ + struct arm_smccc_res res; + + arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_START_WDOG, + 0, 0, 0, 0, 0, 0, &res); + if (res.a0) + return -EACCES; + + arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_SET_WDOG_ACT, + SC_TIMER_WDOG_ACTION_PARTITION, + 0, 0, 0, 0, 0, &res); + return res.a0 ? -EACCES : 0; +} + +static int imx_sc_wdt_stop(struct watchdog_device *wdog) +{ + struct arm_smccc_res res; + + arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_STOP_WDOG, + 0, 0, 0, 0, 0, 0, &res); + + return res.a0 ? -EACCES : 0; +} + +static int imx_sc_wdt_set_timeout(struct watchdog_device *wdog, + unsigned int timeout) +{ + struct arm_smccc_res res; + + wdog->timeout = timeout; + arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_SET_TIMEOUT_WDOG, + timeout * 1000, 0, 0, 0, 0, 0, &res); + + return res.a0 ? -EACCES : 0; +} + +static const struct watchdog_ops imx_sc_wdt_ops = { + .owner = THIS_MODULE, + .start = imx_sc_wdt_start, + .stop = imx_sc_wdt_stop, + .ping = imx_sc_wdt_ping, + .set_timeout = imx_sc_wdt_set_timeout, +}; + +static const struct watchdog_info imx_sc_wdt_info = { + .identity = "i.MX SC watchdog timer", + .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | + WDIOF_MAGICCLOSE | WDIOF_PRETIMEOUT, +}; + +static int imx_sc_wdt_probe(struct platform_device *pdev) +{ + struct watchdog_device *imx_sc_wdd; + int ret; + + imx_sc_wdd = devm_kzalloc(&pdev->dev, sizeof(*imx_sc_wdd), GFP_KERNEL); + if (!imx_sc_wdd) + return -ENOMEM; + + platform_set_drvdata(pdev, imx_sc_wdd); + + imx_sc_wdd->info = &imx_sc_wdt_info; + imx_sc_wdd->ops = &imx_sc_wdt_ops; + imx_sc_wdd->min_timeout = 1; + imx_sc_wdd->max_timeout = MAX_TIMEOUT; + imx_sc_wdd->parent = &pdev->dev; + imx_sc_wdd->timeout = DEFAULT_TIMEOUT; + + ret = watchdog_init_timeout(imx_sc_wdd, 0, &pdev->dev); + if (ret) + dev_warn(&pdev->dev, "Failed to set timeout value, using default\n"); + + watchdog_stop_on_reboot(imx_sc_wdd); + watchdog_stop_on_unregister(imx_sc_wdd); + + ret = devm_watchdog_register_device(&pdev->dev, imx_sc_wdd); + if (ret) { + dev_err(&pdev->dev, "Failed to register watchdog device\n"); + return ret; + } + + return 0; +} + +static int __maybe_unused imx_sc_wdt_suspend(struct device *dev) +{ + struct watchdog_device *imx_sc_wdd = dev_get_drvdata(dev); + + if (watchdog_active(imx_sc_wdd)) + imx_sc_wdt_stop(imx_sc_wdd); + + return 0; +} + +static int __maybe_unused imx_sc_wdt_resume(struct device *dev) +{ + struct watchdog_device *imx_sc_wdd = dev_get_drvdata(dev); + + if (watchdog_active(imx_sc_wdd)) + imx_sc_wdt_start(imx_sc_wdd); + + return 0; +} + +static SIMPLE_DEV_PM_OPS(imx_sc_wdt_pm_ops, + imx_sc_wdt_suspend, imx_sc_wdt_resume); + +static const struct of_device_id imx_sc_wdt_dt_ids[] = { + { .compatible = "fsl,imx-sc-wdt", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx_sc_wdt_dt_ids); + +static struct platform_driver imx_sc_wdt_driver = { + .probe = imx_sc_wdt_probe, + .driver = { + .name = "imx-sc-wdt", + .of_match_table = imx_sc_wdt_dt_ids, + .pm = &imx_sc_wdt_pm_ops, + }, +}; +module_platform_driver(imx_sc_wdt_driver); + +MODULE_AUTHOR("Robin Gong "); +MODULE_DESCRIPTION("NXP i.MX system controller watchdog driver"); +MODULE_LICENSE("GPL v2"); From patchwork Thu Mar 21 02:26:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10862815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1577413B5 for ; Thu, 21 Mar 2019 02:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF07B29F9E for ; Thu, 21 Mar 2019 02:27:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E298A29FA4; Thu, 21 Mar 2019 02:27:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96B7529F9E for ; Thu, 21 Mar 2019 02:27:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727743AbfCUC1C (ORCPT ); Wed, 20 Mar 2019 22:27:02 -0400 Received: from mail-eopbgr20054.outbound.protection.outlook.com ([40.107.2.54]:16953 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727871AbfCUC1C (ORCPT ); Wed, 20 Mar 2019 22:27:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=84+pKoVf9zl3NeMN2ctLfvtV/JbX5de2LgT5Le4V29Y=; b=hu1PzqsX3D7IqKzmytzTghRtyGXdtPTSDOuSfES/8QAShYU46H262pmMG9Pa8UvIpAp3/IKbURNM4bH66OrPfq9UqZP5nc1TpyoQkSMsy3IeuWzgjnwYM7VAEC/ADPmG5xAxGU7EtPOwOj2PRY0ZmmyzBrf5IQZh36wOAa+CIP4= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3785.eurprd04.prod.outlook.com (52.134.71.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Thu, 21 Mar 2019 02:26:57 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08%7]) with mapi id 15.20.1730.013; Thu, 21 Mar 2019 02:26:57 +0000 From: Anson Huang To: "wim@linux-watchdog.org" , "linux@roeck-us.net" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng Dong , Daniel Baluta , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "maxime.ripard@bootlin.com" , Andy Gross , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "stefan.wahren@i2se.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "linux-watchdog@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V9 3/4] arm64: defconfig: add support for i.MX system controller watchdog Thread-Topic: [PATCH V9 3/4] arm64: defconfig: add support for i.MX system controller watchdog Thread-Index: AQHU342OwsT4Um8YTUyFPmYytOjlrw== Date: Thu, 21 Mar 2019 02:26:57 +0000 Message-ID: <1553134884-1720-4-git-send-email-Anson.Huang@nxp.com> References: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0017.apcprd04.prod.outlook.com (2603:1096:203:36::29) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c372cf48-e27b-424d-fca6-08d6ada4b07a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB3PR0402MB3785; x-ms-traffictypediagnostic: DB3PR0402MB3785: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(136003)(396003)(366004)(199004)(189003)(11346002)(316002)(478600001)(446003)(486006)(2616005)(7736002)(476003)(305945005)(66066001)(8676002)(81156014)(14454004)(386003)(110136005)(6506007)(36756003)(68736007)(6486002)(6436002)(256004)(102836004)(52116002)(105586002)(99286004)(76176011)(81166006)(106356001)(26005)(186003)(97736004)(4326008)(50226002)(4744005)(2501003)(8936002)(25786009)(3846002)(6116002)(6512007)(5660300002)(53936002)(2906002)(86362001)(2201001)(7416002)(71200400001)(71190400001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3785;H:DB3PR0402MB3916.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: jRXzgdqQbdgQDNZ21B0v/Ywj5vkZOVirGp1eaV8KFRdCHAN9tVknP1vv6RcYjlEhoxlQo/DmQGI27oKQ8I3O2VhMqKU6qY3AV0ZmdkLkWR7OsmcF7R8rYJ0AOG9FI5rgrWG0xANQAr4yHbs7IRSWwtxSkDp4qS3aPSD3OWOpgLpng4bRFmDYgEY+JGKKnfb1kLO3qsW29Ez5gSovUH8JtdiSPh1DF64MxcsLgB97QUHnj+df0+FK3vske+OFlLxjdjys1INSdvwdh/iGkA6RL+5p6/zW5msfbN/b69EvMHxTQqxBg0+OG2s14vn8Z1eFL2GGm+vysRSsQFxFXKl9azGxJu+TGmmY2tPDxYX+Km/qYLbQg2xs4deTZuxcLfMUcpryi4A7Rv8lRy9L4Yrug54YIIw63KTHjxyMMOYc5PM= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c372cf48-e27b-424d-fca6-08d6ada4b07a X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 02:26:57.2009 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3785 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable CONFIG_IMX_SC_WDT as module to support i.MX system controller watchdog. Signed-off-by: Anson Huang --- no changes. --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index f575401..b4000aa 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -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 From patchwork Thu Mar 21 02:27:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10862817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86BD11575 for ; Thu, 21 Mar 2019 02:27:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A72529F9E for ; Thu, 21 Mar 2019 02:27:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C51229FA4; Thu, 21 Mar 2019 02:27:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0645429F9E for ; Thu, 21 Mar 2019 02:27:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727551AbfCUC1L (ORCPT ); Wed, 20 Mar 2019 22:27:11 -0400 Received: from mail-eopbgr20048.outbound.protection.outlook.com ([40.107.2.48]:38299 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727660AbfCUC1L (ORCPT ); Wed, 20 Mar 2019 22:27:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VQ0/86U+EphEVnjdSHAUsonhr/mcz6iFc46MXR1SFvY=; b=e9Vfwe6wwOch+8qyKS4X4TVuhx8Z0iOnZq2WuzlXODKeV4XPZiD2M6/aJRbdFstZRjjC8TNOdasUNUqzGs+fAYcZQYEkhZCKSn3C7ho4r0Nk3t//QuywAGTHttKyEExNshyTgSo/aWCBZpIzDzI4XoOsCIArng3KXcqcThc85iU= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3785.eurprd04.prod.outlook.com (52.134.71.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Thu, 21 Mar 2019 02:27:06 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08%7]) with mapi id 15.20.1730.013; Thu, 21 Mar 2019 02:27:06 +0000 From: Anson Huang To: "wim@linux-watchdog.org" , "linux@roeck-us.net" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng Dong , Daniel Baluta , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "maxime.ripard@bootlin.com" , Andy Gross , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "stefan.wahren@i2se.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "linux-watchdog@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V9 4/4] arm64: dts: imx8qxp: add system controller watchdog support Thread-Topic: [PATCH V9 4/4] arm64: dts: imx8qxp: add system controller watchdog support Thread-Index: AQHU342TWNNzY9c5R0+JM4M29z9vbg== Date: Thu, 21 Mar 2019 02:27:06 +0000 Message-ID: <1553134884-1720-5-git-send-email-Anson.Huang@nxp.com> References: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1553134884-1720-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0017.apcprd04.prod.outlook.com (2603:1096:203:36::29) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b63e9d8c-b1d6-4840-b3e8-08d6ada4b5ef x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB3PR0402MB3785; x-ms-traffictypediagnostic: DB3PR0402MB3785: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(136003)(396003)(366004)(199004)(189003)(11346002)(316002)(478600001)(446003)(486006)(2616005)(7736002)(476003)(305945005)(66066001)(8676002)(81156014)(14454004)(386003)(110136005)(6506007)(36756003)(68736007)(6486002)(6436002)(256004)(102836004)(52116002)(105586002)(99286004)(76176011)(81166006)(106356001)(26005)(186003)(97736004)(4326008)(50226002)(4744005)(2501003)(8936002)(25786009)(3846002)(6116002)(6512007)(5660300002)(53936002)(2906002)(86362001)(2201001)(7416002)(71200400001)(71190400001)(921003)(32563001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3785;H:DB3PR0402MB3916.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ojLRwGXPomyiTnlDXbDlmrJxo/YBFY/Wi2FEq/ZoSLLnzMeMzHdEqey1Is8C8nPJjmi8z3811wzpkWfijObYKmgB6IyGUshKAVuEnWjSNcHh4SGJBA+E8ADsm5YMb/7DXWT3VE5vleRfxPxE9Vabgs2FFFdC4h2VGwhyh8paL38iE/5mVZZWpxTHtMPPxVWjYUw7YLit7e7T3GyObxAI5d1caY+Rec4B1s0MOZ9q0SOQWh0EBPzhZt+rO/wHq1VppqkbxrZmABy9EnXU9bjQgFmEN2dTxIRvrJ5m5MFqXVhJePQDMvo/e0LFslhTediNCpeU6+uzhdZaUx1Gjc4K4gnTbT/BnZcCDlJcyh4KDDztL2el0w5NMcdGudqOmh2syanUeBRMHR9fcIo8KXW7y0Wf/N3ZRJ1OxaJ/VXYl/XI= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b63e9d8c-b1d6-4840-b3e8-08d6ada4b5ef X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 02:27:06.3844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3785 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add i.MX8QXP system controller watchdog support. Signed-off-by: Anson Huang --- Changes since V8: - add timeout property. --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 019abce..ca4541e 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -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>; + }; };