Commit graph

99049 commits

Author SHA1 Message Date
Marcin Szymczyk
e4c447aac3 usb: add SoF event
Start of Frame events can now be accessed from USB classes.
This will be useful when implementing idle rate functionality.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-11-23 09:18:41 -05:00
Gil Pitney
0d222025d6 doc: boards: cc3220sf_launchxl: Add notes on secure socket offload
Reference working sockets example http_get, and add reference
to SimpleLink Certificate Handling.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-11-23 09:16:21 -05:00
Gil Pitney
9991bcb4c5 net: samples: sockets: http_get: Add secure socket offload support
Update the http_get sockets sample to enable association of secure
tags with certificate filenames.

This allows certificates and keys to be provisioned to the file
system on secure flash, without having to include the actual
certificates in the application.

Validated on the cc3220sf_launchxl board.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-11-23 09:16:21 -05:00
Gil Pitney
c51cf1e463 drivers: wifi: simplelink: Implement setsockopt() for TLS offload
Implements setsockopt() for the socket offload driver
to process the TLS tags sent in via the Zephyr setsockopt() API,
when CONFIG_NET_SOCKETS_SOCKOPT_TLS is chosen.
For each tag, the credential filenames are retrieved and
set via SimpleLink's sl_SetSockOpt() API.

Also, creates a new KConfig option for TLS_CREDENTIAL_FILENAMES.
This new option is used by apps/protocols to add TLS credentials
via filenames referring to the actual content stored on a secure
file system or flash.

Handles the IPPROTO_TLS_* socket protocol families in the
socket() offloaded API.

This was validated on the cc3220sf_launchxl with the http_get sockets
sample, with the globalsign_r2.der file loaded to secure flash via
the TI Uniflash tool, and using the TI Catalog of known good
root CA's.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-11-23 09:16:21 -05:00
Kumar Gala
582e676248 dts: arc: emsk: Remove emsk_dt.h and CONFIG options from dtsi
There are different interrupt numbers for R22 v R23.  Before this was
being handled via using Kconfig symbol CONFIG_BOARD_EM_STARTERKIT_R23 in
emsk_dt.h.  Since we want to remove use of Kconfig in dts we handle this
via different dtsi files and having the proper one included by the
proper board revision dts file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-23 09:13:55 -05:00
Kumar Gala
8d92653f26 dts: arc: emsk: Remove DT_APB_CLK_HZ from emsk_dt.h
As we want to remove emsk_dt.h we just fold the DT_APB_CLK_HZ into the
emsk.dtsi.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-23 09:13:55 -05:00
Kumar Gala
7feb430b38 dts: arc: emsk: Remove DT_{I,D}CCM_SIZE from emsk_dt.h
Towards removing Kconfig from DTS we need to move setting of the sizes
of ICCM/DCCM into the SoC specific DTS files and out of emsk_dt.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-23 09:13:55 -05:00
Ravi kumar Veeramally
b848f8f9c5 net: rpl: Remove __deprecated tag to one function
net_rpl_get_interface() function which returns always NULL is
defined if NET_RPL is not enabled. so remove deprecated tag to
this particular function. Otherwise it will cause unnecessary
compilation warnings.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-11-23 09:10:23 -05:00
Andrei Emeltchenko
4e21f0651a samples: mesh_badge: Update project config
Add CONFIG_BT.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-23 09:10:01 -05:00
Andrei Emeltchenko
76beaf6c1c reel_board: Do not include Bluetooth to every project
Including Bluetooth to every project unnecessary increase size of the
project, for example hello world sizes:

Memory region         Used Size  Region Size  %age Used
           FLASH:       48492 B         1 MB      4.62%
            SRAM:       11236 B       256 KB      4.29%
        IDT_LIST:         136 B         2 KB      6.64%

after the patch:

Memory region         Used Size  Region Size  %age Used
           FLASH:       13344 B         1 MB      1.27%
            SRAM:        4004 B       256 KB      1.53%
        IDT_LIST:          72 B         2 KB      3.52%

3+ times difference.
PS: It also crashes when 802.15.4 enabled.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-23 09:10:01 -05:00
Johann Fischer
aee6764c32 drivers: ssd1673: fix SPI GPIO CS configuration
Use DT_SSD1673_SPI_GPIO_CS_DRV_NAME for CS configuration.

Resolves: #10720

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-11-23 08:39:20 -05:00
Krzysztof Chruscinski
2d6a226b2e logging: Fix lost printk output when no newline
Log_output module was always postfixing printk strings
with '\r'. If printk message did not ended with '\n'
it lead to last printk message being overwritten.

Fixed by adding '\r' only when string was ended by '\n'.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-22 19:18:41 -05:00
Anas Nashif
e4505892bc boards: add docs for quark_se_c1000_devboard
Add documentation for the quark_se_c1000_devboard with links to platform
guidelines and other details.

Fixes #11166

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-22 15:10:47 -05:00
Anas Nashif
8f807946b1 boards: quark_d2000_crb: fix board name
Fixed typo in documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-22 15:10:47 -05:00
Aurelien Jarno
ae20f807da soc: same70: enable data cache on sam_e70
The Cortex-M7 CPU included in the SAM e70 SoCs has a data cache that
significantly boost the performances. However the SAM GMAC Ethernet
driver is using a scatter-gather technique to exchange data with the
Ethernet driver. This requires the use use of a non-cached memory area.
This is currently not supported on Zephyr, but support for it is being
discussed in PR#11199.

In the meantime, enable the data cache during the SoC initialization,
unless the SAM GMAC Ethernet driver is enabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-22 13:17:14 -05:00
Aurelien Jarno
b53c6c1fe3 soc: same70: enable instruction cache on sam_e70
The Cortex-M7 CPU included in the SAM e70 SoCs has an instruction cache
that significantly boost the performances. Enable it during the SoC
initialization.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-22 13:17:14 -05:00
Aurelien Jarno
532550cba1 drivers/i2s_sam_ssc.c: enable cache support
Enable cache operations before starting a DMA operation if the CPU has a
cache. All the support was already in place, it just needs to be
enabled.

With the previous commits, it allows the I2S tests to pass on a SAM E70
Xplained board with the CPU cache enabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-22 13:16:42 -05:00
Aurelien Jarno
a3a3383387 tests/i2s: align memory slabs to 32 bytes
The memory slabs used for I2S are used through DMA. In case the CPU has
a cache, we need to ensure minimum alignment so that an entire number of
cache lines can be cleaned or invalidated.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-22 13:16:42 -05:00
Krzysztof Chruscinski
96a610b736 shell: Fix log messages queueing for multiple instances
Shell log backend was using k_fifo to enqueue log messages.
It was using field in log message that was used for same
purpose in log_core before passing message to backends.
However, this method supported only single shell as
other shell was corruption the fifo because field was
reused.

Modified shell log backend to use k_msgq for pending
messages.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-22 13:14:49 -05:00
Paul Sokolovsky
45b1d73164 drivers: serial: uart_cmsdk_apb: Ack IRQs before callback to avoid races
This effectively reverts part of earlier 49bb163756 which moved
interrupt acknowledgement until after return from the user callback.
This was done confusing the flow of this driver with how some other
drivers do it, where pending interrupt status is checked by
uart_irq_rx_ready()/uart_irq_tx_ready(), which should be called by
the callback. But the uart_cmsdk_apb driver actually uses different
hardware register in these functions. And acking IRQs after user
callback can lead to race condition and losing an IRQ, and the
simple fix in this case is just move acknowledgement to where it
was before.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-11-22 13:14:19 -05:00
Paweł Zadrożniak
55674d8e17 drivers: usb: nordic: change USBD driver locking scheme
Nordic USB driver shim uses nrfx_usbd driver from nrfx package.
The driver was protected by a semaphore during every transfer
to prevent access from multiple threads at the same time.
This leads to the problem when a class schedules transfer on one
endpoint before host asks for the data (to be sent later) - driver
is locked and other endpoints (including control EP) are blocked.
Currently, only driver calls are wrapped with semaphore without
waiting for the transfer to complete, allowing scheduling transfers
on different endpoints. This is allowed bu nrfx_usbd, however
shim prevents user from scheduling multiple transfers on one
EP (required by nrfx_usbd).

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-11-22 13:13:16 -05:00
Anas Nashif
7a85c19f1a ci: update to latest docker image
Added the Pillow module for dealing with fonts for the display
subsystem.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-22 12:17:19 -05:00
Armando Visconti
a33474673d CODEOWNERS: Add @avisconti as maintainer
Add @avisconti as maintainer for following stuff:

- ArgonKey board
- STM32 I2S driver
- ST motion sensor drivers

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-11-22 12:16:57 -05:00
Luiz Augusto von Dentz
6798a421e1 Bluetooth: GATT: Ensure GATT service is registered first
Accourding to Bluetooth specification the Service Changed
Characteristic shall not have its handle changed once it has been
bonded, so this moves the GATT service to be the very first service
registered that way it is guaranteed that it won't change even if
device is flashed with a different configuration which end up changing
the handles after it.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-22 17:27:48 +02:00
Ravi kumar Veeramally
19c598f081 net: coap: Deprecate net_pkt based CoAP library
Deprecating net_pkt based CoAP library due to Socket based
CoAP library.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-11-22 09:08:46 -05:00
Anas Nashif
3d906dc4c1 net: coap: Move both CoAP implementations into one Kconfig
Two separate folders and Kconfig options causing confusion on
CoAP and CoAP_SOCK implementations. This patch simplifies it.
Current CoAP Kconfig option moved to COAP_NET_PKT.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-22 09:08:46 -05:00
Ravi kumar Veeramally
7d0aecfc2a net: rpl: Deprecate RPL
RPL support has been deprecated from Zephyr.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-11-22 09:01:04 -05:00
Christian Taedcke
90473af3cb ext: gecko: Update Silabs Gecko HAL to v5.6.1
Origin: Silicon Labs Gecko SDK
URL: https://www.silabs.com/products/development-tools/software/simplicity-studio
Version: v5.6.1
Purpose: Add support for Silicon Labs EXX32 SoCs
License: Zlib
Maintained-by: External

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-11-22 07:57:19 -06:00
Mieszko Mierunski
1bfa721373 drivers: nrf: nrf uarte fix TX interrupts disabling.
Make sure that TX interrupts are disabled after transmission
is finished.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-22 14:06:01 +01:00
Mieszko Mierunski
ad7c15c77b drivers: nrf: Fix nrf uarte fifo_fill function.
Calling fifo_fill function from uart_nrfx_uarte in the same
interrupt more than once, would break previous transmission.

Following fix adds checking if previous data was sent, and
if not, returns 0.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-22 14:06:01 +01:00
Mariusz Skamra
474b2b3e94 Bluetooth: Don't mask ECDH related events if CONFIG_BT_ECC disabled
It is related to b904ad387f.
This fixes checking ECDH related events in event mask.
If ECDH support is disabled in host, there is no need to check
if those are supported in the controller.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-11-22 12:54:57 +02:00
Jakub Rzeszutko
b7a5874830 tests: shell: migrate tests to the new shell
Testing:
1. Shell built-in commands.
2. Wildcards module.
3. Static commands creation and execution.
4. Dynamic commands creation and execution.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-11-22 11:32:29 +01:00
Jakub Rzeszutko
200da3acaa test: unittest: run for 32bit architecture
Running tests compiled for 64bit architecture were causing errors
in logger module. Updated unittest.cmake to build tests only
for 32bit architecture.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-11-22 11:32:29 +01:00
Piotr Mienkowski
970aef2905 kernel: ensure System Power Managment enables Tickless Idle.
System Power Management is only supported in Tickless Idle mode.
This patch modifies Kconfig dependencies to ensure System Power
Management option selects Tickless Idle one.

Fixes: #11046

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-11-21 23:16:35 -05:00
Krzysztof Chruscinski
af973ca1e9 shell: enable UART backend without interrupts
Currently shell UART backend is interrupt driven if UART driver
is interrupt driven. That can be limitation if one instance
wants to use interrupts but shell UART should not.

Added option to shell uart to be able to control use of
interrupts. By default interrupts are enabled if driver
supports it.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-21 22:41:21 -05:00
Bobby Noelte
9cf8b3cd20 sanitycheck: fix false passed on localized error message
Fix false passed on localized error message in make invocation.

Fixes #8348

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-21 20:04:19 -05:00
Oleg Kapshii
133f9c4885 boards: arm: Updated Cypress PSoC6 cy8ckit_062_wifi_bt_m0 doc
Added description how to build, programm and see console output of
hello_world example on cy8ckit_062_wifi_bt_m0 board.

Signed-off-by: Oleg Kapshii <oleg.kapshii@cypress.com>
2018-11-21 20:03:16 -05:00
Marti Bolivar
5ec7ed8bbf arch: suspend CONFIG_SOC's doomsday
This option is useful to have for a flatter hierarchy for one-off SoCs
that aren't split into family and series from the silicon vendor
perspective.

The commit saying it was going to go away is from 2 years ago; it
hasn't happened and it doesn't seem to need to happen. Just delete it.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-11-21 18:37:46 -05:00
Kumar Gala
0916659fb7 adc: remove adc_ti_adc108s102.h
When we removed the adc108s102 driver we missed adc_ti_adc108s102.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 18:06:11 -05:00
Kumar Gala
c256949bae dts: adc: cleanup CONFIG_ADC_x_NAME
All of the cases of CONFIG_ADC_x_NAME should be DT_ADC_x_NAME.
So go ahead and fix them up.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 18:05:39 -05:00
Kumar Gala
d4983db515 dts: adc: cleanup CONFIG_ADC_x_IRQ_PRI
All of the cases of CONFIG_ADC_x_IRQ_PRI should be DT_ADC_x_IRQ_PRI.
So go ahead and fix them up.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 18:05:39 -05:00
Kumar Gala
c167789d20 adc: adc_intel_quark_d2000: Pass 0 for IRQ Priority
The Interrupt Controller on the Quark D2000 doesn't support irq priority
to just pass 0 in the for the priority instead of CONFIG_ADC_0_IRQ_PRI.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 18:05:39 -05:00
Andrei Emeltchenko
240b25e5da usb: testusb: Add README to the sample
The readme mostly combined from the PR #7435

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-21 18:04:32 -05:00
Kumar Gala
77149642f6 driver: wifi: eswifi: Fix how we get SPI bus
We were hard coding the SPI bus name to "SPI_3".  Instead we should use
DT_INVENTEK_ESWIFI_ESWIFI0_BUS_NAME as its generated from the device
tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 16:01:13 -05:00
Kumar Gala
9f88c0d471 driver: wifi: eswifi: Use DT_ prefixed names
The driver was using the straight alias generated defines, however we
want to use DT_ prefixed defines so its clear that the values are coming
from DT.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 16:01:13 -05:00
Vikrant More
227c1b28b3 samples: mesh: nrf52: make all transition timer dependent
This commit will take back changes made by previous commit
i.e. fad8ff39c3.

This is beacause k_sleep() based delay is not behaving as
expected while testing & take more time than expected.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-11-21 22:23:18 +02:00
Gil Benkö
28580ab2e8 boards: arm: Add support for Silicon Labs EFM32PG-STK3402A
The EFM32 Pearl Gecko Starter Kit contains sensors and
peripherals demonstrating the usage of the EFM32PG MCU
family. This patch adds basic support for this board
and is copied from EFM32WG-STK3800.

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-11-21 13:42:26 -06:00
Gil Benkö
563af20134 drivers: gpio_gecko: Use emlib API for compatibility
This ensures compatibility with Silicon Labs EXX32 MCU Series 1.

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-11-21 13:42:26 -06:00
Gil Benkö
1f6425b1d8 arm: exx32: Add Silabs EFM32PG12B soc files
The Silicon Labs EFM32 Pearl Gecko MCU includes:

         * Cortex-M4F core at 40MHz
         * up to 1024KB of flash and 256KB of RAM
         * multiple low power peripherals

Ported from EFM32WG:
https://www.silabs.com/documents/public/application-notes/an0918.0-efm32_to_efm32jgpg_migration_guide.pdf

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 13:42:26 -06:00
Christian Taedcke
4466460be4 ext: gecko: Add workaround in em_emu.h
For the EFM32PG12B, the define _EMU_EM23PERNORETAINCTRL_VDAC0DIS_MASK
is not availabe. This commit guards its usage with ifdefs.
This might be a bug in the gecko SDK or some version incompatibility
in the used files.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2018-11-21 13:42:26 -06:00