This series adds SPL support for the SpacemiT K1 SoC, enabling boot
on K1-based boards such as the BananaPi F3.

>From v4 I am taking over this submission from Raymond Mao.

The main v4 change is the move to the upstream K1 DT (via
dts/upstream/src/riscv/spacemit/). v4 sits on top of my K1
clock/reset/dts migration [1], which obsoletes four v3 patches:

- v3 4/16 "reset: k1: remove TWSI8 reset restriction" - drop
- v3 5/16 "dt-bindings: clock: import k1-syscon from upstream" - drop
- v3 6/16 "dts: k1: import dts file from upstream folder" - drop
- v3 7/16 "clk: spacemit: Add support for K1 SoC" (Junhui Liu) —
  absorbed into [1] as its patch 1/8.

V4 has the following new patches:
- v4 4/14 "clk: spacemit: k1: prune SPL clock tree"
- v4 14/14 "doc: spacemit: add K1 SPL build and test guide"

To verify, please refer to patch 14/14 ("doc: spacemit: add K1 SPL
build and test guide") for build and test steps.

Vincent Legoll: I dropped your v3 Tested-by tags because v4's DT
handling changed substantially (OF_UPSTREAM). If you can re-test on
BPI-F3 8GB, a fresh Tested-by would help. Branch with all patches:
[2].

BR,
Guodong Xu

Link: 
https://lore.kernel.org/u-boot/20260510-b4-k1-clk-reset-upstream-dts-v1-0-db0b0503e...@riscstar.com/
 [1]
Link: https://github.com/docularxu/u-boot/tree/b4/k1-spl-bring-up-v4 [2]

Changelog
---------

Changes in v4 (vs v3):
- Switch to the upstream K1 device tree (depends on the K1 clock/reset
  migration series linked above).
- All U-Boot-specific DT deltas now live in
  arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi.
- Per-patch v4 notes are placed below the `---` cutoff line in the
  corresponding patches.
Link to v3: 
https://lore.kernel.org/u-boot/[email protected]/

Changes in v3 (Raymond Mao):
- Merge CONFIG_ARCH_K1 and CONFIG_TARGET_BANANAPI_F3 into
  CONFIG_TARGET_SPACEMIT_K1. This configuration should be used for all
  boards with Spacemit K1 SoC.
- Remove CONFIG_SPL_RESET_SPACEMIT_K1, CONFIG_SPL_CLK_SPACEMIT_K1,
  CONFIG_SPL_PMIC_SPACEMIT_P1, CONFIG_SPL_DM_REGULATOR_SPACEMIT_P1.
  Since they're redundant for SPL stage.
- Fix the calculation on clock ID. While the clock driver is
  initialized in uboot stage, it'll be run twice. Without the
  protection, it'll cause panic in the second time.
Link to v2: 
https://lore.kernel.org/u-boot/[email protected]/

Changes in v2 (Raymond Mao):
- Use read_poll_timeout() in k1 i2c driver.
- Abandon to parse offset and size from Kconfig & Makefile for binman.
- Abandon to attach firmware image into the patch set.
- Update the related document and some minor changes.
Link to v1: 
https://lore.kernel.org/u-boot/[email protected]/

Signed-off-by: Guodong Xu <[email protected]>
---
Guodong Xu (2):
      clk: spacemit: k1: prune SPL clock tree
      doc: spacemit: add K1 SPL build and test guide

Raymond Mao (12):
      spacemit: k1: support multi-board infrastructure
      spacemit: k1: enable SPL with debug UART
      configs: k1: enable early timer support
      configs: k1: add default option for clock driver in SPL
      dts: k1: enable clocks in SPL
      board: k1: initialize clock and serial devices in SPL
      i2c: k1: add I2C driver support
      spacemit: k1: add TLV EEPROM support in SPL
      spacemit: k1: Add DDR firmware support to SPL
      power: pmic: add support for Spacemit P1 PMIC
      power: regulator: add support for Spacemit P1 SoC
      board: k1: enable pmic in spl

 arch/riscv/Kconfig                              |   8 +-
 arch/riscv/cpu/k1/Kconfig                       |   6 +
 arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi       | 100 +++++
 board/spacemit/bananapi-f3/MAINTAINERS          |   6 -
 board/spacemit/bananapi-f3/Makefile             |   5 -
 board/spacemit/{bananapi-f3 => k1}/Kconfig      |   6 +-
 board/spacemit/k1/MAINTAINERS                   |  11 +
 board/spacemit/k1/Makefile                      |  28 ++
 board/spacemit/{bananapi-f3 => k1}/board.c      |   0
 board/spacemit/k1/spl.c                         | 343 ++++++++++++++++
 board/spacemit/k1/tlv_codes.h                   |  22 +
 configs/bananapi-f3_defconfig                   |  26 --
 configs/spacemit_k1_defconfig                   |  66 +++
 doc/board/spacemit/bananapi-f3.rst              |   2 +-
 doc/board/spacemit/index.rst                    |   1 +
 doc/board/spacemit/k1-spl.rst                   | 243 +++++++++++
 drivers/clk/spacemit/clk-k1.c                   | 128 ++++++
 drivers/i2c/Kconfig                             |   7 +
 drivers/i2c/Makefile                            |   1 +
 drivers/i2c/k1_i2c.c                            | 523 ++++++++++++++++++++++++
 drivers/i2c/k1_i2c.h                            |  69 ++++
 drivers/power/pmic/Kconfig                      |   8 +
 drivers/power/pmic/Makefile                     |   1 +
 drivers/power/pmic/pmic_spacemit_p1.c           |  94 +++++
 drivers/power/regulator/Kconfig                 |   7 +
 drivers/power/regulator/Makefile                |   1 +
 drivers/power/regulator/spacemit_p1_regulator.c | 464 +++++++++++++++++++++
 include/configs/bananapi-f3.h                   |  13 -
 include/configs/k1.h                            |  20 +
 include/power/spacemit_p1.h                     | 163 ++++++++
 30 files changed, 2314 insertions(+), 58 deletions(-)
---
base-commit: 52ec53db8f18ed476f30de3799067652948eba28
change-id: 20260518-b4-k1-spl-bring-up-b11b18c226a4

Best regards,
--  
Guodong Xu <[email protected]>

Reply via email to