Commit graph

95529 commits

Author SHA1 Message Date
Erwan Gouriou 7c6cf201e0 boards: stm32: add button and leds gpio definitions
Provide led and button nodes to stm32 based boards.
Provide matching zephyr aliases.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 13:36:45 -05:00
Erwan Gouriou 4fe3a9776f dts: gpio: create gpio dt-bingings and inlude in stm32 dtsi files
Create a dt-bindings/gpio.h file.
Bindings definitions are extracted from existing gpio.h.
gpio dt-bindings file is required because existing gpio.h file could
not be parsed by dts parser.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 13:36:45 -05:00
Erwan Gouriou 2b4cb5a7ad dts: provide yaml bindings for led and gpio keys
Provide yaml bindings for led and gpio keys (buttons).
These are based on gpio bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 13:36:45 -05:00
Erwan Gouriou 6c92e55635 dts: bindings: add bindings for stm32 gpio
Provide yaml bindings for gpio nodes properties generation

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 13:36:45 -05:00
Andrzej Głąbek f2177bfb8e tests: net: Make "app" tests dependent on netif
This will prevent building these tests for boards not supposed to run
a TCP/IP stack, particularly 96b_carbon_nrf51 where test-with-dns
would not fit into 32 kB of RAM.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-13 17:04:16 +02:00
Andrzej Głąbek 1d27d27a06 boards: 96_carbon_nrf51: Update SPI driver default configuration
Update names of the configuration entries so that the new nRF SPIS
driver can be used on this board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-13 17:04:16 +02:00
Andrzej Głąbek 5991cea137 drivers: spi: Add missing periods in Kconfig.nrfx
Quite a few sentences in help descriptions and comments were not ended
with periods.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-13 17:04:16 +02:00
Andrzej Głąbek ecd081115a drivers: spi: Add shim for nrfx SPIS driver
This adds a translation layer to make the nrfx driver for the nRF SPIS
(SPI Slave with EasyDMA) peripheral accessible via the Zephyr's API.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-13 17:04:16 +02:00
Tomasz Bursztyka ffb2bcbb4d drivers/spi: Slave async calls require recv frames as successful status
Synchronous call return them on success, asynchronous one - with proper
signal - require to get this info through the status.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-13 16:02:03 +02:00
Tomasz Bursztyka 1143606ce9 drivers/spi: Fix context lock behavior
- removing a left over from previous SPI slave attempt
- unlock async calls on error

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-13 16:02:03 +02:00
Erwan Gouriou 93318f9f00 yaml: rename cell_string clocks
Use capital letters, as this seems to be the norm for this field

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 09:01:25 -05:00
Erwan Gouriou 1aa123d05d arm: nucleo_f103rb: Do not enable PWM by default
The test "net/utils" fails to build on nucleo_f103rb
due to "region `SRAM' overflowed by 8 bytes.

Disabling PWM at the board level to build the test.

Moreover, according to issue #6858, we will only configure
board valuable HW and connectors on board level and the
user should enable what is needed on application level.

Reported-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 09:01:04 -05:00
Erwan Gouriou 50bf306f4f dts: stm32: Populate gpio nodes for stm32l0 series
Introduce gpio nodes in stm32l0 dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Erwan Gouriou a78adcdd91 dts: stm32: Populate gpio nodes for stm32l4 series
Introduce gpio nodes in stm32l4 dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Erwan Gouriou a4c426abcb dts: stm32: Populate gpio nodes for stm32f3 series
Introduce gpio nodes in stm32f3 dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Erwan Gouriou dbc3c02452 dts: stm32: Populate gpio nodes for stm32f1 series
Introduce gpio nodes in stm32f1 dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Erwan Gouriou 8e5cf5fe8f dts: stm32: Populate gpio nodes for stm32f0 series
Introduce gpio nodes in stm32f0 dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Erwan Gouriou e7ab1d306b dts: stm32: Populate gpio nodes for stm32f4 series
Introduce gpio nodes in stm32f4 dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Erwan Gouriou 708b59b9aa dts: stm32: stm32f469 is a stm32f429 derivative
Make stm32f469.dtsi file inherit from stm32f429.dtsi

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 08:56:47 -05:00
Anas Nashif a534aa6a6e CODEOWNERS: update owners
Update posix, usb and power subsystem owners.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-13 08:30:18 -05:00
Ruslan Mstoi 2563c373c3 net: ipv6: Fix crash from NULL fragment pointer access
This commit fixes crash from dereferencing NULL pointer to pending
fragment in net_pkt_get_len.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2018-04-13 15:40:20 +03:00
Jukka Rissanen be6bf29363 syslog: net: Fix multiple network interface selection for IPv4
In IPv4 we need to select the network interface, where the packet
is to be sent, using the IPv4 address instead of default network
interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-13 08:29:44 -04:00
Jukka Rissanen a91c46ffde net: app: Select local IP address properly if multiple interfaces
If we have multiple network interface (like in VLAN), then we need
to select the proper local interface based on destination address.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-13 08:29:44 -04:00
Jukka Rissanen 2bb179b7e1 net: shell: Use correct network interface for IPv4 ping
Instead of always using default interface, use the IPv4 target
address to select the correct network interface when sending
IPv4 ping request.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-13 08:29:44 -04:00
Jukka Rissanen da8af39302 net: if: Add helper to select src interface for a IPv4 dst addr
If we have multiple network interfaces and we want to send
a IPv4 network packet to certain destination, then this new
helper can be used to figure out what network interface to use.

Note that this commit only adds support to select the correct network
interface according to destination IPv4 address. This does not enable
any automatic routing to happen.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-13 08:29:44 -04:00
David B. Kinder 5e9f7cb27a doc: fix misspellings in Kconfig files
occasional spelling-check scan found some misspellings

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-13 08:28:57 -04:00
Andrzej Głąbek 5976afe91f drivers: spi: Correct a typo in spi_nrfx_spi.c
Introduced with the commit 7a9c4cbd9d,
by copy-pasting from "spi_nrfx_spim.c". Shame on me...

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-13 10:26:28 +02:00
Ulf Magnusson 9c032eb14d boards/arduino101: Enable UART 0 controller
boards/x86/arduino_101/arduino_101_defconfig currently enables
CONFIG_UART_QMSI_0_HW_FC (HW flow control on UART 0), but doesn't enable
CONFIG_UART_QMSI_0 (the UART itself), which is a direct dependency.

This means CONFIG_UART_QMSI_0_HW_FC remains disabled despite the request
to enable it, and kconfig.py prints a warning.

Enable CONFIG_UART_QMSI_0 in the arduino_101_defconfig.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-12 17:55:46 -05:00
Iván Sánchez Ortega 05f02bd038 docs: group the GPIO_* flags into logical groups.
Aesthetical changes to the documentation about GPIO flags - group
them together, add some headers, some minor markup and wording
modifications.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-04-12 17:54:20 -05:00
Sebastian Bøe c1aa9d16e9 cmake: Fix CONFIG_CUSTOM_LINKER_SCRIPT
Specifying a custom linker script is supposed to be supported through
Kconfig, but evidently this has been unused and 100% broken at least
since the CMake migration.

This commit fixes
https://github.com/zephyrproject-rtos/zephyr/issues/6983

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-04-12 18:31:33 -04:00
Henrik Brix Andersen 8c5b16cc79 drivers: flash: atmel sam0: Fix compilation without page layout support
The sam0 flash driver has support for retrieving flash page layout
information.  This commit fixes compilation when
CONFIG_FLASH_PAGE_LAYOUT is disabled.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-04-12 17:26:54 -05:00
Leandro Pereira 1f45f79d61 tests: mempool: Add overflow checks
Test for overflow in k_malloc() and k_calloc().

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-12 14:27:24 -07:00
Leandro Pereira 85dcc97db9 kernel: mempool: Always check for overflow in k_calloc()
Assertions should never be used to test for error conditions, such as
checking for overflows.  It should only be used to test for invariants.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-12 14:27:24 -07:00
Leandro Pereira b902da3599 kernel: mempool: Check for overflow in k_malloc()
If a large size is requested, the expression `size += sizeof(...)`
might overflow, leading to a small block being requested and returned
by k_malloc().

Use a GCC builtin to trap the overflow and return NULL in this case.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-12 14:27:24 -07:00
Anas Nashif c7f5cc9bcb license: fix spdx identifier in a few files
Use correct SPDX identifier for Apache 2.0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-12 15:19:51 -04:00
Rajavardhan Gundi 3c8b3875c6 tests: kernel: threads: Additional tests for set_priority
Added some additional tests for setting priority of threads.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-04-12 14:21:43 -04:00
Andrzej Głąbek 7a9c4cbd9d drivers: spi: Align nrfx_spi shim with the nrfx_spim one
Similar parts of code are aligned in the two shims, so that they
can be easily compared and updated if required.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-12 14:19:53 -04:00
Andrzej Głąbek 998c79d09b drivers: spi: Add shim for nrfx SPIM driver
This adds a translation layer to make the nrfx driver for the nRF SPIM
(SPI Master with EasyDMA) peripheral accessible via the Zephyr's API.
The shim is provided only for nRF52840 because of a hardware anomaly
present in nRF52832. See Anomaly 58 (SPIM: An additional byte is clocked
out when RXD.MAXCNT = 1) in Errata for this chip.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-12 14:19:53 -04:00
Andrzej Głąbek 397e52f099 arch: nrf52: Correct the number of IRQs in nRF52840
The old value does not cover the IRQ assigned to the SPIM3 peripheral.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-12 14:19:53 -04:00
Andrzej Głąbek ea1d14e529 hal: nordic: Move nrfx IRQ related stuff from SPI shim to nrfx_glue
The simple function that helps to integrate nrfx IRQ handlers with
the IRQ_CONNECT macro can be used in shims for various nrfx drivers,
not only the SPI one.
Similarly, the macro for getting the IRQ number from the peripheral
base address needs to be widely available. It should be even moved
to <nrfx_common.h> in some next nrfx update.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-04-12 14:19:53 -04:00
Sebastian Bøe 88b66b58b1 doc: getting_started: Make it more obvious how to follow the guide
Several users have reported confusion about whether one should stop at
the 'Using MSYS2' guide, or continue following the guide.

To resolve this we title the three options as Option 1,2,3, and change
the wording of the second guide to make it clear that it is an
alternative, not an additional step.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-04-12 14:18:31 -04:00
Andrei Emeltchenko a660fcb315 doc: Add USB documentation identifiers and links
Add nicer looking links to sections and correct section name.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-12 14:03:00 -04:00
Andrei Emeltchenko 556e5329a6 doc: Make code consistent lowering case
Lowering case for consistency.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-12 14:03:00 -04:00
Andrei Emeltchenko 5e9563ab8b doc: usb: Move USB sections to USB Stack
At the moment "USB Vendor and Product identifiers" is hanging
inside "Subsystem" section.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-12 14:03:00 -04:00
Tomasz Bursztyka c995bfe7e6 net/wifi: Add a shell module for controlling WiFi devices
This module exposes for now the net mgmt for WiFi: connect, disconnect
and scan commands.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-12 09:56:07 -04:00
Tomasz Bursztyka eab3f168fd net/mgmt/wifi: Add dedicated net mgmt hooks for WiFi offload devices
Exposing connect, disconnect and scan for now.

In case the iface is an instance of a WiFi offload device, the way it
manages scanning, connecting and disconnecting will be specific to that
device (not the mgmt interface obviously). In such case the device will
have to export relevantly a dedicated bunch of function to serve the
mgmt interface in a generic way.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-12 09:56:07 -04:00
Gil Pitney 17b923ae3c net: wifi: Add a wifi.h to hold WiFi definitions
Placeholder to hold generic WiFi definitions.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-04-12 09:56:07 -04:00
Tomasz Bursztyka 8b839b4e0c drivers/wifi: Add files skeleton for adding WiFi drivers
This will help not to collide within drivers implementations and/or
avoid dependency from one driver to another one.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-12 09:56:07 -04:00
Tomasz Bursztyka dc81659bc5 net/wifi: Select dependencies to get wifi mgmt working
Wifi mgmt interface will be required by offloaded wifi device drivers
therefore when selecting this interface, make sure dependencies are
selected too.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-12 09:56:07 -04:00
Patrik Flykt 7bde51d86a net/mgmt: Add initial WiFi management API definitions
Add empty WiFi network management functions that only return -ENETDOWN.
Define management handlers for scan, connect and disconnect requests,
again without any implementation nor parameters defined.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-12 09:56:07 -04:00