Commit graph

41120 commits

Author SHA1 Message Date
Jose Alberto Meza
77b7b42f1d drivers: espi: xec: Allow to intercept eSPI host suspend/reset warnings
Fix #22188
Introduce config option to disable automatic acknowledge via
virtual wires on response to eSPI host suspend and reset warnings.
This will give the opportunity for eSPI slave systems that need to
perform preparations before reset or suspend.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-28 20:13:36 +02:00
Jose Alberto Meza
35c28a3dbf drivers: espi: xec: Use DT IRQ priority values
Use  DT define IRQ priorities instead KConfig.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-28 20:13:36 +02:00
Jose Alberto Meza
592e0afdf3 soc: arm: microchip: Update fixup for priorities
Avoid exposing unnecessary details for eSPI IRQ priorities.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-28 20:13:36 +02:00
Jose Alberto Meza
da87abd971 dts: arm: microchip: Adjust DT IRQ priorities
Adjust default IRQ priorities.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-28 20:13:36 +02:00
Henrik Brix Andersen
57e3851b30 doc: release-notes-2.2: mention deprecation of counter_read()
Mention that counter_read() is deprecated in favor of
counter_get_value().

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-28 12:52:46 -05:00
Henrik Brix Andersen
c894a6db4d drivers: counter: add counter_get_value(), deprecate counter_read()
Introduce a new counter API function for reading the current counter
value (counter_get_value()) and deprecate the former counter_read() in
favor of this.

Update all drivers and calling code to match the new counter API.

The previous counter driver API function for reading the current value
of the counter (counter_read()) did not support indicating whether the
read suceeded. This is fine for counters internal to the SoC where the
read always succeeds but insufficient for external counters (e.g. I2C
or SPI slaves).

Fixes #21846.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-28 12:52:46 -05:00
Jukka Rissanen
748eb99646 samples: net: websocket: Verify the received data properly
Make sure that we do not calculate terminating \n when comparing
the received data to sent data because the \n is not part of
the lorem_ipsum buffer.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-28 19:49:16 +02:00
Jukka Rissanen
b957581391 tests: net: websocket: Add TX unit tests for websocket API
Add simple tests for testing sent and received websocket data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-28 19:49:16 +02:00
Jukka Rissanen
86b688d43f tests: net: websocket: Add RX unit tests for websocket API
Add simple tests for testing receiving websocket data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-28 19:49:16 +02:00
Jukka Rissanen
cb7547860c net: websocket: Fix receiving websocket data
Make sure that if we receive websocket data in small chunks,
the parsing and returning of data to caller is done properly.

Fixes #21989

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-28 19:49:16 +02:00
Jukka Rissanen
66cc8e9c3a drivers: modem: gsm: Fix uart_pipe.h location
The uart_pipe.h was moved to drivers/console/uart_pipe.h and that
was missed by sanity.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-28 19:11:13 +02:00
Joakim Andersson
576c68317a Bluetooth: L2CAP: Reset channel status before destroy callback
Move reset of channel status from after the destroy callback since the
after the destroy callback the memory should be assumed to be released.
Instead clear the channel status when the channel is created in
l2cap_chan_add. This way we don't rely on the memory given being set to
the correct value.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-28 17:55:38 +02:00
Joakim Andersson
d84528edb1 Bluetooth: ATT: Fix ATT corrupting mem_slab structure after free
Fix ATT releasing the att structure back to the memory slab allocator
before the structure is actually ready to be released. The memory slab
allocator will write context data inside the freed slab which is
currently being overwritten by l2cap during channel teardown.

This manifests as an "Unable to allocate ATT context for conn" when
reconnecting with multiple connections.

Since the l2cap channel is embedded inside of the ATT context and l2cap
still has a valid referenc to the l2cap channel we need to release the
ATT context at a later time.
This should be fixed by implementing the channel destroy function and
releasing the channel there.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-28 17:55:38 +02:00
Joakim Andersson
83f108afd1 Bluetooth: L2CAP: Add destroy callback to fixed L2CAP channels
Add the option to provide the destroy callback to the fixed channels.
This can be used to free the memory for the L2CAP channel context which
is provided by the fixed channel in the accept callback.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-28 17:55:38 +02:00
Anas Nashif
d55a09ff05 samples: shared_mem: exclude qemu_x86_64
This sample keeps failing in CI due to some SMP issues currently being
addressed. Exclude until we have a fix.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-28 10:38:10 -05:00
Anas Nashif
132fcd0eaa samples: remove extra colon from test identifier
Fix bad yaml syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-28 10:38:10 -05:00
Flavio Ceolin
d337f3bab3 tests: tags: Add entropy and random tags
Add these new two tags to tests that exercise these features.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-01-28 09:37:51 -05:00
Jonas Eriksson
8c59af0807 boards: arm: Add stm32vl_disco support
Port based on existing stm32f3_disco and nucleo_f103rb boards.

Signed-off-by: Jonas Eriksson <jonas@upto.se>
2020-01-28 08:30:52 -06:00
Jonas Eriksson
3e64e751b6 soc: stm32f1: Add support for stm32f1xx SoCs
Define stm32f100xx family, tested using stm32vl_disco
(stm32f100rb).

Signed-off-by: Jonas Eriksson <jonas@upto.se>
2020-01-28 08:30:52 -06:00
Robert Lubos
7e7f05546d modules: nordic: Allow separate nRF 802.15.4 radio driver build
So far, nRF 802.15.4 radio driver build was dependent on the 802.15.4
subsystem in Zephyr. While this was a reasonable approach for samples,
it prevented the radio driver from being built as a standalone entity,
which could be useful in some applications (e. g. running core nRF
802.15.4 radio driver tests with Zephyr).

Resolve this, by providing a separate set of Kconfigs for the radio
driver, therefore allowing to build it as a separate entity. The 802154
subsystem simply enables the radio driver module in this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-28 15:18:42 +01:00
Patrik Flykt
10fb64f4dc samples: net: Create sample app for GSM modems
Sample app compiled with the GSM modem driver enabling PPP.

This sample was tested with a Reel Board UART_1 connected via the
external board/connector and a FONA 808 modem. Reel board specific
suppor is found in boards/.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2020-01-28 12:44:17 +02:00
Patrik Flykt
ede043a84c net: l2: ppp: Assign IPv4 address received with IPCP
Store the IPv4 address into the local LCP options and set it
as the interface IP address once IPCP negotiation is complete.

Fix calling the correct function when an IPCP Configure Reject
is received carrying our local IP address.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2020-01-28 12:44:17 +02:00
Patrik Flykt
3fe8707bc0 drivers: modem: Implement uart_pipe interface for GSM modem
Implement uart_pipe functionality for the modem so that it
integrates with the PPP implementation.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2020-01-28 12:44:17 +02:00
Patrik Flykt
2308293d89 drivers: modem: Support GSM modems and PPP
Create a driver for GSM modems that use a standard AT command set
and enable Zephyr's own PPP stack for IP traffic.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2020-01-28 12:44:17 +02:00
Morten Priess
c20a870b6b bluetooth: controller: Added use of slot_window for ADV
Request ticker re-scheduling of ADV (within the 10ms randomized window).

Signed-off-by: Morten Priess <mtpr@oticon.com>
2020-01-28 08:07:54 +01:00
Morten Priess
64c89d682f bluetooth: controller: Implemented dynamic re-scheduling in ticker
As a part of a ticker extension interface, it is now possible to specify
a slot_window when starting a ticker. When setting the
ticks_slot_window to a non-zero value, it is requested that the node
timeout is re-located to a position within the window, where the node
does not collide with other nodes - aligning to the end of the window.
The solution takes into consideration if a node has already been
updated with drift correction (e.g. ADV randomization), subtracting this
from the window.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2020-01-28 08:07:54 +01:00
Ulf Magnusson
cf89ba33ea global: Fix up leading/trailing blank lines in files
To make the updated test in
https://github.com/zephyrproject-rtos/ci-tools/pull/121 clean, though it
only checks modified files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 17:41:55 -06:00
Erwan Gouriou
f44b120449 boards: nucleo_wb55rg: Add openocd support and set to default runner
Flashing stm32wb SoCs is available since Zephyr SDK-0.11.0.
Enables it on nuclmeo_wb55rg and set it as default as it is
faster in flashing and support doesn't require additional
action (vs pyocd package support).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-27 15:26:25 -06:00
Ivo Clarysse
a290d30c9a drivers: can: stm32: Fix bit timing conversion
Fix CAN TS1, TS2 and SJW bit timing conversion to properly
handle upper limits.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-27 15:07:32 -06:00
Peter Bigot
0bb4e5bb6c west.yml: update hal_nxp to use full path to driver headers
Zephyr-specific files in mcux break when the drivers subdirectory is
no longer present in the include path.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 12:25:05 -06:00
Ulf Magnusson
8e476ab692 dts: bindings: semtech,sx1276: Remove redundant document separator
Not needed. Bindings are never concatenated together.

Makes the https://github.com/zephyrproject-rtos/ci-tools/pull/123 check
clean, though it only looks at changed files in PRs.

Clean up the header too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 10:41:31 -06:00
Alexander Wachter
2f44990e9b can: Introduce can-primary alias
This commit introduces the can-primary alias to identify
the primary CAN interface.
This alias is used for all samples and tests, so they don't
need to probe the right interface.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-01-27 10:25:00 -06:00
Peter Bigot
4fcf80d64f doc: reference: add discussion of terms that define API behavior
Define a minimal set of attributes that can be used to indicate the
allowed context for invoking specific Zephyr API and kernel functions,
and the effect of invoking them on thread and other behavior.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Peter Bigot
6b1fd13949 doc: generate documentation for asynchronous SPI API
Add the flag so the related functions are documented and can be
referenced from documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Peter Bigot
76995b61ac doc: scheduler: define reschedule point
This term needs to be defined to support documenting the effect of
various API calls on scheduler selection of the running thread.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Piotr Mienkowski
49bcafc9f5 tests: remove pinmux_basic_api test
The pinmux_basic_api test relies on a hardware loopback, manual
shorting of two GPIO pins. The Zephyr test framework does not allow
currently to define such pins in a generic way. The pinmux_basic_api
test hard codes pin numbers specific to a few evaluation boards.

The test has a few more flaws and limitations:
- it verifies that pin configured to function A can be controlled by
  GPIO driver. It doesn't verify that pin configured to function B can
  be contorolled by a corresponding peripheral driver.
- the test relies on level sensitive interrupt support which is not
  always available.
- the test will pass even if there are erros when pin is configured to
  function B.
- the test allows to configure both test pins as an output therefore
  shorting the outputs.

Considering the flaws and limited coverage of the test as well as
missing features of the Zephyr test framework this commit removes the
testcase. It is not currently possible to write a generic pinmux
testcase that supports multiple boards and can be used to assess the
quality of the driver. Instead, to ensure the driver code will not
degrade, we need to rely on implicit testing done by the board
initialization code located in boards/ folder.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-01-27 08:52:45 -06:00
Vinayak Kariappa Chettimada
c793c0edda Bluetooth: controller: split: Update lll_conn_flush interface
Updated the lll_conn_flush interface to pass the connection
handle while the LLL connection context stored handle has
been invalidated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-27 13:51:08 +01:00
Vinayak Kariappa Chettimada
d9c67ebd77 Bluetooth: controller: split: Revert Move invalidation of connection handle
This reverts commit d3e3f8d2b4.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-27 13:51:08 +01:00
Vinayak Kariappa Chettimada
43d8166045 Bluetooth: controller: split: Revert conn handle invalidation
This reverts commit 7417e6e09e.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-27 13:51:08 +01:00
Anas Nashif
d380622a4d mec1501modular: allow building on macOS
Do not abort build on macOS if SPI utility is not found.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-27 00:11:10 -05:00
Wentong Wu
ac2b117acd power: policy: recover deep sleep states from residency policy.
Commit c248cdf17e remove deep sleep states
from residency policy based on SoC loses context in deep sleep states to
avoid a "forever timeout" power-off the whole system. It's right if deep
sleep means power off whole system only.

One of deep sleep states is that most power domains are shut off, but
except a few that retain just enough logic to allow the CPU to resume
from the same point of execution where it went to sleep. This is well
documented and implementations also have same behavior.

For another deep sleep state, system off, sys_pm_ctrl_disable_state can
prevent system off unexpectedly from being entered on long timeout. And
sys_pm_force_power_state can help power off whole system.

This reverts commit c248cdf17e.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-01-26 11:13:22 -08:00
Peter Bigot
ab7773dae8 sanitycheck: leave non-tty terminal unmodified on exit
The terminal configuration should not be reset on exit if
sanitycheck's output is being directed to something that mediates the
terminal control, such as a pager.  Only do the reset if stdout is
interactive.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:54:41 +01:00
Peter Bigot
235a5e5e4b cmake: remove include/drivers from include lists
Files that need something from this directory should be using the
prefix, e.g. <drivers/sensor.h> instead of just <sensor.h>.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
344c109f02 treewide: use full path to wifi/winc1500.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
9689868f7b treewide: use full path to watchdog.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
84497d0e49 treewide: use full path to usb/usb_dc.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
02ae343100 treewide: use full path to uart.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
5ceb612738 treewide: use full path to spi.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
165fe48229 treewide: use full path to sensor.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot
12e30f16c9 treewide: use full path to pwm.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00