tx_int_sem serves solely as a signal indicator and does not require signal
counting. Within eth_stm32_tx, the semaphore is reset each time a packet
is transmitted. Upon receiving the transmission completion signal, the
function exits. Signal counting is unnecessary. Change to a binary
semaphore.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Take it from the chosen flash node parent (MPI controller) 'nor'
register, which contains the memory mapped address for the NOR flash.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Ideally we should be able to just use jedec,spi-nor (to keep Linux
compatibility), but, QSPI controllers live in a limbo in Zephyr. Adding
this binding won't make things worse than they are.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Compatible should be set at board level, depending on how MPI IP is used
(e.g. NOR, NAND, PSRAM).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
During a Host-to-Device Control transfer, an arbitrary amount of data is
sent from Host to the Device using OUT Data packets. If the total amount of
data to transfer, communicated via the wLength field of the SETUP packet,
exceeds the EP0 MaxPacketSize, several Data packets until all data has been
transfered.
Combined with HAL behavior, the STM32 driver did not handle this situation
properly and always ended reception after a single Data packet was received
regardless of whether or not all data had actually been received from Host.
Modify driver to handle this situation properly by keeping track of how
much data has been received and restarting transfers until we have received
everything the Host promised it would send.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Drop all existing transfers in control endpoints' queue when a new SETUP
packet is received. Also use the appropriate net_buf API in a nearby place.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
For a reason that escapes me for now, the doc build is not particularly
fast on our hosted runners, and we are starting to hit the 20 minutes
timeout. Increase to 60 minutes to be safe for now.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Building the full docs every 3 hours is not really the best approach
given we end up building "for nothing" when things are quiet, and on the
other hand introduce a 3-hours-at-most delay for changes to be reflected
on the public docs after a merge/push.
Therefore, drop cron and do the full build on every push to main.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add missing inclusion of stddef.h and stdbool.h to respectively define
size_t and bool types used in some cache.h function declarations.
This change prevents build errors like:
.../include/zephyr/arch/cache.h:105:41: error: unknown type name 'size_t'
105 | int arch_dcache_flush_range(void *addr, size_t size);
| ^~~~~~
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This was missing despite other mikrobus labels being there. Verified
against LPCXpresso55S69_Board_Schematic_RevA2_dec4.pdf
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
detect_version() used os.environ["ZEPHYR_BASE"],
which raises a KeyError when the variable is
absent, preventing the fallback path from running.
Switch to os.environ.get("ZEPHYR_BASE") and use
Path(__file__).resolve() for the fallback so the
path is absolute/canonical.
Signed-off-by: Paul Oberosler <paul.oberosler@raspberrypi.com>
Move interrupt controller selection from SOC_FAMILY_QEMU_VIRT_RISCV
to individual SoC configurations.
This follows Zephyr best practices where hardware capabilities should
be selected at the most specific level possible (SoC porting guide).
This enables conditional selection of mutually exclusive interrupt
controllers within the same SoC.
Changes:
- Remove 'select RISCV_HAS_PLIC' from SOC_FAMILY_QEMU_VIRT_RISCV
- Add 'select RISCV_HAS_PLIC' to each individual SoC:
* SOC_QEMU_VIRT_RISCV32
* SOC_QEMU_VIRT_RISCV32E
* SOC_QEMU_VIRT_RISCV64
No functional change - all existing QEMU RISC-V boards continue to
use PLIC as before.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
This commit enhances DNS upstream resolver functionality by adding
support to query for PTR and SRV records.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
The linter is super fast, no need to limit to only changed files.
For example if the linter configuration changes, all Python files need to
be validated.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This adds a role that can be used to reference the board catalog page,
optionally with filter parameters to pre-filter the list of boards.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Suppoted feature 'usb' is not required or used in any of the USB
samples or tests. The only valid feature for USB is `usbd`, or
`usb_device` for the legacy samples and tests.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Replace `sizeof(unsigned long)` with `PMPCFG_STRIDE` (defined as
`__riscv_xlen / 8`) for dimensioning PMP configuration register arrays
(`pmpcfg_regs`).
The size of PMP configuration registers should be derived directly from
the target architecture's XLEN. Using `sizeof(unsigned long)` can cause
size mismatches, particularly with static analysis tools like SonarQube.
These tools might assume a host-specific size for `unsigned long`,
leading to spurious out-of-bounds access warnings when analyzing code
for different RISCV base architectures (e.g., RV32 vs. RV64).
This change ensures the array sizing is correctly and consistently tied
to the target's register width (XLEN).
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Add test cases verifying that invalid credentials are rejected by the
socket when configured on TLS/DTLS socket with TLS_SEC_TAG_LIST socket
option.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
So far the TLS/DTLS credentials would only be validated upon first use,
i. e. when TLS/DTLS handshake was initiated. This could lead to some
confusion, especially when trying to understand the reason of the
handshake failure, as it wasn't clear whether the handshake failed due
to peer sending bad certificate or due to local configuration issues.
This commit attempts to improve this, by pre-validating the credentials
as soon as they are configured on a socket with TLS_SEC_TAG_LIST socket
option. That way, in case bad credentials are configured on a socket, or
more commonly, mbed TLS is misconfigured to handle certain credential
type, it will be caught early during socket configuration, instead of
during the handshake.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Updatehub now only use PSA Crypto API for crypto support and it
automatically enables Mbed TLS when TF-M is not available in the build,
so there is no need for neither a specific test case for PSA nor
the overlay file.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Following the removal of legacy crypto support the code could be further
simplified so this commit accomplish to this part.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The long-term Zephyr's goal is rely only on PSA Crypto API for crypto
support in Zephyr and at the same time Mbed TLS will remove this support
from the next release.
Therefore this commit removes usage of legacy crypto hash support from
updatehub.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Update workflow to use the new version of Vermin to enrich the Python
minimum version checks in the CI pipelines.
Signed-off-by: Morten Kristensen <me@mortens.dev>
The "status" property was defined after the pllX subnodes
in pll node, which violates the Devicetree Specification
v0.4, section 6.3:
"Nodes may contain property definitions and/or child node
definitions. If both are present, properties shall come
before child nodes."
This caused the Device Tree Compiler error: "Properties
must precede subnodes. Unable to parse input tree"
This commit moves the "status" property to precede all pll subnodes,
fixing the syntax error and ensuring compliance with the Devicetree
Specification.
Signed-off-by: Stanislav Bobokalo <stas.gurland@gmail.com>
Apparently some compiler may expect the fields initialized in a certain
order when there are anonymous fields in a struct.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
A previous commit (84163d3) changed the RTT backend from outputting a
binary stream to a hex encoded stream when dictionary logging is
enabled.
This commit adds a Kconfig option to keep the binary format, which is
required for live_log_parser.py, and also for log_parser.py when the
--hex argument is not used.
Signed-off-by: Jesper Puge Nielsen <jpni@demant.com>
Add a new overlay for testing the M1K flash controller:
it515xx_m1k.overlay (only supported on it515xx_evb)
Update testcase.yaml to include this overlay with DTC_OVERLAY_FILE
and platform_allow accordingly.
example:
west twister -p it515xx_evb -s drivers.flash.common.it515xx_m1k
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Refactor the flash common test setup by moving the flash0 node from
it8xxx2_evb, it82xxx2_evb, and it515xx_evb board DTS files into
dedicated test-specific overlays under
tests/drivers/flash/common/boards:
it8xxx2_indirect.overlay for indirect flash testing
Update testcase.yaml to reference this overlay using DTC_OVERLAY_FILE
and restrict platform availability with platform_allow for the three
supported board: it8xxx2_evb, it82xxx2_evb, and it515xx_evb
example:
west twister -p it8xxx2_evb -s drivers.flash.common.it8xxx2_indirect
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Extend the IT51XXX M1K flash controller driver to implement the flash
extended operation (ex_op) API. This allows runtime selection of both
the flash device and the addressing mode:
Flash target selection:
- FLASH_IT51XXX_INTERNAL: on-chip SPI eFlash
- FLASH_IT51XXX_EXTERNAL_FSPI_CS0: external SPI flash on FSCE0#
- FLASH_IT51XXX_EXTERNAL_FSPI_CS1: external SPI flash on FSCE1#
Addressing mode selection:
- FLASH_IT51XXX_ADDR_3B: 3-byte (24-bit) addressing mode, supports
flash devices up to 16MB capacity
- FLASH_IT51XXX_ADDR_4B: 4-byte (32-bit) addressing mode, required
for devices larger than 16MB
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>