U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] riscv: spacemit: k1: add pinctrl/GPIO and SPI NOR support
@ 2026-05-20 10:45 Guodong Xu
  2026-05-20 10:45 ` [PATCH v2 1/9] mtd: spi: select SPL_SPI_FLASH_TINY in SPL stage Guodong Xu
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Guodong Xu @ 2026-05-20 10:45 UTC (permalink / raw)
  To: Takahiro Kuwano, u-boot, u-boot-spacemit
  Cc: Vignesh R, Tom Rini, Raymond Mao, Rick Chen, Leo, Huan Zhou,
	Peng Fan, Sam Protsenko, Mayuresh Chitale, Yao Zi, Anis Chali,
	Dan Carpenter, Sean Anderson, Heiko Schocher, Rasmus Villemoes,
	Philip Molloy, Michal Simek, Yegor Yefremov, Eoin Dickson,
	Tanmay Kathpalia, Sumit Garg, Casey Connolly, Neil Armstrong,
	Guodong Xu, Rui Miguel Silva, Guodong Xu

This series adds pinctrl, GPIO, and SPI NOR flash support for the
SpacemiT K1.  Drivers are usable in both SPL and U-Boot proper.  In
SPL, the QSPI controller and SPI NOR flash are probed during early
init, and the SPL boot device is changed from memory-mapped NOR to
SPI so the common loader reads the next-stage image from NOR.  It
sits on top of the K1 SPL bring-up series [1], which depends on the
K1 clock/reset/dts migration series [4].

From v2 I am taking over this submission from Raymond Mao, and
have re-authored some of the patches.  v1 is at [2].

To apply on origin/master, two prerequisite series on lore must be
applied first, in this order:

  1. K1 clock/reset/dts migration [4]    (8 patches)
  2. K1 SPL bring-up v4 [1]              (14 patches)
  3. This series                         (9 patches)

For each series:

  b4 am <cover-msgid>
  git am ./*.mbx

The full stack (already in apply order) is at [3].

BR,
Guodong Xu

Link: https://lore.kernel.org/u-boot/20260519-b4-k1-spl-bring-up-v4-0-3915a2a904c1@riscstar.com/ [1]
Link: https://lore.kernel.org/u-boot/20260422143112.1329478-1-raymondmaoca@gmail.com/ [2]
Link: https://github.com/docularxu/u-boot/tree/b4/k1-spl-pinctrl-spinor-v2 [3]
Link: https://lore.kernel.org/u-boot/20260510-b4-k1-clk-reset-upstream-dts-v1-0-db0b0503ee44@riscstar.com/ [4]

Dropped or absorbed from v1, seven v1 patches are not in v2:

Five touched the local arch/riscv/dts/k1*.dts that [1] removed in
the OF_UPSTREAM move.  The upstream K1 dts already provides the
pinctrl includes and the qspi@d420c000 node:

- v1  3/16  "dts: k1: fix gpio ranges"
- v1  4/16  "dts: k1: import pinctrl dts file from upstream folder"
- v1  5/16  "dts: k1: remove embedded subnode in pin configs"
- v1 10/16  "dts: k1: add QSPI controller support"
- v1 16/16  "spacemit: k1: rename device tree prefix from k1- to k1_"

Absorbed into SPL series v4 [1]:

- v1 13/16  "spacemit: k1: append RISCV_MMODE_TIMERBASE"
- v1 15/16  "spacemit: k1: Add support for mmc regulator initialization"

No new patches in v2.

Changes in v2 (vs v1):
- Drop the seven patches above.
- Patch 4/9, "spl: k1: enable SPI NOR flash detection and boot" (v1 11/16):
    - Adds QSPI controller and flash node to k1-musepi-pro-u-boot.dtsi with
      bootph-pre-ram markers,
    - switches default DT to k1-musepi-pro, and calls nor_early_init()
      from SPL.
- Patch 6/9 "spacemit: k1: Add multiple device tree support" (v1 14/16):
    - Reworked to use binman --fit-multi-config so u-boot.itb packs
    - multiple board DTs.
- Patch 8/9 "gpio: add gpio driver for Spacemit K1 SoC" (v1 1/16):
    - Add .request/.rfree ops delegating to pinctrl;
    - xlate() uses gpio_flags_xlate().
- Patch 9/9 "configs: k1: enable pinctrl and gpio" (v1 6/16):
    - Also enable CONFIG_CLK and CONFIG_CLK_CCF for U-Boot proper.

Link to v1: https://lore.kernel.org/u-boot/20260422143112.1329478-1-raymondmaoca@gmail.com/

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
Guodong Xu (3):
      spl: k1: enable SPI NOR flash detection and boot
      spacemit: k1: Add multiple device tree support
      configs: k1: enable pinctrl and gpio

Raymond Mao (6):
      mtd: spi: select SPL_SPI_FLASH_TINY in SPL stage
      mtd: spi: enable spi_nor_remove() in soft reset config
      spi: fsl: add support for Spacemit K1 SoC
      riscv: binman: Always set default configuration in FIT image
      pinctrl: add pinctrl driver for Spacemit K1 SoC
      gpio: add gpio driver for Spacemit K1 SoC

 arch/riscv/dts/binman.dtsi               |   2 -
 arch/riscv/dts/k1-musepi-pro-u-boot.dtsi | 273 +++++++++++++++
 board/spacemit/k1/MAINTAINERS            |   3 +
 board/spacemit/k1/spl.c                  |  56 +++-
 configs/spacemit_k1_defconfig            |  35 +-
 drivers/gpio/Kconfig                     |   8 +
 drivers/gpio/Makefile                    |   1 +
 drivers/gpio/spacemit_gpio.c             | 253 ++++++++++++++
 drivers/mtd/spi/Makefile                 |   5 +-
 drivers/mtd/spi/sf_probe.c               |   8 +-
 drivers/pinctrl/Kconfig                  |   1 +
 drivers/pinctrl/Makefile                 |   1 +
 drivers/pinctrl/spacemit/Kconfig         |   9 +
 drivers/pinctrl/spacemit/Makefile        |   2 +
 drivers/pinctrl/spacemit/pinctrl-k1.c    | 550 +++++++++++++++++++++++++++++++
 drivers/spi/fsl_qspi.c                   |   9 +
 16 files changed, 1201 insertions(+), 15 deletions(-)
---
base-commit: ba87dd05ec82c06673e98ea50d84cf062798af6e
change-id: 20260519-b4-k1-spl-pinctrl-spinor-c66649702a95

Best regards,
--  
Guodong Xu <guodong@riscstar.com>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-06-04  5:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 10:45 [PATCH v2 0/9] riscv: spacemit: k1: add pinctrl/GPIO and SPI NOR support Guodong Xu
2026-05-20 10:45 ` [PATCH v2 1/9] mtd: spi: select SPL_SPI_FLASH_TINY in SPL stage Guodong Xu
2026-05-27 13:28   ` Kathpalia, Tanmay
2026-05-20 10:45 ` [PATCH v2 2/9] mtd: spi: enable spi_nor_remove() in soft reset config Guodong Xu
2026-05-27 13:40   ` Kathpalia, Tanmay
2026-05-20 10:45 ` [PATCH v2 3/9] spi: fsl: add support for Spacemit K1 SoC Guodong Xu
2026-05-20 10:45 ` [PATCH v2 4/9] spl: k1: enable SPI NOR flash detection and boot Guodong Xu
2026-05-20 10:45 ` [PATCH v2 5/9] riscv: binman: Always set default configuration in FIT image Guodong Xu
2026-05-20 10:45 ` [PATCH v2 6/9] spacemit: k1: Add multiple device tree support Guodong Xu
2026-05-24 21:25   ` Aurelien Jarno
2026-05-26 13:24     ` Guodong Xu
2026-05-26 13:36   ` Simon Glass
2026-06-04 14:21     ` Guodong Xu
2026-05-20 10:45 ` [PATCH v2 7/9] pinctrl: add pinctrl driver for Spacemit K1 SoC Guodong Xu
2026-05-20 10:45 ` [PATCH v2 8/9] gpio: add gpio " Guodong Xu
2026-05-20 10:45 ` [PATCH v2 9/9] configs: k1: enable pinctrl and gpio Guodong Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox