The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Wang Yang" <yang.wang@deepcomputing.io>
To: <linux-kernel@vger.kernel.org>
Cc: "Benson Leung" <bleung@chromium.org>,
	 "Tzung-Bi Shih" <tzungbi@kernel.org>,
	 "Guenter Roeck" <groeck@chromium.org>,
	<chrome-platform@lists.linux.dev>,
	 "Rob Herring" <robh@kernel.org>,
	 "Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	 "Conor Dooley" <conor+dt@kernel.org>,
	"Yixun Lan" <dlan@kernel.org>,
	 "Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
	 <devicetree@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
	 <spacemit@lists.linux.dev>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	 "Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	 "Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	 "Aurelien Jarno" <aurelien@aurel32.net>,
	 "Conor Dooley" <conor@kernel.org>,
	 "Krishnamoorthi M" <krishnamoorthi.m@amd.com>,
	<yh_chung@aspeedtech.com>
Subject: [PATCH v2 00/13] Add SpacemiT K3 FML13V05 EC keyboard support
Date: Fri,  4 Dec 2026 12:20:58 +0800	[thread overview]
Message-ID: <20261204042112.2985112-1-yang.wang@deepcomputing.io> (raw)

This series enables the built-in keyboard on the DeepComputing FML13V05.
The SpacemiT K3 host exposes the EC command window through the eSPI
Peripheral Channel. The EC implements the Chrome EC host protocol, and
the existing Chrome EC keyboard driver reports input events.

Changes since v1:
- Share LPC-style polling, protocol v2/v3 transfers and readmem between
  the LPC and K3 transports. Keep the K3 window mapping and recovery in
  the K3 transport. A command that times out is not replayed.
- Let the EC core request the IRQ. Existing transports keep their
  low-level default and K3 uses the rising edge specified by the board.
- Add the EC binding before the controller binding that references it.
  Derive the CPU window from ranges and specify the link frequency in Hz.
  The second peripheral base retains the vendor board value, 0xcac8c000.
- Correct the pin pull settings, command status clearing and negotiated
  clock selection. Check packet bounds and EC readiness. On resume,
  check a pending recovery before enabling the EC event IRQ.
- Order the five RISC-V configuration entries using savedefconfig.

The AMD host RFC models chip-select targets and controller operations.
K3 needs a CPU-mapped Peripheral Channel window and a way to recover the
host link following a timeout. The Aspeed series covers the BMC side.

On next-20261202, an earlier revision booted on FML13V05 from NVMe with
test-only PCIe and DT additions. After a mainboard reset with the EC
still powered, the EC reported FML13V05-V01.06. The built-in keyboard
reported a left Shift press and release, and the EC IRQ count rose from
zero to two. The change since that test is confined to the K3 EC
transport's link check at probe and resume.

OpenAI Codex assisted with refactoring, review of v1 feedback, commit
messages and test preparation.

v1: https://lore.kernel.org/all/20261118085742.1817536-1-yang.wang@deepcomputing.io/
AMD RFC: https://lore.kernel.org/all/20260804115259.4065638-1-krishnamoorthi.m@amd.com/
Aspeed: https://lore.kernel.org/all/20260313-upstream_espi-v1-0-9504428e1f43@aspeedtech.com/

Wang Yang (13):
  platform/chrome: Correct LPC EC readmem bounds
  platform/chrome: Extract LPC-style EC protocol helpers
  platform/chrome: Allow transport-specific LPC response timeouts
  platform/chrome: Allow transports to select EC IRQ flags
  dt-bindings: embedded-controller: Add SpacemiT K3 EC window
  dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller
  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        | 149 ++++
 .../spacemit,k3-cros-ec.yaml                  |  77 ++
 .../spacemit/k3-deepcomputing-fml13v05.dts    | 137 +++
 arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi  |  24 +
 arch/riscv/boot/dts/spacemit/k3.dtsi          |  30 +
 arch/riscv/configs/defconfig                  |   5 +
 drivers/bus/Kconfig                           |  10 +
 drivers/bus/Makefile                          |   1 +
 drivers/bus/spacemit-k3-espi.c                | 799 ++++++++++++++++++
 drivers/platform/chrome/Kconfig               |  20 +-
 drivers/platform/chrome/Makefile              |   4 +-
 drivers/platform/chrome/cros_ec.c             |   3 +-
 .../platform/chrome/cros_ec_espi_spacemit.c   | 568 +++++++++++++
 drivers/platform/chrome/cros_ec_lpc.c         | 239 +-----
 drivers/platform/chrome/cros_ec_lpc_proto.c   | 246 ++++++
 drivers/platform/chrome/cros_ec_lpc_proto.h   |  36 +
 include/linux/platform_data/cros_ec_proto.h   |   2 +
 include/linux/spacemit-k3-espi.h              |  20 +
 18 files changed, 2152 insertions(+), 218 deletions(-)
 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_espi_spacemit.c
 create mode 100644 drivers/platform/chrome/cros_ec_lpc_proto.c
 create mode 100644 drivers/platform/chrome/cros_ec_lpc_proto.h
 create mode 100644 include/linux/spacemit-k3-espi.h


base-commit: 799dd936553182df5770dde7f38d94c8337df75a
-- 
2.43.0

             reply	other threads:[~2026-12-04  4:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  4:20 Wang Yang [this message]
2026-12-04  4:20 ` [PATCH v2 01/13] platform/chrome: Correct LPC EC readmem bounds Wang Yang
2026-12-04  4:21 ` [PATCH v2 02/13] platform/chrome: Extract LPC-style EC protocol helpers Wang Yang
2026-12-04  4:21 ` [PATCH v2 03/13] platform/chrome: Allow transport-specific LPC response timeouts Wang Yang
2026-12-04  4:21 ` [PATCH v2 04/13] platform/chrome: Allow transports to select EC IRQ flags Wang Yang
2026-12-04  4:21 ` [PATCH v2 05/13] dt-bindings: embedded-controller: Add SpacemiT K3 EC window Wang Yang
2026-12-04  4:21 ` [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller Wang Yang
2026-12-04  4:21 ` [PATCH v2 07/13] bus: Add SpacemiT K3 eSPI controller support Wang Yang
2026-12-04  4:21 ` [PATCH v2 08/13] platform/chrome: Allow ChromeOS platform support on RISC-V Wang Yang
2026-12-04  4:21 ` [PATCH v2 09/13] platform/chrome: Add SpacemiT K3 eSPI EC transport Wang Yang
2026-12-04  4:21 ` [PATCH v2 10/13] riscv: dts: spacemit: Add K3 eSPI pin group Wang Yang
2026-12-04  4:21 ` [PATCH v2 11/13] riscv: dts: spacemit: Describe the K3 eSPI controller Wang Yang
2026-12-04  4:21 ` [PATCH v2 12/13] riscv: dts: spacemit: Enable the FML13V05 EC keyboard Wang Yang
2026-12-04  4:21 ` [PATCH v2 13/13] riscv: defconfig: Enable the FML13V05 EC keyboard modules Wang Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204042112.2985112-1-yang.wang@deepcomputing.io \
    --to=yang.wang@deepcomputing.io \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=aurelien@aurel32.net \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=groeck@chromium.org \
    --cc=krishnamoorthi.m@amd.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=troy.mitchell@linux.spacemit.com \
    --cc=tzungbi@kernel.org \
    --cc=yh_chung@aspeedtech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox