Skip to content

Conversation

@niedzwiecki-dawid
Copy link
Member

This is the PR with 2 commits:

  • the first one introducing the emulator for eSPI,
  • the second one with the implementation of a generic eSPI host.
    At the moment, the functionality is very basic, but it can be easily extended with following commits.

@aescolar
Copy link
Member

aescolar commented Jan 7, 2021

(@pabigot FYI)
@semihalf-niedzwiecki-dawid from a quick browse this driver does not seem to be specific for native_posix in any way, but that it would work in any target. Is that correct?
The only changes specific to native_posix would be that you are adding the needed DTS info to the native_posix board so you can build the driver directly without per app dts overlays(?)
If so:

  • please rephrase the PR tile, as today it would indicate otherwise.
  • I will leave the review to others. Though I would suggest to add some documentation for this feature, and some test(s) which would cover it.

@niedzwiecki-dawid niedzwiecki-dawid changed the title The native_posix emulator for eSPI The emulation system for eSPI Jan 7, 2021
@niedzwiecki-dawid
Copy link
Member Author

(@pabigot FYI)
@semihalf-niedzwiecki-dawid from a quick browse this driver does not seem to be specific for native_posix in any way, but that it would work in any target. Is that correct?
The only changes specific to native_posix would be that you are adding the needed DTS info to the native_posix board so you can build the driver directly without per app dts overlays(?)
If so:

  • please rephrase the PR tile, as today it would indicate otherwise.
  • I will leave the review to others. Though I would suggest to add some documentation for this feature, and some test(s) which would cover it.

That's true.
Thanks for the comment.

Copy link
Contributor

@pabigot pabigot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know nothing about eSPI or how it relates to normal SPI, so I'll leave approval to people who understand and would use this functionality.

Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devicetree and device initializations parts only. I don't know eSPI and am not qualified to review the rest.

Copy link
Contributor

@sjg20 sjg20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mostly I just want to seem more comments please

Add an emulation controller which routes eSPI traffic to attached
emulators depending on the selected chip(mostly host).
This allows drivers for eSPI peripherals to be tested on systems
that don't have that peripheral attached, with the emulator handling
the eSPI traffic.

Signed-off-by: Dawid Niedzwiecki <[email protected]>
This emulator pretends a generic eSPI Host. It supports basic virtual
wires and port80 operations.

There are functions to trigger actions on the host side e.g. for
setting a virtual wire from the host to the eSPI slave, use
emul_espi_host_send_vw. It will prepare data and set a proper event
on the slave side which will trigger callback (if there is any).

Signed-off-by: Dawid Niedzwiecki <[email protected]>
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DT bits seem fine

@nashif
Copy link
Member

nashif commented Jan 15, 2021

@albertofloyd can you please take a look?

@nashif nashif merged commit 6ec4ff2 into zephyrproject-rtos:master Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: API Changes to public APIs area: Boards area: Devicetree Binding PR modifies or adds a Device Tree binding area: Devicetree area: Documentation area: eSPI eSPI area: native port Host native arch port (native_sim)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants