From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.127.231.37 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796358089; b=nIoKfGO0ONLzBM13rm119T00rS9L5st4OnYBkZ4+ily61MWC+Njo+sZu2pFk8EUhd41/ M1+8lpm1rRQfbyEs8sNmkBWH4OM1sR2NfywnrV5dsgRo1mCiFxh3wA3whS/mP/2zZ3XRA qreSWBUR/UUdK67xfEjOzzwOYt0d0JJ2TuMqLLWlg3Su3dm5KTBUbk5oQtkZuVVZVnTgP TMKrsat9VJipmrnYwBaOMlSwb5xkPB5hhqp7HHlS2O8J7sWhC/xzIECQ5BLWoO18zZ8Lh Vd00K3HQbhJXXl4tNNteJiX3aJ/O5Na1l6QEPQyqXrtO3jjbpSpvc7u4JdLXrhXbdyw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796358089; h=DMARC-Filter:DKIM-Signature:Subject:Date:Received:X-Lms-Return-Path: Content-Type:To:From:Mime-Version:Cc:Message-Id:X-Original-From: X-Mailer:Content-Transfer-Encoding; bh=QO8jrBMumX6pMCJzXkzva/9OO/fbPwoiRK/fHSrMccA=; b=FXiLg5cylXPWMU4CarexyGlBfWNQgSwUZyOcWqX3aii5cYXD2NLBdQnbaZZTENfingbo 3by0qUHSskwtGMVOYEWIABXk8olcBlTcExqN1N7LqfTWC1S0qhpuzihAKBDwXTG/4c8iU P4V9RBc25PzYs+ZNjNv1SxheQWKnSF7yWv1MkzzNeiHzohU9+07G536dUAHoDb3aCqkCc jcZV62q84VyYbeJlyGLOGMIxdwdPYSa3bKN1bSieNdjqNspG1zvY5e6yIiyyW4/o9zPGu TWl1f9J9Vs0G26cDyXs2CpvCmNiyictbMy4XaMhdZ9eOfS2DT7mZdvfu0xOdVlkCFPA== 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.37 Received: from va-2-37.ptr.blmpb.com (va-2-37.ptr.blmpb.com [209.127.231.37]) (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 EEA2B606A337 for ; Fri, 4 Dec 2026 04:21:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EEA2B606A337 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, unprotected) 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== Subject: [PATCH v2 00/13] Add SpacemiT K3 FML13V05 EC keyboard support Date: Fri, 4 Dec 2026 12:20:58 +0800 Received: from ubuntu.. ([183.23.101.24]) by smtp.feishu.cn with ESMTPS; Fri, 04 Dec 2026 12:21:20 +0800 X-Lms-Return-Path: Content-Type: text/plain; charset=UTF-8 To: From: "Wang Yang" X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 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" , Message-Id: <20261204042112.2985112-1-yang.wang@deepcomputing.io> X-Original-From: Wang Yang X-Mailer: git-send-email 2.43.0 Content-Transfer-Encoding: 7bit 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