Commit graph

56703 commits

Author SHA1 Message Date
Glauber Maroto Ferreira
fb1632925e soc: esp32: partial code standardization
Replaces the prefixes of gpio_matrix_in and gpio_matrix_out
to unify those function calls on all supported socs.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-10 14:52:41 -04:00
Peter Mitsis
e231d50535 tracing: fix k_thread_abort tracing references
Fixes undefined references to sys_port_trace_k_thread_abort_enter()
and sys_port_trace_k_thread_abort_enter().

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-08 17:33:40 -04:00
Kumar Gala
80981dc489 boards: arm: nxp: Add pinctrl-names
Add "pinctrl-names" property for "default" to all NXP kinetis
based boards.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-10-08 10:28:37 -05:00
Francois Ramu
41833951b0 dts: arm: stm32u5 fix register address for spi3 node
this commit is correcting the address of the spi3 bank

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-08 08:32:52 -05:00
Andrzej Głąbek
165c14dc60 drivers: pwm_nrfx: Fix handling of zero length periods
When the driver was called to set the period length for a channel
to 0, it set the COUNTERTOP register in the PWM peripheral to 0,
what resulted in an undefined behavior of the peripheral (and lack
of the STOPPED event sometimes).
The PWM API does not precise how should a zero length period be
handled; some drivers return the -EINVAL error in such case, some
do not. This patch fixes the pwm_nrfx driver so that it does not
change the previously used COUNTERTOP register value when the period
length is set to 0, and because the pulse cycles are always limited
by the driver to period cycles (so 0 in this case), in result the
relevant channel is simply deactivated. This allows users to switch
off a channel by requesting the pulse width to be set to 0 without
providing a non-zero period in such call.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-10-08 13:06:40 +02:00
Tim Lin
41c9b71450 ITE: soc: add cpu idle task
Implement the CPU idle task. The system should enter this task when
there is no any task to ensure power saving.

Tested on it8xxx2_evb board. It will reduce 12.5mA when system enters
the CPU idle task.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-10-08 13:01:06 +02:00
Pieter De Gendt
d5520f2e59 debug: coredump: flash backend: fix header if stream erase
If CONFIG_STREAM_FLASH_ERASE is set, a page erase is done before
writing the coredump header to the flash. If the flash page erase size
is larger than the flash write size this results in erasing part of
the coredump data.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-10-08 13:00:57 +02:00
Pieter De Gendt
1dc74d70f2 debug: coredump: flash backend: fix stream API data size
The stream api initialization for the coredump flash backend used an
incorrect size.

This commit subtracts the header size.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-10-08 13:00:57 +02:00
Sylvio Alves
06a624f2a3 soc: esp32: add west debug support
This adds west debug support for ESP32
and ESP32S2 boards using custom openocd tool.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-08 12:59:55 +02:00
Sylvio Alves
49bcc08033 openocd: add hardcoded configs as input parameters
Debugging ESP32 SoCs is not possible if the commands
halt, target and load are enabled by default.
This MR allows this configs to be used as input parameters.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-08 12:59:55 +02:00
Piotr Pryga
39c535fef8 Bluetooth: controller: Make per adv filtering by CTE cond compilable
The filtering of periodic advertisements by scanner may be not needed
in certain situations e.g. while use of periodic advertising by BT ISO.
To make the code smaller and avoid execution of not needed code the
functionality will be conditionally compilable. It may be enabled
or disabled by use of CONFIG_BT_CTLR_SYNC_PERIODIC_CTE_TYPE_FILTERING
Kconfig option.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
b61101144a tests: Bluetooth: bsim_test_iso: Change wait time in BIG receiver
The receiver and transmitter in the test are synchronized by
use of sleep functions. The change in handling of periodic
advertising synchronized event caused missmach in waiting
times. Receiver is notified about established synchronization
later that it was in the past. Due to that the wait for end
of transmitter operation was too long.

Temporary fix for the problem is decrease of receiver sleep
time by one periodic advertising interval.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
e03f9c3042 Bluetooth: controller: Add per sync filt by CTE type for SOC w/o DFE
First implementation of periodic advertising sync filtering
requires existence of Direction Finding Extension in Radio
peripheral.
To add the filtering support for other Nodric SOCs software
based PDU traversing for CTEInfo should be implemented.

In case there is no DFE in Radio peripheral, actual filtering
is done in ULL.

The commit provides necessary changes to previous solution.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
fba51111cf samples: Bluetooth: df: enable filtering of per adv by CTE type
Enable filtering of periodic advertisements to synchronize
with advertisenemts that include CTE.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
ecf761b4e9 Bluetooth: controller: ULL: add per sync filtering by CTE type
Follow up on changes in lower link layer to add filtering
of periodic advertisements synchronization by CTE type.

The NODE_RX_TYPE_SYNC is used to transport information that:
- Sync is established. In such situation the node_rx
  includes data related with received PDU
- Sync scanning is terminated.
In first case ULL will generate NODE_RX_TYPE_SYNC_REPORT
after sending NODE_RX_TYPE_SYNC.

Also EVENT_DONE_EXTRA_TYPE_SYNC handling has additional
execution path that terminates sync scanning if requested
by lower link layer. In other case it adjusts sync scan
window and maintains timeout as usual.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
9b66a8b47d Bluetooth: controller: rework per scan lll to allow filt by CTE type
Periodic advertisement synchronization may be filtered by CTE type.
If particular CTE type is not allowed then depening on filtering policy:
- if filtering policy is off synchronization if terminated
- if filtering policy is on synchronization is continued to
  synchonize with another device from allowed adverisements list.
If synchronization is established and peer device changes CTE type
to one that is not allowed, synchronization should be maintained.

There are two new execution paths. First one is executed when
synchronization is created. In this case CTEILINE is enabled
to parse PDU for CTEInfo field. In this execution path CTE
type is verified. Second execution path does not include
parsing PDU for CTEInfo and verification of CTE type.

Information about sync allowed is added to node_rx instance
that transports received PDU data. In case the sync has to be
terminated the node_rx will not hold PDU data.

Also done event is extended with information about sync
termination if CTE type is not allowed and filtering
policy is off.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
04e2e84cb7 Bluetooth: radio: move radio_df_cte_inline_set_enabled to radio.c
To enable runtime parsing of PDU to find CTEInfo field CTEINLINE mode
has to be enabled. Thanks to that it is possible to verify if the PDU
has allowed CTE type e.g. for periodic advertising synchornization.
To run CTEInfo parsing other parametrers of CTEINLINE are not relevant.
If Radio is set to disable after PDU END event the CTE sampling
will not be processed.

The commit moves the radio_df_cte_inline_set_enable function to make
it accessible even the direction finding features are disabled.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
ff3045db61 Bluetooth: hci: Add handling of allowed CTE types for per sync create
Add missing code responsible for handling of allowed CTE types
in HCI_LE_Periodic_Advertising_Create_Sync command.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Piotr Pryga
0b4047c1c4 Bluetooth: hci: Add helper macros for ver of disallowed CTE types
The commit adds helper macros for verification of disallowed
CTE types when periodic advertising synchornization is created.

The macros are added here, because they are directly related
with values specified by BT Core 5.1 specification.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Flavio Ceolin
76702e8ff3 doc: release: 2.7: add release notes for PM
Update V2.7.0 release notes document with noticeable changes
related to power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-07 17:35:56 -04:00
Daniel Leung
da9c40a7b8 scripts: footprint: fix print alignment and color
The size percentage was doing "xx.xx%" so 100% would not be
aligned correctly when printed. So add a space for percentage
printing.

Also change the coloring of "(hidden)" node so it would not
have the same color as files or symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-07 16:56:20 -04:00
Daniel Leung
e5a6b69683 toolchain: xcc: add macro __in_section_unique_named()
XCC doesn't like having quotes in the section name, so
workaround it by overriding __in_section_unique_named()
similar to __in_section_unique().

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-07 16:56:00 -04:00
Daniel Leung
88ccb5f8f0 Revert "xtensa: remove unused script"
This reverts commit 67d290540e.

The script is actually used to generate the _soc_inthandlers.h
file when introducing a new Xtensa SoC. So restore it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-07 16:04:11 -04:00
Michał Narajowski
5d0f2fbc1d tests: bluetooth: tester: Adjust Segment Retransmit Count
In test cases MESH/NODE/TNPT/BV-04-C and MESH/NODE/TNPT/BI-01-C
the PTS is sending incomplete Seg Ack 3 times and in some cases we run
out of retransmit attempts before PTS sends complete Seg Ack. As a
workaround, increase Segment Retransmit Count to improve stability of
these tests.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-10-07 15:45:22 -04:00
Tjerand Bjornsen
872f560981 net: lwm2m: Fix device obj missing error code ri
From the OMA LwM2M Object and Resource Registry: "When the single Device
Object Instance is initiated, there is only one error code Resource
Instance whose value is equal to 0 that means no error."

This fix creates that initial error code resource instance, and makes
sure that it doesn't get deleted by the Reset Error Code resource.

Signed-off-by: Tjerand Bjornsen <tjerand.bjornsen@nordicsemi.no>
2021-10-07 15:44:46 -04:00
Flavio Ceolin
5027c356cd test: pm: device: Fix build options
The test is using device and device runtime power management. Just
including them to the test build.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-07 15:44:32 -04:00
Flavio Ceolin
893977f3b4 pm: Remove unused fields in pm_device
Several fields on struct pm_device are just necessary when
built with PM_DEVICE_RUNTIME.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-07 15:44:32 -04:00
Vinayak Kariappa Chettimada
2ab8b9061c Bluetooth: Controller: Fix cpu sleep for simulation targets
Use __WFE and __SEV for CPU sleep in simulation too to
avoid stalling and to let ISRs execute during CPU sleep.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-07 15:44:10 -04:00
Krzysztof Chruscinski
3f6f3325a8 doc: add draft for 3.0 release notes
Add draft for the Zephyr v3.0.0 release notes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-07 15:44:00 -04:00
Morten Priess
6344ea984b Bluetooth: controller: Framework for vendor ISO data path
Added weak function for data path dependent ISO-AL sink creation. This
is required for vendor specific ISO-AL data sink operation. Invoke sink
creation for vendor specific data path.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-10-07 15:43:17 -04:00
Morten Priess
06900485ec Bluetooth: host: Add bt_configure_data_path for vendor data path
Implemented host function for configuring vendor specific data path for
use with ISO, and fixed passing of path ID in setup.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-10-07 15:43:17 -04:00
Magdalena Kasenberg
3f6737f688 doc: autopts: Remove duplication of getting started guide
and highlight only the differences in setup instead.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-10-07 15:43:03 -04:00
Erwan Gouriou
19a40a15b6 drivers/usb: stm32: Deprecate 'enable-pin-remap'
'enable-pin-remap' is deprecated in favor of 'remap-pa11-pa12' from
'st-stm32-pinctrl'.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:53 -04:00
Gerard Marull-Paretas
f3fbff6ecb drivers: pinmux: stm32: remove unused init priority
The device initialization priority is not used, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 15:38:53 -04:00
Gerard Marull-Paretas
5554a91135 boards: stm32g0316: use pinmux remap dts bindings
PA11 can be remapped to PA9 by using the recently introduced
remap-pa11-as-pa9 property.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:53 -04:00
Erwan Gouriou
e1b905d6bc drivers: pinmux: stm32: add support for PA11/12 remap.
STM32G0/F0 SoCs allow to remap PA11/12 to PA9/10. Some boards
were manually configuring this remap. This patch centralizes this
functionality to the pinmux driver, allowing boards to enable the
remap directly in board dts file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:53 -04:00
Erwan Gouriou
76505cff9f dts/bindings/pinctrl: stm32: Add properties for PA11/PA12 pin remaps
Add specific properties to enable remap for PA11/PA12, which is a
possibility on STM32G0/F0 SoCs.
These properties only have effect when defined.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:53 -04:00
Erwan Gouriou
de76ab1999 boards: b_u585i_iot02a: Provide PM configuration
Provide configuration for "suspend to idle" states
for b_u585i_iot02a target.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Erwan Gouriou
997e4584ce soc: stm23u5: Provide power implementation
Provide power modes implementation for u5 socs.
For now STOP3 mode is not implemented as this mode is not
compatible with LPTIM activation and hence cannot be used
as a workable suspend to idle state using LPTIM as kernel
tick source.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Erwan Gouriou
1ec41ce922 drivers/clock_control: stm32u5: Fix VCO setting
When existing stop mode 1&2, VCO is set to range 4
and should be set back to range 1 to allow full speed
operations.
Rather than setting VCO at startup, set it inside clock
setting procedure so that it could done
in clock reset procedure when existing stop modes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Erwan Gouriou
f89693200f dts/arm/stm32: u5: Add LPTIM1 node
Provide lptim1 node for u5 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Erwan Gouriou
dcac61631d drivers/timer: stm32 lptim: Update for u5 series support
Adapt lptim driver implementation to support stm32u5 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Erwan Gouriou
3366e34e31 boards: b_u585i_iot02a: Enable i2c and hts221 mems sensors
Enable i2c1 and i2c2 nodes on b_u585i_iot02a.
i2c1 is used as Arduino I2C
i2c2 is used as bus for HTS221 MEMS device.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Erwan Gouriou
d00597e1a4 dts/arm: stm32u5: Add i2c nodes
Add i2c nodes for stm32u5 socs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:40 -04:00
Francois Ramu
e9945df6ff boards: arm: stm32f412 boards change Kconfig
This changes is an adaptation for the different boards
based on the SOC_STM32F412ZG that has been redifined
to SOC_STM32F412ZX

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-07 15:38:22 -04:00
Francois Ramu
983ff8b040 soc: arm: stm32f4: group stm32f412xx in a Kconfig for the serie
A new stm32f412vx devices is introduced.
The soc devices stm32f412cx, stm32f412vx, stm32f412zx are
removed to have a more generic stm32f412xx Kconfig.
The stm32cube modules stm32f412cx/vx/zx exists.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-07 15:38:22 -04:00
Jordan Yates
d76a627bfb tests: build_all: sensor: remove unused modems
Remove CC1200 and CC2520 devicetree nodes from the test as they are not
sensors and are not being built by this test regardless.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-10-07 15:31:40 -04:00
Jordan Yates
d16b96f88d tests: build_all: ieee802154: added
Adds build_all for ieee802154 drivers. A substantial number of drivers
are for SoC peripherals, so test cases are required many boards.

Fixes #11519.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-10-07 15:31:40 -04:00
Flavio Ceolin
82a6104808 pm: Fix device resume order
Devices need to be resumed in the reverse order they are suspended.
e.g: devA +---> devB ---> devD
          |
          +---> devC

They are initialized in the following order, devA -> devB -> devC ->
devD, and suspended starting from the end of the list, devD -> devC ->
devB -> devA. When they are suspended they are temporary put in a list
that is used later to resume them.

This list has to be iterated from the end to the beginning, otherwise a
device may be resumed before its parent.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-07 15:31:12 -04:00
Jordan Yates
6b912e4cd8 tests: build_all: remove floating files
Remove two unused files that were left floating around when the
build_all sample was split up.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-10-07 14:28:56 -05:00