Commit graph

66938 commits

Author SHA1 Message Date
Kumar Gala 4773bb45b0 drivers: gpio: dw: Remove dead clock gate code
Remove dead clock gate code and associated PM code as the platforms
that used the clock gate code are no longer supported in Zephyr.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:31:42 +02:00
Kumar Gala ef78470e4a drivers: gpio: dw: Remove dead shared IRQ code
The shared IRQ code has been broken for several releases and no one
seems to have noticed.  The platforms that this was used on are not
supported in Zephyr anymore so remove the code.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:31:42 +02:00
Kumar Gala 0b5b74da82 drivers: video: video_mcux_csi: Use phandle for devicetree sensor ref
Replace sensor_label property in devicetree with just a sensor phandle
property.  This is more generic and allows driver to use DEVICE_DT_GET
instead of device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:31:27 +02:00
Attie Grande d713aa8e2f samples: drivers: adc: fixup sam0 samples
The sam0 ADC driver has ADC_CONFIGURABLE_INPUTS enabled, which means
that the device tree ADC nodes must include the zephyr,input-positive
property.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-14 10:31:19 +02:00
Jackson Cooper-Driver f06c06de07 ipc_service: Add endpoint registered check
Currently, it is possible to call various ipc_service functions
which take in an endpoint pointer (such as send, get_tx_buffer)
with an endpoint which has not been registered with the instance.
This leads to dereferencing a NULL pointer when the function tries
to access the api field of ept->instance.
This patch adds in multiple checks to ensure that the endpoint is
registered before continuing, one in the frontend, when ensures
that the ept->instance pointer is not NULL and one in the backend
which checks the value of the token pointer. If either of these fail,
we return -ENOENT.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper---driver@amd.com>
2022-07-14 10:29:42 +02:00
Enjia Mai 4a3184441c tests: kernel: mem_protect: move the obj validation test to new ztest
Migrate the testsuite tests/kernel/mem_protect/obj_validation
to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai a3d834ed2b tests: kernel: mem_protect: move the syscalls test to new ztest
Migrate the testsuite tests/kernel/mem_protect/syscalls to
the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai 72d4ac27ad tests: kernel: mem_protect: move the protection test to new ztest
Migrate the testsuite tests/kernel/mem_protect/protection to
the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai 4df4646aa1 tests: kernel: mem_protect: move the stack random test to new ztest
Migrate the testsuite tests/kernel/mem_protect/stack_random to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai b479838e0a tests: kernel: mem_protect: move the stack protection test to new ztest
Migrate the testsuite tests/kernel/mem_protect/stackprot to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai 87f0b58efe tests: kernel: mem_protect: move the mem map test to new ztest API
Migrate the testsuite tests/kernel/mem_protect/mem_map to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Lucas Tamborrino 8407909ebc west.yml: hal_espressif: update to latest revision
Includes MCPWM pinctrl support and source files.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-07-14 10:29:26 +02:00
Lucas Tamborrino 756a38af24 CODEOWNERS: Add ownership for ESP32 PWM drivers
Add myself as codeowner for the ESP32 LEDC and MCPWM drivers.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-07-14 10:29:26 +02:00
Lucas Tamborrino 3c6d64874d tests: pwm: add support for esp32 loopback test
Add overlay for esp_wrover_kit
Use default values for test_continuous_capture
Add test case for esp32 platform

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-07-14 10:29:26 +02:00
Lucas Tamborrino 80fbef9677 drivers: pwm: esp32: mcpwm driver
Add new mcpwm peripheral driver

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-07-14 10:29:26 +02:00
Lucas Tamborrino eca365929b dts: esp32: add bindings to mcpwm driver
add new pwm driver based on the mcpwm peripheral

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-07-14 10:29:26 +02:00
Kumar Gala 02d0d20d59 tests: subsys: sd: sdmmc: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Move to using alias 'sdhc0' for SDHC controller.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:29:14 +02:00
Kumar Gala 459425c7b9 tests: drivers: sdhc: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Move to using alias 'sdhc0' instead.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:29:14 +02:00
Kumar Gala a5d16f32fc boards: Add sdhc0 alias for testing purposes
Add 'sdhc0' alias that points to SDHC controller to use for testing
purposes.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:29:14 +02:00
Shaoan Li d7541defbe tests: arch: arm: move test arm_irq_advanced_features to new ztest API
Migrate the testsuite tests/arch/arm/arm_irq_advanced_features to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-14 10:29:00 +02:00
Anas Nashif 700de003e8 MAINTAINERS: rename label for intel audio platforms
To cover more platforms, rename to Intel ADSP. CAVS is just one
generation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 17:18:47 -04:00
Anas Nashif 726fcf2401 MAINTAINERS: add Drivers: Memory Management
Add new area with maintainers/collabs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 17:18:47 -04:00
Jan Kablitz 8e79af0eca tests: drivers: counter: basic_api: add overlay for nucleo_l476rg
Add overlay for nucleo_l476rg to enable counter_basic_api
tests on this board. The prescalers of the timers will result
in a counter frequency of 1 MHz.

Signed-off-by: Jan Kablitz <kabeljant@gmail.com>
2022-07-13 21:34:19 +02:00
Jan Kablitz 95678f3434 tests: drivers: counter: basic_api: add overlay for nucleo_l433rc_p
Add overlay for nucleo_l433rc_p to enable counter_basic_api
tests on this board. The prescalers of the timers will result
in a counter frequency of 1 MHz.

Signed-off-by: Jan Kablitz <kabeljant@gmail.com>
2022-07-13 21:34:19 +02:00
Jan Kablitz d6fc415e2a dts: arm: st: l4: add counter nodes to timers of stm32l4 series
Add counter nodes to timer nodes in dts of stm32l4 series.
This should enable the support of the basic counter API
on all stm32l4 mcus for general-purpose and basic TIMx timers.

Signed-off-by: Jan Kablitz <kabeljant@gmail.com>
2022-07-13 21:34:19 +02:00
Shaoan Li e3d084ccb2 tests: arch: fix arm_thread_swap on stm32 platform
The test fails on several stm32 platforms, due to the
correlation between test_arm_syscalls and
test_arm_thread_swap, so disable the corresponding IRQ
interrupt may fix it.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-13 21:23:08 +02:00
Kumar Gala 989e17a493 dma: HDA: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-13 13:11:17 -05:00
Henrik Brix Andersen 5c16ba05c2 drivers: can: mcux: flexcan: add triple sampling mode support
Add support for triple sampling mode to the NXP FlexCAN driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 19:06:59 +02:00
Henrik Brix Andersen 97d9ab8c18 drivers: can: shell: add support for setting triple sampling mode
Add support for setting triple sampling mode.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 19:06:59 +02:00
Henrik Brix Andersen fd6213b8cc drivers: can: add triple sampling mode flag
Add flag for enabling triple sampling of the CAN RX signal.

Normally just one sample of the RX signal is performed by the CAN
controller, but in triple sampling mode the RX signal is sampled three
times. These three samples are then used for determining the value of the
received bit, typically by majority vote.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 19:06:59 +02:00
Benjamin Björnsson 05a6c0fe68 drivers: sensor: stm32_temp: Add multi-instance support
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-13 19:06:41 +02:00
Henrik Brix Andersen 7b6ca29941 drivers: can: mcux: mcan: add pinctrl support
Add pinctrl support to the NXP LPC driver front-end.

Fixes: #47742

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 18:10:52 +02:00
Evgeniy Paltsev ec075ebf60 ARC: MWDT: add missing options to generate symbol file
Fix for #47353 where we add and enable symbol generation,
but miss to add proper options for ARCMWDT toolchain.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2022-07-13 12:00:39 -04:00
Christopher Friedt fe8dcdf4a3 tests: posix: eventfd: make min_ram a common test parameter
Some platforms with insufficient ram were incorrectly included
in this test since #47288.

Fixes #47734

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-13 11:56:42 -04:00
Anas Nashif 76f990af8a intel_adsp: move attribute macros to dedicated linker header
Those belong where other attribute macros are usually defined. They are
not xtensa or ADSP specific and are used across Intel SoCs on all
architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif 680df57582 intel_adsp: add a header for soc specific defines
Instead of ifdeffing on SOCs and missing things along the way, maintain
platform definitions that are different among SoCs in one single file
per SoC and use data from that file critical spots.

In this case, we were checking for CAVS25, setting one value where
everything else was set to 0, so new SoC like ACE was getting 0 as well,
although it has the same value as TGL.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif e328508a66 intel_adsp: ace: run soc.c through clang-format
Just a minor cleanup.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif fc67224864 intel_adsp: ace: simplify and cleanup sram init functions
Remove redundant code and simplify SRAM init functions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif 332d9fb7d1 intel_adsp: ace: rename inx -> idx
Original author probably meant inx for index, use idx instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif f82b271b1f intel_adsp: ace: convert delay count into a define
The delay count was converted to a define.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Tom Burdick 3824024f77 dma: hda link driver fixups
Fixes configured DMA direction for HDA link in/out drivers.

Adjusts the number of channels for link in/link out to safe value
that seems to work on all tested parts.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-07-13 10:55:17 -04:00
Jaroslaw Stelter afb156a1eb soc: ace_v1x: unmap entire unused virtual space
This patch corrects the initial unmapping of unused l2 memory
to unmap until the end of virtual address space instead
of unmapping until the end of l2 physical memory.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-13 09:46:48 -05:00
Jaroslaw Stelter 8b598539f2 soc: ace_v1x: correct the move_region behavior
This patch introduces sys_mm_drv_move_region implementation
which stops usage of the sys_mm_drv_simple_move_region.
The sys_mm_drv_simple_move_region is unsuitable becuase
it iterates through physical pages in linear fashion.
The new implementation queries the tlb for each virtual
page of the requested region to find the physical page
to be remapped.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-13 09:46:48 -05:00
Flavio Ceolin ff22268d68 maintainers: dts: Add Intel xtensa pattern
Add directory containing Intel Xtensa dts files to the matching
criteria.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-13 10:22:06 -04:00
Flavio Ceolin cb80142a9f maintainers: Add ceolin as xtensa collaborator
Add myself as collaborator of Intel xtensa platforms.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-13 10:22:06 -04:00
Piotr Pryga e84cabf0d4 Bluetooth: Controller: fix mayfly unwanted re-init every bt_enable call
Mayfly by design uses a memq for storage of its jobs. The memq
requires head and tail to track the content. It is considered
empty is head equals tail.

When memq instance is initialized then there is a new link
instance stored in head and tail, nevertheless the memq is
still empty.

When new job is enqueued to a memq, the inilial link is used
to store the job. New link, provided by enqueue call, is stored
in the tail for future enqueue.

When enqueued job was served and is dequeued, the link it was
assigned to is returned and stored in the job object.
That link will be used in future for call to enqueue.

Now lets consider a situation when we are just after initalization.
Some default initial link is in empty memq. We enqueue and dequeue
a job. After dequeue, the job object stores the initial link object.
The one that was put into the memq during initialization.
Next Bluetooth stack is disabled and enabled again.

The job is enqueued again, but it still stores the initial link
address. After enqueue the memq head points to initial link object,
that stores new job. Tail points to link deliveded by enqueue call,
that is also the initial link object. The memq is considered to be
empty, nevertheless there was a successful enqueue operation.

The issue is casued by lack of re-initialization of a job object
on init. In most cases these objects are static members of some
functions, hence there is no re-initialization after bt_disable
and bt_enable calls.

The problem is fixed by re-initialization of mayfly only once
on bt_enable() call. Then it doesn't matter what links are stored
in dequeued objects and there is no need to re-initialized mayfly
job objects.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-07-13 16:13:57 +02:00
Piotr Pryga 9cd94277bf Bluetooth: Host: conn_change signal object not correclty initialied
The problem is visible after call to bt_disable when there was
a connection. On a next bt_enable call when hc_tx_thread starts
it is possible that the conn_change object internals are not
re-initialized entirely and the function fails during k_poll call.

The commit changes explicit assignment conn_change object to
a k_poll_signal_init that does proper initialization.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-07-13 16:13:57 +02:00
Piotr Pryga 2125a6494c Bluetooth: Host: add missing de-init of periodic sync pool
While execution of bt_disable there is missing de-initialization
of per_adv_sync_pool. If there was a sync in progress, (flags set
to BT_PER_ADV_SYNC_SYNCING) before bt_disable, then when the stack
is re-enabled by bt_enable new sync create fails.

The commit fixes the issue by new function that clears flags for
all per_adv_sync_pool entries. The function is executed by bt_disable.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-07-13 16:13:57 +02:00
Piotr Pryga 8be0999dfb tests: Bluetooth: df: connectionless cte tx migrate to new ZTEST API
Migrate tests in connectionless_cte_tx to new ZTEST API.

Remove main.c source file because is unncessary when automatic
unit tests registration is available. Also former use of
predicate to select unit tests for execution is removed
because the tests are split into two distinct tests suites
that has its't own setup and teardown phases.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-07-13 16:13:57 +02:00
Piotr Pryga 11da98fde0 tests: Bluetooth: df: connectionless cte rx migrate to new ZTEST API
Migrate tests in connectionless_cte_rx to new ZTEST API.

Remove main.c source file because is unncessary when automatic
unit tests registration is available.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-07-13 16:13:57 +02:00