Reword frequency and timing selection logic for SDIO framework so that
the maximum supported timing mode between the card and host will be
selected, even if the maximum frequency supported by the host is not
equal to the maximum frequency for that mode.
Also, resolve an issue where a host and card combo only supporting HS
mode or worse would still use legacy timing mode, because the CCCR flags
were not being checked when checking if HS bus speed could be used.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
SDMMC framework frequency and timing selection logic has several
longstanding issues, including:
- requiring that SD hosts support the maximum frequency possible for a
given UHS mode in order to apply that timing
- selecting SDHC_TIMING_SDR25 for high speed mode, when SDHC_TIMING_HS
would be correct
Rework the frequency and timing selection logic within the SD framework
to resolve these issues.
Fixes#52589Fixes#67943
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add UNSUPPORTED frequency macro for HS mode frequencies, used when a
card does not support any high speed mode frequencies
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Use frequency macros to define SD frequencies, this should increase
readability of the file and reduce errors.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Rather than relying to the alphanumeric test ordering implemented in
ZTEST to ensure certain tests run first, setup the SDHC IO properties to
known good values before starting any of the tests. This allows the SDHC
tests to run in any order, rather than needing certain tests to run
first.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Update NXP hal to the revision pointing to the following commit:
"drivers: csi: Rework to fix the low framerate issue"
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The default stack size of RFCOMM DLC is 256.
The default value is sufficient for basic operation.
If more stack space is used (such as call function printk)
in context of callback disconnected of RFCOMM DLC, the
default stack size is not sufficient.
Add a configuration BT_RFCOMM_DLC_STACK_SIZE to configure
the RFCOMM DLC stack size.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
To avoid the case that CONN_TX is available but RFCOMM_TX is
unavailable, set the default value of BT_RFCOMM_TX_MAX to
BT_CONN_TX_MAX.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The maximum data length of event packet is 255 for BR/EDR.
Such as the data length of event Remote Name Request
Complete is 255.
Set BT_BUF_EVT_RX_SIZE to 255 to avoid error "Not enough
space in buffer" from bt_hci driver.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add macros to get Major Service Classes, Major Device
Class and Minor Device Class.
Define Major Device Class code.
Define Minor Device Class field for Computer Major
Class.
Define Minor Device Class field for Phone Major Class.
Define Minor Device Class field for Audio/Video Major
Class.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix default command line options check dependency on `--device-testing`
when it is provided to run Twister and turn device command options
as mandatory.
Fixes after changes introduced with #72399.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
If the controller can detect VBUS state changes, enable USB support only
when the device is connected and disable it when the device is
disconnected.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Lock the scheduler to ensure that the context is not preempted before it
is fully initialized.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
udc_init() only initializes and enables the USB regulator. This is
enough to detect VBUS changes, the USB controller is enabled in
udc_enable(). Deinitialization happens correspondingly in reverse order.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
There are controllers with capability to detect VBUS state change. This
can be used in a generic application to explicitly handle the VBUS
detected event after usbd_init() and for example allow the PMIC to
detect to what type of port device controller is connected.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
For the simple events, do not check whether the device driver and stack
are marked as initialized. USB device notification will reschedule
delivery if the stack is not yet marked initialized.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Since no threads are waiting for the FIFO and we do not need any k_fifo
features, we can just use slist.
Some notifications (caused by interrupts), especially "VBUS ready", can
be triggered very quickly right after UDC initialization if the USB
controller is already connected. Depending on the global thread
configuration, messsage publishing work can be executed before the
context is marked as initialized. Use delayed work to reschedule
publishing when the context is not initialized.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Support regulator output different voltage as reference to LPADC
the regulator output voltage can be set through property
zephyr,vref-mv
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Remove nxp_ground_select property.
Delete the use of NXP vref peripheral CSR register REFL_GRL_SEL bit.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
STM32 devices with an SDMMC driver will still need to be tested, but
they do not use the SDHC framework for their disk driver. Therefore, add
a special testcase to validate disk access support for devices with the
STM32 specific SDMMC DT compatible enabled.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
SDHC twister tag indicates that the board supports an SD host controller
driver. Since the ST SDMMC support is provided directly via a disk
driver, SDHC tests are not supported on ST boards. Drop this tag in
order to avoid twister failures running the SDHC tests on these
platforms.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Unit tests currently are not runnable on Windows systems, failing
on two testfiles: test_jobserver.py and test_testsuite.py.
This commit removes code dependency on Windows-unavailable
elements on Windows systems via skipping the offending tests.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Fixes remote address for ping before upload. This caused the ping in zperf
upload to timeout as shown in the following output:
```
uart:~$ zperf udp upload 2001:db8::2 5001 10 50 1M
Remote port is 5001
Connecting to 2001:db8::2
Duration: 10.00 s
Packet size: 50 bytes
Rate: 1000 kbps
Starting...
ping 2001:db8::2 timeout
Rate: 1.00 Mbps
Packet duration 390 us
```
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/68674
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Add nsim cmake support file as parts of Synopsys platform
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>