Commit graph

69697 commits

Author SHA1 Message Date
Pierre Marzin 10d6685f57 samples: blinky_pwm: add rcar_h3ulcb_cr7 board overlay's
Use dts overlay to declare the pwm-led only when needed.
This is only used for demo purpose of PWM0 on RCAR gen3
boards (H3ULCB only at the moment).

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Pierre Marzin a05c827063 boards: h3ulcb: Add support of pwm0
Declare pw0 channel0 that can be used on H3ULCB (test pin CP8).
Add support status to H3ULCB board documentation.
PWM0 is disabled by default as its usage could consume uneeded
power.
Only enable it into the test API with overlay.

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Pierre Marzin f8e7961da7 dts: arm: rcar_gen3_cr7: declare pwm0 node
R-Car Gen3 platforms have up to 7 channels. Add the node to
the rcar_gen3_cr7 SoC series. In contrary to Linux, declare
only one PWM controller with 7 channels. So only one node is
written into dtsi file.

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Pierre Marzin 1d2752f4ee drivers: pwm: add Renesas R-Car driver
Add R-Car Gen3 PWM driver.

Clock diviser is automatically adjusted according to requested period
and duty-cycle in order to obtain as much accuracy as possible.
Indeed, in order to improve PWM accurancy, the PWM clock has to fit
the requested period. So use the given period_cycle to define if the
clock as to be adapted. In such case, increase/decrease the clock
diviser to adapt the period_cycle and be sure that it fits into the
10 bits counter of the PWM controller.

Tested on H3ULCB on pwm0 and pwm4.

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Pierre Marzin 1367767624 dts: bindings: pwm: add Renesas R-Car PWM
This add the PWM can bindings for R-Car platforms.
Tested on Renesas Gen3 (h3).

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Erwan Gouriou ec6f932ad2 drivers/timer: stm32 lptim: Fix frequency check
Aim is to error out on misconfifurations, not the other way round.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-07 15:39:16 +02:00
Torsten Rasmussen a5cd394758 cmake: improve warning deprecation message
The current deprecation warning could give the impression that
CROSS_COMPILE is deprecated, which is not the case.

Instead it is the behavior of defaulting to `cross-compile` when
setting CROSS_COMPILE in environment without setting
ZEPHYR_TOOLCHAIN_VARIANT that is deprecated.
Not the use of `CROSS_COMPILE` setting itself.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-07 15:38:36 +02:00
Martí Bolívar 7ef9c4b20e edtlib: remove python 3.5 workaround
Remove a yaml monkeypatch. It is no longer needed since we support 3.6
or later on Zephyr v2.7 LTS and 3.8 or later on what will become v3.2.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-07 15:38:26 +02:00
Francois Ramu 735921fa68 tests: drivers: flash on stm32l475 requires higher stack size
Increasing the stack size to pass the
tests/drivers/flash testcase on the disco_l475_iot1 disco kit.
Note that CONFIG_MPU_ALLOW_FLASH_WRITE is set.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-07 15:38:08 +02:00
Francois Ramu 6205866143 tests: drivers: flash driver for the non-secure stm32u5 board
this commit adds an overlay to run the tests/drivers/flash
on the b_u585i_iot02a_ns target platform.
It renames the non-secure partition to slot1_ns_partition
to match the testcases.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-07 15:38:08 +02:00
Francois Ramu e133ebfe2e drivers: sdmmc: stm32 enables HSI48 MHz clock by default
For some stm32 devices, the SDMMC clock selection is HSI 48MHz
by default (reset value). It must be enabled before acccessing
the peripheral.
The ErrorCode is reported when Init fails.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-07 15:35:10 +02:00
Kevin Wang 82785ca48f tests: drivers: spi: spi_loopback: Add board's overlay
Add child node in spi node for testcase parsing compatible

Signed-off-by: Kevin Wang <yunkai@andestech.com>
2022-09-07 15:34:47 +02:00
Kevin Wang 93025635b3 dts: bindings: spi: add andes spi driver
Add Andes SPI atcspi200 dts binding.
Remove not necessary property for spi node in soc dtsi.

Signed-off-by: Kevin Wang <yunkai@andestech.com>
2022-09-07 15:34:47 +02:00
Kevin Wang a268dbced8 boards: riscv: adp_xc7k_ae350 support SPI driver
Enable spi node in dts
Disable flash node due to haven't implemented yet.
Add spi to the supporting device list in board yaml.

Signed-off-by: Kevin Wang <yunkai@andestech.com>
2022-09-07 15:34:47 +02:00
Kevin Wang c01dcacb6f drivers: spi: add Andes atcspi200 driver
Support the Andes atcspi200 spi driver

Signed-off-by: Kevin Wang <yunkai@andestech.com>
2022-09-07 15:34:47 +02:00
Francois Ramu 45cffd79a9 tests/drivers/spi: loopback testing on the stm32u5x spi with DMA
Adds the dma transfer for the SPI loopback test
for the b_u585i_iot02a disco kit and nuceo_u575zi_q.
GPDMA1 is the DMA instance
Connect pins on the target board D11 <--> D12 of the CN13

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-07 15:34:35 +02:00
Francois Ramu 86ede2b679 drivers: spi : driver with DMA for the stm32u5
This commit is the adaptation of the stm32 SPI driver with DMA
transfer for the stm32u5 soc.
Use the DT_HAS_COMPAT_STATUS_OKAY(st_stm32h7_spi)
also valid for the stm32U5 serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-07 15:34:35 +02:00
Hu Zhenyu 99ab3fba54 tests: Change the result compare method in pin_get_config()
Fixes #47921
When setting a GPIO to certain value, and then get the GPIO value, on some
platforms, such as ITE, these two values may not be the same. For example
setting GPIO_OUTPUT | GPIO_OUTPUT_INT_HIGH, it will read back
GPIO_OUTPUT | GPIO_OUTPUT_INT_HIGH | GPIO_VOLTAGE_3P3. This is as expected,
as GPIO_VOLTAGE is a read only property. So when comparing the gpio set
and get values, it is necessary to filter the read only bits first and
then compare to the set value.

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-07 15:34:28 +02:00
Thomas Stranger 16242e9c32 drivers/w1: add 1-wire shell
This commit implements shell support for 1-Wire.
Commands for bus-reset, bit-, byte-, and block- communication,
as well as search and configuration are implemented.

- write_byte, and write_block perform a reset before,
in case the option "-r" is passed.
- using read_io_options() function to parse the reset option,
as this allows to easily add further options in the future.
- configuration type can be specified either as number or as name.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-07 15:33:52 +02:00
Anders Storrø bfb4e1bac4 Bluetooth: Mesh: Shell: Split out mdl shell feat
This commit splits out the model related commands from mesh shell to
separate shell modules. The purpose of this alteration is to make model
commands more flexible by letting the application itself define the
model instances.

- Move Health Client commands to separate shell module.
- Move Config Client commands to separate shell module.
- Remove Health Client instance from shell.c.
- Add Health Client instance to mesh_shell test application.
- Add util library for Mesh shell.
- Some refactoring of shell menu layout.
- Update Mesh shell documentation.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-07 15:02:58 +02:00
Anders Storrø 548f850192 Bluetooth: Mesh: Move shell.c to subfolder
Moves shell.c to shell subfolder. Done as a separate step to preserve
diff between previous and new revision of shell.c.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-07 15:02:58 +02:00
Gerard Marull-Paretas e6fca0ef89 scripts: ci: check_compliance: ignore missing APP_LOG_LEVEL
Application log level is not detected correctly as the option is defined
using a template, so it can't be grepped.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-07 11:18:27 +00:00
Stephanos Ioannidis 9d0ec5dcd6 cmake: bintools: gnu: Do not use gdb-multiarch
The commit c2419fc006 introduced a change
to the CMake toolchain detection routine in which it attempts to use
the distro-provided `gdb-multiarch` GDB executable when the target-
specific GDB executable cannot be found (i.e. fallback to
`gdb-multiarch`).

This can cause many problems for the Zephyr users because the distro-
provided GDB does not contain any Zephyr-specific patches and it may
misbehave under various conditions (e.g. negative tid/pid being
displayed, Xtensa debugging mysteriously failing, ARC debugging not
working).

This commit removes the fallback mechanism to the distro-provided
`gdb-multiarch` because it is better to display an error message saying
GDB is not found than to use a wrong GDB that can give out very
confusing and misleading error messages to users.

Moreover, this fallback mechanism is no longer necessary because the
Zephyr SDK is now available on all major host operating systems and it
provides the target-specific custom GDB that contains all Zephyr-
specific patches.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-07 09:27:16 +00:00
Stephanos Ioannidis 3363c64abc cmake: bintools: gnu: Update GDB executable names for Zephyr SDK 0.15
The Zephyr SDK 0.15.0 release has changed the default GDB executable to
be Python-less and introduced an alternate Python-capable variant
called `gdb-py` (note that the Zephyr SDK previously provided
`gdb-no-py` instead).

This commit updates the CMake toolchain detection routine to attempt
using the Python-capable GDB variant (gdb-py) first and, if it is not
available or fails to launch due to a missing libpython dependency,
use the Python-less GDB variant (gdb).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-07 09:27:16 +00:00
Anas Nashif 163b99e755 doc: doxyegen: readd data structure api group
Re-add parent groups for data-structures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif 1570f1710c doc: doxygen: add disk to io_interfaces
Add disk to the io_interfaces group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif a8a69559cd doc: doxygen: move all IPC APIs under one group
Group all related APIs under one parent group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif e1c123cd3e doc: doxygen: group smp tests
Put all smp tests under one group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif 0050bd98b2 doc: doxygen: move lifo tests to test group
Put all tests under one parent group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif d7f2f97fe9 doc: doxygen: add memory management group
Add new group for all memory management APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif 5a60fd5397 doc: doxygen: restructure device model APIs
add doxygen groups for device model under one parent group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Anas Nashif 4530268e79 doc: group demand paging APIs in doxygne
add doxygen groups for demand paging under one parent group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Evgeniy Paltsev 0c7f3efb98 ARC: boards: hs5x: enable zephyr toolchain
As we've finally switched to 0.15.0 Zephyr SDK in upstream
verification we can enable zephyr toolchain for all ARC HS5x
targets.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-09-07 10:32:01 +02:00
NingX Zhao e57ac68efe tests: unit: rbtree: move testcases to new ZTEST API
Move testcases to the new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-09-07 10:31:06 +02:00
Timothy Keys 194cb8abab Bluetooth: Controller: Request any TX Power
Allow requesting any TX power in SDC via kconfig. This enables easily
setting higher TX values when using a FEM.

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2022-09-07 10:30:55 +02:00
Yong Cong Sin 148317f075 shell/mqtt: Handle negative return value of wait
`wait()` returns the retval of `zsock_poll()` which can be
negative but is currently unhandled.

This patch make sure that the error will be handled.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-09-07 10:30:16 +02:00
Yong Cong Sin 834fb411e3 shell/mqtt: minor MISRA-related fixes
Minor MISRA-related fixes so that the conditionals are boolean
and precedence of statements are explicit.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-09-07 10:30:16 +02:00
Hu Zhenyu 011b1ea8da tests: net: socket: offload_dispatcher move to new ztest API
Move offload_dispatcher tests to use new ztest API
TEST=twister -T tests/net/socket/offload_dispatcher

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-07 10:29:56 +02:00
Gerard Marull-Paretas 37c956ffb9 samples: pm: demonstrate usage of the policy latency APIs
Even though we have unit tests that cover the PM policy latency APIs, it
may not be obvious on how to use it in practice. This patch adds a new
sample where both the application and a device driver impose latency
requirements. The sample illustrates how latency requirements are
aggregated and are taken into account when choosing the CPU power state.
The test has been designed to run on native_posix, since it only serves
for demonstration purposes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-07 10:28:55 +02:00
Tom Burdick 897ae4a2d5 test: timer_behavior: Rename readme.md to readme
Renames the file to avoid what appears to be automatic inclusion
into the root of the doctree.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-06 17:54:52 -04:00
Andrey Borisovich c75e6cfcb9 soc: intel_adsp_ace1x: Added IPC/IDC implementation
Added IPC and IDC implementation for Intel ADSP ACE1X SoCs.

Co-authored-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-09-06 15:33:24 -04:00
Gerard Marull-Paretas be38456279 include: types: remove ulong_t
ulong_t was mainly used in MIPS/RISC-V. Just use "unsigned long".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 18:16:33 +02:00
Gerard Marull-Paretas 8081d7f2a4 drivers: s/DT_CHILD(DT_DRV_INST(n), ...)/DT_INST_CHILD(n, ...)
Use instance version of DT_CHILD when possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 08:45:25 -07:00
Gerard Marull-Paretas 3732bbfa12 tests: devicetree: add tests for DT_CHILD/DT_INST_CHILD
Add some coverage for the DT_CHILD/DT_INST_CHILD macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 08:45:25 -07:00
Gerard Marull-Paretas 7a54318d35 devicetree: add DT_INST_CHILD
Add the instance-based version of DT_CHILD.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 08:45:25 -07:00
Vinayak Kariappa Chettimada 61a44f1af2 Bluetooth: Controller: Use macros in num complt implementation
Use macros to encode the counting of number of completed
packets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Morten Priess eb025d0497 Bluetooth: Controller: Fix ISO TX pool corruption and missing release
- Fix ISO TX data pool corruption due to multiple calls to
  tx_cmplt_get, without removing the nodes
- Added missing release of TX node link in case of ISOAL error

Signed-off-by: Morten Priess <mtpr@oticon.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 4a74f97a9a Bluetooth: Controller: Fix ISO Tx PDU memory pool corruption
Fix ISO Tx PDU memory pool corruption due to duplicate ISO
Tx PDU buffers repeatedly released into the memory pool.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 8eee8430d4 Bluetooth: Controller: Add implementation to flush Tx on BIG terminate
Add implementation to flush pending ISO Tx PDUs when BIG
events are terminated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 73e0b415ce Bluetooth: Controller: Fix removal of BIG association with Periodic Adv
Move the removal of BIG context association with the
Periodic Advertising context to when the BIG streams are
release and BIG terminate message is generated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00