Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5197722rwp; Sun, 16 Jul 2023 22:40:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlFXB9deU2jwpCtE5DuiKbMnCWXmYxS1cPGS6j+VDXCxblYy27H4eohmUuWu39Id7vSiitc+ X-Received: by 2002:a05:6a00:1f97:b0:677:3439:874a with SMTP id bg23-20020a056a001f9700b006773439874amr11445331pfb.3.1689572428495; Sun, 16 Jul 2023 22:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689572428; cv=none; d=google.com; s=arc-20160816; b=ckbq/sptUUCq4Q8PuDnwwwBISn6AnVmaD+N3PTTWHjEMFXtlKldqKXqd10XOsZ2y2z InMM8haFJ5f8ngcUJdUgBf335cbNo7crOATmp86ITcAphctyP/oEHVkqludxEJOImCE1 gw2gxoicmVZqdWkHhz1eZoJkiqSAxZwZfW7eJh9BEw48oFLBfT3KtsgCmbX8kgtvoFGM hqqT2oFq+hAgBZJ2OGyXus1x9NuUVPDIeaIUn/Kj2BxynJt3oVnM5RGo68pIFiNRub9A Dd0L/MHDkKMgO/M6pFJpjdzoIZM4JlTyl4UJuqBEqMaTNcSlXdXX533TZ4fa0z07Pzwb snbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=16QoQmAKo2qzesmPGTwO8y2pNV60OgC3a0qEHM2+Xyc=; fh=jH1CH0DAPIS6QocSC+F9YjRSJaXNqU3VNWJTNISHAfM=; b=Ho0CbyJJw8kZdav/sJM1dR/vvpIe3cOZFUDfwHZR/I4wwq757vQ0p5V9Y+pu3XWfGv 9RjVjMfz+3OyNhreDklcvYFhbTKpd6mGVQKIazNBIVtAtlZoTgsldFfeGu/W1qGOmsPi pzUYA5c4Gq8DmlqWmicx4Z4eE5XUQisWffKXXXCLfh+emr6EFl5Rgxs3Eg1H0n734WyL lIwXdOfELo0+jvZHvxcGn/R18ab1kyFRhWE7MITxpl9/+e3Qz+9xHmrrPK6C+YIit/lA kRxAQjrg5dKs8CnRq/wXgsq4KROAK7y5pHubejfwFQWGf2X3X2E5/V4lZj1SeckdUB1R HOTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=GTbM7bJg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu12-20020a056a00410c00b00661759efb4esi10809591pfb.229.2023.07.16.22.40.12; Sun, 16 Jul 2023 22:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=GTbM7bJg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231142AbjGQFQC (ORCPT + 99 others); Mon, 17 Jul 2023 01:16:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbjGQFQB (ORCPT ); Mon, 17 Jul 2023 01:16:01 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E27C113; Sun, 16 Jul 2023 22:16:00 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-577497ec6c6so36351957b3.2; Sun, 16 Jul 2023 22:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689570959; x=1692162959; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=16QoQmAKo2qzesmPGTwO8y2pNV60OgC3a0qEHM2+Xyc=; b=GTbM7bJg/Eo6bbnUwazMM2fKux4LrpSuZGiqddjB6R89x7hstmswiGAmgpkk2W7c+h m8lUGCk/jjZ5Yz2rVHDtGykSeAIyrKOv2yDG2R+ZqHzUZkZXSkBBOJ9Xjqf2Q201iX2s xErXAa8A75ndJGjo05PLvCxZyPodxQDnlrH8Uo3f/EI4vYaIzvDXXfLobZofiySTISxS hp7o2SRf0LZVJmCAfa73n1thA2M2vHYaTKhD7kfGxlHq0ZIoqvDAWdg5F5Et07rS0Pz8 fS/0WbEat7lhh71b92roc3rusOMih8GuMCUqjXQzM1Vj+OBckzl8bKA5wD4+jQGNxzfR oZ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689570959; x=1692162959; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=16QoQmAKo2qzesmPGTwO8y2pNV60OgC3a0qEHM2+Xyc=; b=eteBhkZVC30Jf5Mylq8yUVXr/zo0tFfN6B/4Kyw3zk20Z1Y+WzN1Wn5/ypWXURaTRe H8gVZfllEr8hiS8xvOgcgZSuqT4wiJw9AfDrRQD7E1q0uzhm3rdUb3ZPhS3sXfArnNhi aDjWvZG8VHAJMMho8lx6BDImAcR2pXEt3JJuTt8Q3PuNJUTzvMBVFYO7rR0OLa1lks5E o9D5+FML4EmgttOibfE7qGo1IySNh9MoM8/bBzEURikpV/g6U35npRRn1UpQ9RODdfqX iHyVbFz0CkFdBzzbKYjBcJzCuoUFa6HpYy/IRGutMXpiEsQCPQIxezlt/AW1pFbnJ4Eb i4Mw== X-Gm-Message-State: ABy/qLbZY6aZ3Voa6/keL3ir8gEE+hj4tpIbKT/U1JzA2j5eOhsb5UHq doPUct5J3eaj+uglvgyv18Y= X-Received: by 2002:a0d:f183:0:b0:562:16d7:e6eb with SMTP id a125-20020a0df183000000b0056216d7e6ebmr11297357ywf.40.1689570959207; Sun, 16 Jul 2023 22:15:59 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v123-20020a0dd381000000b00577269ba9e9sm3650724ywd.86.2023.07.16.22.15.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jul 2023 22:15:58 -0700 (PDT) Sender: Guenter Roeck Message-ID: <43eea233-5024-bc0a-2872-8c037ec1db67@roeck-us.net> Date: Sun, 16 Jul 2023 22:15:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v4 1/3] dt-bindings: watchdog: ti,rti-wdt: Add support for WDIOF_CARDRESET Content-Language: en-US To: huaqian.li@siemens.com, wim@linux-watchdog.org, 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, Krzysztof Kozlowski , Conor Dooley , Rob Herring References: <20230717040723.1306374-1-huaqian.li@siemens.com> <20230717040723.1306374-2-huaqian.li@siemens.com> From: Guenter Roeck In-Reply-To: <20230717040723.1306374-2-huaqian.li@siemens.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/16/23 21:07, huaqian.li@siemens.com wrote: > 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. > > Reviewed-by: Krzysztof Kozlowski > Reviewed-by: Conor Dooley > Reviewed-by: Rob Herring > Signed-off-by: Li Hua Qian Reviewed-by: Guenter Roeck > --- > .../bindings/watchdog/ti,rti-wdt.yaml | 41 +++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml > index fc553211e42d..4b66c4fcdf35 100644 > --- a/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml > +++ b/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml > @@ -34,6 +34,20 @@ properties: > power-domains: > maxItems: 1 > > + memory-region: > + maxItems: 1 > + description: > + Contains the watchdog reserved memory. It is optional. > + In the reserved memory, the specified values, which are > + PON_REASON_SOF_NUM(0xBBBBCCCC), PON_REASON_MAGIC_NUM(0xDDDDDDDD), > + and PON_REASON_EOF_NUM(0xCCCCBBBB), are pre-stored at the first > + 3 * 4 bytes to tell that last boot was caused by watchdog reset. > + Once the PON reason is captured by driver(rti_wdt.c), the driver > + is supposed to wipe the whole memory region. Surely, if this > + property is set, at least 12 bytes reserved memory starting from > + specific memory address(0xa220000) should be set. More please > + refer to Example 2. > + > required: > - compatible > - reg > @@ -59,3 +73,30 @@ examples: > assigned-clocks = <&k3_clks 252 1>; > assigned-clock-parents = <&k3_clks 252 5>; > }; > + > + - | > + // Example 2 (Add reserved memory for watchdog reset cause): > + /* > + * RTI WDT in main domain on J721e SoC. Assigned clocks are used to > + * select the source clock for the watchdog, forcing it to tick with > + * a 32kHz clock in this case. Add a reserved memory to keep the > + * watchdog reset cause persistent, which was be written in 12 bytes > + * starting from 0xa2200000 by RTI Watchdog Firmware. > + * > + * Reserved memory should be defined as follows: > + * reserved-memory { > + * wdt_reset_memory_region: wdt-memory@a2200000 { > + * reg = <0x00 0xa2200000 0x00 0x1000>; > + * no-map; > + * }; > + * } > + */ > + watchdog@40610000 { > + compatible = "ti,j7-rti-wdt"; > + reg = <0x40610000 0x100>; > + clocks = <&k3_clks 135 1>; > + power-domains = <&k3_pds 135 TI_SCI_PD_EXCLUSIVE>; > + assigned-clocks = <&k3_clks 135 0>; > + assigned-clock-parents = <&k3_clks 135 4>; > + memory-region = <&wdt_reset_memory_region>; > + };