Remove useless OR operation on return value is udc_stm32_enable()
since the return value is always 0 before it's OR-ed with a new return
value.
No functional changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Change implementation to ensure all boolean test are done on essentially
boolean values.
No functional changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Rename endpoint configuration pointer variable in HAL_PCD_ResetCallback(),
udc_stm32_ep_mem_config() and udc_stm32_ep_disable() from ep to ep_cfg
to prevent confusion since ep is usually used as endpoint address.
For consistency, also use ep_cfg elsewhere where an endpoint config
pointer is used, instead of using either cfg, ecfg and ep_cfg.
No functional changes.
Suggested-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The condition for setting the GPOMD bit when `port0_push_pull`
is enabled was reversed.
Fix this problem.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add flash and psram dts based on RT700 board resource.
Add the clock and power setting for XSPI in board specfic initilization
function.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Move nxp,xspi.yaml from spi bindings to mtd, it should be flash
controllor rather than simple bus controller.
Delete the xspi flash mx25um51345g bindling yaml file which is useless.
Enable flash and two psrams on RT700 core0 and one psram on core1.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
In NPCXn variant, the I2C peripheral hardware uses FIFO for data
transfer, while in NPCKn variant, it uses DMA.
This change separates the FIFO-specific code from the common controller
logic and adds support for DMA mode.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Add an new boolean property `dma-driven` to indicate if the I2C
hardware module has a dedicated DMA support for the data transfer.
Add this property to `i2c_ctrlx` nodes in NPCKn variant SoCs.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Dropped the device argument from i2c_silabs_pm_policy_state_lock_get/put.
Updated all internal usage.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Updated the I2C driver for EFR Series 2 devices based on the
design improvements in the SiSDK I2C implementation
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The Analog Device AD5601, AD5611, and AD5621 devices are 8, 10 and 12
bits DAC respectively.
These devices use a 16 bits SPI communication protocol.
The 2 first bit encode the low power mode (this driver do not use the
low power mode, it always run in the 'normal' mode).
The next 14 bits contain the left aligned value. The 2, 4, or 6
remaining bits (depending on the resolution) are set to 0.
Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
This commit enhances the SPI shell in a number of different ways:
- Previously only spi buses could be specified in the shell.
Now both spi buses and spi devices (physical device on the spi bus,
not the device struct) can be specified.
- Both spi buses and spi devices can be specified by their node name or
by any of their node labels.
- Instead of having a single instance of a spi config struct, each spi
bus/device has it's own dedicated config. This means that
users only have to configure spi config once for each device and use
them freely, without needing to reconfigure them every time after
switching between different spi buses/devices.
- Spi devices get their spi configs automatically from the devicetree at
compile time. This means that once a good working configuration is
found for a spi device, that can be specified as a "default" in the
devicetree.
- Spi devices don't need to have their status set to "okay" or be
initialized by their driver to be accessible from the spi shell. As
long as the spi bus that they are on has status="okay", they can
be accessed.
- When changing a cs pin with spi cs command, the spi device/bus
needs to first be specified before specifying the gpio device.
The nested dynamic subcommands enable users to autocomplete both
of the arguments.
Implementation details
- It was possible to gather all the information about the spi devices
from the devicetree at the compile time, but not for the spi buses.
For the spi devices we have a way to get spi device nodes that are
on an okay spi bus with a devicetree macros and extract data from
those nodes. For the spi buses that is not possible,
since there is no macro to get all spi bus nodes at once.
- So, for the spi buses this discovery step has to be done at the
runtime, with the help of SYS_INIT macro and shell_device_filter
function.
- Since we now allow users to either specify a spi bus or a spi device
by their node label or their node name, we needed to have a way to map
those strings to the correct spi config struct, so we can later pass
it to the spi API functions or do some configuration on it. That is
made possibly by the find_spec_by_label and the two arrays,
spi_things and maps.
Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
Allow the display to also use if() instead of #if by leveraging the
DEVICE_DT_GET_OR_NULL() that permit display_dev to always be defined.
The compiler will const-fold all the unused variables and functions.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Centralize exit of all helper functions and display a common message
that indicates clearly that the sample is not blocking on any function
but instead stopped running.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Turn the test part of the sample code into a dedicated test into the
tests/ directory instead of just samples/.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Use the same error handling implementation as everywhere else in the
video area and the majority of Zephyr:
ret = error();
if (ret < 0) {
return ret;
}
Signed-off-by: Josuah Demangeon <me@josuah.net>
Use an "app_" prefix for all functions local to the application.
This avoids accidentally using "display_" or "video_" prefix that
are reserved for the respective area.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When possible, make use of C if statements instead of preprocessor #ifdef.
This still allow conditional compilation by letting the compiler
garbage-collect unused code.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Increase log verbosity to print one line per captured frames and make
it like in the README by default. This avoids giving the impression
that the capture sample does not work. Users desiring to get better
performance can disable logging or reduce verbosity from INF to WRN.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When possible, use static initializer instead of memset() and
initialization at runtime. Fixes a bug where uninitialized memory of caps
would be used, in case drivers do not initialize them like they should.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Add an always-on CID for enabling the test pattern, which makes
it possible to use it in tests enabling the test first enabling
the pattern.
Signed-off-by: Josuah Demangeon <me@josuah.net>
- Updated the testcase to test `z_riscv_fault()` error handling path.
- The main file is now fully assembly so that we can use precompiler
guards more easily to test with/without frame pointer enabled.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_EXTRA_EXCEPTION_INFO` that was added in #78065 doesn't
seem necessary, as we were already storing and printing the
callee-saved-registers before that. All `CONFIG_EXTRA_EXCEPTION_INFO`
does in RISCV is to add an additional `_callee_saved_t *csf` in the
`struct arch_esf`, which overhead is negligible to what's being enabled
by `CONFIG_EXCEPTION_DEBUG`.
Let's remove `CONFIG_EXTRA_EXCEPTION_INFO`, and have that extra
`_callee_saved_t *csf` in the `struct arch_esf` as long as
`CONFIG_EXCEPTION_DEBUG` is enabled.
TL;DR: it doesn't make sense to not enable `CONFIG_EXTRA_EXCEPTION_INFO`
when `CONFIG_EXCEPTION_DEBUG` is enabled, so let's merge them.
Then, since `*csf` is always available in the `struct arch_esf` when
`CONFIG_EXCEPTION_DEBUG=y`, we can simply rely on that pointer in
`z_riscv_fatal_error()` instead of an additional argument in
`z_riscv_fatal_error_csf()`, rendering the latter redundant and thus
can be removed.
Additionally, save the callee-saved registers before jumping to
to `z_riscv_fault()`, so that callee-saved-registers are printed on
generic CPU exception as well.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The reset GPIO for the SN74HC595 driver was not working anymore since
c407fbc. That commit made it optional among other changes but
accidently removed the s from reset_gpios property name causing the
driver not being able to retrieve the specified reset-gpios property
from the devicetree anymore. Add the missing s back to fix this.
Signed-off-by: Michael Klammt <michael.klammt@automatic-research.de>
Improve the STM32 DMA driver to only enable transfer and half-transfer
interrupts if the interrupt handler has effects beside clearing the
isr flag. This improves system performance as unnecessary interrupts
are no longer raised by the hardware.
Signed-off-by: Axel Utech <utech@sofiha.de>
When GPIO works with IOPCTL, the PIO instance offset in IOPCTL
can't be calculated easily. It should be recorded in DTS based on
SOC integration.
When IOPCTL is used, add PIO reigster address in DTS, gpio_mcux
driver will configure the PIO register based on this address.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Introduce dedicated helper functions for connection type checking:
- bt_conn_is_br() for BR/EDR connections
- bt_conn_is_le() for LE connections
- bt_conn_is_iso() for ISO connections
- bt_conn_is_sco() for SCO connections
Replace direct conn->type comparisons with these new helper functions
throughout the connection management code. This improves code readability,
maintainability, and provides proper configuration checks for each
connection type.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Use a combination of multiple helper functions to implement the
functionality of existing interfaces starting with `bt_sdp_get_`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Update the command `sdp-find` to support attribute parsing helper.
If the argument count is 1, the general SDP discovery will be used
to discover the protocol `L2CAP`.
In the SDP record discovered callback, call attribute parsing helper
functions to parse the SDP record and SDP attributes. And print all
parsed attribute values.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The current implementation does not support multiple attributes with
the same attribute identifier in a discovered SDP record.
Add function `bt_sdp_record_parse()` to parse the received SDP record.
Add function `bt_sdp_has_attr()` to check if the specified attribute
identifier has been discovered.
Add function `bt_sdp_get_attr()` to get the attribute of specified
attribute identifier.
Add function `bt_sdp_attr_value_parse()` to parse the attribute value.
Add function `bt_sdp_attr_has_uuid()` to check if the attribute
contains the specified UUID.
Add function `bt_sdp_attr_read()` to read the value of the attribute.
Add function `bt_sdp_attr_addl_proto_parse()` to parse the protocol
descriptor from the additional protocol descriptor list.
Add function `bt_sdp_attr_addl_proto_count()` to get the protocol
descriptor count of the additional protocol descriptor list.
Add function `bt_sdp_attr_addl_proto_read()` to read the attribute
value from the additional protocol descriptor list for specific index
and UUID.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Remove the handling of cross domain pins from nrf drivers. To use
cross domain in tests, force on constlat and disable power domains
for the test.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Remove SOF-specific region mappings. These should be handled inside of
SOF (external module), instead of Zephyr. This way, we avoid creating
a cyclic dependency between the two.
Needed for #91061.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
rimage is used in the context of Sound Open Firmware (SOF) to sign the
resulting firmware image. Since SOF is an external module, code found in
mainline Zephyr should not depend on it, but, rather, the other way
around. Therefore, drop the rimage signing support from the imx95_evk
board. This should be handled in SOF instead of Zephyr.
Needed for #91061.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Adding overlays to support gpio_api test on the kit_pse84_ai m33 and m55
cores. The test expects jumpers between P16_0 (J14_6) and P16_1
(J14_5).
Signed-off-by: John Batch <john.batch@infineon.com>
Adds basic support for the Infineon kit_pse84_ai board, including:
* samples/hello_world
* samples/basic/blinky
* tests/driver/uart/uart_api
Signed-off-by: John Batch <john.batch@infineon.com>
DUT Failed to associate fast-gtc/fast-mscahpv2 enterprise network, there
is error log shows 'EAP-FAST: Compound MAC did not match'.
tls_connection_get_eap_fast_key() gets wrong key, currently using
mbedtls_ssl_tls_prf to derive key, and it's not PSA API.
Therefore, conn->expkey_keyblock_size can't be set as 0, the correct
expkey_keyblock_size should contain keylen + mac_key_len + ivlen.
Remove MBEDTLS_USE_PSA_CRYPTO to get keyblock_size correctly.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Configure CPU clock using FDPLL, sourced from XOSC to achieve 120Mhz.
Also configure UART clock to support bootup initialization.
Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>