Commit Graph

72256 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 61f252fe33 ci: doc-build: remove unnecessary libclang dependency
Doxygen 1.9.4 no longer needs libclang.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 14:17:26 +09:00
Johan Hedberg a96016d747 drivers: ivshmem: Remove unnecessary BDF lookup code
There was a bunch of BDF lookup code in the ivshmem driver originating
from issues with not being able to have multiple PCIE_BDF_NONE entries
in DTS. Now that devices are always looked up based on VID/DID this
should not be an issue, and hence the additional code is not needed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2022-11-19 14:17:16 +09:00
Chris Friedt 909185f79c tests: posix: cond: test to ensure there is no resource leakage
Add a test to ensure that `pthread_cond_t` can be used over
and over again and that there is no resource leakage with proper
usage.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:16:38 +09:00
Chris Friedt 3a56d276e9 posix: cond: abstract pthread_cond_t as uint32_t
Consistent with the change of `pthread_t` from
`struct posix_thread` to `uint32_t`, we can now also abstract
`pthread_cond_t` as `uint32_t` and separate `struct posix_cond`
as an implementation detail, hidden from POSIX API consumers.

This change deprecates `PTHREAD_COND_DEFINE()` in favour of the
(standardized) `PTHREAD_COND_INITIALIZER`.

This change introduces `CONFIG_MAX_PTHREAD_COND_COUNT`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:16:38 +09:00
Chris Friedt afae448ff2 posix: pthread: take care with pthread cond resources
Previously, `pthread_cond_init()` could not actually fail, and
destroying condition variables was a no-op, and it was missing
in `pthread_exit()`.

However, with the change of `pthread_cond_t` to `uint32_t`, and
since those are embedded inside of `struct posix_thread` for the
time being, the pthread code needs to keep track that it is
relinquishes used condition variables when a thread completes.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:16:38 +09:00
Chris Friedt 1777a33558 lib: posix: internal: use a more generic INIT mask and inlines
Previously `PTHREAD_MUTEX_MASK_INIT` was used to mark a
`pthread_mutex_t` as initialized.

The same needs to be done for `pthread_cond_t` and likely others.

Rather than copy-pasting that and a number of inlines that
duplicate the same functionality, simply make it more generic.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:16:38 +09:00
Marcin Szkudlinski 84c09433b5 mtl: soc: TLB driver provides required size of L3 storage buffer
TLB driver knows the required number of bytes for HPSRAM
storage during power off state.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski c01a8c8807 mtl: soc: store power gating state in D3 state
Power gating register must be stored when CPU is in
power off state

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski 1631d2dc2d mtl: soc: add context save and restore flow
Context save is saving whole memory to persistent
memory area, than turning off memory and CPU
Context restore is a modified boot flow, where
the previously saved context is restored

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski 3ee8bf7053 mtl: soc: add TLB driver context save to platform PowerManagement
Connect the TLB context save to MTL suspend power flow

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski 540f6d1dc5 mtl: drivers: tlb driver cleanup
a small cleanup in the code, preaparation for memory context save

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski c929bbcc58 mtl: dts: add L3 memory definitions macros
Add helper macros for l3 memory definitions from
the Device Tree

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Kiril Petrov 5801ab2231 drivers: sensors: lis2dh: add attr to set HP filters
Add ability to set High Pass filter on AOI function on interrupt 1 or 2.

Signed-off-by: Kiril Petrov <retfie@gmail.com>
2022-11-18 10:46:52 -06:00
Anas Nashif 17e8b58a45 tests: kernel: common: tag test correctly
Add missing kernel tag to a very basic kernel test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-18 10:41:52 -05:00
Anas Nashif c1b575e20d intel_adsp: mtl: fix platform testing tags
Was very limited and restrictive and was missing many issues in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-18 10:41:52 -05:00
Vincent Geneves f4cccd66de dts: arm: stm32: add dts support for ADC2/3 of stm32f7
This PR enables the ADC peripheral 2 & 3 for the stm32F7 soc
series from STMicroelectronics.

Signed-off-by: Vincent Geneves <vgeneves@kalray.eu>
2022-11-18 14:53:29 +00:00
Anas Nashif b512c8e4fa samples: fix duplicate identifier
Test identifier was duplicated.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-18 09:19:47 -05:00
Anas Nashif ae24329daa twister: show duplicates correctly
Find duplicate test identifiers and report them with
--list-test-duplicates.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-18 09:19:47 -05:00
Adrian Bonislawski fa57cd613b drivers: dai: ssp: clear RSE bits on ACE
On ACE RSE bits should be cleared unconditionally
if ssp is no longer in use

This will allow to successfully disable SSP in
dai_ssp_pm_runtime_dis_ssp_power()
and enable it correctly in the next run

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-11-18 12:01:24 +00:00
Henri Xavier cfda0afbf9 boards/arm64/qemu_cortex_a53: Synchronize defconfigs
The various qemu_cortex_a53 defconfigs diverged.

We harmonize these files, and put config-specific
features at the end.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-11-18 12:00:09 +00:00
Francois Ramu 94cf0a0c7c boards: arm: stm32wb55 nucleo board actual flash size
Adjust the flash size of the nucleo_wb55rg board from
STMicroelectronics to the exact flash as defined by the DTS
of the stm32wb55Xg.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-18 11:59:48 +00:00
Morten Priess afd14d6573 Bluetooth: controller: CIS Central fixes from EBQ run
Various fixes for issues found during EBQ run.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-11-18 12:48:13 +01:00
Morten Priess 745bf7297e Bluetooth: controller: Implement CIS Central in ULL
- Add CIS Create policy config choices
- Implemented CIS Central in ULL following proposed setup/commit flow
- Full support for HCI_LE_Set_CIG_Parameters_Test
- Extend ull_conn_iso_start and ull_conn_iso_ticker_cb to handle
  central role
- Partial support for HCI_LE_Set_CIG_Parameters. TODOs:
  * Drop suggested retransmissions if Max_Transmission_Latency is
    exceeded
  * Calculate ISO interval based on policy

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-11-18 12:48:13 +01:00
Morten Priess 07acdc9650 Bluetooth: controller: HCI fixes for ISO central role CIG/CIS creation
Fix issues with referencing invalid netbuf data and add missing
parameter. Removed returning of handle in setup functions, as handles
are  not available until commit.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-11-18 12:48:13 +01:00
Morten Priess 64ade9e01d Bluetooth: controller: Move CIS peripheral functionality to ull_conn_iso
Move ull_peripheral_iso_start ull_peripheral_iso_ticker_cb to
ull_conn_iso, to share code between CIS peripheral and central.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-11-18 12:48:13 +01:00
Morten Priess 38a4e58d1f Bluetooth: controller: Implement local CIS Creation procedure
Local procedure for CIS central establishment. Calls yet unimplemented
functions in ull_central. Changes are guarded by
CONFIG_BT_CTLR_CENTRAL_ISO.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-11-18 12:48:13 +01:00
Michał Barnaś 94458f88b9 ec_host_cmd: add eSPI peripheral for the host commands
This commit adds the support for host commands being transported
by the eSPI subsystem.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-11-18 10:11:40 +01:00
Michał Barnaś b91849c4bd ec_host_cmd: add missing fields and improve compatibility
Add missing fields in structure containing the arguments used by
the host commands handlers and change the order of parameters
in macro used for defining the handlers.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-11-18 10:11:40 +01:00
Michał Barnaś e184e45a52 ec_host_cmd: add missing status codes
Add missing status codes that can be used by host commands handlers

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-11-18 10:11:40 +01:00
Michał Barnaś 369596dc95 ec_host_cmd: increase stack size, change thread priority and alignment
This commit increases the stack size for thread handling the host
commands requests. It was required due to the stack being
corrupted using earlier default size. The thread priority is now
configurable using the Kconfig.
It also adds alignment to the tx_buffer since the npcx MCU requires it
to work correctly and removes clearing the buffer before use due to
the hard time requirements. Tests checking if buffers are cleared
are also removed.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-11-18 10:11:40 +01:00
Michał Barnaś 959d3b87fb ec_host_cmd: move the host_cmd_periph.h to subdirectory
Move the header file to corresponding directory which refers to
submodule name instead of root of drivers directory.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-11-18 10:11:40 +01:00
Michał Barnaś 1563cda9dd ec_host_cmd: remove syscalls for this subsystem
The functions for ec_host_cmd_periph are only used by statically defined
kernel thread and should never be used from other subsystem, especially
from userspace. This commit removes the syscalls prefixes from these
functions and leaves them as inline call to API implementations from
peripheral.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-11-18 10:11:40 +01:00
Jason Yuan 6ff0b79d74 drivers: gpio: Add TCA6424A driver
The driver supports 24 gpio pins which are numbered sequentially from
0 to 23.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2022-11-18 10:10:11 +01:00
Carles Cufi 3fea29d7c5 readme: Add support for light/dark modes in the logo
Use the mechanism described here:
https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to

to provide different logos for light and dark mode, so that the "Zephyr"
text is clearly visible in both.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-18 08:58:59 +01:00
Emilio Benavente 1374415a2c soc: Updated clock_init in rt6xx
Updated the clock_init function to the latest sdk
and added a safe initialization for the flash setup

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-17 13:59:39 -06:00
Emilio Benavente a3e3cbc3f9 soc: Setup up Kconfigs for safe flash code to load in SRAM
Added a selecion on rt6xx that allows the loading of
the safe flash clock initialization to be inside SRAM
if the user code is being executed from flash.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-17 13:59:39 -06:00
Emilio Benavente 9a2fa8d9c0 soc: Add safe flash clock support for MXRT685
Added Safe flash clock setup files for rt6xx

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-17 13:59:39 -06:00
Miguel Dardenne 44c27e8134 boards: adafruit m0 basic proto: Do not enable GPIO by default
Not needed for basic operation and to align with changes on
adafruit m0 lora from https://github.com/zephyrproject-rtos/zephyr/pull/50625

Signed-off-by: Miguel Dardenne <miguel.dardenne@gmail.com>
2022-11-17 12:35:55 -06:00
Miguel Dardenne 7230e46300 boards: adafruit m0 basic proto: Use DT_SIZE_K for defining partition sizes
To align with changes on adafruit m0 lora from
https://github.com/zephyrproject-rtos/zephyr/pull/50625

Signed-off-by: Miguel Dardenne <miguel.dardenne@gmail.com>
2022-11-17 12:35:55 -06:00
Daniel DeGrasse dcced505cb boards: arm: RT1010_EVK: Set FlexSPI read address option bit
Set FlexSPI read address option bit (READADDROPT) in early boot for
FlexSPI on RT1010. This fixes an issue where the FlexSPI fetch would
return invalid data, resulting an a HardFault.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-17 11:53:42 -06:00
Daniel DeGrasse 1ed776a218 soc: arm: imx_rt10xx: call CMSIS SystemInit at early boot
Call CMSIS SystemInit at early platform boot, to ensure that registers
are configured correctly on RT10xx series.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-17 11:53:42 -06:00
Pieter De Gendt 5710f609c9 tests: devicetree: add tests for DT_GPARENT/DT_INST_GPARENT
Add some coverage for the DT_GPARENT/DT_INST_GPARENT macros.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-11-17 10:18:11 -06:00
Pieter De Gendt 9e2dad91b4 devicetree: Move DT_INST_PARENT to devicetree-inst group
The DT_INST_PARENT macro belongs into the devicetree-inst
documentation group.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-11-17 10:18:11 -06:00
Pieter De Gendt 3064e58ac4 devicetree: Add DT_INST_GPARENT
Add the instance-based version of DT_GPARENT.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-11-17 10:18:11 -06:00
Daniel Leung 75fd531164 tests: mem_map: test if z_phys_unmap reclaim memory correctly
This adds a test to see if z_phys_unmap() can reclaim memory
correctly, so that the next z_phys_map() re-uses the same
address (with identical input arguments).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-11-17 15:56:04 +00:00
Daniel Leung 100eacca07 kernel: mmu: fix potential running out of virtual memory space
In z_phys_unmap(), the call to virt_region_free() is not using
aligned virtual address and space. This can result in freeing
smaller region that allocated given that inputs to z_phys_unmap()
may not be aligned. So use the already calculated aligned
virtual address and size as input to virt_region_free().

Note that the assertion and if-block in virt_region_free() to
check whether the to-be-unmapped region is within the virtual
memory region needs to be trimmed by one byte at the end.
The assertion and if-block are checking against the region
end address but (start + size) is just one byte over the end.
So subtract one.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-11-17 15:56:04 +00:00
Dominik Ermel a0380aabff doc/release/3.3: Notes on changes in MCUmgr subsystem tree
Added notes on changes in MCUmgr subsystem tree.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel dbd212844f mgmt/mcumgr: Correct documentation in img_mgmt.h
Some documentation has not been properly formatted for generating
and some has been inaccurate.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel 7048383362 doc: Move SMP transport documentation under doc/services
The commit moves MCUmgr SMP transport documentation from
subsys/mgmt/mcumgr/lib to doc/services/device_mgmt.
Documentation have been rewritten for that purpose.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel 31d4a2e7bd samples/nrf/onoff_level_light: Convert to new MCUmgr header paths
Header paths changed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00