Commit graph

99049 commits

Author SHA1 Message Date
Alberto Escolar Piedras
d5b691adba nrf52_bsim: Update to support incoming changes to clock driver
Incoming updates to the nRF clock driver require some extra enum
definitions from the nRFx HAL which were not available in HW
model versions before 1.4 => update it.
Also as the nrf52_bsim does not yet support DTS, include a define
for the clock IRQ interrupt number (as the new clock driver will
be using the DTS macro instead of the nRF MDK value.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-01-19 07:09:38 -05:00
David Kinder
d5f8c5d286 doc: reduce image size of board pics
Some board images were unnecessarily large and slowing down the browser

Signed-off-by: David Kinder <david.b.kinder@intel.com>
2019-01-19 07:08:22 -05:00
David B. Kinder
d57ece8ec6 doc: update doc guidelines
Add information about image size recommendations, and add some more
details about other reST features such as tables.  Also added a flow
picture to the documentation generation doc.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-19 07:05:53 -05:00
Alberto Escolar Piedras
a40f07a3f3 tests: Prolong BT encrypted connection test
Prolong by 1 second the BT encrypted connection test, to ensure
there is enough time for the link itself to be encrypted.
Before this change the key was exchanged, but the 1st notification
(pass condition) was received before the link itself was encrypted.
With this change we wait for 1 notification more (1 second more),
and during that extra second the link is actually encrypted.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-01-18 18:28:32 -05:00
Ioannis Glaropoulos
3df50604e5 boards: nrf: correct the source of LED and Button definitions
board.h does not exist for any of the (official) Nordic nRF
boards. This commit corrects the information about the source
ofthe button and LED definitions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-18 18:27:48 -05:00
Ioannis Glaropoulos
704e4b446b soc: nrf: clean up inclusions and style fixes
Remove redundant inclusion of nrf.h (included by nrfx.h).
Group the logging/log.h inclusion together with the other
inclusions in this file (make inclusions' list look as in
nrf9160/soc.c).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-18 18:27:12 -05:00
Ioannis Glaropoulos
bc5b8e24fe soc: nrf: remove unnecessary macros in mpu_regions.c
Remove the locally-defined macros which define the base
addresses for XICR, Peripheral space and PPB. The macros
are not used.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-18 18:27:12 -05:00
Endre Karlson
5965c0e7e0 boards: efr32mg_sltb004a: Fix device name typos
Chose the wrong device name here.

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2019-01-18 18:26:01 -05:00
Alberto Escolar Piedras
acefd36501 native_posix: Remove all references to the defunct legacy shell
Remove all references in the documentation and Kconfig options
to the legacy shell to avoid confusing users and developers

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-01-18 18:25:05 -05:00
Kumar Gala
9502fce067 doc: extensions: Add shield support to zephyr-app-commands
Add 🛡️ as an argument to zephyr-app-commands, update the shield
porting rst example to use it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 18:22:02 -05:00
Andrew Boie
53b5204309 kernel: remove experimental tag from userspace
We are solidifying APIs for the 1.14 LTS release.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-01-18 18:20:21 -05:00
Erwan Gouriou
5a197bf8f2 boards/shields: Clean up Kconfig'ery
Following change of selection mechanism, clean boards/shields from
Kconfig related code.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-01-18 13:20:59 -06:00
Erwan Gouriou
0115c47b69 cmake: dts: move to specifying shield on the command line
Rather than specifying SHIELD via Kconfig, we move it to being
specified via the command line, similar to board.

So we can do:

  -DSHIELD=x_nucleo_iks01a1

or, for multiple shields:

  -DSHIELD="x_nucleo_iks01a1 frdm_kw41z"

Following cmake change, update x_nucleo_iks01a1 sample in order
not to enable CONFIG option anymore but set SHIELD cmake option.

Last, update documentation to reflect this change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 13:20:59 -06:00
Kumar Gala
affc1ed253 sensor: bmi160: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert bmi160 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:53:53 -06:00
Kumar Gala
31dad5b411 sensor: vl53l0x: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert vl53l0x sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:52:14 -06:00
Kumar Gala
62e1ed928c samples: sensor: vl53l0x: Fixup sample to build all boards with it
Updated the sample.yaml to use depends_on and update the board yaml that
have the vl53l0x sensor.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:52:14 -06:00
Kumar Gala
957c3009a6 sensor: max30101: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert max30101 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:50:12 -06:00
Kumar Gala
8b691f50ca led_strip: ws2182: Add Device Tree support
Convert the ws2812 driver to use device tree and new DT_<COMPAT>
defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:47:45 -06:00
Andrew Boie
970758408b printk: don't print incorrect 64-bit integers
printk is supposed to be very lean, but should at least not
print garbage values. Now when a 64-bit integral value is
passed in to be printed, 'ERR' will be reported if it doesn't
fit in 32-bits instead of truncating it.

The printk documentation was slightly out of date, this has been
updated.

Fixes: #7179

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-01-18 08:23:15 -08:00
Peter A. Bigot
12836d9280 drivers: sensors: sht3xd: support multiple devices and DT bindings
Add a configuration structure to sht3xd that holds instance-specific
parameters, implemented in a immutable statically allocated object
initialized with material from device tree binding aliases.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-18 09:43:14 -06:00
Peter A. Bigot
ec6509504d drivers: sensors: sht3xd: uncrustify
Run this through the code formatter.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-18 09:43:14 -06:00
Peter A. Bigot
98cc93952d drivers: sensors: sht3xd: move object definitions out of header
These belong in the driver implementation file.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-18 09:43:14 -06:00
Kumar Gala
7b9bf08dce sensor: lps22hb: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert lps22hb sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 09:38:31 -06:00
Robert Lubos
0b93c68f79 net: sockets: Add fcntl to socket offloading API
Offload fcntl calls through socket offloading API.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-18 17:25:01 +02:00
Kumar Gala
717b647c30 ieee802154: mcr20a: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert mcr20a driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 09:06:10 -06:00
Kumar Gala
8f04f81e97 sensor: fxas21002: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert fxas21002 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 08:54:31 -06:00
Anas Nashif
a1a6174b37 tests: ipm: disable on qemu_x86_64 [REVERT ME]
Fails sporadically on this platform and causing CI blockage.
Filed bug #12478. Should be reverted once bug is fixed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 09:50:18 -05:00
Anas Nashif
eecd90f1d8 ci: remove check-compliance script
This is now maintained outside of the tree in ci-scripts repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 09:49:56 -05:00
Robert Lubos
97aa3ac519 samples: openthread: Increase shell stack size
OpenThread commissioner shell command caused stack overflow on shell
thread, hence increase it for OpenThread samples.

Fixes #12455

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-18 15:24:16 +02:00
Robert Lubos
73ec83a9a5 net: openthread: Increase default stack size when commissioner is on
OpenThread commissioner feature has extra stack requirements, hence
increase it in this configuration.

Fixes #12455

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-18 15:24:16 +02:00
Anas Nashif
eff81c498b power: remove obsolete power samples
We have a new power management system and those samples have been
written for specific boards and using the application based power
management subsystem. We are getting new tests/samples that are generic
with the new subsystem, so remove those in favor of the new ones.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 06:50:04 -05:00
Anas Nashif
15a5fedca7 qmsi: remove handling of qmsi library
Use built-in by default. We do not use external library of QMSI anymore
and rely on integrated HAL. Remove this option and simplify HAL
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 06:50:04 -05:00
Maureen Helm
ad52bce1d0 boards: mimxrt1050_evk: Add fxos8700 dts node
Adds an fxos8700 device tree node to the mimxrt1050_evk. The sensor
interrupt gpios require a board modification to be used and conflict
with Ethernet and LCD signals, therefore their pinmuxes are not
configured.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Maureen Helm
b7b238e021 boards: mimxrt1050_evk: Enable mcux lpi2c driver and pins
Enables the mcux lpi2c shim driver and pin muxes on the mimxrt1050_evk
board. Updates the board documentation and yaml supported list
accordingly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Maureen Helm
9cad30814d soc: nxp_imx: Enable mcux lpi2c driver and clocks
Enables the mcux lpi2c shim driver and clocks on all imx rt socs when
the i2c driver interface is enabled.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Maureen Helm
395a92b36b clock_control: Add support for lpi2c clock in mcux ccm driver
Adds support for getting the lpi2c clock frequency in the mcux ccm
driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Maureen Helm
d7dfa21391 drivers: i2c: Introduce mcux lpi2c shim driver
Adds a shim layer around the mcux lpi2c driver to adapt it to the zephyr
i2c interface. This shim driver leverages heavily from the mcux i2c shim
driver because the MCUXpresso SDK provides similar APIs for the i2c and
lpi2c peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Maureen Helm
ce5926aa6d dts: Add bindings for imx lpi2c
Adds device tree bindings for the imx lpi2c peripheral.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Andy Ross
e664c78b82 kernel/timeout: Fix recursive spinlock in z_set_timeout_expiry()
The z_set_timeout_expiry() function was added in part to simply the
locking strategy, but it missed a case where a function it was calling
was re-locking the same spinlock.  It "works"[1] in uniprocessor
environments, but can be a deadlock in SMP.

Fix this by moving the meat of the function to an unlocked utility,
use that locally, and turn the entry point into one that does locking.
Actually this only gets called from idle now, which is a use case that
will go away when TICKLESS_IDLE is removed as a separate feature (once
you know all timeouts are set tickless, you don't need to set it from
the idle entry at all).

Discovered via lucky inspection.

[1] It doesn't work.  It releases the lock prematurely at the end of
the inner block.  But in practice this wasn't discovered.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-01-18 06:48:51 -05:00
Gil Pitney
7f956a9353 drivers: wifi: simplelink: add timeout for fast connect feature
The SimpleLink wifi driver enables the Fast Connect method of
WiFi provisioning, which allows the network coprocessor to
reconnect to a previously connected Access Point (AP) on
startup.

Previously, if Fast Connect failed to connect, any network
socket applications would inevitably fail, as there would have
been no wifi connection.

This patch adds a configurable timeout for the Fast Connect
feature, after which timeout, an error is logged informing
the user to manually reconnect to an AP.

Reconnection is typically accomplished by separately running the
wifi sample shell program.

Fixes: #11889

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2019-01-18 12:32:59 +02:00
Kumar Gala
32cbc42ce6 scripts/dts/extract: fix handling of non-MMIO SPI flash
The Intel S1000 board has a SPI flash that isn't directly MMIO
addressable.  For this case we shouldn't generate CONFIG_FLASH_SIZE or
CONFIG_FLASH_BASE_ADDRESS.

We use the heuristic of assuming if the flash node #size-cells is 0, its
a SPI flash.  Than if the parent node (SPI controller) has only a single
reg element we assume its a non-MMIO addressable SPI flash.  If there is
more than one reg element we assume the last reg element is the MMIO
address region for access to the flash.

Fixes #12530

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-17 21:29:07 -05:00
Anas Nashif
74dbe338d4 sanitycheck: do not keep extending timeout
While trying to catch crashes after test completes, do not keep
extending the timeout which might lead to and endless loop and not
getting out based on set timeout.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-17 19:46:45 -05:00
Andrzej Głąbek
0906a51dac drivers: adc: Fix handling of invalid sampling requests
Commit aad21ecb31 introduced an incorrect
pattern of handling ADC sampling requests with invalid parameters in
both nRF ADC drivers. After discarding such request, the drivers do not
release properly the access lock and therefore become unusable.
Unfortunately, this pattern were later on copied in all other ADC
drivers in the source tree.
This commit adds the proper lock releasing in all the affected drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-17 16:58:21 -05:00
Andrzej Głąbek
6e1dede197 tests: drivers: adc: Add a test case for invalid requests handling
This commit adds a test case checking if ADC drivers can work properly
after discarding an invalid sampling request.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-17 16:58:21 -05:00
Andrzej Głąbek
49c41d36ef tests: drivers: adc: Revert inappropriate changes
Apart from normal customizations of vendor specific parameters in ADC
configuration used in the test, a few more changes in test cases were
also introduced in commit 1bfa34f4fb.
This resulted in some parts of ADC API (like zero interval between
consecutive samplings) not being tested at all. This commit restores
the original behavior of the test cases (with added comments that
zero intervals are intentional).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-17 16:58:21 -05:00
Andrzej Głąbek
026904f7f6 tests: drivers: adc: Remove needless inputs definitions
Currently only nRF drivers need assignments of analog inputs to ADC
channels (ADC_CONFIGURABLE_INPUTS Kconfig option is activated only for
these drivers). Hence, there is no need to define ADC_xxx_CHANNEL_INPUT
labels for any other ADC driver as they will be ignored anyway.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-17 16:58:21 -05:00
Andrzej Głąbek
7c52bf9d0c drivers: adc: nrfx: Correct log module name in adc_nrfx_adc.c
Due to a copy-paste mistake, this driver used an incorrect module
name (adc_mcux_adc16) in log messages.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-17 16:58:21 -05:00
Andrew Boie
dfeed647f5 printk: fix printing 64-bit hex values
These were being truncated to 32-bits, and only 8
hex digits were supported.

An extraneous printk() at the beginning of the test
which was not being tested in any way has been removed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-01-17 14:59:03 -06:00
Jakub Rzeszutko
f2c03280f2 shell: documentation update
1. Update shell documentation according to proposals in
PR #12437 (Extend shell meta keys).
2. Fix lines exceeding 80 characters limit.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-01-17 15:45:28 -05:00
Kumar Gala
5431762769 sensor: fxos8700: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert fxos8700 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-17 13:29:46 -06:00