[PATCH v2 0/5] I2C framework, reboot Unmatched via PMIC

Alexandre Ghiti alexandre.ghiti at canonical.com
Fri Oct 15 08:05:57 PDT 2021


On Fri, Oct 15, 2021 at 4:31 PM Jessica Clarke <jrtc27 at jrtc27.com> wrote:
>
> On 15 Oct 2021, at 15:05, Nikita Shubin <nikita.shubin at maquefel.me> wrote:
> >
> > On Fri, 15 Oct 2021 14:56:40 +0100
> > Jessica Clarke <jrtc27 at jrtc27.com> wrote:
> >
> > Hello Jessica,
> >
> >> The chip is common for RTC, power management and watchdog
> >> functionality. Using it to reboot in this manner is not, as evidenced
> >> by the fact that Linux does not have a driver for doing so and the
> >> hardware vendor is unsure of how it’s even working the way it is. I
> >> hope this driver is never needed for future RISC-V hardware (and I
> >> don’t quite understand how it ended up being needed for the Unmatched,
> >> when the Unleashed had a gpio-restart device, though that lacked a
> >> gpio-poweroff I believe; seems like a very strange oversight).
> >>
> >> Jess
> >>
> >
> > Implementing SBC reset via Watchdog or PMIC is quite a common practice.
>
> This sequence differs from the existing watchdog-based implementation
> though, and to quote one of Dialog’s own engineers on LKML:
>
> > Personally, if it was possible I think the RTC approach would be best as it's a
> > full reset and to me is far safer with regards to potential side effects, but as
> > that's not on the table then this seems the only other approach in your case.
>
>

I don't know if you followed the discussion Nikita here:
https://patchwork.kernel.org/project/linux-riscv/patch/20210921053356.1705833-1-alexandre.ghiti@canonical.com/

> This is why I am suggesting it not be a generic device tree thing, as
> the vendor is basically saying it’s not a good option but the only
> choice you have, so should be kept a quirk.

This is not the only choice and Adam admits he does not know the
"side-effects" of a partial reset like the one implemented here. But
to implement the solution he proposes, we need to sacrifice the RTC as
it may override user configuration. Maybe it's better to make sure the
reset works as expected at the expense of the RTC, that's an open
question and today I would tend to listen to him :)

Alex

>
> Jess
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list