Commit graph

46098 commits

Author SHA1 Message Date
Francois Ramu
da614fccd6 dts: dma : stm32 soc with dmamux has a special offset
The offset value in the dma config is required when the
soc has dmamux like the stm32wb series

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-11-19 17:04:25 -05:00
Francois Ramu
720863217d drivers: dma : stm32 with dmamux has a special offset
This new offset value in the dma config is made to
build the table of dma mux_channels with a dmamux.
Range depends on the nb of channels for selected dma instance

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-11-19 17:04:25 -05:00
Jakub Pegza
19a93a3c68 boards: arm: nordic: Update DTS for nrf21540
Update nrf21540 DTS to support FEM configuration and update other pins
according to te board datasheet

Signed-off-by: Jakub Pegza <Jakub.Pegza@nordicsemi.no>
2020-11-19 17:02:00 -05:00
Katsuhiro Suzuki
2b42efeb8e dts/bindings: Add binding for riscv,clint0
Currently there is no binding for RISC-V Core-Local Interruptor.
This patch add a simple binding.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2020-11-19 17:00:46 -05:00
Jose Alberto Meza
387e3e4477 drivers: peci: xec: Enhance PECI bus recovery mechanism
Perform FIFO flush in write failure case
Perform full PECI HW block reset if multiple consecutive
failures are observed
Remove trailing \n from logging messages

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-11-19 17:00:16 -05:00
Maksim Masalski
c7a5c406b7 doc: timing docs fix misprint
Fix misprint that causes wrong display of the API function name
in the documentation.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-11-19 16:59:47 -05:00
Paul Sokolovsky
9fa33f27e1 tests: socket: tcp: Add test for ENOTCONN behavior
A socket which didn't undergo completed connect() or accept() calls
should react with ENOTCONN to recv() call. This test checks both
a freshly created socket ("client" one) and a socket in LISTEN
state ("server").

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-11-19 16:58:37 -05:00
Paul Sokolovsky
d29fcb8187 net: sockets: recv() on unconnected stream socket should lead to ENOTCONN
Because unoconnected stream socket doesn't have any chance to receive
any data, so a blocking recv() would hang forever on it (and does
without this change).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-11-19 16:58:37 -05:00
Martin Åberg
e15297e7d9 cmake: Preparation for SDK 0.12 and SPARC
Zephyr SDK version 0.12 is distributed with SPARC cmake target support,
while version 0.11.3 and 0.11.4 need target.cmake from the Zephyr repo.

This commit has been tested with:
- zephyr-sdk-0.11.3 (currently used in CI)
- zephyr-sdk-0.11.4
- zephyr-sdk-0.12.0-beta-2

This commit is expected to be compatible with
- zephyr-sdk-0.12.0 (not yet released)

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-19 16:57:37 -05:00
Anas Nashif
f8a45863ed CODEOWNERS: populate entry for kernel docs
Add owners for kernel docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-19 13:18:59 -05:00
Anas Nashif
80e471dbd9 doc: kernel: clarify object limits
Clarify that while any number of kernel objects can be created, there is
a limit which is set by the available RAM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-19 13:18:59 -05:00
Katsuhiro Suzuki
76b3a50e7f logging: add padding for RISC-V 64bits environment
This patch add padding in filter structure of log system.
In RISCV && 64BIT environment. Log system is facing alignment bug.

struct log_source_dynamic_data {
	uint32_t filters;
};

static inline uint32_t *log_dynamic_filters_get(uint32_t source_id)
{
	return &__log_dynamic_start[source_id].filters;
}

A sizeof(log_source_dynamic_data) = 4, address offset of
&__log_dynamic_start[] are:
  - &__log_dynamic_start[0]: +0
  - &__log_dynamic_start[1]: +4
  - &__log_dynamic_start[2]: +8

But RISCV 64bit gcc/ld places each log_dynamic_log, log_dynamic_os
and log_dynamic_test per 8bytes alignment. So address offset of
log_dynamic_* are:
  - &log_dynamic_log : +0
  - &log_dynamic_os  : +8
  - &log_dynamic_test: +16

tests/subsys/logging/log_core cannot set correct log filters in
RISCV && 64BIT environment, so test is always going to fail.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2020-11-19 12:46:35 -05:00
Katsuhiro Suzuki
0a6918d064 dts: riscv32-fe310: add missing clint properties
RISC-V clint is an interrupt controller but it has no required
properties (#interrupt-cells and interrupt-controller).
This patch just adds missing properties.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2020-11-19 12:45:14 -05:00
Tomasz Wojno
a43db40da3 Samples: Fix printf in MPU6050 example
Removed whitespaces in format specifiers.

Signed-off-by: Tomasz Wojno <tomek.wojno@gmail.com>
2020-11-19 12:37:30 -05:00
Peter Bigot
bce3a70ec5 regulator: check manager init for failure
Use the return value to verify success when assertions are enabled.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-19 12:36:44 -05:00
Simon Glass
129cfec28a emul: spi: bmi160: Add a check for a missing rx buffer
If a read is requested without a read buffer, the emulator currently
crashes. Fix this by adding a check.

Fixes: #29703
Fixes: #29702
Fixes: #29017
Fixes: #29016

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-19 11:26:32 -06:00
Alexandre Bourdiol
4c15611f42 doc: guides: debugging: host-tools.rst: typo PATH
On Windows, environment variable to update is PATH

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-11-19 11:14:13 -06:00
Gerson Fernando Budke
6cf9af4af4 boards: arm: sam4l_ek: Enable twim tests
Enable TWIM tests and update hardware table documentation.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-19 10:52:49 -06:00
Gerson Fernando Budke
bc00f19724 drivers: i2c: Introduce SAM4L i2c TWIM driver
The SAM4L have a unique I2C driver.  It shares simultaneously pins for
both master and slave controllers.  Each controller have their own
instance.  This introduces the TWIM controller that handles only the
master part.

The TWIM controller uses no copy and the driver was prepared to work
with both 7 and 10 bits address.  The controller can handler up to 256
bytes for a single transfer allowing long data communication with
almost no CPU intervention.

The driver was wrote specifically to Zephyr.  It receives a transfer
list of from upper layers to a specific device on the bus.  It programs
the first and second transfer, if it exists, before start.  At end of
full read/write interrupt, will program the next data block.  This
process repeats until all transfers be executed.  The driver uses
interrupt from TWIM to check for erros or program next tranfer.

Future work can enable low power mode on the driver allowing long
transfers with low power consumption.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-19 10:52:49 -06:00
Gerson Fernando Budke
2d3ef0c902 dts: i2c: Add atmel sam TWIM controllers
Add Atmel SAM I2C Two-wire Master Interface (TWIM).  The SAM
i2c controller have specifics regs depending of operation mode
Master/Slave and the bindings are for Master only.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-19 10:52:49 -06:00
Alexander Kozhinov
f1d7455201 boards: arm: nucleo_h745zi_q: openocd.cfg
enable and test connect under reset
  with onboard ST-LINK V3 debugger and OpenOCD

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-19 10:36:45 -06:00
Keith Packard
1201bd6418 xtools: Select correct ARM architecture for xtools
Just like the zephyr SDK code, the xtools toolchain needs to select
aarch64-zephyr-elf instead of arm-zephyr-eabi for the target triple when
building for 64-bit ARM processors.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-11-19 10:32:35 -06:00
Jukka Rissanen
753412bd23 net: tcp2: Fix llvm issue when printing mss
llvm uses wrong int type for some reason, force cast to uint16_t

Fixes #29997

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-19 10:56:26 -05:00
Kamil Kasperczyk
414ba6b074 include: net: Fix incorrect casting of timeval on zsock_timeval.
Currently zsock_timeval implementation uses long type for both
tv_sec and tv_usec fields. In the select method timeval type is
directly casted on zsock_timeval, but in some cases (e.g. when
using CONFIG_POSIX_API and some specific libc version) both types
have fields of different sizes, what may lead to assigning them
incorrect values.
Using types declared by the used libc in the CONFIG_POSIX_API=y
case will let to keep timeval and zsock_timeval types compatible.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-11-19 15:08:33 +02:00
Christian Taedcke
7dc047e30a boards: nucleo_f429zi: Fix arduino header pin D4
The gpio port of D4 on the arduino header was incorrect and is now
corrected to PF_14.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-11-19 12:40:20 +01:00
Joakim Andersson
34e66db776 Bluetooth: host: Fix different endian in comparison
Fix the debug key-set comparison for debug keys comparing the
generated key in big-endian format against the debug private
key in little-endian format.

Fix this by converting the private key to big-endian format for
convenience.

Use the _be suffix for all variables to make the mixing of the
endian formats easier to read.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-11-19 12:40:13 +01:00
Peter Bigot
73d416a572 dts: binding-template: document conditions for use of default values
The YAML binding allows for a default which is used to substitute a
value if one is not explicit in the devicetree source.  This feature
is mis-used when defaults are provided that are likely to be
incorrect.

Document concerns with the use of default and provide guidance for
when it can be used, what to do when it shouldn't, and noting the need
to explain the source of the default in the binding documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-19 12:38:33 +01:00
Nicolas Pitre
e4e5e01101 tests/unit/cbprintf: test %p with NULL and justification
Make sure the "(nil)" string is properly aligned.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-11-19 12:37:42 +01:00
Nicolas Pitre
0e9a37161e tests/unit/cbprintf: rationalize the code a bit
Factor out the CONFIG_CBPRINTF_LIBC_SUBSTS exception.
Remove redundant lines and obsolete comment.
Make some code pattern more consistent.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-11-19 12:37:42 +01:00
Peter Bigot
c1b0cf8ec6 lib: cbprintf: work around LLVM code generation bug
LLVM building for qemu_x86 appears to have an optimization bug where a
union that is assigned to hold values read from va_args() is inferred
to be a constant value, so is placed in ROM with an all-zero content.

Prevent this by packing the conversion state and the value union into
a single container structure that's stack allocated.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-19 12:37:33 +01:00
Robin-Charles Guihéneuf
f0250d5c71 lvgl: kscan: Only process prev state if it has been updated
When no message was get from kscan_msgq queue, the prev state
(x/y point) was processed as a new state. During process its
coordinates could be inverted or modified, depending on the
LVGL_POINTER_KSCAN_SWAP_XY, LVGL_POINTER_KSCAN_INVERT_X,
LVGL_POINTER_KSCAN_INVERT_Y or display orientation configuration.
In these cases, it could cause wrong input data.

Signed-off-by: Robin-Charles Guihéneuf <robin-charles@hotmail.fr>
2020-11-19 12:36:31 +01:00
Emil Gydesen
deac6d73c5 Bluetooth: controller: Removes guards ull_adv_sync_*
Two ull_adv_sync function declarations, ull_adv_sync_reset and
ull_adv_sync_init was guarded by a #if causing CI issues.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2020-11-19 12:36:23 +01:00
Emil Gydesen
6b72bed967 Bluetooth: Controller: Add common ULL ticker stop with mark function
The same code block for marking an object with
ull_disable_mark, stopping the ticker and then unmarking
the object appeared multiple places; often with a regression
bug where instead of unmarking it in case of error, it would
be "remarked".

This commit fixes the bug, and moves the functionality to
a common function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2020-11-19 12:36:14 +01:00
Emil Gydesen
071db25f66 Bluetooth: Controller: Adds missing ull_disable in ll_sync_terminate
A call to `ull_disable` was missing in the function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2020-11-19 12:36:14 +01:00
Shihao Shen
90f0a1d6af samples: drivers: add platform filtering for led pwm
The sanity check on this sample gives timeout failure
on reel board because of bad filtering. Because the
sample does not adopt ztest framework, sanitycheck in
our daily test will report this as failure, which lowers
our passrate but this is not a sample with errors.

Signed-off-by: Shihao Shen <shihao.shen@intel.com>
2020-11-19 12:36:03 +01:00
Alexander Kozhinov
ad5b7be929 boards: arm: stm32h747i_disco: doc: images
add images for board ethernet modification
add index.rst Ethernet HW modifications description

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-19 12:35:22 +01:00
Alexander Kozhinov
6d10ca0879 boards: arm: stm32h747i_disco: rng
add rng driver support

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-19 12:35:22 +01:00
Alexander Kozhinov
bc6835ba50 boards: arm: stm32h747i_disco: ethernet
add ethernet driver support

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-19 12:35:22 +01:00
Harry Jiang
c37a0897f6 boards: nucleo_h743zi: Add SPI support
Add SPI1 support on the Arduino R3 connector

Signed-off-by: Harry Jiang <explora26@gmail.com>
2020-11-19 12:35:12 +01:00
Harry Jiang
de729882a0 drivers: spi: spi_ll_stm32: Fix the master mode not work.
On the STM32MP1 and STM32H7 Series SoC, if slave select pin control by
software on master mode operation, the SS input/output polarity (SSIOP)
should be set to high level avoid the mode fault (MODF) error.

Signed-off-by: Harry Jiang <explora26@gmail.com>
2020-11-19 12:35:12 +01:00
Harry Jiang
85e0e21390 drivers: spi: spi_ll_stm32: Add support for STM32H7xx SoC
Add SPI driver support for STM32H7xx SoC.

Signed-off-by: Harry Jiang <explora26@gmail.com>
2020-11-19 12:35:12 +01:00
Harry Jiang
d0058d92db dts: arm: st: h7: Add SPI nodes to STM32H7xx SoC
Add the SPI nodes to STM32H7xx Series Soc

Signed-off-by: Harry Jiang <explora26@gmail.com>
2020-11-19 12:35:12 +01:00
Erwan Gouriou
6c7380183e drivers/bluetooth: ipm_stm32: Wake up C2 at init
When C2 is powered on, flash erase/write operation requires C1
to share a flash mutex with C2. This can only be done if IPM
communication is set up (SHCI).
Instead of configuring C2 (BLE controller) at on ble open,
do it at driver start up.
This allows flash operations before ble_open.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-19 12:35:01 +01:00
Stefan Bigler
596cad8231 spi: fix locking for SPI_LOCK_ON using synchronous API
Keep locking for SPI_LOCK_ON from the first call of transceive until
spi_release release the lock. Use owner parameter to in the spi_context
to store the owner of the lock.
The locking is in line with the SPI_HOLD_ON_CS

Signed-off-by: Stefan Bigler <stefan@bigler.io>
2020-11-19 12:34:44 +01:00
Markus Becker
638b5f389f net: openthread: OpenThread RCP mode integration into Zephyr
* Add RCP library.
* Conditionally remove non required libraries not required for RCP.
* Drop :option: marker for CONFIG_OPENTHREAD_NCP_SPINEL_ON_UART_ACM

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-11-19 12:34:14 +01:00
Lingao Meng
65395f30ec Bluetooth: Mesh: Fixes pb-adv segment recv
Wrong use of function `find_msb_set(~link.rx.seg)`,
uint8_t type is implicitly converted to uint32_t.
As a result, it always returns 32 instead of the
expected value, resulting in abnormal processing
of prov segment.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2020-11-19 13:28:28 +02:00
Lingao Meng
9cd34f8675 Bluetooth: Mesh: Fixes prov string log dump
Missing log_strdup around the string.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2020-11-19 13:28:28 +02:00
Lingao Meng
109d6d4d8c Bluetooth: Mesh: Fixes wrong prov pointer clear
The structure pointer was wrongly cleared before,
`bearer` and `role` in `bt_mesh_prov_link` structure
resulting in illegal pointer access.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2020-11-19 13:28:28 +02:00
Ilya Averyanov
d262b064a2 Bluetooth: shell: fix compilation
phy2str also used when CONFIG_BT_USER_PHY_UPDATE not only
when CONFIG_BT_OBSERVER

Signed-off-by: Ilya Averyanov <a1ien.n3t@gmail.com>
2020-11-19 13:28:06 +02:00
Lingao Meng
88f8c735a7 Bluetooth: Mesh: Fixes missing set virtual addr
Fixes missing virtual address set

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2020-11-19 13:23:48 +02:00