Commit graph

44530 commits

Author SHA1 Message Date
Peter A. Bigot
16a4081520 kernel: timer: update _timeout API for const correctness
API that takes _timeout structures but doesn't change data in them is
updated to const-qualify the underlying object, allowing information
to be retrieved from contexts where the containing object is
immutable.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-10-02 11:29:14 +02:00
Gerard Marull-Paretas
e390105b0f boards: arm: adafruit_feather_nrf52840: use dual mode for QSPI NOR
Right before #28631 was merged the writeoc/readoc settings were ignored,
so the flash was actually working in single line mode. In turns out that
quad mode can't be used with this flash without setting the QE bit in
the status register, so until this is supported fall back to dual mode.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-02 11:28:17 +02:00
Kiril Petrov
8100a4a7c8 lwm2m_client: update README.rst to include OpenThread info
Update README.rts to include OpenThread info.

Signed-off-by: Kiril Petrov <retfie@gmail.com>
2020-10-02 09:22:29 +03:00
Kiril Petrov
39231ef490 lwm2m_client: add working config for OpenThread
It's copy of openthread conf from samples/net/sockets/echo_client,
but requires increasing of main stack size to avoid crash.
Also fixes building if CONFIG_LWM2M_DTLS_SUPPORT is enabled #28787.

Signed-off-by: Kiril Petrov <retfie@gmail.com>
2020-10-02 09:22:29 +03:00
Torsten Rasmussen
d1268206cf llvm: use bintools/gnu/target_bintools.cmake
Fixes llvm inclusion of gnu/target_bintools.cmake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-10-01 22:35:39 -04:00
Aastha Grover
83b9f69755 code-guideline: Fixing code violation 10.4 Rule
Both operands of an operator in the arithmetic conversions
performed shall have the same essential type category.

Changes are related to converting the integer constants to the
unsigned integer constants

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2020-10-01 17:13:29 -04:00
Marcin Niestroj
fc67409291 sanitycheck: ignore coverage directories by matching any in path hierarchy
So far 'tests' and 'samples' directories were matched only when they
were first directories in path hierarchy. This doesn't work when running
sanitycheck from directory other than Zephyr source code root.

Match any directory in path hierarchy, similar how file is matched
currently. That way sanitycheck can be executed from outside of Zephyr
source code directory.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-10-01 17:11:34 -04:00
Marcin Niestroj
b536fc416a sanitycheck: add optional --coverage-basedir argument
Add '--coverage-basedir BASEDIR' argument, which can be used to specify
source code base directory other than default Zephyr root directory.

This is mainly useful for projects built on top of Zephyr, where
sanitycheck is used for unit testing application code.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-10-01 17:11:34 -04:00
Martí Bolívar
49fdfd4f39 doc: west: changes for v0.8
Track changes in the APIs and CLIs for this release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-01 20:47:53 +02:00
Martí Bolívar
b593087734 doc: west: API doc cleanups
Use italics more consistently when referring to parameters by name.
Make the ImportFlag members appear.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-01 20:47:53 +02:00
Martí Bolívar
f6e90fce87 doc: west: add missing 0.7.x docs
I neglected to update the release notes when cutting these. Whoops.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-01 20:47:53 +02:00
Tomasz Bursztyka
2b6c574499 arch/x86: If ACPI is enabled, get the CPU APIC ID from it
The hardcoded APIC ID will be kept as default if the CPU is not found in
ACPI MADT.

Note that ACPI may expose more "CPUs" than there actually are
physically. Thus, make the logic aware of this possibility by checking
the enabled flas. (Non-enabled CPU are ignored).

This fixes up_squared board made of Celeron CPU.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-10-01 11:16:40 -07:00
Tomasz Bursztyka
d98f7b1895 arch/x86: Optimize ACPI RSDP lookup
As well as normalizing its signature declaration through header.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-10-01 11:16:40 -07:00
Tomasz Bursztyka
4ff1885f69 arch/x86: Move ACPI structures to header file
Let's have all specified ACPI structures in the central header.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-10-01 11:16:40 -07:00
Tomasz Bursztyka
9ce08544c5 arch/x86: Fix style issue and code logic in ACPI
Trivial changes.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-10-01 11:16:40 -07:00
Tomasz Bursztyka
c7787c623e arch/x86: Cleanup ACPI structure attributes names
No need to mix super short version of names with other structures
having full name. Let's follow a more relevant naming where each and
every attribute name is self-documenting then. (such as s/id/apic_id
etc...)

Also make CONFIG_ACPI usable through IS_ENABLED by enclosing exposed
functions with ifdef CONFIG_ACPI.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-10-01 11:16:40 -07:00
Emil Gydesen
0be8a91a73 Bluetooth: host: Add NULL checks for scan callbacks
The scan callbacks may be NULL, which would cause an error if
e.g. the timeout callback wasn't set and the scan terminates after
a timeout.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2020-10-01 13:57:53 -04:00
NavinSankar Velliangiri
c98d9a678c board: arm: disco_l475_iot1: Add four more adc pins
Add four more adc pins

Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
2020-10-01 13:56:10 -04:00
Peter Bigot
88e756e05e kernel: document interrupt behavior of k_cpu_atomic_idle
The generic kernel API did not specify the effect of the call on the
interrupt lockout state.  The implementation forwards to
arch_cpu_atomic_idle() which does document that the state is restored
to the state specified in the passed key, which makes it have the
effect of invoking irq_unlock(key).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-01 18:45:08 +02:00
Erwan Gouriou
e4e60a4a0f boards: nucleo_f103rb: Configure serial console pins using dt
usart2 pin configuration is now done through device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
346d2ab92f drivers/uart: stm32f1: Add remap support for dt configured pinctrl
On stm32f1 series, device pinctrl configuration could be modified
thanks to remapping capability.
Remapping allows to provide alternate pinctrl configuration to a
peripheral device and applies to all impacted pins.

So, specifically for stm32f1 series, apply remapping when required
before proceeding with pin configuration.
Additionally, because remapping is defined individually for each pin,
apply a function on pinctrl configuration to check remapping setting
coherency accorss pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
f100e2c09e drivers/pinmux: stm32f1: Update dt to gpio encoding function
Based on pinmux data encoded in dt bindings some stm32f1 post
processing is required to eventually fit into data structures
expected in gpio_stm32_configure function.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
0f95e31e7e soc: stm32f1: Update DT macros for dt pinctrl support
ST_STM32_PINCFG requires slight modification to support
encoding pincfg structure from pinctrl dt bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
1ef4c1ba7a dts: stm32f1: Use series specific compat for pinctrl
stm32f1 series pin controller IP is not compatible with other stm32
series.
Set the dedicated st,stm32f1-pinctrl compatible for pinctrl node.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
029d749446 include/dt-bindings: Add include binding for st,stm32f1-pinctrl
Add header to allow use of STM32F1_PINMUX macros described
for st,stm32f1-pinctrl binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
c534bbaafa dts/bindings: Add yaml binding for st,stm32f1-pinctrl
Provide yaml bindings for st,stm32f1-pinctrl copmpatible.
It differs from generic stm32 pinctrl bindings on the following points:
- Pinmux "function" parameter: Alternate, General output, Input, Analog
- Pinmux supports an additional "remap" parameter to encode potential
remapping configuration
- Bias configs only apply to input modes
- Drive and speed configs only apply to output modes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
b023dbe8b3 include/dt-bindings/pinctrl: stm32f1: No pull-up/down on output mode
On stm32f1 series, in output mode, there is no way to enable
pull-up/down resistors.
Clean these settings from helper defines.

Additionally add helper define to shorten few lines.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
e45757ffb1 include/dt-bindings/pinctrl: stm32: Move non F1 compatible definitions
Macro STM32_PINMUX and related definitions are not compatible with
stm32f1 series and then should not be provided in -common.h.
Move them to stm32-pinctrl.h

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
e9eec5a5d1 include/dt-bindings/pinctrl: stm32: Rename stm32-pinctrlf1
Rename header file stm32-pinctrlf1.h to more appropriate
stm32f1-pinctrl.h

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
531af45b38 cmake: dts: Remove duplicated "Remove duplicates"
"Remove duplicates" step was duplicated.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
55f79d95f7 boards: disco_l475_iot1: Move usart1 pins configuration to device tree
Convert only this node to test and demonstrate flexibility.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
f39e229844 west.yml: Update hal_stm32 to host -pinctr.dtsi
Use hal_stm32 to host stm32 -pinctrl.dtsi files (>800 files)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
252a623ca2 drivers/serial: stm32: Enable use of dt pinctrl as serial signals
When available, use dt pinctrl to configure a variable number of
serial signals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
d1afd83df0 drivers/pinmux: stm32: provide dt pinctrl to gpio driver interface
Provides tool set to be used by device drivers in order to be able
to configure device signals.
This does not involve the implementation of a dedicated pinctrl
driver. In this regard, this is equivalent to implementation used
for treatment of current pinmux.c files.

Since STM32F1 uses a different GPIO configuration scheme, its
support is exlcuded for now.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
ccd6b72bc0 drivers/serial: stm32: Fix indentation in STM32_UART_INIT
Looks better this way

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
b48ba090e4 include/dt-bindings: stm32: provide stm32-pinctrl-common.h binding
Provide stm32-pinctrl-common.h matching st,stm32-pinmux binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
14be1f3cd7 dts/bindings: stm32: provide st,stm32-pinctrl binding
Remove unused st,stm32-pinmux binding.
Provide st,stm32-pinctrl binding, equivalent to Linux stm32 one.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
b9e59b5e9d drivers/pinmux: stm32: minor fixes
Update stm32_pin_configure prototype to use more appropriate
unsigned arguments
Additionally, fix documentation for z_pinmux_stm32_set function

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
2223d7b4fc dts: stm32: Rename compatible st,stm32-pinmux to st,stm32-pinctrl
Rename compatible st,stm32-pinmux to st,stm32-pinctrl to better
reflect the nature of upcoming child nodes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Carlo Caione
871bdd0712 arch: arm64: Deprecate booting from EL2
We are deprecating booting and running in EL2.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-01 10:42:47 -04:00
Carlo Caione
fb2bf23ec1 arch: arm64: Remove EL2/EL3 code
Zephyr is only supposed to be running at EL1 (+ EL0). Now that we drop
in EL1 from ELn at start we can remove all the EL2/EL3 unused code.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-01 10:42:47 -04:00
Carlo Caione
7d40208ef7 arch: arm64: Remove CONFIG_SWITCH_TO_EL1
Remove the useless CONFIG_SWITCH_TO_EL1 since there should be no reason
to run Zephyr in EL3. So just drop to EL1 by default when booting from
EL3. Remove also non-reachable code.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-01 10:42:47 -04:00
Carlo Caione
46b42e347f boards: qemu_cortex_a53: Start in EL3
No need anymore to start QEMU in EL1. Start directly from EL3 and let
the code drop to EL1 like it would happen on a real hardware.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-01 10:42:47 -04:00
Jan Pohanka
74dbcfebab drivers: wifi: fix simplelink driver to use zsock_ functions
This fix removes dependency on CONFIG_POSIX_API
or NET_SOCKETS_POSIX_NAMES.

Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>
2020-10-01 17:35:45 +03:00
Jan Pohanka
91adf41dd4 net: sockets: tls: fix using of zsock_ functions
Use zsock_ variants of socket functions to be independent on
NET_SOCKETS_POSIX_NAMES config.

Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>
2020-10-01 17:35:45 +03:00
Jan Pohanka
9e5dc213cb net: mqtt: fix tests to use zsock_ functions
Use zsock_ variants of socket functions in mqtt tests.

Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>
2020-10-01 17:35:45 +03:00
Jan Pohanka
c737cca7be net: mqtt: fix sample to use zsock_ functions
Use zsock_ variants of socket functions in mqtt sample application.

Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>
2020-10-01 17:35:45 +03:00
Jan Pohanka
fff28ad8ae net: mqtt: use zsock_ functions
Using zephyr's internals zsock_ calls make mqtt library more compatible,
now it does not depend on NET_SOCKETS_POSIX_NAMES.

Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>
2020-10-01 17:35:45 +03:00
Erwan Gouriou
ee3dab3082 boards: nucleo_l552ze_q_ns: Use dts flash partitioning.
Provide device tree flash partition in order to configure
and flash non secure binary.
Flash partitioning depends on TFM configuration and use case,
so it is provided as an overlay in the sample it is used.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 15:43:28 +02:00
Lingao Meng
f16c653be9 Bluetooth: Mesh: Move Replay Protect to seperate module
Move RPL to seperate module, and remove it in `bt_mesh`
structure.

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2020-10-01 16:20:24 +03:00