Commit graph

75242 commits

Author SHA1 Message Date
Daniel DeGrasse 1e83a34164 soc: arm: nxp_kinetis: move NXP Kinetis SOCs to use SystemInit
Add call to SystemInit for all NXP Kinetis SOCs and remove any
redundant code from initialization flow. This allows watchdog
initialization to be removed from all Kinetis SOCs as it is handled
by SystemInit.

Since Kinetis watchdog is enabled by default at boot, allow watchdog
setup to by bypassed with CONFIG_WDOG_ENABLE_AT_BOOT. This
setting requires the user to provide a watchdog configuration hook
using z_arm_watchdog_init, but will allow the watchdog to remain
enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-20 09:47:28 +01:00
Francois Ramu 3cf2654141 samples: drivers: led pwm running on 2 pwm leds on nucleo_u575
Add the overlay file to run the samples/drivers/led_pwm
on the nucelo_u575zi_q board.
Two green leds are used on pc7 and pb7 corresponding to pwm
channels of timers3 and timers4.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu 20d7b9afcd boards: arm: stm32u575 nucleo add nodes for timers3 & 4 and pwm leds
Add and enable the timers3 and timers4 of the nucleo_u575zi_q.
Both PWM channel 2 of each timer have output pins connected to leds
on the board.
Add the nodes for pwm leds corresponding to the pwm channels
of the timer 3 and timer 4.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu 98e24fa6ce samples: drivers: led pwm running on 2 pwm leds on disco l475
Add the overlay file to run the samples/drivers/led_pwm
on the disco_l475_iot1 board. Two green leds are used on pa5 and pb14
corresponding on 2 pwm channels of timers2 and timers15.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu 84272914d4 boards: arm: stm32l475 board add nodes for timers15 and pwm leds
Add a new node to the DTS of the disco_l475_iot1 board for timers15
Output pin for the pwm channel1 is PB14 (D10 of arduino CN1)
Add the nodes for pwm leds corresponding to the pwm channels
of the timer 2 and timer 15.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu d41f69559a samples: drivers: led pwm running on pwm led of the nucleo boards
Configure the overlay file to run the samples/drivers/led_pwm
on the nucleo_l073rz and nucleo_f091rc board.
The green led is used on pa5 for pwm channels of timers2 channel
The leds node has to be disabled to let the pin for the pwm nodes.
The spi1 is disabled in that sample to avoid conflict on pa5 pin.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Ravi Dondaputi 1c547580e4 wifi: shell: Print beacon interval and DTIM period
Print beacon interval and DTIM period as part of Wi-Fi
status output.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2023-02-20 09:46:34 +01:00
Emil Gydesen e71460cdb8 Bluetooth: Audio: Only allow receiver to send start command
Only the receiver of the audio is allowed to send the
receiver start ready command.

Furthermore, this removes the automated transition to the
streaming state on the server, as the server now shall
call bt_audio_stream_start to put the stream into the
streaming state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-20 09:45:18 +01:00
Dominik Ermel 1e0f36e896 fs/fatfs: Move FF_USE_LFN logic to Kconfig
Commit add hidden Kconfig option CONFIG_FS_FATFS_FF_USE_LFN
that is passed to ELM FAT to define FF_USE_LFN configuration.
The FF_USE_LFN still depends, indirectly, on choice
CONFIG_FS_FATFS_LFN_MODE config options
CONFIG_FS_FATFS_LFN_MODE_BSS, FS_FATFS_LFN_MODE_STACK and
FS_FATFS_LFN_MODE_HEAP, but the logic has been moved out of
zephyr_fatfs_config.h into Kconfig file.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-20 09:44:18 +01:00
Jun Lin 2e961102c1 driver: Port80: npcx: defer Port80 code sending to workqueue thread
If the host sends Port80 postcodes frequently while EC is busy handling
other tasks, the Port80 FIFO (16-byte depth) might overflow easily,
especially when the host sends the postcode with the 4-byte format.
This change defers the handling and sending (to the upper layer)
postcodes to the system workqueue thread. It can reduce a lot of
(but not all) the overflow case. Also in practice, we usually care
about the latest postcodes. The older codes are not significant to the
developer. This commit also lowers the printing of the overflow warning
to LOG_DEBUG.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-02-20 09:43:20 +01:00
Nicolas Pitre 45623585ab tests/kernel/fpu_sharing/generic: enforce execution on a single CPU
This test relies on one thread interrupting another to exercize the FPU
sharing. On SMP those threads get one CPU each with no sharing of their
FPU making the test rather pointless.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-02-19 21:00:32 -05:00
Ruibin Chang e3b57c392c ITE drivers/pinctrl/it8xxx2: add default mode function
Add default mode function for pin control.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-02-19 21:00:14 -05:00
Anas Nashif 1440b19bde twister: restore logic to determine which gcov we should use
We do not want to use gcov from the SDK for native posix and unit tests,
instead we want the system gcov. Restore logic that determines that.

Fixes #54226

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-19 20:59:56 -05:00
Alberto Escolar Piedras 70830b5b88 tests: bsim_bt: audio: Do not reuse sim_ids
Even if the tests are not run in parallel
do not reuse sim_ids as that overwrites the result data
preventing re-running in check mode, and inspecting
the test results.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-02-19 20:59:04 -05:00
Zachary J. Fields c29dcb3a98 cortex-m: warnings: Address -Wextra warnings
`#defines` do NOT sepecify a type. They will either adopt a native
system type or type of the value that was passed into the expression.
This can lead to warnings such as, "warning: comparison of integer
expressions of different signedness: 'uint32_t' {aka 'unsigned int'}
and 'int' [-Wsign-compare]".

By casting expressions, such as `MAX_TICKS` to `k_ticks_t`, we can
force the appropriate types and resolve these warnings.

Signed-off-by: Zachary J. Fields <zachary_fields@yahoo.com>
2023-02-19 20:58:44 -05:00
Marcin Niestroj cb0ce21480 ARM: nxp_imx: rt1064: use PODF values from rt1060
rt1064 already includes dtsi file for rt1060, including values for ARM and
IPG PODFs. Drop explicit assignment of those PODF values in order to reduce
duplicated code.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-02-19 20:57:54 -05:00
Hake Huang c775387e16 usb: add usb device support for lpc55s28 platform
update the endpint in dts to 6 to alignd with RM
enable usb-device for LPC55S28
all USB supported tests/samples PASS

samples:
scripts/twister -p lpcxpresso55s28 \
--device-testing --hardware-map ~/map.yml \
-T samples/subsys/usb/
...
INFO    - 7 of 25 test configurations passed (100.00%),\
0 failed, 18 skipped with 0 warnings in 73.49 seconds
...

tests
scripts/twister -p lpcxpresso55s28 \
--device-testing --hardware-map ~/map.yml \
-T tests/subsys/usb/
...
INFO    - 3 of 4 test configurations passed (100.00%),\
0 failed, 1 skipped with 0 warnings in 36.39 seconds
...

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-02-19 20:57:40 -05:00
Emil Gydesen 1ff32085f8 Bluetooth: Audio: Add comment for bt_audio_stream.audio_iso
The bt_audio_stream.audio_iso is something we only use for the
unicast client, and will only be set by the unicast client
operatiosn.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-19 20:56:44 -05:00
Muhammed Ahmed 3f0fc7fe6b drivers: serial: Add PM support for UART MCUX
Adding PM support to uart_mcux by gating clock and disabling transmitter

Signed-off-by: Muhammed Ahmed <muhammed.ahmed@intel.com>
2023-02-19 20:56:16 -05:00
Martí Bolívar 20c5866cb1 boards: mps2_an521: clean up memory map
Fix comments in board DTS files referring to AN521 tables defining
memory areas, and choose node label names that more accurately reflect
the entries of interest in those tables.

Adjust the one in-tree user of the affected node labels.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-02-19 20:55:47 -05:00
Giuliano Franchetto 67767df8c0 drivers: iis2dlpc: adding activity interrupt
This commit adds the activity/inactivity recognition as well as the
stationary/motion detection as defined in the IIS2DLPC application
note.

For now, there is no possibility to configure this interrupt using
device tree binding, as I would like to keep the configuration updatable
and not set at boot time. This behaviour is fine for prototypes and
samples, but is too restrictive on products that may want to change the
interrupt configuration at run-time.

The interrupt is configured using the attributes SENSOR_ATTR_SLOPE_TH and
SENSOR_ATTR_SLOPE_DUR.

Signed-off-by: Giuliano Franchetto <giuliano.franchetto@intellinium.com>
2023-02-19 20:55:09 -05:00
Kumar Gala 5af7ff4558 Bluetooth: Mesh: Cfg_cli: Remove deprecated functions
Remove deprecated functions that have been deprecated for at least
two releases now.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-02-19 20:48:06 -05:00
Kumar Gala 5605da129b tests: kernel: mem_protect: stackprot: Dont inline check_input
When building with LLVM on qemu_x86 we see the compiler ends up
inlining the check_input function.  This breaks the stack overflow
that the test is trying to generate, so mark the check_input()
function as noinline to fix the issue.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-02-19 20:47:44 -05:00
Kumar Gala 8b24346bff tests: arch: x86: static_idt: Fix test when building with llvm
llvm will generate a different div instruction than gcc does and than
the number of types that the div instruction opcode takes is not 2.

Move to using inline asm with a idivl instruction to ensure the opcode
size is what we expect so that exc_divide_error_handler() can properly
skip over the instruction.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-02-19 20:47:23 -05:00
Guillaume Gautier 7a1eb41077 doc: releases: Update release notes 3.3
Update release notes 3.3 with the PWM pinctrl change.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-02-19 20:47:01 -05:00
Guillaume Gautier 893f6f8b17 tests: drivers: pwm: pwm_loopback: boards: Add Nucleo F103RB overlay
Add Nucleo F103RB overlay to the PWM loopback test to check that the newly
introduced PWM inputs are functional.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-02-19 20:47:01 -05:00
Guillaume Gautier 5ffbe67db6 boards: arm: nucleo_f103rb; Add timer2 and pwm2 to dts
Add timer2 and pwm2 (input) to nucleo f103rb dts for pwm loopback test

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-02-19 20:47:01 -05:00
Guillaume Gautier 9af2a37b80 west.yml: Use latest STM32 HAL
Use latest STM32 HAL to have the new STM32F1xx PWM inputs.
Also update the existing boards with correct new PWM outputs definition

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-02-19 20:47:01 -05:00
Allan Norgaard 23cacb3766 scripts: dts: gen_driver_kconfig_dts: Skip empty yaml files
The YAML parsing will currently return a None-type if no input data
is empty, and the subsequent check for a substring will cause an
exception.

Signed-off-by: Allan Norgaard <allannk@gmail.com>
2023-02-19 20:46:44 -05:00
Michal morsisko 2e4d8761be drivers: sensor: Add support for BH1750 ambient light sensor
This commit adds support for BH1750 ambient light sensor.
The driver works using I2C peripheral in one-time mode.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2023-02-19 20:44:34 -05:00
Juha Ylinen 3c48b71eee tests: lwm2m_rd_client: Update tests
Update unit tests for lwm2m_rd_client.c after adding new event
LWM2M_RD_CLIENT_EVENT_REG_UPDATE.

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-02-19 20:44:02 -05:00
Juha Ylinen fdffdedc41 net: lwm2m: Add event LWM2M_RD_CLIENT_EVENT_REG_UPDATE
New event LWM2M_RD_CLIENT_EVENT_REG_UPDATE to indicate
application that engine starts registration update.

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-02-19 20:44:02 -05:00
Jaska Uimonen 26e4da9511 drivers: dai: intel: ssp: add aux data support
Intel SSP configuration can have auxiliary data embedded after it in a
variable length tlv array. Enable the parsing of this data and add the
data structs to describe the contents.

For now add support only for new version 1.5 blob. This is because
legacy blob doesn't have size field to describe its variable size.
Auxiliary data parsing has currently only 1 setting for link clock
needed in ACE platforms.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-19 20:43:34 -05:00
Jaska Uimonen c64f91de1a drivers: dai: intel: ssp: add blob 1.5 support
Add support for newer data blob version 1.5. Refactor the code to re-use
the common register setting. Clock setting will be handled differently
with legacy and version 1.5 blob.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-19 20:43:34 -05:00
Jaska Uimonen 3b7f9c320d drivers: dai: modify dai_config_get API func
Modify dai_config_get function to have the config struct as argument.
This was not a showstopper but a request in the API review.

In the same patch modify all Intel dai drivers using the API to preserve
bisect/compile.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-19 20:43:14 -05:00
Adrian Warecki 55be5d81f2 ace: dts: Add watchdog device to the device tree
Added watchdog devices to the device tree of mtl platform.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-19 20:42:52 -05:00
Adrian Warecki f230a887da drivers: watchdog: Add a new driver for Synopsys DesignWare watchdog
This commit adds a base version of the driver for Synopsys DesignWare
watchdog.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-19 20:42:52 -05:00
Rajavardhan Gundi c71ab5699a tests: drivers: sbs_gauge: Include additional properties
Include tests for Fuel Gauge mode, status, charge current,
charge voltage, design capacity and design voltage.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2023-02-19 20:42:10 -05:00
Rajavardhan Gundi 09d8123d0a drivers: sbs_gauge: Add support for additional properties
Fuel Gauge mode, status, charge current, charge voltage, design
capacity and design voltage are added.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2023-02-19 20:42:10 -05:00
Zhang Lixu 0a5e4e493b tests: build_all: add int-gpios in test_i2c_bmi160 to fix build issue
After adding the interrupt support for bmi160 i2c instance, it needs to add
the int-gpios in the twister test's dts because the bmi160's trigger mode
is enabled by default.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-02-19 20:41:56 -05:00
Zhang Lixu e9d587c30c tests: emul: disable bmi160 trigger mode in emul's prj.conf
The trigger mode is enabled by default in bmi160's Kconfig.
After adding the interrupt support for bmi160 i2c instance,
it needs to disable the trigger mode if there is not int-gpios
in dts.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-02-19 20:41:56 -05:00
Zhang Lixu b67e33fc50 sensor: bmi160: fix the issue of missing gpio cfg for i2c
Add BMI160_TRIGGER_CFG in bmi160_cfg for i2c instance when
trigger mode enabled.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-02-19 20:41:56 -05:00
Zhang Lixu 21436b27bf sensor: bmi160: fix the issue with interrupt status
When enabling trigger mode of bmi160 on i2c bus, I've come across
an issue where the readings register STATUS. The issue comes from
the dummy byte in the beginning of the buf.raw which is not necessary.
In addition, for bmi160 on spi bus, the dummy byte has already been
handled in bmi160_transceive while reading register.
So the dummy byte should be removed.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-02-19 20:41:56 -05:00
David Reiss 2d8271dca1 pytest: Log pytest command
This makes it easy to run the command manually, possibly with edits to
change the test behavior.

Signed-off-by: David Reiss <dreiss@meta.com>
2023-02-19 20:41:34 -05:00
David Reiss f61929455d pytest: Fix typo in comment in pytest suite
The option is "cmdopt"

Signed-off-by: David Reiss <dreiss@meta.com>
2023-02-19 20:41:34 -05:00
Felipe Neves 865f4e64b5 dts: xtensa: esp32: modify esp32 dts
To split ipm area into ipm memory and
general use shared memory.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-02-19 20:41:18 -05:00
Tommi Kangas a25bcfdc59 shell: modules: kernel: add shell command for system heap stats
Added a shell command to print kernel system heap usage statistics.

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
2023-02-19 20:40:48 -05:00
Jay Vasanth f3714825ad drivers: pwm: Add Microchip XEC BBLED PWM driver
The Microchip XEC (MEC172x and MEC152x) have a breathing-blinking
LED (BBLED) block which implements a simple PWM mode. The BBLED
PWM frequencies are 32KHz and 48MHz selectable in device tree.
Frequency divider is 12-bit resolution from 256 to (256 * 4096).

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-02-19 20:40:22 -05:00
Jay Vasanth b1cf745828 pm: MEC172x: enable device power mgmt in soc layer
Allow the the SoC to enter deep sleep when CONFIG_PM_DEVICE
is enabled. This will allow to selectively add low power
support for certain drivers like UART and ADC.
The previous checking of ifndef CONFIG_PM_DEVICE was
incorrect. The MEC172x requires the soc power file to perform
some operations when CONFIG_PM_DEVICE is enabled to allow
the hardware to shut down the PLL.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-02-19 20:39:40 -05:00
Anas Nashif 8b7a5a546f tests: zbus: modify test identifiers to match component
Use message_bus as component in all zbus tests for better organisation
and to be able to select them in test plans.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-19 20:39:20 -05:00