Skip to content

Commit f013fd1

Browse files
wypccDC-DeepComputing
authored andcommitted
platform: spacemit: add K3 eSPI bus and EC transport
The FML13V05 internal keyboard is scanned by a ChromeOS EC connected over eSPI. DC Linux lacks both the K3 controller and its EC transport, and the Chrome platform menu currently excludes RISC-V. Port the controller and protocol v2/v3 transport from the vendor 6.18.3 kernel. Expose shared-memory access and link recovery, serialize host commands, and enable the EC menu on RISC-V. Keep interrupt ownership in the new transport: register the EC without a core IRQ, then request the DT-configured interrupt and reuse the exported EC event thread. Release it before unregistering the EC and unwind EC registration if the IRQ request fails. This preserves the board's rising edge without changing the shared EC core's fixed low-level IRQ handling. Validate full Image/modules builds, EC communication, lifecycle recovery and cold-boot module autoload on FML13V05. The port, IRQ adaptation and validation were developed with Codex assistance using the vendor source. Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>
1 parent 53a012e commit f013fd1

7 files changed

Lines changed: 1740 additions & 1 deletion

File tree

‎drivers/bus/Kconfig‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ config STM32_DBG_BUS
149149
platforms when the debug configuration is not accessible by the
150150
normal world.
151151

152+
config SPACEMIT_ESPI_BUS
153+
bool "SpacemiT K3 eSPI controller"
154+
depends on OF && HAS_IOMEM
155+
depends on ARCH_SPACEMIT || COMPILE_TEST
156+
help
157+
Enable the SpacemiT K3 eSPI controller, including clock and reset
158+
management, link initialization and recovery after an EC reboot.
159+
Child devices can use its peripheral shared-memory window.
160+
Say Y here to use the EC keyboard on DeepComputing FML13V05.
161+
152162
config STM32_FIREWALL
153163
bool "STM32 Firewall framework"
154164
depends on (ARCH_STM32 || COMPILE_TEST) && OF

‎drivers/bus/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o
2525
obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o
2626
obj-$(CONFIG_QCOM_EBI2) += qcom-ebi2.o
2727
obj-$(CONFIG_QCOM_SSC_BLOCK_BUS) += qcom-ssc-block-bus.o
28+
obj-$(CONFIG_SPACEMIT_ESPI_BUS) += spacemit-k3-espi.o
2829
obj-$(CONFIG_STM32_DBG_BUS) += stm32_dbg_bus.o
2930
obj-$(CONFIG_STM32_FIREWALL) += stm32_firewall.o stm32_rifsc.o stm32_etzpc.o
3031
obj-$(CONFIG_SUN50I_DE2_BUS) += sun50i-de2.o

0 commit comments

Comments
 (0)