Turn MCX series into families.
Reasoning:
1. The MCX SOCs are quite different from each other and having them all
under one family in the HWMv2 hierarchy is fruitless because there
are so many differences that it is confusing to try to introduce
family-level code and configs since they would each only apply to a
subset of the series. There is almost nothing that can be shared
between all of them. Which is why there are comments in the MCX
family files saying not to put anything in them. This is a technical
waste.
2. Therefore, turning all of them into families is almost 0 effort and
makes sense. It will allow these different types of MCX to be
further subdivided into series in the future as the MCX portfolio
expands and such division will be necessary as new SOCs within each
letter family are released.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There are cases, for example when peer is requesting two DNS
addresses, but we can only give one, we should reject the secondary
DNS request first, before sending NAK to acceptable options.
Option parser can reject a parameter by returning -ENOTSUP and when
it wants to NAK the parameter, it returns -EINVAL.
On RFC 1661:
Configure-Reject
If some Configuration Options received in a Configure-Request are
not recognizable or are not acceptable for negotiation (as
configured by a network administrator), then the implementation
MUST transmit a Configure-Reject.
Configure-Nak
If every instance of the received Configuration Options is
recognizable, but some values are not acceptable, then the
implementation MUST transmit a Configure-Nak.
So as stated by RFC, we should start the negotiation by rejecting all
parameters that we cannot configure. I added an example of rejecting
DNS requests, if we don't have those.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When Kconfig option CONFIG_NET_L2_PPP_OPTION_DNS_USE is enabled,
Zephyr should request two DNS addresses in IPCP negotiation by sending
IPCP ConfReq for DNS otions using 0.0.0.0 as an address.
Remote peer may offer DNS by sending IPCP ConfNak with proper address.
This is explained in RFC 1332 and RFC 1877 (DNS extension).
When no DNS is required, we should only send IPCP ConfReq for IP
address, without having DNS fields in the same request.
However, when PPP is configured to serve a DNS using Kconfig option
CONFIG_NET_L2_PPP_OPTION_SERVE_DNS it should serve the DNS address in the
IPCP ConfNak message and from the ipcp.peer_options structure, not from
the ipcp.my_options.
This might break backward compatibility outside this repository
as DNS addresses used to be served from ipcp.my_options.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Some APIs taken in_addr/in6_addr pointer w/o const qualifier, while they
do not actually intend to modify the provided address. This commit
adds the missing const qualifier where applicable.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Allow passing characters to strip for zephyr-keep-sorted. This can be
useful for optional double quotes in yaml maps.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Ensure uart_configure() only updates UART parameters without
reassigning pin configuration. Pin assignment via pinctrl is now
restricted to the initialization procedure, guaranteeing pins are
set only when properly configured.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
There was an observed situation where the assert checking frame length
is below 128 bytes was hit. While the nrf-802154 checks that the frame
does not exceed that size, there might exists code paths that allow such
packets to pass through.
The change removes the assert and drops the packet instead.
An error is also printed to allow for further debugging.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Remove mentions of st_counter_value which has been renamed to st_timeout.
Rework slightly the sample behavior to better demonstrate the interest
of st,timeout which allows to define an timeout matching exactly the
application needs.
Reword the various comments to make it hopefully clearer to the reader.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To be consistent with the definition of label stm32_lp_tick_source,
be sure "st,timeout" is taken from the LPTIM defined as lp_tick_source.
Then, fix the computation of lptim_time_base.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Fix the non-IRAM interrupt disable routine to use non_iram_int_mask[cpu]
directly instead of its bitwise inverse. The previous implementation used
the wrong mask and could affect unrelated interrupts. This change ensures
that only intended non-IRAM interrupts are disabled and restored.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix bitwise operation when freeing an interrupt to correctly clear the
VECDESC_FL_NONSHARED, VECDESC_FL_RESERVED, and VECDESC_FL_SHARED flags.
Also reset the interrupt source to ETS_INTERNAL_UNUSED_INTR_SOURCE to
ensure proper cleanup and prevent issues with future allocations.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Replace global lock variable with function-local storage for irq_lock()
state. This fixes a race condition when multiple access enter or exit
the critical section at the same time. Now each lock/unlock pair uses
its own key, making interrupt safe.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
disable debug in general as it is too verbose and hides test output.
However, this now fixes an issue in the test itself after 4.2 release.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
don't use global buffers for reg_read and reg_write,
so we only need to rely on the spi drivers lock and
don't have to use our lock.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The requested SPI clock rate and the actual rate that is set can be
different depending on the peripheral clock and divisors available to
the SPI peripheral. For some MAX32 SoCs, actual rate ended up being
higher than the devicetree setting. This would then cause latency tests
to fail as transfers finish earlier than minimum expected duration.
Update the test frequency values in several MAX32 board overlays to pass
latency tests.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
spi_configure was returning HAL error codes that are incompatible with
Zephyr error definitions straight back to the caller. Replace these with
error codes that Zephyr can correctly interpret.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Driver was not handling SPI word sizes other than 8 bits. Apply DFS
shift wherever necessary to support non 8-bit transfers.
DMA mode cannot support word sizes that are less than 8 bits so return
-ENOTSUP if word size less than 8-bits is required.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
In the BAP Broadcast Sink implementation the sync request,
the BIGInfo and the broadcast code can come in any other.
Currently the btp_bap_broadcast_sink_bis_sync would reject
the request if it came before the BIGInfo, but will now
instead store the request and then apply it once the BIGInfo
has been received, as there is not BIGInfo BTP event that the
caller can use.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Nicla Vision datasheet is referring to the 8-bit wire address (0x52) for
the VL53L1X sensor, so that's likely what ended up being used in the
board's devicetree. However, it's the 7-bit I2C address that should be
used so fix that by changing the I2C address to 0x29. Successfully
tested on actual hardware.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Avoid redeclaring 'err' inside a nested block, which shadowed the outer
definition.
This cleanup prevents confusion and potential logical bugs.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoid redeclaring 'err' inside a nested block, which shadowed the outer
definition.
This cleanup prevents confusion and potential logical bugs.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoids shadowing the outer 'err' variable by reusing it instead of
redeclaring a new one inside conditional blocks.
This improves clarity and prevents confusion during debugging.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add the service_area section to the list of sections for which objcopy
is executed. As this section was missing from the resulting data image,
it prevents targets (right now, the mimxrt685s/hifi4) from booting.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
1. enable sensor/nxp,lpcmp support
2. verified samples/sensor/mcux_lpcmp
3. update the mcux_lpcmp to support different port
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Reading back the raw interrupt status from the gpio controller, provides
the interrupt mask _without_ the controller's masking registers applied.
This means that e.g. a rising edge would trigger an interrupt even on
pins that are configured for falling edge only.
Fix this by reading the "enabled" interrupt status instead of the raw
one.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
The polarity mapping was swapped such that GPIO_INT_TRIG_LOW would
translate to high, and vice versa, on the chip configuration.
Swap the polarity to fix this.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
This commit implements the gpio_get_config handle for the gpio_mspm0
driver.
NOTE: Currently only handles input/output state and not configured flags
Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
Prior to this commit, writing a gpio port would completely clear
the state of given port. This commit ensures that state is kept
when writing, reading and configuring gpio ports.
Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
Add a new flash for toggling runtime SFDP data fetching, and use static
devicetree properties by default. Clean up various minor items from review.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Properly configure the MAX32 SPIXF peripheral to use the SPIXF controller
for transparent memory mapped reads, and enable the SPIXF main controller
and use it for writes.
Add support for testing XIP support to the nocopy sample, which requires
flashing with OpenOCD with MAX32690 QSPI flash support.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Update common flash test and jesd216 samples to work on the
APARD32690-SL board which has MX25U6432FM2I02 on-board.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Xilinx Window Watchdog driver uses window watchdog mode. Window watchdog
timer(WWDT) contains closed(first) and open(second) window with 32bit
width each. Write to the watchdog timer within predefined window periods
of time. This means a period that is not too soon and a period that is
not too late. The WWDT has to be restarted within the open window time.
If the software tries to restart WWDT outside of open window time
period, it generates a SoC reset.
Signed-off-by: Harini T <harini.t@amd.com>
Xilinx Window Watchdog Timer IP uses window mode.
Window watchdog timer(WWDT) contains closed(first) and open(second)
window with 32 bit width each. Write to the watchdog timer within
predefined window periods of time. This means a period that is not too
soon and a period that is not too late.
The WWDT error interrupts (IRQs) occur when the watchdog timer is not
serviced within the predefined window periods. These IRQs are routed to
the Processing System Manager (PSM) error accumulator module. The PSM is
responsible for managing power and system-level errors, generating a
System on Chip (SoC) reset when a WWDT error occurs. The system reset
event is signaled as a system error for the PSM firmware to handle and a
reset output signal to the MIO/EMIO.
Signed-off-by: Harini T <harini.t@amd.com>
add bt_conn_br_switch_role and bt_conn_br_set_role_switchable to control
the role switch, add DEFAULT_ROLE_SWITCHABLE Kconfig to control the default
role switch state.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>