Commit graph

41120 commits

Author SHA1 Message Date
Johann Fischer
3ee09abfff shields: add link board ETH
Add link board ETH.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Johann Fischer
4309030ea8 boards: reel_board: add arduino spi, uart and i2c nodes
Add arduino spi, uart and i2c nodes.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Johann Fischer
d8d7782790 drivers: eth: add driver for ENC424J600 Ethernet Controller
Add driver for ENC424J600 Ethernet Controller.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Jukka Rissanen
117d385de8 tests: net: socket: register: Fix unit tests when proto == 0
Make sure the tests pass properly if the socket() is called
with proto 0.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-12 11:22:45 +03:00
Jukka Rissanen
2f8f5fdd33 net: socket: Set default protocol if proto == 0
If proto field in socket() call is set to 0, then we should have
a sane default for it that depends on the type of the socket.

Fixes #18873

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-12 11:22:45 +03:00
Jukka Rissanen
e182f31b9e net: Add IPPROTO_RAW as it was missing
The IPPROTO_RAW is used as a default for SOCK_RAW when protocol
is not set in socket() call.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-12 11:22:45 +03:00
Andrew Boie
6fd6b7e50a xtensa: remove legacy arch implementation
We re-wrote the xtensa arch code, but never got around
to purging the old implementation.

Removed those boards which hadn't been moved to the new
arch code. These were all xt-sim simulator targets and not
real hardware.

Fixes: #18138

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 01:26:34 -04:00
Marti Bolivar
f15648ee9d west.yml: point civetweb at the zephyrproject-rtos GH fork
We don't want to point anything outside of the Zephyr GitHub
organization. Let's point at the recently created zephyr fork instead.

Details on how this will be managed going forward, according to
standard project policy:

https://docs.zephyrproject.org/latest/guides/modules.html

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-12 12:07:48 +08:00
Andy Ross
643701aaf8 kernel: syscalls: Whitespace fixups
The semi-automated API changes weren't checkpatch aware.  Fix up
whitespace warnings that snuck into the previous patches.  Really this
should be squashed, but that's somewhat difficult given the structure
of the series.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Andy Ross
075c94f6e2 kernel: Port remaining syscalls to new API
These calls are not accessible in CI test, nor do they get built on
common platforms (in at least one case I found a typo which proved the
code was truly unused).  These changes are blind, so live in a
separate commit.  But the nature of the port is mechanical, all other
syscalls in the system work fine, and any errors should be easily
corrected.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Andy Ross
346cce31d8 kernel: Port remaining buildable syscalls to new API
These calls are buildable on common sanitycheck platforms, but are not
invoked at runtime in any tests accessible to CI.  The changes are
mostly mechanical, so the risk is low, but this commit is separated
from the main API change to allow for more careful review.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Andy Ross
4723def90d tests/kernel/mem_protect/syscalls: Add cases to test 64 bit arguments
Add some simple tests of the new code generation for syscalls with 64
bit arguments.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Andy Ross
6564974bae userspace: Support for split 64 bit arguments
System call arguments, at the arch layer, are single words.  So
passing wider values requires splitting them into two registers at
call time.  This gets even more complicated for values (e.g
k_timeout_t) that may have different sizes depending on configuration.
This patch adds a feature to gen_syscalls.py to detect functions with
wide arguments and automatically generates code to split/unsplit them.

Unfortunately the current scheme of Z_SYSCALL_DECLARE_* macros won't
work with functions like this, because for N arguments (our current
maximum N is 10) there are 2^N possible configurations of argument
widths.  So this generates the complete functions for each handler and
wrapper, effectively doing in python what was originally done in the
preprocessor.

Another complexity is that traditional the z_hdlr_*() function for a
system call has taken the raw list of word arguments, which does not
work when some of those arguments must be 64 bit types.  So instead of
using a single Z_SYSCALL_HANDLER macro, this splits the job of
z_hdlr_*() into two steps: An automatically-generated unmarshalling
function, z_mrsh_*(), which then calls a user-supplied verification
function z_vrfy_*().  The verification function is typesafe, and is a
simple C function with exactly the same argument and return signature
as the syscall impl function.  It is also not responsible for
validating the pointers to the extra parameter array or a wide return
value, that code gets automatically generated.

This commit includes new vrfy/msrh handling for all syscalls invoked
during CI runs.  Future commits will port the less testable code.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Ioannis Konstantelias
1846fc600f tests: drivers: watchdog: Update testcase
After the window watchdog introduction, the boards that support it over
independent watchdog fail to pass this test. This patch adds specific
tests for the nucleo_{f401re, l496zg} boards supporting WWDG.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Ioannis Konstantelias
e8b0f5644f samples: drivers: watchdog: Handle watchdog event
Also modified to timeout to 1000ms in order to support watchdogs like
WWDG with smaller timeouts.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Ioannis Konstantelias
4bda345685 boards: arm: nucleo_{f401re, l496zg}: Enable WWDG
Added support for System Window Watchdog.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Ioannis Konstantelias
414e4d30a0 drivers: watchdog: stm32: Add implementation for WWDG
Added drivers for System Window Watchdog of STM32 platform.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Ioannis Konstantelias
f9152adc81 soc: stm32: Add fixups for WWDG EWI and clock info
Extended the WWDG fixups to support early wake interrupt handling and
clock information.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Ioannis Konstantelias
1db2685b57 dts: stm32: Add WWDG in STM32 dtsi files
Added System WWDG support for STM32 devices.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Charles E. Youse
ee525c2597 arch/x86: inline x2APIC EOI
From the Jailhouse days, this has been a function call. That's silly.
We now inline the EOI in the ISR when in x2APIC mode. Also clean up
z_irq_controller_eoi(), so it now uses the inline macros.

Also, we now enable x2APIC on up_squared by default.

Fixes: #17133

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-12 09:53:45 +08:00
Charles E. Youse
155853b39c subsys/testsuite/coverage: move initialization vector to RODATA
The .init_array vector is, in fact, read-only data, so put it there.

Previously it was placed at the end of the ROM, but was unknown to
the x86 memory protection code with XIP enabled (because it was not
part of the text, rodata, or kernel RAM). Until recently, the XIP
implementation artificially bloated _image_rodata_size to cover the
entire ROM, so the (mis)placement of .init_array went unnoticed.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-12 09:53:34 +08:00
Charles E. Youse
8a2624c106 arch/x86: linker.ld: do not pad _image_rom_end when XIP
This appears to be leftover from the days when we generated
more memory protection data at build time.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-12 09:53:34 +08:00
Andrew Boie
9df9994572 x86: fix XIP SOC support and defaults
XIP support in x86 was something of a mess. This
patch does the following:

- Generic ia32 SOC no longer defines a "flash" region
  as generic X86 devices don't have a microcontroller-
  like concept of flash. The same has been done for apollo_lake.
- Generic ia32 and apollo_lake SOCs starts memory at 1MB.
- Generic ia32 SOC may optionally have CONFIG_XIP enabled.
  The board definition must provide a flash region definition
  that gets exposed as DT_PHYS_LOAD_ADDR.
- Fixed definitions for RAM/ROM source addresses in ia32's
  linker.ld when XIP is turned off.
- Support for enabling XIP on apollo_lake SOC removed, there's
  no use-case.
- acrn and gpmrb boards have flash and XIP related definitions
  removed.
- qemu_x86 has a fake flash region added, immediately after system
  RAM, for use when XIP is enabled. This used to be in the ia32 SOC.
  However, the default for qemu_x86 is to now have XIP disabled.
- Fixed tests/kernel/xip to run by default on boards that enable
  XIP by default, plus an additional test to exercise XIP on
  qemu_x86 (which supports it but has XIP switched off by default)

The overall effect of this patch is to:

- Remove XIP configuration for SOC/boards where it does not make
  any sense to have it
- Support testing XIP on qemu_x86 via tests/kernel/xip, but leave
  it off by default for other tests, to ensure it doesn't bit-rot
  and that the system works in both scenarios.
- XIP remains an available feature for boards that need it.

Fixes: #18956

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-11 21:11:38 -04:00
Kumar Gala
702325ddb2 boards: Add arduino_gpio & and arduino_i2c to board supported
Update a number of boards that have arduino_gpio and arduino_i2c
support in their dts files to show that they support that in the
board.yaml file.  This allows coverage on several shield tests that
utilize the tags 'arduino_gpio' and 'arduino_i2c'.

Exlucde stm32mp157c_dk2 from some of the samples right now since the
connector on the board doesn't support A2/A3.  Also remove the duplicate
of exluding disco_l475_iot1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
Kumar Gala
2ef86c9e00 samples: shields: x_nucleo_iks01a2: Depend on arduino_gpio
There are build issues with this sample now that it requires that the
board dts have an arduino_header node.  Add depends_on: arduino_gpio
to sample.yaml so we only build this if the board has that header.

Also remove a duplicate line for excluding the disco_l475_iot1 platform.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
Kumar Gala
e0a2086d9e samples: shields: x_nucleo_iks01a3: rename arduino_header depend
Change arduino_header depend to arduino_gpio as that is more meaningful.
Its easy to mistake arduino_header to mean the board has an arduino
header in general.  What we want to depend on is that we have the gpio
connector in the dts that has 'arduino_header' as the node label.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
Kumar Gala
57b10d0922 dts: nxp: ke1xf: Introduce nxp,kinetis-ke1xf-sim
The KE1xF SoC family SIM unit differs from the other Kinetis family
SoCs.  Add a unique compatiable and binding for it.

Fixes #18160

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:18:35 -05:00
Kumar Gala
55e250b654 sys: dlist: remove deprecated sys_dlist_insert_{before,after}
sys_dlist_insert_before and sys_dlist_insert_after have been deprecated
for at least 2 releases.  We can now remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:18:20 -05:00
Kumar Gala
d758919d48 sys: ring_buffer: remove deprecated sys_ring_buf_*
sys_ring_buf_* hasbeen deprecated for at least 2 releases.  We can now
remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:18:04 -05:00
Kumar Gala
874c35b509 i2c: Remove deprecated functions
We've had a number of API functions for I2C marked as deprecated for 2
releases.  We can now remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:17:46 -05:00
Filip Brozovic
3fe53db5cb boards: arm: frdm_k82f: add support for the NXP FRDM-K82F board
Add support for the NXP FRDM-K82F development board. This board
features an NXP MK82FN256VLL15 CPU, a user RGB LED and two buttons,
two 32 Mb QSPI flashes, Arduino R3 compatible headers, and a FlexIO
header.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Filip Brozovic
2a2113e966 drivers: i2c: mcux_i2c: add instances 2 and 3
Adds instances 2 and 3 to the mcux i2c shim driver.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Filip Brozovic
1fd4ec9577 drivers: i2c: mcux_i2c: add instance initialization macro
Use a macro instead of repeating the initialization code
for each i2c instance.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Filip Brozovic
8d36defbe2 boards: arm: mimxrt1015_evk: enable lpuart4 only if BT_UART is enabled
Since lpuart4 is enabled by default on mimxrt1015_evk but not configured
in the device tree, this leads to a build error after adding the
instance to the lpuart driver. Adjust the mimxrt1015_evk to be the same
as other mimxrt evk boards and enable the lpuart only if BT_UART is
enabled.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Filip Brozovic
e464e98067 drivers: serial: Add instance 4 to mcux lpuart shim driver
Adds instance 4 to the mcux lpuart shim driver.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Filip Brozovic
38125b8b49 soc: arm: k8x: add NXP Kinetis K8x SoC series support
Add initial support for the NXP Kinetis K8x SoC series (MK80F25615
and MK82F25615).

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Filip Brozovic
a63b759598 west.yml: update hal_nxp revision to support Kinetis K8x
Update hal_nxp revision in order to add support for Kinetis
K8x series SoCs

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Joris Offouga
0e038bc6d7 boards: arm: Add support for Pico-Pi i.MX7D board
This patch is to add support for the Pico-Pi board which has an i.MX7D
Dual SoC.
The Zephyr is running on the Cortex M4 core and the following features
were validated on this board:

* UART: Zephyr console

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
2019-09-11 08:47:53 -05:00
Joris Offouga
ccd6bf1d07 soc/mcimx7_m4: Add i.MX7 Dual Kconfig SoC partnumber define
Adds the proper Kconfig entries for the i.MX7D partnumber presented
on Pico-pi board.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
2019-09-11 08:47:53 -05:00
Jukka Rissanen
b14856589e tests: net: getaddrinfo: Logging was missing log_strdup() call
A call to log_strdup() was missing which caused tests to fail if
logging was enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-11 16:17:42 +03:00
Jukka Rissanen
8108f06113 tests: net: getaddrinfo: Resolve using wrong address family
Make sure that resolving IPv4 address but returning IPv6 address
(and vice versa) is failing and we catch that scenario.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-11 16:17:42 +03:00
Jukka Rissanen
06d101e4b1 net: dns: Check family before returning results
If we are returned IPv4 address but the hints says IPv6, then
return error as currently we do not support AI_V4MAPPED addresses.
Same check for IPv6 if we want only IPv4 address.

Fixes #18870

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-11 16:17:42 +03:00
Paul Sokolovsky
fb4e1da114 modules: Kconfig.tls-generic: Add CONFIG_MBEDTLS_ECDSA_DETERMINISTIC
From mbedTLS's description:

Enable deterministic ECDSA (RFC 6979).
Standard ECDSA is "fragile" in the sense that lack of entropy when
signing may result in a compromise of the long-term signing key. This
is avoided by the deterministic variant.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-11 15:02:48 +02:00
Ulf Magnusson
2845d8f404 scripts: edtlib: Make order irrelevant when including multiple files
When foo.yaml set some property 'required: true' and bar.yaml set the
same property 'required: false', the check for changing
'required: false' to 'required: true' would raise an error for

    include: [bar.yaml, foo.yaml]

(with that particular order due to implementation details).

The order files are included in shouldn't matter. To fix it, change the
logic so that 'required' values are ORed together between included files
(so that 'required: true' is always respected), and remove the
'required' true-to-false check when merging included files.

Keep the true-to-false check when merging the (merged) included files
into the main binding (the binding with the 'include:' in it). This
might give a good organization, and the old scripts do it too.

Piggyback two fixes/cleanups:

 - 'compatible' should be allowed to appear in included files

 - No need to allow an 'inherits' key in _check_binding(), because
   it has been removed before then, when merging bindings

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-11 07:50:30 -05:00
Mohamed ElShahawi
bcd9e49f3f drivers: esp32: UART - use dts config for HW flow Control
- dts updated for UART1/2
- Additional check added to _INIT macro to configure flow control mode
- Additional check added to _INIT macro to set CTS/RTS gpios values
- Additional check added for gpio config

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Mohamed ElShahawi
2fa48c879a dts: uart: move hw-flow-control to uart.yaml
- hw-flow-control added to uart.yaml as it is a common feature
- cleanup other related yaml files
- change property 'category' to 'rquired' in yaml files

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Mohamed ElShahawi
0705be344c drivers: esp32: UART Fix yaml/dts binding name
replace "xtensa" with "espressif", as the latter is the correct
vendor name.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Mohamed ElShahawi
2d035c4191 drivers: esp32: Add UART Driver with FIFO/Interrupt support
- Fixes #3981
- Implement UART Polling functions
- Implement UART Interrupt APIs
- Remove dependency on esp32_rom_uart_xxx functions
- Update Device tree with UART addresses and pin config
- Update ESP32 UART KConfig

Notes about implementation:
- Interrupts now defined as a local macros, and should be removed
later on, when interrupts for esp32 are supported in dts

- Threshold interrupts are used for TX/RX
- Reseting FIFOs using _RST bit will corrupt FIFO of UART2 when used for
UART1 and vice-versa, so a generic way is used for all three UARTs

- Old Silicon rev is not supported

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Trond Einar Snekvik
056d44f905 Bluetooth: Mesh: Remove special stack config
Removes the special stack config setting in the Bluetooth Mesh sample to
allow it to run with other Bluetooth controllers.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-11 14:04:16 +03:00
Trond Einar Snekvik
827a852acf Bluetooth: Mesh: Same config for all nrf51_qfaa boards in sample
Renames the nrf51_blenano config file to something generic and uses that
same config for the nrf51_ble400 board, which has the same constraints.

Cannot rely on the CONFIG_SOC_NRF51_QFAA variable, as the CONF_FILE
variable must be set before the boilerplate.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-11 14:04:16 +03:00