Skip to content

Add pinctrl/GPIO and SPI NOR support for Spacemit K1

Raymond Mao u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 1 replyIn review
  2. v116 patches 8 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mtd: spi: select SPL_SPI_FLASH_TINY in SPL stagedrivers/mtd/spi/Makefile+2 -30 replies
2/9mtd: spi: enable spi_nor_remove() in soft reset configdrivers/mtd/spi/sf_probe.c+5 -30 replies
3/9spi: fsl: add support for Spacemit K1 SoCdrivers/spi/fsl_qspi.c+9 -00 replies
4/9spl: k1: enable SPI NOR flash detection and bootarch/riscv/dts/k1-musepi-pro-u-boot.dtsi board/spacemit/k1/spl.c configs/spacemit_k1_defconfig+319 -30 replies
5/9riscv: binman: Always set default configuration in FIT imagearch/riscv/dts/binman.dtsi+0 -20 replies
6/9spacemit: k1: Add multiple device tree supportboard/spacemit/k1/spl.c configs/spacemit_k1_defconfig+56 -110 replies
7/9pinctrl: add pinctrl driver for Spacemit K1 SoCdrivers/pinctrl/Kconfig drivers/pinctrl/Makefile drivers/pinctrl/spacemit/Kconfig +2 more+559 -00 replies
8/9gpio: add gpio driver for Spacemit K1 SoCdrivers/gpio/Kconfig drivers/gpio/Makefile drivers/gpio/spacemit_gpio.c+262 -00 replies
9/9configs: k1: enable pinctrl and gpioboard/spacemit/k1/MAINTAINERS configs/spacemit_k1_defconfig+10 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/9] Add pinctrl/GPIO and SPI NOR support for Spacemit K1

From: Raymond Mao <[email protected]>

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 [2].

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

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

[1] https://lore.kernel.org/u-boot/[email protected]/
[2] https://lore.kernel.org/u-boot/20260510-b4-k1-clk-reset-upstream-dts-v1-0-db0b0503ee44@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                  |  78 +++-
 configs/spacemit_k1_defconfig            |  36 +-
 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    | 546 +++++++++++++++++++++++
 drivers/spi/fsl_qspi.c                   |   9 +
 16 files changed, 1217 insertions(+), 18 deletions(-)
 create mode 100644 arch/riscv/dts/k1-musepi-pro-u-boot.dtsi
 create mode 100644 drivers/gpio/spacemit_gpio.c
 create mode 100644 drivers/pinctrl/spacemit/Kconfig
 create mode 100644 drivers/pinctrl/spacemit/Makefile
 create mode 100644 drivers/pinctrl/spacemit/pinctrl-k1.c
Signature · 1 line
2.25.1