Skip to content

Add SpacemiT K3 FML13V05 EC keyboard support

Wang Yang chrome-platform linux-devicetree linux-riscv linux-spi lkml spacemit 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9dt-bindings: bus: Add SpacemiT K3 eSPI controllerDocumentation/devicetree/bindings/bus/spacemit,k3-espi.yaml+146 -05 replies
2/9dt-bindings: embedded-controller: Add SpacemiT K3 EC windowDocumentation/devicetree/bindings/bus/spacemit,k3-espi.yaml Documentation/devicetree/bindings/embedded-controller/spacemit,k3-cros-ec.yaml+59 -10 replies
3/9bus: Add SpacemiT K3 eSPI controller supportdrivers/bus/Kconfig drivers/bus/Makefile drivers/bus/spacemit-k3-espi.c +1 more+835 -02 replies
4/9platform/chrome: Allow ChromeOS platform support on RISC-Vdrivers/platform/chrome/Kconfig+1 -10 replies
5/9platform/chrome: Add SpacemiT K3 eSPI EC transportdrivers/platform/chrome/Kconfig drivers/platform/chrome/Makefile drivers/platform/chrome/cros_ec_spacemit_k3.c+751 -00 replies
6/9riscv: dts: spacemit: Add K3 eSPI pin grouparch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi+24 -00 replies
7/9riscv: dts: spacemit: Describe the K3 eSPI controllerarch/riscv/boot/dts/spacemit/k3.dtsi+31 -00 replies
8/9riscv: dts: spacemit: Enable the FML13V05 EC keyboardarch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts+137 -00 replies
9/9riscv: defconfig: Enable the FML13V05 EC keyboard modulesarch/riscv/configs/defconfig+5 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/9] Add SpacemiT K3 FML13V05 EC keyboard support

The DeepComputing FML13V05 uses a ChromeOS-compatible embedded controller connected through the SpacemiT K3 eSPI peripheral channel. Its internal keyboard is not available on linux-next without the controller and EC transport support described in this series.

The EC host command registers are exposed through a memory-mapped, non-linear peripheral window. This interface cannot use the ordinary cros_ec_spi message transport directly. Add a K3-specific controller and EC transport, and reuse the existing ChromeOS EC protocol, MFD and keyboard drivers. Existing EC core, LPC, SPI, protocol and keyboard C files and the google,cros-ec binding are unchanged.

The series is based on next-20261116. Patches 1-2 document the controller and EC bindings; patch 3 adds the controller; patches 4-5 enable Chrome platform support on RISC-V and add the EC transport; patches 6-8 describe the pins, controller and board keyboard; patch 9 enables the drivers in riscv defconfig, with the EC transport and keyboard built as modules.

The controller implementation is ported from the SpacemiT vendor BSP (revision 29b78afb484b, originally authored by goumin <[email protected]>). Controller programming and recovery remain separate from the EC client. The EC transport and compatible are scoped to K3 because the window layout and controller recovery API are specific to this hardware. Feedback on the transport split and recovery interface is welcome.

Validation on an FML13V05 with its internal keyboard, 2026-11-18:
- W=1 cross-build of Image, modules and the board DTB completed. No new warnings came from the added drivers.
- Both new bindings and their compiled examples passed schema validation; the new examples passed strict DT style checks. The new EC, controller and keyboard nodes in the board DTB also passed validation.
- Cold boot and module autoload passed all 20 automatic checks.
- 153 read-only EC queries and three EC module unload/reload cycles succeeded. EC firmware was FML13V05-V01.06.
- A/B/C/1/2/Enter, all four arrows and Fn+F1/F2/F7/F8 produced the expected 28 paired press/release events, with no dropped or held keys and no new EC/eSPI errors in the kernel log.

The running test kernel was 7.4.0-rc3-next-20261116-fml13v05-k3-espi+.
Booting the test system required a separate K3 PCIe test module and USB/NVMe DT additions, which are outside this EC series. Suspend/resume, EC restart fault injection, full-keymap coverage and long-duration stability were not tested. A previously observed UEFI reset_system() failure was not addressed or retested by this series.

Checkpatch reports no errors or CHECK findings. Its four new-file MAINTAINERS reminders were reviewed: the existing SpacemiT N: pattern and Chrome EC/DT entries already cover the new paths, so no MAINTAINERS change is included.

OpenAI Codex assisted the port, patch preparation, review analysis and test tooling. The work was developed through an iterative session to port the existing DC-linux/BSP support, keep the common EC implementation unchanged, use K3-specific naming and bindings, and verify the result on hardware. Human review was completed before submission; the numbered patches retain the submitter's existing DCO sign-offs.

Wang Yang (9):
dt-bindings: bus: Add SpacemiT K3 eSPI controller
dt-bindings: embedded-controller: Add SpacemiT K3 EC window
bus: Add SpacemiT K3 eSPI controller support platform/chrome: Allow ChromeOS platform support on RISC-V platform/chrome: Add SpacemiT K3 eSPI EC transport
riscv: dts: spacemit: Add K3 eSPI pin group
riscv: dts: spacemit: Describe the K3 eSPI controller
riscv: dts: spacemit: Enable the FML13V05 EC keyboard
riscv: defconfig: Enable the FML13V05 EC keyboard modules

 .../bindings/bus/spacemit,k3-espi.yaml        | 146 ++++
 .../spacemit,k3-cros-ec.yaml                  |  58 ++
 .../spacemit/k3-deepcomputing-fml13v05.dts    | 137 +++
 arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi  |  24 +
 arch/riscv/boot/dts/spacemit/k3.dtsi          |  31 +
 arch/riscv/configs/defconfig                  |   5 +
 drivers/bus/Kconfig                           |  10 +
 drivers/bus/Makefile                          |   1 +
 drivers/bus/spacemit-k3-espi.c                | 804 ++++++++++++++++++
 drivers/platform/chrome/Kconfig               |  13 +-
 drivers/platform/chrome/Makefile              |   1 +
 drivers/platform/chrome/cros_ec_spacemit_k3.c | 739 ++++++++++++++++
 include/linux/spacemit-k3-espi.h              |  20 +
 13 files changed, 1988 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/spacemit,k3-cros-ec.yaml
 create mode 100644 drivers/bus/spacemit-k3-espi.c
 create mode 100644 drivers/platform/chrome/cros_ec_spacemit_k3.c
 create mode 100644 include/linux/spacemit-k3-espi.h

base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4

Signature · 1 line
2.43.0