Message ID | 20250113112349.801875-1-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive) |
---|---|
Headers | show |
Series | Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC | expand |
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 2) u-boot identify the boot source and does not clear the status bit, but linux clear it. 3) u-boot does not touch WDT status bits, but linux clear it. Cheers, Biju
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. 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>; 0 -> Power on reset 1 -> WDT reset Geert/Rob/Krzysztof - Is the proposed approach acceptable or is there any alternative where this can be avoided. Cheers, Prabhakar
On Mon, 13 Jan 2025 11:23:43 +0000, Prabhakar wrote: > 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. > > v2->v3 > - Updated comment section to mentione there arent any ABI breakages with > this patch series. > > Cheers, > Prabhakar > > Lad Prabhakar (6): > dt-bindings: clock: rzv2h-cpg: Add syscon compatible for CPG block > arm64: dts: renesas: r9a09g047: Add `syscon` compatible for CPG node > arm64: dts: renesas: r9a09g057: Add `syscon` compatible for CPG node > dt-bindings: watchdog: renesas: Document > `renesas,syscon-cpg-error-rst` property > watchdog: rzv2h_wdt: Add support to retrieve the bootstatus > information > arm64: dts: renesas: r9a09g057: Add `renesas,syscon-cpg-error-rst` > property to WDT node > > .../bindings/clock/renesas,rzv2h-cpg.yaml | 10 +++--- > .../bindings/watchdog/renesas,wdt.yaml | 17 +++++++++ > arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 2 +- > arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 6 +++- > drivers/watchdog/rzv2h_wdt.c | 35 +++++++++++++++++++ > 5 files changed, 64 insertions(+), 6 deletions(-) > > -- > 2.43.0 > > > My bot found new DTB warnings on the .dts files added or changed in this series. Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments. If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date: pip3 install dtschema --upgrade New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/renesas/' for 20250113112349.801875-1-prabhakar.mahadev-lad.rj@bp.renesas.com: arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dtb: /soc/spi@10060000/flash@0: failed to match any schema with compatible: ['micron,mt25qu512a', 'jedec,spi-nor']
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
Hi Guenter, On Mon, Jan 13, 2025 at 4:08 PM Guenter Roeck <linux@roeck-us.net> wrote: > > 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. > Agreed. > > 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 ? > It can be done, I think Biju is concerned about the user clearing it, maybe using the `mw` command or the Linux CPG driver clearing it during the probe. Cheers, Prabhakar
Hi Prabhakar, > -----Original Message----- > From: Lad, Prabhakar <prabhakar.csengg@gmail.com> > Sent: 13 January 2025 16:29 > Subject: Re: [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC > > Hi Guenter, > > On Mon, Jan 13, 2025 at 4:0 PM Guenter Roeck <linux@roeck-us.net> wrote: > > > > 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. > > > Agreed. > > > > 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 ? > > > It can be done, I think Biju is concerned about the user clearing it, maybe using the `mw` command or > the Linux CPG driver clearing it during the probe. If either TF-A or U-boot clears the status we have problem. We need to provide input to stake holders of u-boot/tf-a to not to clear the wdt boot status, so that linux can report correct status. Or They need to provide the boot status as command line args if u-boot/tf-a clears it. Or If there is command line arg, parse that and report as boot status, else read from cpg and report it. Cheers, Biju
Hi Biju, On Mon, Jan 13, 2025 at 4:43 PM Biju Das <biju.das.jz@bp.renesas.com> wrote: > > Hi Prabhakar, > > > -----Original Message----- > > From: Lad, Prabhakar <prabhakar.csengg@gmail.com> > > Sent: 13 January 2025 16:29 > > Subject: Re: [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC > > > > Hi Guenter, > > > > On Mon, Jan 13, 2025 at 4:0 PM Guenter Roeck <linux@roeck-us.net> wrote: > > > > > > 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. > > > > > Agreed. > > > > > > 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 ? > > > > > It can be done, I think Biju is concerned about the user clearing it, maybe using the `mw` command or > > the Linux CPG driver clearing it during the probe. > > If either TF-A or U-boot clears the status we have problem. We need to provide input to > stake holders of u-boot/tf-a to not to clear the wdt boot status, so that linux can report correct > status. > I think this can be done, currently the TF-A nor u-boot clears the status. Are you OK with this approach? Cheers, Prabhakar
HI Prabhakar, > -----Original Message----- > From: Lad, Prabhakar <prabhakar.csengg@gmail.com> > Sent: 13 January 2025 17:00 > Subject: Re: [PATCH v3 0/6] Add support to retrieve the bootstatus from watchdog for RZ/V2H(P) SoC > > Hi Biju, > > On Mon, Jan 13, 2025 at 4:43 PM Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > > Hi Prabhakar, > > > > > -----Original Message----- > > > From: Lad, Prabhakar <prabhakar.csengg@gmail.com> > > > Sent: 13 January 2025 16:29 > > > Subject: Re: [PATCH v3 0/6] Add support to retrieve the bootstatus > > > from watchdog for RZ/V2H(P) SoC > > > > > > Hi Guenter, > > > > > > On Mon, Jan 13, 2025 at 4:0 PM Guenter Roeck <linux@roeck-us.net> wrote: > > > > > > > > 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. > > > > > > > Agreed. > > > > > > > > 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 ? > > > > > > > It can be done, I think Biju is concerned about the user clearing > > > it, maybe using the `mw` command or the Linux CPG driver clearing it during the probe. > > > > If either TF-A or U-boot clears the status we have problem. We need to > > provide input to stake holders of u-boot/tf-a to not to clear the wdt > > boot status, so that linux can report correct status. > > > I think this can be done, currently the TF-A nor u-boot clears the status. Are you OK with this > approach? Yes. As it provides consistent wdt status in tf-a/u-boot/kernel. Cheers, Biju
On Mon, Jan 13, 2025 at 11:38:08AM +0000, Biju Das 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 > 2) u-boot identify the boot source and does not clear the status bit, but linux clear it. > 3) u-boot does not touch WDT status bits, but linux clear it. Sounds like the same problem as this[1]. If that works for you, please comment there. Always better if there is more than 1 user for something "common". Rob [1]https://lore.kernel.org/devicetree-spec/48defa98-9718-4997-86cb-b171187708a6@cherry.de/T/#u
On 1/14/25 12:03, Rob Herring wrote: > On Mon, Jan 13, 2025 at 11:38:08AM +0000, Biju Das 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 >> 2) u-boot identify the boot source and does not clear the status bit, but linux clear it. >> 3) u-boot does not touch WDT status bits, but linux clear it. > > Sounds like the same problem as this[1]. If that works for you, please > comment there. Always better if there is more than 1 user for something > "common". > > Rob > > [1]https://lore.kernel.org/devicetree-spec/48defa98-9718-4997-86cb-b171187708a6@cherry.de/T/#u If this ends up being provided through /chosen, it should probably be supported in the watchdog core. Guenter
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. v2->v3 - Updated comment section to mentione there arent any ABI breakages with this patch series. Cheers, Prabhakar Lad Prabhakar (6): dt-bindings: clock: rzv2h-cpg: Add syscon compatible for CPG block arm64: dts: renesas: r9a09g047: Add `syscon` compatible for CPG node arm64: dts: renesas: r9a09g057: Add `syscon` compatible for CPG node dt-bindings: watchdog: renesas: Document `renesas,syscon-cpg-error-rst` property watchdog: rzv2h_wdt: Add support to retrieve the bootstatus information arm64: dts: renesas: r9a09g057: Add `renesas,syscon-cpg-error-rst` property to WDT node .../bindings/clock/renesas,rzv2h-cpg.yaml | 10 +++--- .../bindings/watchdog/renesas,wdt.yaml | 17 +++++++++ arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 2 +- arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 6 +++- drivers/watchdog/rzv2h_wdt.c | 35 +++++++++++++++++++ 5 files changed, 64 insertions(+), 6 deletions(-)