[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <751AB506001CBF5F+aP8L9hBdTaVEko73@kernel.org>
Date: Mon, 27 Oct 2025 14:06:46 +0800
From: Troy Mitchell <troy.mitchell@...ux.spacemit.com>
To: Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
linux-kernel@...r.kernel.org, Lee Jones <lee@...nel.org>,
Sebastian Reichel <sre@...nel.org>, Yixun Lan <dlan@...too.org>,
Paul Walmsley <pjw@...nel.org>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>,
"open list:RISC-V ARCHITECTURE:Keyword:riscv" <linux-riscv@...ts.infradead.org>,
"open list:RISC-V SPACEMIT SoC Support:Keyword:spacemit" <spacemit@...ts.linux.dev>,
"open list:SYSTEM RESET/SHUTDOWN DRIVERS" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] driver: reset: spacemit-p1: add driver for
poweroff/reboot
On Mon, Oct 27, 2025 at 07:01:13AM +0100, Aurelien Jarno wrote:
> On 2025-10-27 11:20, Troy Mitchell wrote:
> > On Sun, Oct 26, 2025 at 11:41:14PM +0100, Aurelien Jarno wrote:
> > > This driver implements poweroff/reboot support for the SpacemiT P1 PMIC
> > > chip, which is commonly paired with the SpacemiT K1 SoC.
> > >
> > > The SpacemiT P1 support is implemented as a MFD driver, so the access is
> > > done directly through the regmap interface. Reboot or poweroff is
> > > triggered by setting a specific bit in a control register, which is
> > > automatically cleared by the hardware afterwards.
> > >
> > > Signed-off-by: Aurelien Jarno <aurelien@...el32.net>
> > > ---
> > > v2:
> > > - Replace the "select" by a "depends on"
> > > - Remove outdated Reviewed-by
> > >
> > > drivers/power/reset/Kconfig | 9 +++
> > > drivers/power/reset/Makefile | 1 +
> > > drivers/power/reset/spacemit-p1-reboot.c | 88 ++++++++++++++++++++++++
> > > 3 files changed, 98 insertions(+)
> > > create mode 100644 drivers/power/reset/spacemit-p1-reboot.c
> > >
> > > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> > > index 8248895ca9038..61c16f3d5abc7 100644
> > > --- a/drivers/power/reset/Kconfig
> > > +++ b/drivers/power/reset/Kconfig
> > > @@ -283,6 +283,15 @@ config POWER_RESET_KEYSTONE
> > > help
> > > Reboot support for the KEYSTONE SoCs.
> > >
> > > +config POWER_RESET_SPACEMIT_P1
> > > + tristate "SpacemiT P1 poweroff and reset driver"
> > > + depends on ARCH_SPACEMIT || COMPILE_TEST
> > > + depends on MFD_SPACEMIT_P1
> > > + default m
> > default m if ARCH_SPACEMIT?
>
> As explained here, this is equivalent:
> https://lore.kernel.org/spacemit/CAJM55Z_BzfRo5aKf2VrneTymSizwDQq6OfMK_LNgyoGjp43K8Q@mail.gmail.com/
>
> But I can make a v5 to change that, if it's the preferred form on the
> SpacemiT side.
I missed that conversation. Just keep it!
>
> > Or default ARCH_SPACEMIT?
> > I believe that reboot and shutdown are actually essential functionalities,
> > so it might make more sense: default ARCH_SPACEMIT?
>
> That was already changed in v3, following a request on v2:
> https://lore.kernel.org/spacemit/CANBLGczi3GeaC4aWECV8NS-zqSHgRa-5onynz9fGsZeN8qgysg@mail.gmail.com/
Thanks for your link.
- Troy
>
> Regards
> Aurelien
>
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien@...el32.net http://aurel32.net
>
Powered by blists - more mailing lists