Linux SPI subsystem development
 help / color / mirror / Atom feed
* Re: [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller
       [not found] ` <20261118085742.1817536-2-yang.wang@deepcomputing.io>
@ 2026-11-18 17:51   ` Conor Dooley
  2026-11-18 22:10     ` Aurelien Jarno
  0 siblings, 1 reply; 5+ messages in thread
From: Conor Dooley @ 2026-11-18 17:51 UTC (permalink / raw)
  To: Wang Yang
  Cc: Yixun Lan, Benson Leung, Troy Mitchell, Tzung-Bi Shih,
	Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Sandie Cao, devicetree, chrome-platform, linux-riscv, spacemit,
	linux-kernel, linux-spi, broonie

[-- Attachment #1: Type: text/plain, Size: 5410 bytes --]

+CC Mark, spi,

On Wed, Nov 18, 2026 at 04:57:34PM +0800, Wang Yang wrote:
> window, clocks, resets and link configuration. The EC uses this memory
> window rather than the ordinary SPI transfer interface.
> 
> The controller implementation is carried as a separate prerequisite so
> that the hardware vendor can review it independently.
> 
> Prepared with Codex assistance from the existing DC-linux EC support.
> 
> Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>
> ---
>  .../bindings/bus/spacemit,k3-espi.yaml        | 146 ++++++++++++++++++
>  1 file changed, 146 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 000000000..30985ee0a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
> @@ -0,0 +1,146 @@
> +# 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

How is this "eSPI" different to the eSPI described in fsl,espi.yaml and
implemented by a driver in drivers/spi?

Cheers,
Conor.

> +
> +maintainers:
> +  - Yixun Lan <dlan@kernel.org>
> +
> +description: |
> +  The K3 eSPI controller connects the application processor to an embedded
> +  controller. Child registers are accessed through a peripheral shared-memory
> +  window, translated by ranges. The controller manages clocks, resets and
> +  channel negotiation, including 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
> +
> +  pr-mem-base0:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: First peripheral memory translation base.
> +
> +  pr-mem-base1:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Second peripheral memory translation base.
> +
> +  operating-frequency:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Requested link clock frequency in MHz.
> +    enum: [20, 25, 33, 50, 66]
> +    default: 20
> +
> +  io-mode:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Requested number of eSPI data lines.
> +    enum: [single, dual, quad]
> +    default: single
> +
> +  alert-mode:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Use the shared IO1 line or the dedicated alert pin.
> +    enum: [io1, pin]
> +    default: io1
> +
> +  alert-type:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Electrical mode of the dedicated alert pin.
> +    enum: [open-drain, push-pull]
> +    default: open-drain
> +
> +  watchdog-timeout:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Controller watchdog counter value.
> +    maximum: 65535
> +    default: 65535
> +
> +  crc-enable:
> +    type: boolean
> +    description: Enable link CRC checking.
> +
> +  auto-gating-enable:
> +    type: boolean
> +    description: Enable automatic controller clock gating.
> +
> +  peripheral-channel-enable:
> +    type: boolean
> +    description: Enable the peripheral channel.
> +
> +  vwire-channel-enable:
> +    type: boolean
> +    description: Enable the virtual-wire channel.
> +
> +  oob-channel-enable:
> +    type: boolean
> +    description: Enable the out-of-band channel.
> +
> +  flash-channel-enable:
> +    type: boolean
> +    description: Enable the flash access channel.
> +
> +patternProperties:
> +  '^ec@[0-9a-f]+$':
> +    $ref: /schemas/embedded-controller/google,cros-ec.yaml#
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#address-cells'
> +  - '#size-cells'
> +  - ranges
> +  - clocks
> +  - clock-names
> +  - resets
> +
> +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>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        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>;
> +    };
> 
> base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4
> -- 
> 2.43.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller
  2026-11-18 17:51   ` [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller Conor Dooley
@ 2026-11-18 22:10     ` Aurelien Jarno
  2026-11-19  9:05       ` Wang Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2026-11-18 22:10 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Wang Yang, Yixun Lan, Benson Leung, Troy Mitchell, Tzung-Bi Shih,
	Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Sandie Cao, devicetree, chrome-platform, linux-riscv, spacemit,
	linux-kernel, linux-spi, broonie

[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]

Hi Conor,

On 2026-11-18 17:51, Conor Dooley wrote:
> +CC Mark, spi,
> 
> On Wed, Nov 18, 2026 at 04:57:34PM +0800, Wang Yang wrote:
> > window, clocks, resets and link configuration. The EC uses this memory
> > window rather than the ordinary SPI transfer interface.
> > 
> > The controller implementation is carried as a separate prerequisite so
> > that the hardware vendor can review it independently.
> > 
> > Prepared with Codex assistance from the existing DC-linux EC support.
> > 
> > Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>
> > ---
> >  .../bindings/bus/spacemit,k3-espi.yaml        | 146 ++++++++++++++++++
> >  1 file changed, 146 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 000000000..30985ee0a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml
> > @@ -0,0 +1,146 @@
> > +# 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
> 
> How is this "eSPI" different to the eSPI described in fsl,espi.yaml and
> implemented by a driver in drivers/spi?

eSPI in fsl,espi.yaml is a Freescale (now NXP) SPI controller, it 
implements a SPI bus.

Here eSPI is a bus, replacing the LPC bus, as defined by Intel:
https://www.intel.com/content/www/us/en/content-details/841685/enhanced-serial-peripheral-interface-espi-interface-base-specification-for-client-and-server-platforms.html

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller
  2026-11-18 22:10     ` Aurelien Jarno
@ 2026-11-19  9:05       ` Wang Yang
  2026-11-19 11:02         ` Conor Dooley
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Yang @ 2026-11-19  9:05 UTC (permalink / raw)
  To: Conor Dooley, Aurelien Jarno
  Cc: Yixun Lan, Benson Leung, Troy Mitchell, Tzung-Bi Shih,
	Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Sandie Cao, devicetree, chrome-platform, linux-riscv, spacemit,
	linux-kernel, linux-spi, broonie

Hi Conor, Aurelien,

> How is this "eSPI" different to the eSPI described in fsl,espi.yaml and
> implemented by a driver in drivers/spi?

Thank you, Aurelien, for clarifying this. K3 uses the Intel-defined
eSPI interface intended to replace LPC. It is a different protocol from the
Freescale/NXP SPI controller described by fsl,espi.yaml.

On K3, the controller exposes a CPU-accessible window for the eSPI
Peripheral Channel. The EC client accesses its command, response
and memory-map regions through this window, rather than exchanging
ordinary SPI messages.

The proposed controller driver handles clocks, resets, link
configuration and window setup. The EC transport handles the EC
register mapping and host commands. The distinction is therefore
the protocol and access model, rather than the use of MMIO itself.

I will make the Intel eSPI terminology and this access model
explicit in the binding description.

Regards,
Wang Yang

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller
  2026-11-19  9:05       ` Wang Yang
@ 2026-11-19 11:02         ` Conor Dooley
  2026-11-19 11:10           ` Conor Dooley
  0 siblings, 1 reply; 5+ messages in thread
From: Conor Dooley @ 2026-11-19 11:02 UTC (permalink / raw)
  To: Wang Yang
  Cc: Aurelien Jarno, Yixun Lan, Benson Leung, Troy Mitchell,
	Tzung-Bi Shih, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Sandie Cao, devicetree, chrome-platform,
	linux-riscv, spacemit, linux-kernel, linux-spi, broonie, yh_chung

[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]

On Thu, Nov 19, 2026 at 05:05:53PM +0800, Wang Yang wrote:
> Hi Conor, Aurelien,
> 
> > How is this "eSPI" different to the eSPI described in fsl,espi.yaml and
> > implemented by a driver in drivers/spi?
> 
> Thank you, Aurelien, for clarifying this. K3 uses the Intel-defined
> eSPI interface intended to replace LPC. It is a different protocol from the
> Freescale/NXP SPI controller described by fsl,espi.yaml.

Ah I think this might be confusing af, because that device also
supports what it calls "eLBC"...

> On K3, the controller exposes a CPU-accessible window for the eSPI
> Peripheral Channel. The EC client accesses its command, response
> and memory-map regions through this window, rather than exchanging
> ordinary SPI messages.
> 
> The proposed controller driver handles clocks, resets, link
> configuration and window setup. The EC transport handles the EC
> register mapping and host commands. The distinction is therefore
> the protocol and access model, rather than the use of MMIO itself.
> 
> I will make the Intel eSPI terminology and this access model
> explicit in the binding description.

Please take a look at a similar series from Aspeed and see if you can
cooperate on creating something common between you:
https://lore.kernel.org/all/20260313-upstream_espi-v1-0-9504428e1f43@aspeedtech.com/

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller
  2026-11-19 11:02         ` Conor Dooley
@ 2026-11-19 11:10           ` Conor Dooley
  0 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2026-11-19 11:10 UTC (permalink / raw)
  To: Wang Yang
  Cc: Aurelien Jarno, Yixun Lan, Benson Leung, Troy Mitchell,
	Tzung-Bi Shih, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Sandie Cao, devicetree, chrome-platform,
	linux-riscv, spacemit, linux-kernel, linux-spi, broonie, yh_chung

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

On Thu, Nov 19, 2026 at 11:02:03AM +0000, Conor Dooley wrote:
> On Thu, Nov 19, 2026 at 05:05:53PM +0800, Wang Yang wrote:
> > Hi Conor, Aurelien,
> > 
> > > How is this "eSPI" different to the eSPI described in fsl,espi.yaml and
> > > implemented by a driver in drivers/spi?
> > 
> > Thank you, Aurelien, for clarifying this. K3 uses the Intel-defined
> > eSPI interface intended to replace LPC. It is a different protocol from the
> > Freescale/NXP SPI controller described by fsl,espi.yaml.
> 
> Ah I think this might be confusing af, because that device also
> supports what it calls "eLBC"...

As in, I got confused while looking at the documentation for the fsl
device between what they were calling eSPI and eLBC, and also didn't
realised that it was lBc not lPc.. Too many similar-ish terms...

> 
> > On K3, the controller exposes a CPU-accessible window for the eSPI
> > Peripheral Channel. The EC client accesses its command, response
> > and memory-map regions through this window, rather than exchanging
> > ordinary SPI messages.
> > 
> > The proposed controller driver handles clocks, resets, link
> > configuration and window setup. The EC transport handles the EC
> > register mapping and host commands. The distinction is therefore
> > the protocol and access model, rather than the use of MMIO itself.
> > 
> > I will make the Intel eSPI terminology and this access model
> > explicit in the binding description.
> 
> Please take a look at a similar series from Aspeed and see if you can
> cooperate on creating something common between you:
> https://lore.kernel.org/all/20260313-upstream_espi-v1-0-9504428e1f43@aspeedtech.com/


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-19 11:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261118085742.1817536-1-yang.wang@deepcomputing.io>
     [not found] ` <20261118085742.1817536-2-yang.wang@deepcomputing.io>
2026-11-18 17:51   ` [PATCH 1/9] dt-bindings: bus: Add SpacemiT K3 eSPI controller Conor Dooley
2026-11-18 22:10     ` Aurelien Jarno
2026-11-19  9:05       ` Wang Yang
2026-11-19 11:02         ` Conor Dooley
2026-11-19 11:10           ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox