The enum kLPI2C_TransferRepeatedStartFlag is not used in fsl_lpi2c.c,
so it shouldn't be used in mcux_lpi2c drivers.
Update nxp hal to get latest version of lpi2c drivers.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
Replace DT_ENUM_IDX_OR with DT_NODELABEL usage with the more appropriate
DT_INST_ENUM_HAS_VALUE macro for checking the version property value.
This improves code readability and uses the proper devicetree API for
enum value checking.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
This property can be used by various modems. Used it successfully with
nRF91-SLM when waiting for "Ready" signal after automatic power-on.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
SAADC peripheral might need to be disabled twice in more cases.
Workaround for nRF53 Series anomaly 135 misused parenthesis.
Templates for nRF54LS05A SoC were missing inclusions.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
In net_context_get(), contexts[i].local is memset to zero before
find_available_port() is called. This leaves sa_family as 0, which
causes check_used_port() to skip both the IPv6 (sa_family ==
NET_AF_INET6) and IPv4 (sa_family == NET_AF_INET) collision-detection
branches, unconditionally returning "port available".
When the PRNG produces the same random port for two consecutive
socket() calls, the collision is not detected and both contexts are
assigned the same ephemeral port. The duplicate is only caught later
during listen() → net_conn_register(), which finds the identical
connection handler and returns -EADDRINUSE (errno 112).
Fix by setting sin6_family / sin_family on the local address
immediately after the memset and before find_available_port() is
called, so that check_used_port() enters the correct address-family
branch and properly detects port collisions.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
Remove the error check because it may misjudge some right cases.
For example, for HSUSBD, in the case Setup-DataIn-StatusOut and
immediately following Setup-DataOut-StatusIn, the DataOut in the
second Control transfer has arrived but user buffer for OUT may
be only ready for StatusOut in the first Control transfer.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The scheduled transfer message can be just a hint and its attached
transfer buffer can be NULL. Skip this case.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The crash results from Control transfer STALL interrupt flag
not cleared. To catch all uncleared interrupt flags, all Control
transfer interrupt flags are cleared altogether at one place
instead of separately, with their handling order not changed.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The exthdr_len was previously validated against the total
packet length, which did not account for the header's offset.
This could allow a crafted packet to cause an out-of-bounds
read by claiming a length that exceeds the remaining buffer.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/106331
This commit:
1. Validates exthdr_len against (pkt_len - start_offset).
2. Adds strict bounds checking for sub-options (PADN/others)
to ensure they do not exceed the extension header boundary.
3. Validates the return value of net_pkt_skip().
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
On PD capable SRC detach, DPM was not being notified of
POWER_CHANGE_0A0 or NOT_PD_CONNECTED. Fix by notifying
POWER_CHANGE_0A0 in tc_attached_snk_exit() and NOT_PD_CONNECTED in
pe_suspend_entry().
On PD capable SNK or SRC detach, pe_suspend_entry() did not clear
the explicit contract flag. Fix by clearing PE_FLAGS_EXPLICIT_CONTRACT
in pe_suspend_entry().
On PD capable SNK attach, DPM was not being notified of PD_CONNECTED
at the correct time. Fix by notifying PD_CONNECTED when PS_RDY is
successfully transmitted (source) or received (sink), using
atomic_test_and_set_bit() to prevent duplicate notifications during
renegotiations.
Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
Since RM1170 Rev. 5 the RC400 gate control bits are marked reserved.
Remove the call to CLOCK_OSC_GateOscRc400M since the headers need
updating to remove it completely as done with the RT1180.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
WPA3 test case 19.5.2 (ECC P384 client certificate) requires the STA to
offer only TLS_ECDHE_ECDSA_AES_256_GCM_SHA384, which exists only in
TLS 1.2. In mbedtls 4.x, this SuiteB cipher is not available in TLS 1.3,
causing the ClientHello to miss the required cipher.
Disable TLS 1.3 when using SuiteB‑192 with P‑384 so that TLS 1.2 is
used and the correct cipher suite is advertised.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
- xt-clang seems to generate some memory access patterns which
result in the simulator accessing incorrect memory or messing
with cached TLB entries when spinlock validation is enabled.
- This is the same issue that was fixed for ace40 in commit
b98fc2740a (fixes#100885). Apply the same workaround to
ace30/ptl/sim and ace30/wcl/sim.
Signed-off-by: Jjateen Gundesha <jjateen97@gmail.com>
The UARTE_GET_CUSTOM_BAUDRATE macro used an incorrect formula that
did not match the one specified in the nRF54x UARTE datasheet.
The correct formula is:
2^12 * floor(2^20 / round(f_PCLK / desired_baudrate))
Update the macro to match the datasheet formula, to reduce the
baudrate error for high-speed UART instances on nRF54x devices.
Signed-off-by: Ahmed Ahmed <ahmed.ahmed@dewinelabs.com>
net_if_carrier is to be used independently of the
administrative state (start and stop of the ethernet_api).
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Building for nrf5340dk cause link time failure as:
undefined reference to `tfm_platform_gpio_pin_mcu_select'
It only happens with this platform, not with other ones in the allow
list, therefore we pick another Nordic one as integration platform and
disable nrf5340dk.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Install Mbed TLS headers because they are required to build TF-M's NS
application (which is built differently from Zephyr's one).
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
- CMakeLists: do no TF-M interface include path to the app. "tfm_api" lib
already provides this and most importantly all the fixes which allow
the coexistence of Mbed TLS 4.x and TF-M 2.2.
- Replace functions which has been removed from PSA API:
* psa_open_key: keys are automatically loaded from the persistent storage
when used.
* psa_close_key: replaced with psa_purge_key
* psa_key_handle: replaced with psa_key_id_t.
- Adjust mbedtls_x509write_csr_pem to new version of Mbed TLS 4.x, i.e.
without RNG parameters. Remove also psa_rng_for_mbedtls because it's
now useless.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
In PSA client mode (e.g. TF-M NS builds) MBEDTLS_PSA_CRYPTO_C is not
set, so crypto_adjust_config_enable_builtins.h is skipped in the config
processing chain (build_info.h guards it with MBEDTLS_PSA_CRYPTO_C).
Without it MBEDTLS_ECP_C, MBEDTLS_BIGNUM_C and the curve macros are
never derived from PSA_WANT_*. The builtin source files (ecp.c,
bignum.c, ecp_curves.c) are always GLOBbed into the builtin target
but compile to empty without these symbols. Manually define what
enable_builtins.h would have set so the implementations are compiled
(PRIVATE on builtin) and the declarations are visible to consumers
(INTERFACE on mbedTLS).
These symbols are flagged as removed by the tf-psa-crypto config
validation in tf_psa_crypto_config.c. The builtin target already
has TF_PSA_CRYPTO_CONFIG_CHECK_BYPASS; extend the bypass to the
tfpsacrypto core target so the INTERFACE definitions do not trip
the check there either.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Co-authored-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
When CONFIG_TFM_USE_NS_APP is set TF-M will build its own NS application
which requires Mbed TLS include files to be installed in the interface
directory. This conflicts with "tfm_api". However this library is not
required in this case because TF-M builds another NS interface library
so we can simply exclude "tfm_api" from the build.
Since "tfm_api" is the reason for which CONFIG_MBEDTLS is implied in
CONFIG_BUILD_WITH_TFM, we gate this condition with !CONFIG_TFM_USE_NS_APP
as well.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
We modified TF-M CMake scripts so that legacy Mbed TLS 3.6.5 header files
are no more installed in TFM_INTERFACE_INCLUDE_DIR. This resolves all
the conflicts we had before and that we need to fix with extra compile
options.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Include a fix in CMake that prevents TF-M from installing Mbed TLS 3.6.5
include files into the binary interface directory. This prevents conflicts
with the Mbed TLS 4.x include files that Zephyr is now using.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Replace SOC_SERIES_CH32V00X with SOC_SERIES_QINGKE_V2C to maintain
consistent naming across SOC series.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
- Add shared_memory to custom mpu regions for Infineon pse84 soc series
- This resolves a bug in the wdt_basic_api test running on the m55 core
for both the kit_pse84_eval and kit_pse84_ai platform
Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
validate the assumptions about buffers returned by alloc_buf() in the
LE CoC receive path.
if the returned buffer does not provide enough user_data space for the
internal segment counter, disconnect and drop the buffer instead of
reading or writing past the metadata area.
also document that alloc_buf() must return a buffer with at least
sizeof(uint16_t) bytes of user_data.
Signed-off-by: Oleh Konko <security@1seal.org>
Make sure that we don't allow bindings which manually
specify any defaults for the status
properties. See DTSpec 2.3.4.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
The status property indicates the operational status of a device.
The lack of a status property should be treated as
if the property existed with the value of "okay".
We are currently allowing defaults.
This is a continuation of
https://github.com/zephyrproject-rtos/zephyr/pull/104931
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Use pa11y to run axe and htmlcs on a few key documentation pages
to ensure they meet WCAG and other recommendations in terms of
accessibility.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Really small color tweaks to ensure most common background/foreground
color combinations hit a minimum of 4.5:1 contrast ratio.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As per WCAG 1.4.1, add a sligth tweak to the links in body text so that
they can be visually distinguished from other text.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The "gp" class didn't have any custom styling, so it was inheriting a
default color from rtd theme, with no adjustment for dark vs. light
mode.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The footnote labels and brackets were using a default "gray" from
RTD theme. Add the proper selectors to override in our custom.css and
set to the relevant color variables from the dark and light themes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes a missing closing </ul> tag that had gone unnoticed (and apparently
does not cause rendering issues either!).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
A couple of <span> tags were left unclosed in the searchbox HTML, fix it.
Also fix incorrect aria-haspopup attribute value.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/w1`
- `drivers/watchdog`
- `drivers/wifi`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/rtc`
- `drivers/sdhc`
- `drivers/sensor`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/interrupt_controller`
- `drivers/led_strip`
- `drivers/lora`
- `drivers/memc`
- `drivers/mfd`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>