From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.127.231.28 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796358091; b=uaQBMFumq/tiSaL9p8NClH0WeD8soGBG9mFGc65SAb7N9Yy4OE5y99eEnkpP1fLFiNxs LkcH2VJyYjZOg6JTM1azu9qz/C49CG9dZEZf0gNkmU/JWSp1kU9A0MWzjk88+V6jx8h3O WBBo21ljCpoJYaJFEuL5LG9wyVrtNg8ISjSBks0UJNiI8RdXhTubF+CZlxqpul7pdOOrR 7rrzG1vcgXb4RBfvKk/csr7ln6+Aa3xw4iUsl/SETs/qqEE9O/h1S1+DyIoJvKT0Nhe4e svNBloDUDQEm4MT41Hw4cxOnlMcu6nwD+s1DrJRB7N6E+SAbG+5ZrVJa4wgGk3Vtj1g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796358091; h=DMARC-Filter:DKIM-Signature:X-Mailer:Message-Id:X-Original-From: X-Lms-Return-Path:Received:To:Cc:From:Mime-Version:Subject:Date: Content-Transfer-Encoding:Content-Type; bh=QO8jrBMumX6pMCJzXkzva/9OO/fbPwoiRK/fHSrMccA=; b=vNimoiqV1/c+h4TNuiPa1nv/gSsn/xVQbinEqoD+p5chTAAzARqTY3M4WQ0X44xk9o0l crPQGMDikSQF8hqsYhX/EbsJl/CIsylnjZJEwKzkxZrH/PaOBZFuWpzXv0TljX/acMeuV SovrYgqsWAzX4uOQmzzjR3Q/ugFJl6osh+GO6ia8Px/vlnRcj/RjTcU9zGbgpybDJqB/z 8PCjyuSQ+bXWxKj6qGXN+f4NBa3ouUrFSypRbuL5DIbOxB+tfbBqcm/6Go/+PiRQAj2A7 2klCgXDNJpubT/jGuiFTbg1xiJqVyoSAgdnan+gNdZ9MMflL9bMw18dwrGYdR++APhA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=deepcomputing.io; spf=pass smtp.mailfrom=deepcomputing.io; dkim=pass header.d=deepcomputing-io.20200927.dkim.feishu.cn header.i=@deepcomputing-io.20200927.dkim.feishu.cn header.a=rsa-sha256 header.s=s1 header.b=JiE8YNBH; arc=none smtp.remote-ip=209.127.231.28 Received: from va-2-28.ptr.blmpb.com (va-2-28.ptr.blmpb.com [209.127.231.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A815E606A696 for ; Fri, 4 Dec 2026 04:21:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A815E606A696 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=deepcomputing.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=deepcomputing.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=deepcomputing-io.20200927.dkim.feishu.cn header.i=@deepcomputing-io.20200927.dkim.feishu.cn header.a=rsa-sha256 header.s=s1 header.b=JiE8YNBH DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=deepcomputing-io.20200927.dkim.feishu.cn; t=1796358082; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=QO8jrBMumX6pMCJzXkzva/9OO/fbPwoiRK/fHSrMccA=; b=JiE8YNBHA1F1TSTJNJH7ex40vyZfgqYHlRygM6Xw6rZJwJUQM8nI/bNFvF9XJnM1Qv8TcV Vzr6/20HkN8TfSkfwUYpu4Q9okBP2ewxBM0MSDDiP7LMvf+dipKcr4vC1heHrgaJKMUmRU FxFx8QTaNFmvOybvzD0/QGSdS64ARQmhC0+58OcFPXeEviv2LLigBv678q8Y0r7SC4OGzU hJKg9bWhSGIAQtSpGV5qOC7ZyUHcMXd/S/o6PfRinimO28UxRs3rO9RPqSXkOSN8ZkMjoY vwtsPhtUVjdzS17TxpGPc5Y5eYtrBZ/vufRXfRsmIsXdhbIvOKfsBazNAPksuw== X-Mailer: git-send-email 2.43.0 Message-Id: <20261204042112.2985112-1-yang.wang@deepcomputing.io> X-Original-From: Wang Yang X-Lms-Return-Path: Received: from ubuntu.. ([183.23.101.24]) by smtp.feishu.cn with ESMTPS; Fri, 04 Dec 2026 12:21:20 +0800 To: Cc: "Benson Leung" , "Tzung-Bi Shih" , "Guenter Roeck" , , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Yixun Lan" , "Troy Mitchell" , , , , "Philipp Zabel" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , "Aurelien Jarno" , "Conor Dooley" , "Krishnamoorthi M" , From: "Wang Yang" X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Subject: [PATCH v2 00/13] Add SpacemiT K3 FML13V05 EC keyboard support Date: Fri, 4 Dec 2026 12:20:58 +0800 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 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