Commit graph

63866 commits

Author SHA1 Message Date
Jan Peters 88ca4fb533 tests: drivers: counter: add mimxrt QTMR to counter_basic_api test
to test basic functionality of the new mcux_qtmr counter driver.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00
Jan Peters 253cec5c95 drivers: counter: add driver for NXP QTMR counters
The driver is implemented using the MCUXpresso SDK.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00
Jan Peters 9ac06660fa manifest: hal_nxp: update hal revision to pull in mcux_qtmr driver
In preparation of mcux_qtmr counter driver.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00
Tom Burdick d5bf250c2b dts: intel_cavs: cavs15 custom base IP base addrs
cavs15 uses different base addresses for IP blocks than the rest
and thus needs its own configuration in device tree.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-05-03 18:50:25 -05:00
Jay Vasanth 8ef2403d37 boards: arm: mec172xevb_assy6906: Include limited drivers
Include only required drivers for hello world application

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-05-03 14:13:20 -05:00
Jay Vasanth b7f60b2354 drivers: ps2: Microchip XEC PS2 driver add PINCTRL support
Add optional PINCTRL support to the Microchip XEC PS2 driver
shared between MEC15xx and MEC172x families.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-05-03 14:13:20 -05:00
Jay Vasanth 60a41f6878 drivers: ps2: Microchip XEC PS2 add MEC172x support
Update the Microchip XEC PS2 driver to support MEC172x.
NOTE: MEC15xx has two PS2 controllers and
MEC172x has one.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-05-03 14:13:20 -05:00
Jay Vasanth bacf4ff730 drivers: ps2: Standarize device tree and structure
Standardize PS2 device tree properties. Standardize device
structure usage. Abstract GIRQ and PCR register access.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-05-03 14:13:20 -05:00
Daniel DeGrasse e8f7181c50 drivers: flash_mcux_flexspi_mx25um51345g: move all device data to RAM
since the flexspi driver interacts with the flash device, storing
device data in flash can cause RWW hazards when running in XIP mode.
Move all device data to RAM to limit these RWW hazards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-03 13:38:55 -05:00
Daniel DeGrasse 836f0f5ee5 drivers: flash_mcux_flexspi_hyperflash: move all device data to RAM
since the flexspi driver interacts with the flash device, storing
device data in flash can cause RWW hazards when running in XIP mode.
Move all device data to RAM to limit these RWW hazards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-03 13:38:55 -05:00
Daniel DeGrasse 7aa883b5df drivers: flash_mcux_flexspi_nor: Move all device data to RAM
Move all device data to RAM. Since the flexspi driver accesses the
flash device that is being used for XIP, various RWW hazards can occur
if the flexspi driver is interacting with the flash device, while
running in XIP mode.

Fixes #45182

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-03 13:38:55 -05:00
Bernardo Perez Priego 7c641e957e samples: sensor: Add sample to demonstrate NPCX ADC Comparator driver
Add sample code that demonstrate the usage for Nuvoton ADC Comparator
driver, this driver is available for NPCX microcontroller family,
this sample is supported on npcx9m6f_evb board.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-05-03 08:51:53 -05:00
Bernardo Perez Priego cfe4d51b4f drivers: sensor: Add adc-comparator binding and implementation for NPCX
Comparator will monitor signal though ADC channel, based on
user configuration, callback will be triggered.
This will enable comparator functionality for nuvoton MCU utilizing its
ADC threshold detection feature. Implementation is exported through
sensor trigger API. Use of CONFIG_ADC_CMP_NPCX is required.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-05-03 08:51:53 -05:00
Armando Visconti 1b07c9ed47 modules/hal_st: Align sensor drivers to stmemsc HAL i/f v2.01
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.01.

Requires https://github.com/zephyrproject-rtos/hal_st/pull/9
(merged as 52a522ca4a8a9ec1e9bb5bb514e1ab6f102863fe)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2022-05-03 08:36:50 -05:00
Sam Hurst 3122a2c8b8 drivers: adc: Refactor code to remove warning
Refactor code so that an unused variable 'adc' warning
is not generated when building for CONFIG_SOC_SERIES_STM32G4X
and not using adc1 or adc5.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-05-03 09:37:28 +02:00
Aleksandr Khromykh 0aa0913ca5 Bluetooth: Host: fix aes ccm authentication
Bluetooth Host calculated authentication value correctly only
for data smaller than 255 bytes. If data is larger then
authentication transformation used wrong flags.
Since the issue was symmetric two Zephyr
based devices were able to understand each other. Hence,
other devices like Android or IOS smartphones weren't able
to authenticate large frames and broke communication.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-05-03 09:37:17 +02:00
Guennadi Liakhovetski 17eb313a1b sparse: add an address space and a __sparse_force annotation
We want to use a sparse address space to identify invalid conversions
between cached and uncached address aliases. This patch adds a
__sparse_cache sparse annotation for that. Where those conversions
must be done that has to be supported by using the __sparse_force
sparse attribute. To avoid compiler complains about unknown
attributes we add a -Wno-attributes flag when building with sparse
support.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-05-03 09:37:08 +02:00
Henrik Brix Andersen 41a77be91c drivers: can: mcan: add shared initializer macros
Add shared initializer macros for struct can_mcan_config and struct
can_mcan_data.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-03 09:36:34 +02:00
Henrik Brix Andersen 5b3712a9ac drivers: can: mcan: refactor to get rid of wrapper functions
Refactor the Bosch M_CAN shared driver functions to get rid of the
front-end driver wrapper functions.

This requires flipping the relationship between shared config/data
structs and front-end config/data structs. Front-end drivers can now
store a pointer to their custom config/data structs in the .custom
fields of the can_mcan_config and can_mcan_data data structures.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-03 09:36:34 +02:00
Henrik Brix Andersen 7ea0951052 drivers: can: mcan: rename private header file
Rename the private header file for the Bosch M_CAN shared driver code
from can_mcan_int.h to can_mcan_priv.h to follow the common naming
scheme.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-03 09:36:34 +02:00
Matthias Fend 288ba95c25 boards: arm: enable mailbox on NXP i.MX8M Mini EVK
Enable the messaging unit for NXP i.MX8M Mini EVK boards. This is a
necessary requirement to be able to run rpmsg examples later.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
2022-05-02 20:28:57 -05:00
Matthias Fend f9adbe7b28 dts: imx8m_m4: add mailbox node for NXP i.MX8Mx SoCs with Cortex M4
Add a device tree node for the messaging unit found on i.MX8Mx SoCs with
a Cortex M4 core.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
2022-05-02 20:28:57 -05:00
Matthias Fend 124d751c28 soc: arm: nxp_imx: select IPM_IMX_REV2 driver for mimx8mm6_m4
This will automatically enable the IMX IPM (Rev. 2) driver if IPM is
enabled on this platform.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
2022-05-02 20:28:57 -05:00
Matthias Fend 30f827341c soc: mimx8mm6_m4: add .resource_table section to linker script
This is required to include the resource table in the build output.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
2022-05-02 20:28:57 -05:00
Mahesh Mahadevan 8566b00df3 drivers: counter: Add error checking to MCUX CTImer
Improve the error checking for the set_top_value function.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-02 13:33:54 -05:00
Daniel DeGrasse 20c4c426ef boards: arm: mimxrt595_evk: enable pinctrl
enable pinctrl for mimxrt595_evk, and remove pinmux setting file.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse 34a6000ded boards: arm: mimxrt685_evk: enable pinctrl
enable pinctrl for mimxrt685_evk. The pinmux file is retained to handle
setting up shared signal sets for I2S tests, since this pin mux setting
is not managed by the pin control driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse a24f9f2e5a drivers: pinctrl: update help text for mcux rt pinctrl driver
update help text for mcux rt pinctrl peripheral driver, to clarify it
does not support RT600/RT500 parts and only RT1xxx series parts.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse dc9c886683 drivers: gpio: gpio_mcux_lpc: add pinmux setting support for IOPCTL
add support for setting pinmux when using IOPCTL peripheral, as well as
setting pin configuration properties.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse d5b719e084 drivers: pinctrl: add pin control driver for NXP RT600/RT500 SOCs
add pincontrol headers for IOCON peripheral present on NXP iMX RT600
and RT500 SOCs, and update LPC pin control driver for iMX RT family
differences.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse d9a74b8e0f boards: arm: mimxrt595_evk: add pincontrol definitions for RT595 evk
add pincontrol pinmux selections for RT595 evk, but do not enable pin
control.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse 6467c412a1 boards: arm: mimxrt685_evk: add pin control definitions for RT685 EVK
Add pin control pinmux selections for RT685 evk, but do not enable
pin control

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse 6f895b537d dts: nxp: add pinctrl node to NXP RT500/RT600 dtsi files
Add pincontrol peripheral (IOCON) to RT500/RT600 dtsi files

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse bca321ceb6 dts: bindings: add rt600/500 iocon pin control binding
add dts binding for RT600/RT500 pin control peripheral.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Sylvio Alves 7fe5ab315a samples: boards: esp32: add flash encryption sample
Sample code to demonstrate and document ESP32
flash encryption feature.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-02 10:30:24 -05:00
Sylvio Alves 7022dcfd95 drivers: flash: esp32: add flash encryption support
Add flash encryption function check to redirect
flash write and read calls properly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-02 10:30:24 -05:00
Sylvio Alves 6c6b688b91 driver: spi: esp32: update flash driver to use hal
This modification is required to enable flash encryption.
Using hal implementation of spi_flash calls maintains
compability amongs different socs while offering
latest esp-idf enhancements.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-02 10:30:24 -05:00
Francois Ramu c2db84ee8a drivers: watchdog: stm32 iwdg starts with timeout install
It Follows the sequence to configure and launch the IWDG watchdog
for the stm32 mcus

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-02 10:27:44 -05:00
Andy Ross b4e9ef0691 kernel/sched: Defer IPI sending to schedule points
The original design intent with arch_sched_ipi() was that
interprocessor interrupts were fast and easily sent, so to reduce
latency the scheduler should notify other CPUs synchronously when
scheduler state changes.

This tends to result in "storms" of IPIs in some use cases, though.
For example, SOF will enumerate over all cores doing a k_sem_give() to
notify a worker thread pinned to each, each call causing a separate
IPI.  Add to that the fact that unlike x86's IO-APIC, the intel_adsp
architecture has targeted/non-broadcast IPIs that need to be repeated
for each core, and suddenly we have an O(N^2) scaling problem in the
number of CPUs.

Instead, batch the "pending" IPIs and send them only at known
scheduling points (end-of-interrupt and swap).  This semantically
matches the locations where application code will "expect" to see
other threads run, so arguably is a better choice anyway.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-05-02 10:23:13 -05:00
Andy Ross 3267cd327e kernel/sched: Refactor IPI signaling
Minor cleanup, we had a bunch of duplicated #if logic to send IPIs,
put it all in one place.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-05-02 10:23:13 -05:00
Andy Ross 8d94967ec4 kernel/workq: Cleanup bespoke reschedule point
The work queue has a semi/non-standard reschedule point implemented
using k_yield(), with a check to see if the current thread is
preemptible.  Just call z_reschedule_unlocked(), it has this check
internally and is the intended API for this.

Really, this is only a half fix.  Ideally the schedule point and the
lock release should be atomic[1] via the more idiomatic
z_reschedule().  But that would take some surgery, so let's go with
the simpler cleanup first.

This also avoids having to duplicate logic that gets added to
reschedule points by an upcoming patch.

[1] So that they represent a condition variable and don't race at the
end. In this case the race is present but benign, since the only thing
we really want to know is that the queue thread gets a chance to run.
The only cost is an occasional duplicated/needless context switch if
two threads are racing on a submit.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-05-02 10:23:13 -05:00
Daniel DeGrasse 41f181e4d8 dts: lpc: add pin control nodes for lpc parts
add pin control nodes for LPC SOCs, to be filled with pin control
settings at the board level.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse bc0d22ccef boards: lpcxpresso54114: enable pin control
enable pin control for lpcxpresso54114, and remove pin mux
configuration.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse 19cc2f6ec2 drivers: pinctrl: update pin control driver for lpc54xxx
update pin control driver with bindings and header for lpc54xxx

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse d342a8f43d boards: lpcxpresso55s28: enable pinctrl
enable pin control for lpcxpresso55s28.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse f8bc6e59d4 boards: lpcxpresso55s16: enable pinctrl
enable pin control for lpcxpresso55s16.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse cba44f5b71 boards: lpcxpresso_55s06: enable pin control
enable pin control on lpcxpresso_55s06. Tested with UART output.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse b21359d078 manifest: hal_nxp: update NXP hal to include new LPC pin control headers
update NXP hal to include pin control headers for all LPC socs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Carlo Caione 66c89e521c libmetal: Bump to v2022.04.0
Bump libmetal to v2022.04.0

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-05-02 08:45:37 -05:00
Carlo Caione 55dc21ffb9 openamp: Bump to v2022.04.0
Bump OpenAMP to v2022.04.0 and fix Zephyr terminology linked to OpenAMP.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-05-02 08:44:17 -05:00