From: Guenter Roeck <linux@roeck-us.net>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Magnus Damm <magnus.damm@gmail.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC
Date: Mon, 13 Jan 2025 08:08:50 -0800 [thread overview]
Message-ID: <5cb9f4c9-c1b2-477c-9c6a-797a4e60d30e@roeck-us.net> (raw)
In-Reply-To: <CA+V-a8tQ_tyxPn2pO=mSPVW2RffVhFz=CPCxR2pxXP1FLkcQcA@mail.gmail.com>
On 1/13/25 04:40, Lad, Prabhakar wrote:
> Hi Biju,
>
> On Mon, Jan 13, 2025 at 11:38 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
>>
>> Hi Prabhakar,
>>
>>> -----Original Message-----
>>> From: Prabhakar <prabhakar.csengg@gmail.com>
>>> Sent: 13 January 2025 11:24
>>> Subject: [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC
>>>
>>> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>>
>>> Hi All,
>>>
>>> This patch series adds SYSCON support to retrieve boot status information for RZ/V2H(P) SoC.
>>> Summary of Changes,
>>>
>>> Clock:
>>> Add syscon compatible support to the CPG block in bindings and
>>> device trees.
>>>
>>> Watchdog:
>>> Document the renesas,r9a09g057-syscon-wdt-errorrst property.
>>> Update the watchdog driver to fetch and report boot status via
>>> Error Reset Registers (CPG_ERROR_RSTm).
>>>
>>> Device Tree:
>>> Add the syscon property to CPG and WDT nodes in R9A09G057 and
>>> R9A09G047 SoC DTSI.
>>>
>>> These changes enable the watchdog driver to identify boot sources like Power-on Reset and Watchdog
>>> Reset, improving system diagnostics.
>>
>> This means that, we should assume U-boot/bootloader should not clear the WDT reset status bit.
>>
>> If they clear it, there should be a way to propagate it from u-boot/bootloader to linux,
>> otherwise, we get wrong bootstatus in linux.
>> But the clearing of watchdog status by one of the cases:
>>
>> 1) u-boot identify the boot source and clear the status bit
>>
> I agree, if the tf-a/u-boot clears the register, the bootstatus
> reported by Linux will be in-correct.
>
I would rephrase that: Today, the boot status is _always_ incorrect if a reboot
was triggered by a watchdog reset. After this patch, it will be correct unless
the boot loader resets the status bit.
> Alternative solution, would be:
>
> Let the TF-A create WDT nodes for us and add a property
> `renesas,r9a09g057-wdt-bootstatus` and propagate the WDT nodes to
> Linux.
>
> renesas,r9a09g057-wdt-bootstatus = <0/1>;
>
That would require both a property change as well as a change in the bootloader.
I suspect it would also be inappropriate as standard property and would have
to be passed as 'chosen' property (if that is even permitted) or as command line
argument.
Either case, if the boot loader has to be changed anyway, why not just tell it
to leave the boot status alone ?
Guenter
next prev parent reply other threads:[~2025-01-13 16:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 11:23 Prabhakar
2025-01-13 11:23 ` [PATCH v3 1/6] dt-bindings: clock: rzv2h-cpg: Add syscon compatible for CPG block Prabhakar
2025-01-13 11:23 ` [PATCH v3 2/6] arm64: dts: renesas: r9a09g047: Add `syscon` compatible for CPG node Prabhakar
2025-01-13 11:23 ` [PATCH v3 3/6] arm64: dts: renesas: r9a09g057: " Prabhakar
2025-01-13 11:23 ` [PATCH v3 4/6] dt-bindings: watchdog: renesas: Document `renesas,syscon-cpg-error-rst` property Prabhakar
2025-01-14 20:40 ` Rob Herring
2025-01-13 11:23 ` [PATCH v3 5/6] watchdog: rzv2h_wdt: Add support to retrieve the bootstatus information Prabhakar
2025-01-14 9:55 ` Biju Das
2025-01-14 10:57 ` Lad, Prabhakar
2025-01-14 11:09 ` Biju Das
2025-01-13 11:23 ` [PATCH v3 6/6] arm64: dts: renesas: r9a09g057: Add `renesas,syscon-cpg-error-rst` property to WDT node Prabhakar
2025-01-13 11:38 ` [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC Biju Das
2025-01-13 12:40 ` Lad, Prabhakar
2025-01-13 16:08 ` Guenter Roeck [this message]
2025-01-13 16:29 ` Lad, Prabhakar
2025-01-13 16:43 ` Biju Das
2025-01-13 16:59 ` Lad, Prabhakar
2025-01-13 17:02 ` Biju Das
2025-01-14 20:03 ` Rob Herring
2025-01-14 20:17 ` Guenter Roeck
2025-02-04 10:48 ` Lad, Prabhakar
2025-01-13 15:26 ` Rob Herring (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cb9f4c9-c1b2-477c-9c6a-797a4e60d30e@roeck-us.net \
--to=linux@roeck-us.net \
--cc=biju.das.jz@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mturquette@baylibre.com \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=wim@linux-watchdog.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®