All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang Yang" <yang.wang@deepcomputing.io>
To: <linux-kernel@vger.kernel.org>
Cc: "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>
Subject: [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller
Date: Fri,  4 Dec 2026 12:21:04 +0800	[thread overview]
Message-ID: <20261204042112.2985112-7-yang.wang@deepcomputing.io> (raw)
In-Reply-To: <20261204042112.2985112-1-yang.wang@deepcomputing.io>

Describe the Intel eSPI protocol replacing LPC and its CPU-accessible
peripheral window. Reference the already-added K3 EC schema from
the first commit. Use vendor properties and frequency units in Hz.

Prepared with OpenAI Codex assistance.

Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>
---
 .../bindings/bus/spacemit,k3-espi.yaml        | 149 ++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml

diff --git a/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
new file mode 100644
index 000000000000..4bd13cc33c90
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
@@ -0,0 +1,149 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/spacemit,k3-espi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT K3 eSPI controller
+
+maintainers:
+  - Yixun Lan <dlan@kernel.org>
+
+description: |
+  The K3 controller implements the Intel Enhanced Serial Peripheral Interface
+  (eSPI), which replaces LPC. This is a different protocol from the ordinary
+  SPI bus implemented by the Freescale/NXP controller called eSPI.
+
+  The controller connects the application processor to an embedded controller.
+  It exposes a CPU-accessible peripheral-channel window, translated by ranges.
+  EC clients access command, response and memory-map registers through this
+  window. The controller manages clocks, resets, channel negotiation and link
+  recovery after an EC reboot.
+
+properties:
+  compatible:
+    const: spacemit,k3-espi
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Serial clock source
+      - description: Serial clock
+      - description: Bus clock
+
+  clock-names:
+    items:
+      - const: sclk_src
+      - const: sclk
+      - const: mclk
+
+  resets:
+    items:
+      - description: Bus reset
+      - description: Serial clock reset
+
+  spacemit,pr-mem-base1:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Base address programmed into the controller's second peripheral-channel memory base register.
+
+  max-frequency:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Maximum eSPI serial clock frequency in Hz.
+    enum: [20000000, 25000000, 33333333, 50000000, 66666666]
+    default: 20000000
+
+  spacemit,io-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Requested number of eSPI data lines.
+    enum: [single, dual, quad]
+    default: single
+
+  spacemit,alert-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Use the shared IO1 line or the dedicated alert pin.
+    enum: [io1, pin]
+    default: io1
+
+  spacemit,alert-type:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Electrical mode of the dedicated alert pin.
+    enum: [open-drain, push-pull]
+    default: open-drain
+
+  spacemit,watchdog-timeout:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Controller watchdog counter value.
+    maximum: 65535
+    default: 65535
+
+  spacemit,crc-enable:
+    type: boolean
+    description: Enable link CRC checking.
+
+  spacemit,auto-gating-enable:
+    type: boolean
+    description: Enable automatic controller clock gating.
+
+  spacemit,peripheral-channel-enable:
+    type: boolean
+    description: Enable the peripheral channel. Required for an enabled EC child.
+
+  spacemit,vwire-channel-enable:
+    type: boolean
+    description: Enable the virtual-wire channel.
+
+  spacemit,oob-channel-enable:
+    type: boolean
+    description: Enable the out-of-band channel.
+
+  spacemit,flash-channel-enable:
+    type: boolean
+    description: Enable the flash access channel.
+
+patternProperties:
+  '^ec@[0-9a-f]+$':
+    $ref: /schemas/embedded-controller/spacemit,k3-cros-ec.yaml#
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - spacemit,pr-mem-base1
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/spacemit,k3-clocks.h>
+    #include <dt-bindings/reset/spacemit,k3-resets.h>
+
+    espi@cac8c000 {
+        compatible = "spacemit,k3-espi";
+        reg = <0xcac8c000 0x1000>;
+        ranges = <0 0x84000000 0x1000>;
+        clocks = <&syscon_apmu CLK_APMU_ESPI_SCLK_SRC>,
+                 <&syscon_apmu CLK_APMU_ESPI_SCLK>,
+                 <&syscon_apmu CLK_APMU_ESPI_MCLK>;
+        clock-names = "sclk_src", "sclk", "mclk";
+        resets = <&syscon_apmu RESET_APMU_ESPI_MCLK>,
+                 <&syscon_apmu RESET_APMU_ESPI_SCLK>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        spacemit,pr-mem-base1 = <0xcac8c000>;
+    };
-- 
2.43.0

WARNING: multiple messages have this Message-ID (diff)
From: "Wang Yang" <yang.wang@deepcomputing.io>
To: <linux-kernel@vger.kernel.org>
Cc: "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>
Subject: [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller
Date: Fri,  4 Dec 2026 12:21:04 +0800	[thread overview]
Message-ID: <20261204042112.2985112-7-yang.wang@deepcomputing.io> (raw)
In-Reply-To: <20261204042112.2985112-1-yang.wang@deepcomputing.io>

Describe the Intel eSPI protocol replacing LPC and its CPU-accessible
peripheral window. Reference the already-added K3 EC schema from
the first commit. Use vendor properties and frequency units in Hz.

Prepared with OpenAI Codex assistance.

Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>
---
 .../bindings/bus/spacemit,k3-espi.yaml        | 149 ++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml

diff --git a/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
new file mode 100644
index 000000000000..4bd13cc33c90
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
@@ -0,0 +1,149 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/spacemit,k3-espi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT K3 eSPI controller
+
+maintainers:
+  - Yixun Lan <dlan@kernel.org>
+
+description: |
+  The K3 controller implements the Intel Enhanced Serial Peripheral Interface
+  (eSPI), which replaces LPC. This is a different protocol from the ordinary
+  SPI bus implemented by the Freescale/NXP controller called eSPI.
+
+  The controller connects the application processor to an embedded controller.
+  It exposes a CPU-accessible peripheral-channel window, translated by ranges.
+  EC clients access command, response and memory-map registers through this
+  window. The controller manages clocks, resets, channel negotiation and link
+  recovery after an EC reboot.
+
+properties:
+  compatible:
+    const: spacemit,k3-espi
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Serial clock source
+      - description: Serial clock
+      - description: Bus clock
+
+  clock-names:
+    items:
+      - const: sclk_src
+      - const: sclk
+      - const: mclk
+
+  resets:
+    items:
+      - description: Bus reset
+      - description: Serial clock reset
+
+  spacemit,pr-mem-base1:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Base address programmed into the controller's second peripheral-channel memory base register.
+
+  max-frequency:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Maximum eSPI serial clock frequency in Hz.
+    enum: [20000000, 25000000, 33333333, 50000000, 66666666]
+    default: 20000000
+
+  spacemit,io-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Requested number of eSPI data lines.
+    enum: [single, dual, quad]
+    default: single
+
+  spacemit,alert-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Use the shared IO1 line or the dedicated alert pin.
+    enum: [io1, pin]
+    default: io1
+
+  spacemit,alert-type:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Electrical mode of the dedicated alert pin.
+    enum: [open-drain, push-pull]
+    default: open-drain
+
+  spacemit,watchdog-timeout:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Controller watchdog counter value.
+    maximum: 65535
+    default: 65535
+
+  spacemit,crc-enable:
+    type: boolean
+    description: Enable link CRC checking.
+
+  spacemit,auto-gating-enable:
+    type: boolean
+    description: Enable automatic controller clock gating.
+
+  spacemit,peripheral-channel-enable:
+    type: boolean
+    description: Enable the peripheral channel. Required for an enabled EC child.
+
+  spacemit,vwire-channel-enable:
+    type: boolean
+    description: Enable the virtual-wire channel.
+
+  spacemit,oob-channel-enable:
+    type: boolean
+    description: Enable the out-of-band channel.
+
+  spacemit,flash-channel-enable:
+    type: boolean
+    description: Enable the flash access channel.
+
+patternProperties:
+  '^ec@[0-9a-f]+$':
+    $ref: /schemas/embedded-controller/spacemit,k3-cros-ec.yaml#
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - spacemit,pr-mem-base1
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/spacemit,k3-clocks.h>
+    #include <dt-bindings/reset/spacemit,k3-resets.h>
+
+    espi@cac8c000 {
+        compatible = "spacemit,k3-espi";
+        reg = <0xcac8c000 0x1000>;
+        ranges = <0 0x84000000 0x1000>;
+        clocks = <&syscon_apmu CLK_APMU_ESPI_SCLK_SRC>,
+                 <&syscon_apmu CLK_APMU_ESPI_SCLK>,
+                 <&syscon_apmu CLK_APMU_ESPI_MCLK>;
+        clock-names = "sclk_src", "sclk", "mclk";
+        resets = <&syscon_apmu RESET_APMU_ESPI_MCLK>,
+                 <&syscon_apmu RESET_APMU_ESPI_SCLK>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        spacemit,pr-mem-base1 = <0xcac8c000>;
+    };
-- 
2.43.0

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  4:20 [PATCH v2 00/13] Add SpacemiT K3 FML13V05 EC keyboard support Wang Yang
2026-12-04  4:20 ` Wang Yang
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   ` Wang Yang
2026-12-04  4:32   ` sashiko-bot
2026-12-04  4:21 ` Wang Yang [this message]
2026-12-04  4:21   ` [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller Wang Yang
2026-12-04  4:44   ` sashiko-bot
2026-12-04  4:21 ` [PATCH v2 07/13] bus: Add SpacemiT K3 eSPI controller support Wang Yang
2026-12-04  4:21   ` 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   ` 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   ` Wang Yang
2026-12-04  4:41   ` sashiko-bot
2026-12-04  4:21 ` [PATCH v2 11/13] riscv: dts: spacemit: Describe the K3 eSPI controller Wang Yang
2026-12-04  4:21   ` Wang Yang
2026-12-04  4:48   ` sashiko-bot
2026-12-04  4:21 ` [PATCH v2 12/13] riscv: dts: spacemit: Enable the FML13V05 EC keyboard Wang Yang
2026-12-04  4:21   ` Wang Yang
2026-12-04  4:21 ` [PATCH v2 13/13] riscv: defconfig: Enable the FML13V05 EC keyboard modules Wang Yang
2026-12-04  4:21   ` 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-7-yang.wang@deepcomputing.io \
    --to=yang.wang@deepcomputing.io \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=troy.mitchell@linux.spacemit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.