Add a clk48Mhz node to the stm32f412 serie.
This clock is sourced by PLL_Q (default) or PLLI2S_Q
That 48MHz clock is used by the USB /SDMMC/RNG peripherals.
The sdmmc/SDIO clock is sourced by this CK48 (default)
or by the SYSCLOCK.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the configuration of the PLL Q divider of main PLL
and I2S_Q of the PLLI2S toset the PLL48MHz clock which feeds
the USB, SDMMC, RNG through the RCC_DCKCFGR2 register.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add power domains for EDMA0's channels 6, 7, 14, and 15.
For QM these are identified as IMX_SC_R_DMA_2_*, while
for QXP thy are identified as IMX_SC_R_DMA_0_*.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This has no address space and doesn't belong between peripheral
nodes. Move it up the DTSI for better visibility. No functional
change.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
imx8qm and imx8qxp have a couple of differences regarding
the peripheral address spaces and how the DT nodes are
configured, which is why using a generic DTSI (nxp_imx8.dtsi)
for the both of them is not right.
One of the differences between the two, which affects Zephyr
is the fact that irqstr's address space is different. Up until
now this has been dealt with at the board level (i.e:
imx8qxp_mek_mimx8qx6_adsp.dts), which is not right as this is not
board-specific, but rather soc-specific. Additionally, this
causes the following warning during compilation:
"unit address and first address in 'reg' (0x51080000) don't
match for /interrupt-controller@510a0000"
To fix this, add two new DTSIs: nxp_imx8qm and nxp_imx8qxp.
Each board (i.e: imx8qm_mek and imx8qxp_mek) will have to include
the DTSI for their soc instead of the generic DTSI (i.e: nxp_imx8).
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Make sure that channels are inactive before releasing them.
This way, there won't be any leftover interrupts needed to be
handled when disabling IRQs.
This patch introduces a new state: CHAN_STATE_RELEASING. This is mostly
useful for the per-channel PD support in which the ISR needs to check
that the channel PD is enabled before attempting to access its register
space.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Commit 48b98a9284 ("drivers: dma: dma_nxp_edma: disable IRQs when
not needed") moved the IRQ enable operation to edma_start() and added
an IRQ disable operation in edma_stop(). This is wrong because it breaks
the DMA API contract w.r.t dma_start() being `isr-ok` on imx8qm/imx8qxp.
As such, move the IRQ enable and disable operations in
dma_request_channel() and dma_release_channel().
Note1: managing the interrupts like this is only really needed when
dealing with interrupt controllers that have a power domain associated
with it (which is the case for irqstr on imx8qm/imx8qxp).
Note2: Zephyr has no reference count for shared interrupts so disabling
a shared interrupt without checking if someone else is using it is
dangerous.
Based on the aforementioned notes, the irq_disable() operation is only
performed if irqstr is used as an interrupt controller (which is only
the case for imx8qm/imx8qxp). Otherwise, the operation isn't needed.
Fixes#80573.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The channel state transitions are currently performed at the
beginning of each of the functions that triggers them
(e.g: edma_start(), edma_stop(), etc...). The main issue with
this approach is the fact if there's any failures after the state
transition then the channel will be in the target state without
performing the required steps for it.
For instance, during edma_config(), if any of the functions after
the state transition (the channel_change_state() call) fails
(e.g: get_transfer_type()) fails then the state of the channel
will be CONFIGURED even if not all the required steps were performed
(e.g: setting the MUX, configuring the transfer, etc...).
To fix this, split the state transition into two steps:
1) Check if the transition is possible.
2) Do the transition.
First step should be done before any configurations to make sure
that we should be performing them in the first place, while the
second step should be performed after all configurations, thus
guaranteeing that all the required steps for the target state were
performed before transitioning to it.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Bump up the hal_nxp revision to pull in the following patch:
dd8bc4f60e7("drivers: edma_rev2: add macro for CHn_CSR's ACTIVE bit")
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Refrain from using Escalation language when requesting review and
getting awareness from maintainers.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Microchip CAP12xx series are available in 3, 6 or 8 channel versions.
Co-authored-by: Benjamin Cabé <kartben@gmail.com>
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
Implement the zero latency interrupt safe APIs to the HFXO clock
commonly used by the bluetooth stach from zero latency interrupt
context.
Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add zero latency interrupt safe APIs to allow requesting and
releasing HFXO. These will be used from components running
in zero latency interrupt context, like the bluetooth stack.
Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
It is not needed to use always the system work queue to send a
message over IPC. In thread context IPC service can be called
directly. It speeds up the communication and allows to use nrfs
from the system work queue. Legacy approach could easily lead
to the deadlock if user would call nrfs from work queue and
pend on semaphore until response is received.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit includes cleanups to `kernel_service`:
- `shell_tdata_dump()`:
Adjust formatting to align with `.clang-format`.
- `shell_stack_dump()`:
Update to pass `sh` directly instead of `user_data` since
it is already assigned.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Switch from using direct `strtoul` calls to `shell_strtoul`.
This change leverages the extensive error handling provided
by `shell_strtoul`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
As `strtoul`, `strtoll`, and `strtol` guarantee to set `endptr`,
the initial `NULL` can be omitted.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Adds driver support for the charge enable (ce) gpio. This GPIO is
optional and if no GPIO is allocated the pin is assumed to be asserted.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
The ARM Thumb-1 instruction set, used by ARMv6-M and ARMv8-M Baseline
cores, does not have a valid encoding for "immediate-to-register move
without affecting flags" instruction (i.e. `mov reg, imm`), and the only
valid variant of immediate-to-register move instruction for it is `movs`,
which affects the flags.
Since none of the register initialisation instructions used here are
flag-sensitive in their context, this commit changes `mov` to `movs`.
This fixes the compilation errors with Clang/LLVM, which is more picky
about the `mov` mnemonic usage and prints out an "invalid instruction"
error when `mov reg, imm` is specified in Thumb-1 mode.
Note that GNU assembler implicitly converts `mov reg, imm` to `movs reg,
imm` when assembling in Thumb-1 mode.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Simplify `uart_cb_handler` by directly using `dev` instead of `cfg->dev`,
as both hold the same value.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Now that `CONFIG_RTIO_SUBMIT_SEM` is the default option, testing the
alternate code path requires explicitly disabling it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This updates openocd.cfg file to support flashing multiple boards
attached to the host computer.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
This reverts commit f6235e03cf.
Reason for revert:
The modifications introduced in this commit caused a problem
with the WebUSB.
As a result, these modifications are not needed and are being
reverted to restore proper operation of the WebUSB sample.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
This change brings in certain default configurations that are needed
for selection of random number generator, and to set tcp
configuration CONFIG_NET_TCP_ISN_RFC6528=n for nRF7002dk board.
Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
Add the PSA_WANT_XXX settings that might be needed for various crypto
algorithms and Keys in WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA
configuration setting.
Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
In case the peer device has NO SDP record, the result is valid,
but the result->resp_buf is NULL, it would introduce a hardfault.
Therefore, also add a NULL pointer check for result->resp_buf.
Signed-off-by: Make Shi <make.shi@nxp.com>