Always return exit code 0 when cmd_uart_read stopped reading
data from UART. Instead, return with a error code in case
reading from the UART interface failed.
Currently, this command might return with exit code -1 because
uart_poll_in didn't return data and the read duration expired.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
use DT_INST_PROP_OR for local-mac-address, so
that it is not required to be set in dt, as there are
other ways to se the mac address.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
make sure, that zephyr,random-mac-address
has a higher prio, than local-mac-address, as
documented in ethernet-controller.yaml.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
make sure, that zephyr,random-mac-address
has a higher prio, than local-mac-address, as
documented in ethernet-controller.yaml.
Also make sure, that no vaild mac address
doesn't lead to init fail, as it can still be
set later via set_config.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Do not synchronously wait for endpoint interrupt bits when disarming
endpoints. Introduce ep_disabled k_event that makes it possible for
application to wait for the action to take effect which is necessary
when handling SetFeature(ENDPOINT_HALT) or SetInterface() requests.
This change improves incomplete iso IN and OUT handling performance,
especially when there are multiple isochronous endpoints that need
servicing.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
At High-Speed there is at most 25 us handling window for incomplete iso
IN/OUT and therefore determining which endpoints are isochronous is too
wasteful. Add lookup variable holding which isochronous endpoints are
enabled and limit the search to only enabled endpoints. For applications
with just one OUT and one IN isochronous endpoint this is optimal.
The lookup variable is updated only when mutex is held. Interrupt
handler accesses the variable read-only and in general there is no
problem is incomplete iso handling interrupt hits when the lookup
variable is updated, because:
* when endpoint is just activated, it cannot be source of incomplete
iso interrupt because the endpoint is not armed yet
* when endpoint is just deactivated, it was first disabled
If there is more than one isochronous endpoint same direction then just
relying on endpoint enabled is not necessarily optimal. However, in
order to be able to limit the search to only armed endpoints, the lookup
variable would have to be updated on every transfer preparation and
completion which would require more time-expensive synchronization.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Replace irq_lock() with spin lock which is proper synchronization
primitive that should be used. Because non-SMP implementations are
allowed to optimize spin lock to just locking interrupts the resulting
code is the same on all currently supported DWC2 targets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Constify vendor quirks structure to not keep it in RAM. Use constified
vendor quirks structure directly if there is only one snps,dwc2 instance
to allow compiler inlining quirk implementation.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
TI MSPM0 SoC series has General Purpose Timer and Advanced control timers
with Compare block which is used to generate time expiry and output
waveform like PWM. Add driver support for MSPM0 PWM output.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
When loopback mode is enabled, the output of transmit serial shifter
is connected to the input of receive serial shifter internally.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Two DMA channels are assigned to TX and RX respectively:
- A TX DMA single request is asserted when there is space in the FIFO.
- A RX DMA single request is asserted when data is in the FIFO.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Optimize sckc_get_rate() to be called without configurations in
parameter, the selection of slow clock of the timing domain directly
comes from the register.
Optimize sckc_get_status() with return value "CLOCK_CONTROL_STATUS_ON",
slow clock is always on either driven by the RC oscillator or by the
32.768 kHz crystal oscillator.
Signed-off-by: Tony Han <tony.han@microchip.com>
Create bus helpers that will send ccc commands as well as update
items within the i3c descriptor. These are different than the
direct ccc functions as these can give a bit of convience to also
updating the descriptor.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The issue is found when doing shell command "i2c scan" on sama7g54-ek.
In this case no data will be transferred besides START and STOP. Data
abort would occur on accessing "msg->buf[msg->idx++]" when MMU is
enabled and "msg->idx" is very large.
Signed-off-by: Tony Han <tony.han@microchip.com>
CS hold time parameter is not correct which may cause bus fault
randomly.
System hang during status register reading after flash progromming which
is caused by parameter accessing in XIP mode.
Add dummy delay for READ command according the flash datasheet which is
required for SDR mode.
Use FlexSPI internal divider for clock updating instead of register in
CCM to avoid potential risk caused by flash access during clock updating
procedure.
Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
MT35 flashes could run in octal mode, Now the driver doesn't support
octal mode, add octal mode support for MT35 flashes.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
When external station connects to soft ap,
fill ap_sta_info.twt_capable with external
station HE capability.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
1. When external stations connect to soft ap,
Wi-Fi driver will send UAP_CLIENT_ASSOC event with data.
nxp_wifi_wlan_event_callback will be called to process this event.
2. The data should include some basic station information
but not only mac address of station.
3. Fill ap_sta_info with information of
connected station but not soft ap self.
4. Fix: Wi-Fi driver send UAP_CLIENT_ASSOC event
with basic station information.
5. Fix: ap_sta_info with information of connected station.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
Different LPSPI IPs are used for RT11xx and MCXN. On a older version of
LPSPI, a transmit command or a TX data need to be issued to end a frame.
On a new version, no such requirement.
Based on above information, we have to make DMA transfers "cascade" in
the DMA ISR to keep CS asserted during the whole SPI transfer.
PCS_HOLD_ON is a feature to keep CS asserted during multi SPI transfers.
It is implemented and supported on new LPSPI IP but it is impossible to
be supported on an older version like RT11xx.
Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
The basic characteristics of "atmel,sam-rtc" is the same as the ones
of sama7g5.
Differences between the RTCs listed bellow:
| atmel,sam-rtc | rtc in sama7g5
--------------------|---------------|----------------------
Persian calendar | Y | N
UTC Mode support | N | Y
Tamper Timestamping | N | Y
Signed-off-by: Tony Han <tony.han@microchip.com>
The preferred way to reference the size of the MAC address is
WIFI_MAC_ADDR_LEN.
For consistency, replace ARRAY_SIZE(mac.octet) with WIFI_MAC_ADDR_LEN.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
We avoid to assign unused values during declaration. Hence, the reader
knows that every value assigned are meaningful. It also allow compile to
raise true warning if a value is used uninitialized.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Usually, the exception are treated in a condition before the nominal
case:
ret = f();
if (ret) {
return -EXXX;
}
... nominal case ...
siwx91x_on_join_ipv4() and siwx91x_on_join_ipv6() didn't follow this
pattern.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
sl_wifi_interface_t interface is always initialized with
sl_wifi_get_default_interface().
Let's assign the value during the declaration everywhere.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>