Commit graph

106827 commits

Author SHA1 Message Date
Francois Ramu
df86315a41 tests: drivers: flash RDP testing on stm32h7
Add the configuration to run the testcase
with READOUT_PROTECTION (RDP) on stm32h7 disco kits

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Francois Ramu
3696ee06e5 drivers: flash: stm32h7 with RDP protection
Implement the readout protection for the STM32H7 series.
Define the specific functions used by the flash_stm32h7.
Move the stm32h7 flash register manipulation in a write_optb()
to be called by the flash_stm32_set_rdp_level.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Francois Ramu
a8da57471f drivers: flash: stm32 flash ex op functions are common
Move the stm32 flash driver ex_op functions to common
flash_stm32_ex_op.c file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Francois Ramu
3e166bc209 drivers: flash: stm32 driver move sem functions for multithread
Place the flash_stm32_sem_take and flash_stm32_sem_give
function to header file for common to use in any flash driver

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Lyle Zhu
2424bfd869 Bluetooth: BR: improve br_sufficient_key_size
Currently, the minimum value of encryption key size is
`BT_HCI_ENCRYPTION_KEY_SIZE_MIN`.

Add a new Kconfig `BT_BR_MIN_ENC_KEY_SIZE`. It is used to set the
specific minimum encryption key size.
The default value is `BT_SMP_MIN_ENC_KEY_SIZE`. And it can be
configured if `BT_SMP_SC_ONLY` is not enabled.

Use `CONFIG_BT_BR_MIN_ENC_KEY_SIZE` as minimum encryption key size in
`br_sufficient_key_size`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-09 15:11:52 +01:00
Johan Carlsson
f756d0d2bd usb-c: pe: set correct sink/src ready state.
policy engine errors were unconditionally setting the state back
to sink ready. this fix sets the correct state based on the current
power role.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Johan Carlsson
9b021bc8e1 usb-c: add PE_SRC_Disabled support.
with this fix the pd stack works with type-c devices that does not
respond to pd.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Johan Carlsson
cae67312d1 usb-c: ignore VDM messaged when using PD 2.0
according to PD 2.0 sepecification VDM should be ignored
if not supported.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Johan Carlsson
0fa9ef8b07 usb-c: clear cache cc_voltage variable.
when not clearing cc_voltage the type-c current limit
will only be reported on the first plug in.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Emil Gydesen
a4df95f390 samples: Bluetooth: BAP: Refactor stream_recv_lc3_codec
Refactor the function to use net_buf_pull_mem instead of the
offset variable when decoding.

Since the offset value was always 0 before, this fixes the
incorrect decoding.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-09 15:11:23 +01:00
Daniel DeGrasse
a8182aa942 drivers: display: display_rm67162: check ret value of gpio_add_callback
Check the return value of gpio_add_callback() in the display init
function, to resolve an issue flagged by static analysis.

Fixes #81921

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-09 15:11:11 +01:00
Daniel DeGrasse
4d24120dcf drivers: display: display_rm67162: fix unsigned compare against 0
"wlen" variable set to return value of mipi_dsi_transfer should be a
ssize_t type, so that if a negative value is returned the error will be
caught and returned.

Fixes #81929

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-09 15:11:11 +01:00
Daniel DeGrasse
d7c9c4505c drivers: display: display_rm67162: fix dead code for pixel format
Fix dead code within the set_pixel_format() function for the RM67162.
This function should set the relevant data fields for the driver, then
send the MIPI DCS command to change pixel format.

Fixes #81945

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-09 15:11:11 +01:00
Andries Kruithof
dd75fc39c3 Bluetooth: Audio: add bt_ prefix when registering logging module
Add the bt_ prefix when registering logging for the media_proxy module,
to be consistent with what the other modules in bluetooth/audio do
Note that the bap_usb module shall not have the bt_ prefix

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-12-09 15:10:57 +01:00
Andrzej Głąbek
6e22d19fd2 samples: drivers: spi_flash: Remove unnecessary Kconfig option changes
It is no longer needed to enable a specific flash driver in the sample
configuration. An appropriate driver (together with its dependecies,
like the SPI bus) for a given target will be enabled automatically
based on what is enabled in DTS.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-09 15:10:47 +01:00
Andrzej Głąbek
cd3a78056d samples: drivers: jesd216: Remove unnecessary Kconfig option changes
It is no longer needed to enable a specific flash driver in the sample
configuration. An appropriate driver (together with its dependencies,
like the SPI bus) for a given target will be enabled automatically
based on what is enabled in DTS.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-09 15:10:47 +01:00
Alessandro Manganaro
5c290d8d55 drivers: bluetooth: hci: STM32WBA: Fix pub address assignment
BLE public address assignment shall be done only when
CONFIG_BT_HCI_RAW is not enabled.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-12-09 15:10:37 +01:00
Tomas Choat
bc3748ce60 net: lib: ptp: fix cpp compilation errors
Compilation errors in ptp library when using C++ compiler.
First error is due to 'class' keyword being reserved in C++
and 'class' is used as a variable name in ptp library.
Second error is due to a flexible array member in a struct
is not placed at the end.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Tomas Choat
7541742002 net: lib: ptp: Assert statements inverted
The asserts always fail because the condition is inverted.
This patch fixes the condition to verify the socket
is lower than PTP_SOCKET_CNT.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Tomas Choat
b3505fbaa6 net: lib: ptp: Fix bidir time adjustment
When the offset is larger than 1 second, the time
adjustment should still be allowed to be bidirectional.
Casting the offset to an unsigned value after the
subtraction will allow the adjustment to be bidirectional.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Tomas Choat
ecfc44469c net: lib: ptp: fix follow up msg bug
When sending follow up messages, the pre send function
does not insert the correct time stamp in the message.
Issue is fixed by calling the pre send timestamp function.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Anas Nashif
072a430cea twister: handler: open files using with statement
Use with statement to open stdout/stderr and resolve current warning
when running twister:

	ResourceWarning: unclosed file....

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-09 15:10:19 +01:00
Robert Slawinski
ef6f804d8f drivers: dm8806: link speed change interrupt handling
On the interrupt handling, one thread per driver instance is involved
into monitoring the semaphor, sends inside the gpio callback triggered
by the gpio interrupt. Each time, when the link parameters are change,
the DM8806 is generating the gpio interrupt. After getting semaphor,
the application callback function which was linked during initialization
process is called to get the new link parameters with standard API
calls

Signed-off-by: Robert Slawinski <robert.slawinski1@gmail.com>
2024-12-09 09:50:29 +01:00
Robert Slawinski
19e74f1ba0 drivers: dm8806: add new driver for davicom dm8806 phy mac
New driver for Davicom DM8806 PHY. Driver is using standar mdio API
to manage the DM8806 switch controller. Register access needs the
PHY addres or switch address to be one of five possible values, since
DM8806 has built-in five PHY's. These values should be defined in the
application .dts file. One DM8806 ethernet port must corresponds with
one ethernet PHY node with two properties for ethernet port: one for
PHY address and one for switch address - <reg> for register access from
Internal PHY Register area and <reg-switch> for register access from
Switch Per-Port Registers area. Device tree example below:

example device-tree:
  dm8806_phy: ethernet-phy@0 {
    reg = <2>;
    reg-switch = <8>;
    compatible = "davicom,dm8806-phy";
    status = "okay";
    davicom,interface-type = "rmii";
    reset-gpio = <&gpiod 2 GPIO_ACTIVE_LOW>;
    interrupt-gpio = <&gpioc 1 GPIO_ACTIVE_HIGH>;
  };

Signed-off-by: Robert Slawinski <robert.slawinski1@gmail.com>
2024-12-09 09:50:29 +01:00
Emil Gydesen
3e0c08caec Bluetooth: CAP: Fix log warning for meta pointer
Fixes the following warning:
<wrn> cbprintf_package: cbprintf_package_convert:
  (unsigned) char * used for %p argument. It's recommended
  to cast it to void * because it may cause misbehavior in
  certain configurations. String:"%s: meta %p len %zu" argument:1

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-09 09:50:12 +01:00
Andries Kruithof
d64293b185 Bluetooth: Audio: unittest fails when BT_MAX_CONN = 1
There is a unittest to verify that the distribute broadcast code procedure
is not called with the same peer twice. This test requires a minimum
of two connections, so we disable this test when only 1 connection
can be made

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-12-09 09:50:00 +01:00
Anas Nashif
30ad1901f3 twister: testplan: do not verify_platforms_existence again
We already sanitize those lists very early on, no need to call this
check again on the same lists.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-09 09:49:46 +01:00
Anas Nashif
c0dbcdab10 twister: error on invalid platforms
In case of unknown platforms in filters such as plaform_allow,
integration_plaforms or platform_exclude, report an error and exit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-09 09:49:46 +01:00
Leifu Zhao
256a51459d west.yml: update hal_intel to latest version
Update hal_intel to include ptl ish pm d0i2/ipapg support.

Signed-off-by: Leifu Zhao <leifu.zhao@intel.com>
2024-12-09 09:49:34 +01:00
Bjarki Arge Andreasen
59779ebe4b pm: policy: event: use uptime ticks
Update events to use uptime ticks, which is a monotonic clock which
in the same res as kernel ticks. This makes comparisons simple and
removes the complexity of dealing with wrapping counter values.

The wrapping is particularly problematic for events since this makes
it quite complex to track if an event has occured in the past, or
will occur in the future. This info is needed to know if an event
has actually been handled or not.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-09 03:55:52 +01:00
Chris Friedt
6aa760a4d9 tests: posix: env: colocate with single_process option group
Move the previously singular env testsuite to be with the
other features that are part of the POSIX_SINGLE_PROCESS
Option Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-09 03:55:02 +01:00
Danh Doan
5f30744b28 boards: renesas: add SCE7 entropy support on Renesas RA boards
Add entropy support for these boards: ek_ra6m1, ek_ra6m2, ek_ra6m3

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-09 03:54:50 +01:00
The Nguyen
771d910938 dts: arm: renesas: add support for sce7 trng on Renesas RA family
Add device node to support sce7 trng on RA6M1, RA6m2, RA6M3 SoCs

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-09 03:54:50 +01:00
Danh Doan
c432f3dcad drivers: entropy: Add support for SCE7 to entropy driver
add support SCE7 to entropy driver for Renesas RA

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
2024-12-09 03:54:50 +01:00
Danh Doan
9d06cd7510 manifest: update rev of hal_renesas to support Renesas RA SCE7
Update hal_renesas to add SCE7 support for Renesas RA family

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-09 03:54:50 +01:00
Jiafei Pan
fc41950960 boards: nxp: imx93_evk: add code property for gpio-keys
drivers/input/input_gpio_keys.c requires property "zephyr,code" must
be provides for gpio-keys, so add code property for imx93_evk A55
and M33 boards.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-12-09 03:54:40 +01:00
Ryan McClelland
9f8120528d pm: fix warning for missing initializer
A warning is giving for missing initalizer for field `exit_latency_us`
of `struct pm_state_info`. This adds the additional init fields.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-09 01:40:18 +01:00
TOKITA Hiroshi
1a4b7ab66c drivers: input: ft5336: Correct referencing to unexists symbol
The `n` is a non-existent symbol.
Changing it to the correct argument name to fix.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-09 01:39:51 +01:00
Daniel Leung
d1c5e1317e tests: multi_level_backend: limit allowed platforms
The tests should only be allowed on supported platforms instead
of blanket enabling on architectures. There are platforms which
do multi level interrupts but cannot run the tests.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-12-09 01:39:39 +01:00
Fabian Blatz
bea5fc71c4 tests: drivers: build_all: stepper: Add adi,tmc2209
Adds the adi,tmc2209 driver to the build all stepper test.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-07 16:01:41 +00:00
Fabian Blatz
6e799979d8 drivers: stepper: Add adi,tmc2209 driver
Adds the tmc2209 driver using the step dir interface.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-07 16:01:41 +00:00
Fabian Blatz
ba2aee24c9 drivers: stepper: Add step direction stepper common binding
Adds a step direction binding that can be used with any stepper that
implements said control interface to cut down on boilerplate code.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-07 16:01:41 +00:00
TOKITA Hiroshi
51d59fa1d1 include: zephyr: linker: linker-devnull: Fix include-guard
The implementation of include-guard is incomplete, so I fixed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-07 16:01:25 +00:00
Daniel Leung
b5b00134c5 tests: demand_paging/mem_map: move malloc config to prj.conf
Both tests set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=0 so extract
it to prj.conf. The tests require malloc arena size to be 0 to
run successful. By refactoring the config, it is now able to
with west build and still passing.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-12-07 16:01:10 +00:00
Jakub Michalski
191d38dee8 posix: define POLLPRI in posix/poll.h
Add the POLLPRI constant defined by POSIX and test for it.

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2024-12-07 14:17:11 +01:00
Jakub Michalski
f4cb7e35ec posix: define nfds_t in posix/poll.h
Add the nfds_t type defined by POSIX and test for it.

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2024-12-07 14:17:11 +01:00
Chris Friedt
55db0d84a8 tests: posix: threads_ext: remove stale comment
For a long time now, it's been possible to call
`pthread_attr_init()` and have it just to The Right Thing (TM)
without having to statically assign a stack.

Remove the stale comment and commented-out code.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-07 14:16:34 +01:00
Marcio Ribeiro
7c12e86e06 boards: esp32: correct "zephyr,sram" property under /chosen node
Correct "zephyr,sram" property under /chosen node to make board and samples
compatible with new SoC memory description.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-12-07 11:02:46 +01:00
Marcio Ribeiro
7f13961884 soc: esp32: replace hard-coded addresses and sizes by DT macros
Replaces hard-coded memory addresses and sizes with macros that retrieve
such values from the device tree.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-12-07 11:02:46 +01:00
Marcio Ribeiro
98277c9889 dts: esp32: enhance memory regions description
Add regions to .dtsi files to better describe SoCs memory

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-12-07 11:02:46 +01:00