Commit graph

41266 commits

Author SHA1 Message Date
Erwan Gouriou 1d3c1f8d2e drivers/serial: Add support for stm32l5 soc
Add serial support for STM32L5 serial driver and instances

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou cdd5856167 driver/gpio: stm32: Add STM32L5 support
Add basic GPIO support. Regarding interface with EXTI,
STM32L5 is similar to STM32G0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 1f054a7b31 drivers/exti: stm32: Add support for STM32L5 series
Add support for stm32l5 socs on stm32 external interrupts driver

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou f258199595 drivers/clock_control: Add clock_control on STM32L5 series
Add clock_control driver for STM32L5.
It's based on L4/WB driver since it is similar IP.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 25ac59685f dts/arm/st: Add l5 device tree basics and stm32l552x socs
Add l5 secure and non secure device tree files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 3057d801c7 soc/arm/st_stm32: Add stm32l5 series soc support
This provides basic stm32l5 series SoC support.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Jukka Rissanen 34b7a6c81c testsuite: Allow user to override minimal logging
The testsuite was always forcing minimal logging. This is problematic
as it does not allow user to see full logging string. Allow user to
override the minimal logging if needed, the default is still to
enable minimal logging.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-07 23:47:55 -05:00
Krzysztof Chruscinski 2e6e818c91 tests: shell: Add test for raw argument option
Added test for commands with SHELL_OPT_ARG_RAW flag set.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-07 23:47:39 -05:00
Krzysztof Chruscinski 512de5ecac shell: Refactor command execution to enable raw arguments
Added special flag that can be used to indicate that optional
arguments are passed without any parsing (e.g. quotation marks
removal). Modified execute command to parse command line buffer
argument by argument.

After this change it is possible to forward whole command to
command handler (using select).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-07 23:47:39 -05:00
Robert Lubos 2c2771970e modules: mbedtls: Update mbedTLS commit and apply fixes
Update mbedTLS commit along with the following fixes:

* Fix naming inconsistencies in some cipher modes, to match core mbedTLS
  configs
* Add Kconfig to enable CTR cipher mode

Fixes #22421

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-07 23:46:08 -05:00
Hans Wilmers fdd89efd3a drivers: modem: ublox-sara-r4: automatic setting of APN
During communication initialisation, the IMSI of the inserted SIM
card is evaluated to determine the APN. This is done by comparing
the first 5 characters of the IMSI to a list of known providers.
The list can be given in Kconfig.

To enable this functionality, set following bool in Kconfig:
MODEM_UBLOX_SARA_AUTODETECT_APN

To set a list of providers, set following string:
MODEM_UBLOX_SARA_AUTODETECT_APN_PROFILES

If the provider can not be found in the list, the APN given in
following entry is used as a fallback:
MODEM_UBLOX_SARA_R4_APN

Signed-off-by: Hans Wilmers <hans@wilmers.no>
2020-05-07 23:36:10 -05:00
Hans Wilmers cef334b5fe drivers: modem: ublox-sara-r4: automatic detection of modem type
The modem type (Sara R410 or Sara U201) is detected automatically after
hardware initialisation of the modem. Further initialisation and
functionality is then chosen depending on the detected modem type.

To enable this functionality, set following bool in Kconfig:
MODEM_UBLOX_SARA_AUTODETECT_VARIANT

Signed-off-by: Hans Wilmers <hans@wilmers.no>
2020-05-07 23:36:10 -05:00
Stephanos Ioannidis 25fe4bf9c7 tests: drivers: Add console driver test
This commit adds the initial implementation of the console driver test.

The purpose of this test is to verify the output functionality of the
various types of console drivers (UART and semihost console types are
supported for now).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-07 23:33:38 -05:00
Stephanos Ioannidis 2c00c8e504 cmake: emu: Support QEMU semihosting console emulation
The QEMU '-semihosting' option enables the emulation of the semihosting
mechanism that can be used to interface the Zephyr RTOS to the host
operating system.

In order to support semihosting console output, the QEMU semihosting
feature is enabled and its console is connected to the console backend
chardev.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-07 23:33:38 -05:00
ZhongYao Luo 1811fff2dd console: Add semihosting console
Many chips have only one serial port. When the serial port is occupied
by other devices, there is a lack of a console to output debugging
information. Semihosting can provide a console. The disadvantage of
semihosting is that a debugger must be connected, so it can only be
used for online debugging.

Signed-off-by: ZhongYao Luo <LuoZhongYao@gmail.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-07 23:33:38 -05:00
Johann Fischer 8c051f0809 boards: decawave_dwm1001_dev: enable DW1000 802154 driver
Enable DW1000 802154 driver.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-07 23:30:58 -05:00
Johann Fischer d461befc2b boards: decawave_dwm1001_dev: add jlink runner support
Add jlink runner support.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-07 23:30:58 -05:00
Johann Fischer 8f983c3654 drivers: ieee802154: add Decawave DW1000 driver
Add initial support for Decawave DW1000
IEEE 802.15.4-2011 UWB transceiver.

Driver has basic functionality. Additional functions such
as reading out timestamps and delayed TX were implemented
for test purposes, but also require support in the 802154
subsystem.

Register, sub-register, and defaults defines in the file
ieee802154_dw1000_regs.h are taken from the Decawave's
DW1000 driver for the Mynewt OS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-07 23:30:58 -05:00
Robert Lubos fc7b142961 net: openthread: Use newlib in samples
OpenThread throws a warning when minimal libc is used, as some of its
new files use stdlib functions not available in the minimal
implementation. It's not critical failure, as those new functions are
not linked anyway in default configuration, but the warnings do not
look well. Therefore, use newlib by default in the sample to prevent
warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-07 23:27:49 -05:00
Robert Lubos 3fa97df43c net: openthread: Update mbedTLS configuration
After the update, CMAC is also required when DTLS is not used.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-07 23:27:49 -05:00
Robert Lubos 34922fbb72 west.yml: Update OpenThread revision
Regular upmerge.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-07 23:27:49 -05:00
Torsten Rasmussen 2da4550591 cmake: Set the ZEPHYR_<MODULE_NAME>_MODULE_DIR in parent scope
To allow samples to obtain `ZEPHYR_<MODULE_NAME>_MODULE_DIR` it is
necessary to also ensure the module variable is available in parent
scope.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-05-07 23:26:18 -05:00
Andrei Gansari 0b4cfbebe8 soc: lpc55xxx RNG definiton
Definiton for LPC55xxx family RNG device.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Andrei Gansari 50830385d8 boards: map lpcxpresso55xxx boards entropy device
Map lpcxpresso55xxx type boards entropy device to rng peripheral.
Apllies to all versions of lpcxpress55s69 and lpcxpresso55s16.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Andrei Gansari 5b02519d8f drivers: entropy_mcux_rng LPC entropy
Added RNG device used by LPC family devices to generate random numbers.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Andrei Gansari bfbbf92ad5 dts: nxp,lpc-rng binding and lpc55xxx RNG node
Binding used for LPC random number generator hardware.
Describes RNG device node in LPC5xxx SoCs device tree peripherals.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Andrei Gansari 97d940cf33 modules: adds HAS_MCUX_RNG
New RNG module used by LPC family devices as random number generator.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Andrei Gansari 284fbf0bf3 west.yaml: update hal_nxp for entropy device
Updated west.yaml to the hal_nxp commit which enabled entropy
drivers for LPC family.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Vincent Wan cdf780b3c6 west.yml: Update hal_ti for cc13x2/cc26x2 to SimpleLink SDK 4.10.00.78
Update west.yml to point to hal_ti with the latest changes
from TI SimpleLink SDK 4.10.00.78 for CC13x2/CC26x2.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-05-07 23:25:14 -05:00
Francois Ramu dbbf834605 tests: drivers: spi loopback on nucleo_wb55 board
This configures the nucleo_wb55rg board for testing
the SPI loopback with DMA MUX transfer.
This test requires pin SPI_A_MISO (D12) to be connected
to pin SPI_A_MOSI (D11) on the nucleo_wb55rg board

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-07 23:03:20 -05:00
Francois Ramu a08e262fa6 dts: arm: stm32wb: configure DMA and DMAMUX
This patch enables the DMA and DMAMUX on the stm32wb55x.
The DMAMUX has 14 channels.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-07 23:03:20 -05:00
Francois Ramu dc04ce84a4 soc: arm: stm32wb55x series enabling dma and dmamux
This patch defines the dma feature for the stm32wbXX
and the dmamux feature for the stm32wb55x
soc series from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-07 23:03:20 -05:00
Gerard Marull-Paretas 5c454e955c boards: arm: nucleo_h743zi: enable ADC support
Enable ADC on Nucleo H743ZI board (ADC12 channel 15).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-07 23:01:59 -05:00
Gerard Marull-Paretas cfebfc188e drivers: adc: stm32: add support for H7 series
Add support for ADC on H7 series. Note that ADC1 and ADC2 share the same
register set, so it is added as "adc1_2".

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-07 23:01:59 -05:00
Francois Ramu 01e9983142 drivers: pinmux: stm32wb: use a pull-down for SPI SCK pin
Like stm32 L4 does,
when the STM32WBx SoC goes into STOP mode, the SPI device is disabled.
This cause the pins to not be drived anymore (i.e. they are floating)
except through their pull-up or pull-down.

From the logical point of view, the NSS pin is held high by a pull-up
so it's not a problem if the other pins are floating. However those pins
are floating input for the slaves, which increase their power
consumption.

The solution is to hold the state of the pins through a pull-up or a
pull-down. This is already done for the NSS and MOSI pins, but not for
SCK. Fix that by using pull-down on the SCK pin the same way it is
already done for the MOSI pin.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-07 23:00:32 -05:00
Luiz Augusto von Dentz d2caa658f5 Bluetooth: hci_raw: Fix build error on hci_usb_h4
BT_BUF_TX_SIZE is actually used for setting the MPS properly.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-05-07 22:38:31 -05:00
Daniel Leung eb10b87430 boards: x86/minnowboard: specify CONFIG_X86_MMU_PAGE_POOL_PAGES
Given that the Minnowboard has relatively large memory, the default
number of pages allocated for page tables are not enough, and
resulting in asserting in the page table initialization code.
So change the number of pages to a large number to accomodate
various applications.

Fixes #24353

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-05-07 20:32:31 -07:00
Kumar Gala 10a5c438fc soc: arm: atmel_sam: Remove soc_pinmap.h
All pin configuration for ATMEL SAM SoC come from devicetree so we can
now remove the soc_pinmap.h header files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Kumar Gala 6ae8664889 drivers: i2s: i2s_sam_ssc: Convert to devicetree
Convert i2s_sam_ssc driver to utilize devicetree.  We replace Kconfig
options for specifying the DMA configuration (channel, DMA device name)
with getting that from devicetree.  We also get pincfg from devicetree,
however we still have Kconfig sybmols to specify if the RF or RK pin is
enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Kumar Gala 49bab484df drivers: dma: sam_xdmac: Convert to devicetree
Convert sam_xdmac driver to utilize devicetree.  As part of the
controller binding we specify that dmas should contain a channel and the
perid for the DMA transaction.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Carles Cufi 3954aa5a5a serial: sam0: Complete port to the new timeout API
The conversion in 9b096f40b6 left out a
few tidbits that were not converted properly. Complete the conversion
properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-07 22:00:39 -05:00
Dominik Ermel ba8b74d801 devicetree: Add DT_FOREACH_CHILD macro
The macro iterates through the list of child nodes and invokes provided
macro for each node.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 21:42:58 -05:00
Kumar Gala 0a7d4e2135 devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon
Remove semicolon between instance invocations of DT_FOREACH_IMPL_ and
thus DT_INST_FOREACH.  This provides more flexibility to the user.  This
requires we fixup in tree users to add semicolon where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 20:03:56 -05:00
Jose Alberto Meza 06d4c6d8b3 drivers: espi: xec: Ensure OOB interrupts are not missed
MCHP Soc operation uses clear-on-write register for interrupt
status, read-OR-write operation may clear interrupts unintentional.
Fixes #24464

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-05-07 17:18:26 -07:00
Andy Ross e20e6f4beb doc: Add k_heap/sys_heap docs
We have a new heap implementation replacing mem_pool.  Add docs on its
API and internals, and add a deprecation note to the mem_pool section.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-07 17:17:52 -07:00
Andy Ross c310be876b doc: Rewrite clocks and timing sections
The recent work with k_timeout_t has invalidated much of the existing
timing documentation.  Rewrite the section focusing on the new API,
adding details on the internals and driver-facing API.  Includes a
porting guide for legacy applications and subsystems.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-07 17:17:52 -07:00
Andy Ross 729f2037c4 doc: Add docs on data structures
Add some documentation and diagrams for OS library data structures:
dlist/slist, rbtree and ring buffer.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-07 17:17:52 -07:00
Andrew Boie ac9abb10b8 tests: mem_protect: cleanup
This suite was fairly messy and very unstable on how it re-used
kernel objects.

* Unnecessary ztest_test_pass() or self-aborts removed
* k_thread_join() now used to wait for child thread completion,
  instead of a strange use of a semaphore which was effectively
  a 10ms sleep
* Barriers simplified
* the number of thread objects in kobject.c is now drastically reduced
* test case function names are now descriptive and made static if
  only used in local scope in kobject.c
* SMP no longer disabled

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-07 19:21:16 -04:00
Andrew Boie 1ff066548a ztest: end tests more robustly
If a ztest test case creates child thread(s), and one of the
descendent threads invokes ztest_test_pass(), ztest_test_fail(),
or ztest_thread_skip(), only that descendent thread will be
aborted.

Then ztest will try to run the next scenario on the ztest_thread
which is already in use. This was causing corruption issues on
SMP systems, and possibly other subtle, hard-to-debug
situations.

This patch ensures that ztest_thread is always dead before
re-using it, as run_test() now attempts to join on it instead
of using a semaphore.

The ztest_test_* functions now ensure that the ztest_thread
is always aborted, in addition to the current thread.

This isn't perfect. If the testcase spawned other threads,
they will keep running. The most robust way to fix this is to
iterate over all non-essential threads in the system and abort
them. Unfortunately, Zephyr doesn't have a facility to do
this safely.

It would also be simpler to re-use thread objects if
k_thread_create() could detect whether the thread was already
active and abort it, but this is currently not possible
since k_thread_create() can be used with uninitialzed
thread object memory and no checks are possible. This
may be improved in the future, see #23030.

Fixes: #22738
Partial fix for: #24713

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-07 19:21:16 -04:00
Andrew Boie d2dce5e845 x86: Revert "qemu_x86: use icount for 32-bit"
This was causing problems on some network tests.

This reverts commit 9b055ecf82.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-07 15:37:43 -07:00