public inbox for spacemit@lists.linux.dev
 help / color / mirror / Atom feed
From: Yanko Kaneti <yaneti@declera.com>
To: linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
	Sebastian Reichel	 <sre@kernel.org>,
	Troy Mitchell <troy.mitchell@linux.spacemit.com>,
	Yixun Lan	 <dlan@gentoo.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt	 <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti	 <alex@ghiti.fr>,
	"open list:RISC-V ARCHITECTURE:Keyword:riscv"	
	<linux-riscv@lists.infradead.org>,
	"open list:RISC-V SPACEMIT SoC Support:Keyword:spacemit"	
	<spacemit@lists.linux.dev>,
	"open list:SYSTEM RESET/SHUTDOWN DRIVERS"	
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH v5 2/2] mfd: simple-mfd-i2c: add a reboot cell for the SpacemiT P1 chip
Date: Fri, 27 Feb 2026 13:29:53 +0200	[thread overview]
Message-ID: <990bc03ed2baa05e619f0aa9cc6a23acadd66ea6.camel@declera.com> (raw)
In-Reply-To: <aaC78FTN31QYaVg0@aurel32.net>

On Thu, 2026-02-26 at 22:32 +0100, Aurelien Jarno wrote:
> Hi,
> 
> On 2026-02-26 16:32, Yanko Kaneti wrote:
> > Hello,
> > 
> > On Mon, 2025-11-03 at 00:02 +0100, Aurelien Jarno wrote:
> > > Add a "spacemit-p1-reboot" cell for the SpacemiT P1 chip.
> > > 
> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > ---
> > > v5: no changes
> > > 
> > >  drivers/mfd/simple-mfd-i2c.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> > > index 0a607a1e3ca1d..542d378cdcd1f 100644
> > > --- a/drivers/mfd/simple-mfd-i2c.c
> > > +++ b/drivers/mfd/simple-mfd-i2c.c
> > > @@ -99,6 +99,7 @@ static const struct regmap_config spacemit_p1_regmap_config = {
> > >  };
> > >  
> > >  static const struct mfd_cell spacemit_p1_cells[] = {
> > > +	{ .name = "spacemit-p1-reboot", },
> > >  	{ .name = "spacemit-p1-regulator", },
> > >  	{ .name = "spacemit-p1-rtc", },
> > >  };
> > 
> > Perhaps its safe to merge this one now that everything P1 and I2C is
> > already in linus tip ?
> 
> Unfortunately, this patchset is still missing:
> https://lore.kernel.org/all/20260207-b4-k3-i2c-pio-v7-0-626942d94d91@linux.spacemit.com/
> 
> This means the reboots work most of the time, but are not 100% reliable, 
> and that's the reason why this patch got blocked from merging.

I see. Thanks. Sounds to me like sometimes working compared to never
working is better , but anyway..

FWIW  with this patch and the pio patcheset I get this rcu splat on
reboot (which is still working). Similar splat is there without the pio
patcheset.

..
[   56.411363] systemd-shutdown[1]: Rebooting.
[   56.432988] reboot: Restarting system
[   56.434120] ------------[ cut here ]------------
[   56.438642] Voluntary context switch within RCU read-side critical section!
[   56.438665] WARNING: kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x370/0x510, CPU#0: systemd-shutdow/1
[   56.438693] Modules linked in: rfkill binfmt_misc vfat fat r8169 loop nfnetlink zram lz4hc_compress lz4_compress fuse
[   56.438733] CPU: 0 UID: 0 PID: 1 Comm: systemd-shutdow Not tainted 7.0.0-rc1+ #16 PREEMPT(full) 
[   56.438742] Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2022.10ky-OpenWrt-r28427-6df0e3d02a 10/01/2022
[   56.438747] epc : rcu_note_context_switch+0x370/0x510
[   56.438757]  ra : rcu_note_context_switch+0x370/0x510
[   56.438764] epc : ffffffff801781b8 ra : ffffffff801781b8 sp : ffffffc6000432b0
[   56.438769]  gp : ffffffff83843a90 tp : ffffffd6048bdd00 t0 : ffffffff80036330
[   56.438774]  t1 : ffffffc600043080 t2 : 2d2d2d2d2d2d2d2d s0 : ffffffc600043330
[   56.438780]  s1 : ffffffd67eb15240 a0 : 000000000000003f a1 : ffffffff83559770
[   56.438784]  a2 : 0000000000000010 a3 : ffffffff83559b30 a4 : 0000000000000000
[   56.438789]  a5 : 0000000000000000 a6 : ffffffff83529700 a7 : ffffffff83559758
[   56.438793]  s2 : ffffffff83b55370 s3 : 0000000000000000 s4 : 0000000000000000
[   56.438798]  s5 : ffffffff83b55370 s6 : 0000000000000000 s7 : ffffffd605a1ccc0
[   56.438802]  s8 : 0000000000080009 s9 : 00000000fffc4890 s10: 0000000000000020
[   56.438806]  s11: ffffffff800b5160 t3 : 00000000ffffdfff t4 : 0000000000000001
[   56.438812]  t5 : 000000000000001f t6 : ffffffc600043098 ssp : 0000000000000000
[   56.438817] status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
[   56.438822] [<ffffffff801781b8>] rcu_note_context_switch+0x370/0x510
[   56.438832] [<ffffffff81285038>] __schedule+0x88/0x870
[   56.438844] [<ffffffff8128584e>] schedule+0x2e/0xa8
[   56.438851] [<ffffffff8128d9e4>] schedule_timeout+0x84/0x120
[   56.438860] [<ffffffff81286930>] wait_for_completion_timeout+0x78/0x148
[   56.438869] [<ffffffff80e30ab6>] spacemit_i2c_xfer_common+0x2d6/0x600
[   56.438881] [<ffffffff80e30e2a>] spacemit_i2c_xfer+0x1a/0x40
[   56.438887] [<ffffffff80e24d3a>] __i2c_transfer+0xf2/0x570
[   56.438896] [<ffffffff80e2520c>] i2c_transfer+0x54/0xc0
[   56.438903] [<ffffffff80c7fc02>] regmap_i2c_read+0x5a/0x98
[   56.438912] [<ffffffff80c791d4>] _regmap_raw_read+0xbc/0x380
[   56.438922] [<ffffffff80c794d0>] _regmap_bus_read+0x38/0x70
[   56.438930] [<ffffffff80c7776e>] _regmap_read+0x4e/0x1e0
[   56.438938] [<ffffffff80c7821c>] _regmap_update_bits+0xac/0xe8
[   56.438945] [<ffffffff80c79d04>] regmap_update_bits_base+0x5c/0x80
[   56.438953] [<ffffffff80e3ec1c>] spacemit_p1_restart_handler+0x2c/0x70
[   56.438963] [<ffffffff800b519a>] sys_off_notify+0x3a/0x60
[   56.438973] [<ffffffff800b3450>] notifier_call_chain+0x68/0x1a8
[   56.438980] [<ffffffff800b36c6>] atomic_notifier_call_chain+0x3e/0x60
[   56.438986] [<ffffffff800b5fb2>] do_kernel_restart+0x2a/0x40
[   56.438993] [<ffffffff80028b80>] machine_restart+0x18/0x28
[   56.439005] [<ffffffff800b618a>] kernel_restart+0x92/0xb8
[   56.439013] [<ffffffff800b64f2>] __do_sys_reboot+0x13a/0x238
[   56.439021] [<ffffffff800b671a>] __riscv_sys_reboot+0x22/0x38
[   56.439028] [<ffffffff8127ecfe>] do_trap_ecall_u+0x176/0x608
[   56.439036] [<ffffffff812926ec>] handle_exception+0x16c/0x178
[   56.439049] ---[ end tracsys: 0x0

Regards
Yanko

  reply	other threads:[~2026-02-27 11:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-02 23:01 [PATCH v5 0/2] driver: reset: spacemit-p1: add driver for poweroff/reboot Aurelien Jarno
2025-11-02 23:01 ` [PATCH v5 1/2] " Aurelien Jarno
2025-11-02 23:02 ` [PATCH v5 2/2] mfd: simple-mfd-i2c: add a reboot cell for the SpacemiT P1 chip Aurelien Jarno
2026-02-26 14:32   ` Yanko Kaneti
2026-02-26 21:32     ` Aurelien Jarno
2026-02-27 11:29       ` Yanko Kaneti [this message]
2026-03-01 22:16         ` Aurelien Jarno
2026-03-02 20:08           ` Aurelien Jarno
2026-03-02 20:34             ` Yanko Kaneti
2026-03-03 20:38               ` Aurelien Jarno
2026-03-11  2:58                 ` Troy Mitchell
2026-03-11  6:46                   ` Aurelien Jarno
2026-03-11  7:08                   ` Yanko Kaneti
2026-03-11  7:48                     ` Troy Mitchell
2025-11-03  0:48 ` (subset) [PATCH v5 0/2] driver: reset: spacemit-p1: add driver for poweroff/reboot Sebastian Reichel
2025-11-04  1:24   ` Troy Mitchell
2025-11-05  9:34     ` Lee Jones
2025-11-05  9:42       ` Troy Mitchell
2025-11-05 10:08         ` Lee Jones
2025-11-05 10:11           ` Lee Jones
2025-11-05 13:10             ` Troy Mitchell
2026-04-10  1:49               ` Troy Mitchell
2026-03-31 22:20             ` Aurelien Jarno
2026-04-01 11:19               ` Lee Jones
2025-11-05 22:49         ` Aurelien Jarno
2025-11-06  1:03           ` Troy Mitchell
2025-11-05  9:35     ` Lee Jones
2025-11-05  9:40       ` Troy Mitchell

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=990bc03ed2baa05e619f0aa9cc6a23acadd66ea6.camel@declera.com \
    --to=yaneti@declera.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=dlan@gentoo.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=sre@kernel.org \
    --cc=troy.mitchell@linux.spacemit.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