[PATCH 0/2] Add reboot support for SpacemiT K1 platforms

Aurelien Jarno aurelien at aurel32.net
Sun Apr 19 07:49:18 PDT 2026


This add reboot support for SpacemiT K1 platforms that uses the SpacemiT
P1 PMIC, which is TTBOMK all of them. Note that the Linux kernel also
has a driver for that [1], but not yet enabled [2]. However it has been
suggested that it's better to implement reboot support at the OpenSBI
level [3].

The first patch add I2C support for the SpacemiT P1 SoC, and the second
one reboot support for the SpacemiT P1 PMIC. This chip is also used on
some SpacemiT K3 platforms, that's why I decided to add it at the PMIC
level (lib/utils/reset/fdt_reset_spacemit_p1.c) instead of at the
platform level (platform/generic/spacemit/k1.c).

This patchset has been tested on a Banana Pi BPI-F3 board and on a
Milk-V Jupiter board.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/power/reset/spacemit-p1-reboot.c
[2] https://lore.kernel.org/all/20260401165437.1048786-3-aurelien@aurel32.net/
[3] https://lore.kernel.org/all/c1f466f8-4e76-43a2-a7a2-126415fd1f56@sifive.com/

Aurelien Jarno (2):
  lib: utils/i2c: add minimal SpacemiT I2C driver
  lib: utils/reset: add SpacemiT P1 PMIC support

 lib/utils/i2c/Kconfig                   |   4 +
 lib/utils/i2c/fdt_i2c_spacemit.c        | 220 ++++++++++++++++++++++++
 lib/utils/i2c/objects.mk                |   3 +
 lib/utils/reset/Kconfig                 |   4 +
 lib/utils/reset/fdt_reset_spacemit_p1.c | 112 ++++++++++++
 lib/utils/reset/objects.mk              |   3 +
 platform/generic/configs/defconfig      |   2 +
 7 files changed, 348 insertions(+)
 create mode 100644 lib/utils/i2c/fdt_i2c_spacemit.c
 create mode 100644 lib/utils/reset/fdt_reset_spacemit_p1.c

-- 
2.53.0




More information about the opensbi mailing list