From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.127.231.38 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796358092; b=C4XZxn/161OaTDijxCy3AsbLwrkrUpSurSijXOSwhpAUplLSncPgLbz2zF+rJUS6G8Jc Ktl3rBQUGkYcvorO2ptXkiopI1AQRRdyfPmPxpYKuPv+EM0JkeDHVtMwQk8a5X5ch+tLK UAHaMXCwLG+6NAL4i/VopncdNDxNRfKhXsupA0UwRPaLUGNvPSVsO2iuHBdtUc9SET7Kc y2TPfTWJf8fLl01Aoi6bdITipjY85pVSYqqDZjEifslyiZRMAHJIHxNDlMbEidLMA3OiT GnAi6fiy6q0ByVqfmuw2dcIXV0Td+1D4+17xqkkeD7lCsLMf2G2mlAKIqW1HcjulOFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796358092; 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=tN4FsxtRYf7Ww1lHstlIo+E36OSFv7TF8RMFImfKI3s9V8yD0PMG8lcFGtqJmFWCIMZx 5JSKB/eaUS2zEMoW1L2UnrJ5ivK4wro9/gUOt76tSN9K0GoBc6Mu+a1cuEkpLZpFcAXSD XBxWVRHQVL6daF+oy17tWuFJvn5jJen4BrVplr89JYaXx4M6Edn9oArGILE+ZTteXC1j8 awfqledkekuSgq+KItFZCH6ueRDypYQ3R9GQ4VOWuN6Xd0OQdhwPcDdBeNAgmHgqa5XxT TrbHT9rrEX/qMc0/kUYwjXBMWQpwVlB03OtGTlrhKgW100toiImy2+VOQHwept1V48g== 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.38 Received: from va-2-38.ptr.blmpb.com (va-2-38.ptr.blmpb.com [209.127.231.38]) (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 E43DB606A33F for ; Fri, 4 Dec 2026 04:21:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E43DB606A33F 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== 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: devicetree@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