From patchwork Tue Jul 11 09:17:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Hua Qian" X-Patchwork-Id: 701844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E646EEB64DD for ; Tue, 11 Jul 2023 09:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229963AbjGKJVV (ORCPT ); Tue, 11 Jul 2023 05:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGKJUz (ORCPT ); Tue, 11 Jul 2023 05:20:55 -0400 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D21D7172D for ; Tue, 11 Jul 2023 02:17:42 -0700 (PDT) Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20230711091739bca3c4114a407ec6be for ; Tue, 11 Jul 2023 11:17:40 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=huaqian.li@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=wE+SEueNbEbwnhCHFDEWPtQJzySe4EclgZMfWR8En/4=; b=gt8hEd6JCG6zwuqr5chB1NtzWxJ910wZPCDgmK9GLi8dwDMo+u+xPW84URA2v2SRvoXxx1 mhwOAdnPpAmEsIYY3ppntPYh6S9DJSqF+lAkkQn6NznpdinLn6Js9cLWAJCe3KmzsGmWKDpo 6WbeQKTgGX2EFv9tgbyv4OmWsHg/A=; From: huaqian.li@siemens.com To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: huaqianlee@gmail.com, nm@ti.com, vigneshr@ti.com, kristo@kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jan.kiszka@siemens.com, baocheng.su@siemens.com, Li Hua Qian Subject: [PATCH v2 1/3] dt-bindings: watchdog: ti,rti-wdt: Add support for WDIOF_CARDRESET Date: Tue, 11 Jul 2023 17:17:11 +0800 Message-Id: <20230711091713.1113010-2-huaqian.li@siemens.com> In-Reply-To: <20230711091713.1113010-1-huaqian.li@siemens.com> References: <20230711091713.1113010-1-huaqian.li@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-959203:519-21489:flowmailer Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Li Hua Qian TI RTI (Real Time Interrupt) Watchdog doesn't support to record the watchdog cause. Add a reserved memory to know the last reboot was caused by the watchdog card. In the reserved memory, some specific info will be saved to indicate whether the watchdog reset was triggered in last boot. Signed-off-by: Li Hua Qian --- .../devicetree/bindings/watchdog/ti,rti-wdt.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml index fc553211e42d..f227db08dc70 100644 --- a/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml @@ -26,7 +26,18 @@ properties: - ti,j7-rti-wdt reg: - maxItems: 1 + maxItems: 2 + description: + - Contains the address and the size of MCU RTI register. + - Contains the address and the size of reserved memory, which + has the pre-stored watchdog reset cause as power-on reason. The + second item is optional. + In the reserved memory, the following values are needed at the + first 12 bytes to tell that last boot was caused by watchdog + reset. + - PON_REASON_SOF_NUM: 0xBBBBCCCC + - PON_REASON_MAGIC_NUM: 0xDDDDDDDD + - PON_REASON_EOF_NUM: 0xCCCCBBBB clocks: maxItems: 1