Some tools consider this as commented code because of the ifdef, so
remove that and fix a coding guideline violation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update sample espi driver test to exercise some SAF functionality
based on the limited hardware available. Note the SAF test will
erase a section of the flash. SAF tests are enabled for the EVB only.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
In npcx7 series, all of them support the Intel Enhanced Serial
Peripheral Interface (eSPI) Revision 1.0. This specification provides a
path for migrating host sub-devices via LPC to a lower pin count, higher
bandwidth bus. In addition to Host communication via the peripheral
channel, it provides virtual wires support, out-of-band communication,
and device mastering option over the Chipset SPI flash.
Becisdes introducing eSPI device in npcx7, this CL also includes:
1. Add eSPI device tree declarations.
2. Add npcx7-espi-vws-map.dtsi to present the relationship between eSPI
Virtual-Wire signals, eSPI registers, and wake-up input sources.
3. Zephyr eSPI api implementation.
4, Add OOB (Out of Band tunneled SMBus) support.
5. Add configuration files for eSPI test suites.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
ESPI is supported in MEC15 chips but similar to PECI, I2C, eSPI bus
testing requires another device to act as eSPI host.
While this sample can be run in EVB the HW connection to a eSPI host
(Intel RVP) is not documented/supported.
Mark as not supported in that HW only in Modular card
(which setup is documented)
Also remove duplicate definition of the "depends_on: espi"
in the end of the sample.yaml file
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add sample where a fictious lenghty operation is required before a more
elaborate handshake is perform with eSPI master.
This requires sending SLAVE_BOOT_DONE virtual wire explicitly.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Use non-default frequency 25MHz and Quad mode to ensure
frequency configuration is taking effect.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Ensure multiple OOB transactions can be perform back-to-back
Check OOB transaction response length matches is as expected.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Extend sample code to demonstrate the eSPI API to read/write flash.
Remove trailing \n
Use LOG_ERR when applicable instead of LOG_WRN
Treat warnings as errors.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add sample of how to handle eSPI host warnings when these are
intercepted by app code.
Replace printk with logging macros to standardize the sample.
Log additional details about peripheral channel notifications.
Remove unnecessary trailing \n from logging messages.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Treat Kconfig-specific GPIOs as active-high (default) and use the
logic-level API to interact with them.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The seasonal overhaul of test identifiers aligning the terms being used
and creating a structure. This is hopefully the last time we do this,
plan is to document the identifiers and enforce syntax.
The end-goal is to be able to generate a testsuite description from the
existing tests and sync it frequently with the testsuite in Testrail.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Bool symbols implicitly default to 'n'.
A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.
Also replace some
config
prompt "foo"
bool/int
with the more common shorthand
config
bool/int "foo"
See the 'Style recommendations and shorthands' section in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use this short header style in all Kconfig files:
# <description>
# <copyright>
# <license>
...
Also change all <description>s from
# Kconfig[.extension] - Foo-related options
to just
# Foo-related options
It's clear enough that it's about Kconfig.
The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)
git ls-files '*Kconfig*' | \
xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Show eSPI API driver usage, including early configuration,
send of virtual wire packets and callback mechanism
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>