If the underlying PWM device does not have a PM callback,
the PWM LED driver will flood the console with error logs.
The change ignores the error if there is no PM callback
for the PWM device.
Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
Add wakeup_duration support. (WAKE_DUR in WAKE_UP_DUR)
Value is configurable through DT per instance.
Signed-off-by: Adrian Wojak <adrian.wojak@outlook.com>
Use a new property, "clock-mux" to select the clock mux for the SAI.
Previously, the clock mux was being selected using the "bits" specifier
of the "clocks" phandle property, which is not the purpose of this
specifier. This can be shown by the regression introduced by 5bebbb91,
which changed the "bits" field to the clock gate shift (which is the
intended meaning).
This incidently worked for the SAI1 and SAI3 peripherals, as the lower 2
bits of the correct clock source selection (0b10) are the same as the new
value placed in the "bit" specifier. For SAI2, the clock source was
switched to PLL3 PDF0 by this change.
To resolve this, use an explict "clock-mux" property for this selection.
Fixes#63541
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
As the automatic start requires that the zephyr exe is run as
a root user, it is somewhat cumbersome to use. Remove the script
support and require that the zeth device is created beforehand
by the net-setup.sh script found in net-tools zephyr project.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This change slightly simplifies the configuration of a CSL receiver and
generalized CSL_RX_TIME to EXPECTED_RX_TIME as a re-usable primitive
across several timing-sensitive IEEE 802.15.4 standard sub-protocols
(namely BE-PANs/DSME/CSL/RIT/TSCH).
This API change is based on the rules outlined in RFC #61227.
Fixes: #62918
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Improves standard conformance of the IEEE802154_CONFIG_ENH_ACK_HEADER_IE
option and introduces certain "soft MAC" capabilities around header IEs:
* Introduces types and helpers that allow driver maintainers to
represent, parse, write and validate header IEs.
* Introduces helper functions to access non-aligned fields in header
IEs, namely element IDs.
Updates the only existing L2 and driver pair that uses
IEEE802154_CONFIG_ENH_ACK_HEADER_IE: OpenThread platform radio and nRF5
and improves header IE validation in the nRF5 driver.
This change should help further driver maintainers to support
OpenThread's CSL and vendor IE extensions. It is based on the rules
specified in RFC #61227.
It is also a precondition to generically support both, "soft MAC" and
"hard MAC", approaches to header IEs in the TSCH protocol, namely the
time synchronization IE.
Fixes: #62940
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
"Sleeping" has a well defined meaning in Zephyr related to threading and
power management. This differs from OpenThread's definition:
- Deprecates the "SLEEP_TO_TX" capability as it is redundant and
conflicts with all of Zephyr's nomenclature, #61227, RFC 2863, Thread
standard and IEEE 802.15.4. This binds the API to an implementation
detail of OpenThread, instead. See #63670 for the agreed migration path.
- Renames the "SLEEP" event to "RX_OFF" which conforms to the
nomenclature in Zephyr, this API and IEEE 802.15.4.
Fixes: #62995
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
As noted in PR#63165 checking of result should use comparison to
success value instead of checking if result is negative. It will
allow to check if function returned invalid but positive value.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
These two functions are used together so there is no need for
splitting them into two functions. This commit also makes this
function required to be implemented by the TCPC driver.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
TCPC API functions should be able to inform the caller if the function
is supported and successfully executed. Bool values doesn't allow this
so it is needed to change the type to int.
For is_rx_pending_msg function the return code should conform to
existing error codes, so in case of function being not supported,
the -ENOSYS should be returned. In case of successful execution,
if there is no pending message, the -ENODATA should be returned and
in case of message pending, the value of 0.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Add "chip" subcommand that displays the vendor, product and device
identifiers for all TCPC referenced by USB-C connectors.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Add a new SPI shim driver for Intel SoCs. Builds upon the SEDI bare
metal SPI driver in the hal-intel module.
Co-Authored-By: Kong Li <li.kong@intel.com>
Signed-off-by: Ye Weize <weize.ye@intel.com>
The receive FIFO needs to be drained in a different way depending when it
is done.
- before start
If the RX FIFO is in overflow state then we must read all the entries out
to empty it (it was after all full).
- before stop
The DMA might be already running to read out data. Check the FIFO level
change in one sample time which gives us the needed information to decide
to wait for another loop for the DMA burst to finish, wait for the DMA to
start it's burst (DMA request was asserted) or drain the FIFO directly.
No need to drain the RX fifo at probe time.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Update interface of memc flexspi driver to better handle multiple
devices. Previously, using multiple devices on one FlexSPI bus would
require the user to configure each device to install its command table
(referred to as a LUT table by the driver) at an offset, so that it did
not overlap with other devices on the bus.
This commit changes the interface of the memc flexspi driver to instead
configure the LUT and flash device in one call. This allows the memc
driver to record the port each LUT sequence is used with, so that
future FlexSPI transfer requests can have their LUT offsets adjusted
based on the target port (which will correspond to a target device)
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Check XIP state based on the value of CONFIG_FLASH_BASE_ADDRESS. This
check should be more reliable than the SOC based method currently
used.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Introduces a (currently redundant) buffer length sanity check to prepare
for L2s that support PHYs with PHY payloads > 127 bytes.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Introduces a (currently redundant) buffer length sanity check to prepare
for L2s that support PHYs with PHY payloads > 127 bytes.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
When LPUART1 is not defined, the driver did not compile even if
any other LPUART was defined. This patch fixes that.
Signed-off-by: Nando Galliard <nando.galliard@protonmail.com>
Updated the Async API allowing the code path
for DMA while Async is enabled. Added common
DMA function that sets up both tx and rx dma
channels.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Annotate the calculation with type casts to force
promotion to uint32_t and then cast back down
to uint16_t for the return. This solves the issue
with invalid voltage (mV) values being returned
due to overflow during the conversion from the
register value on the max17048 chip.
Signed-off-by: Martin Calsyn <martin.calsyn@outcomex.com.au>
There is no fallthrough statement or comment so I assume break is
missing.
Fixes build time warning from some tools.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Currently the Kconfig for eth_mcux selects nocache if
HAS_MCUX_CACHE is set. But, for platforms that have a flexspi
cache but not a CPU cache, this is invalid, so clarify this
in the Kconfig definition.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This reverts commit 1c2d326579.
which was limited to CONFIG_UART_ASYNC_API=y case and causing regression
otherwise.
Fixes#63885
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add option for overriding the maximum number of wait loop iterations for
entering/leaving freeze mode. Set the default to 10000 (as opposed to a
default of 1000 used in the HAL).
Fixes: #56171
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
i2c_rcar.c includes soc.h header which doesn't need for this source
and exists not for all boards. soc.h header doesn't exist for rcar-gen3
soc based on arm64 core.
soc.h consists soc-depended defenitions and need to be included
by soc-depended sources.
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Only copy frame data for non-RTR frames as RTR frames do not carry any
data. The limitation of how much data to copy is currently handled in the
NXP HAL.
Fixes: #57002
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Only copy frame data for non-RTR frames as RTR frames do not carry any
data. Limit the amount of data copied to the actual DLC.
Fixes: #57002
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The k_mem_block structure has been obsolete for some years with
a few loose ends still remaining. As its usage in the usb_dc_mcux
codebase was confined to needing its "void *" pointer field, it
was simple to enough to hoist that field to remove another loose end.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
If the channel was used for 16bit in the once, subsequent 32bit sample size
audio will be broken since the SCS bit remains set.
Example sequence with SOF:
normal audio playback with 16bit
ChainDMA audio playback with 16bit
normal audio playback with 16bit
The last playback results garbled audio.
Introduce intel_adsp_hda_set_sample_container_size() helper function
to handle the SCS bit and use it in the driver.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>