espi: add espi peripheral channel HOST_CMD driver for rts5912
Unlike other chips using IO port 0x800-0x8ff, we utilize shared memory to
transfer host command parameters. The AP firmware must have corresponding
settings for this configuration.
Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
Due to erratum 1013783-B, speculative accesses might be performed
to normal memory unmapped in the MPU. This can be avoided by using
MPU region 0 to cover all unmapped memory and make this region
execute-never and inaccessible.
Note that this applies when CPU Cortex-M7 implements MPU and D-cache.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Due to erratum ERR011573, speculative accesses might be performed
to normal memory unmapped in the MPU. This can be avoided by using
MPU region 0 to cover all unmapped memory and make this region
execute-never and inaccessible.
Fixes#89852
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
base on DesignWare I2C driver to implement RTS5912 I2C driver.
1. support customize bus recovery function.
2. fix isr timing issue by enable tx empty control.
3. support stuck at low handle by enable bus clear feature.
4. support custom stuck at low timeout set from dts
5. disable block mode in rts5912 i2c.
6. support I2C_ALLOW_NO_STOP_TRANSACTIONS
Signed-off-by: Titan Chen <titan.chen@realtek.com>
this sample needs add dts defines for each platform, so should not be
generally enabled.
fixes: #90714
This reverts commit 022962c90d.
Signed-off-by: Hake Huang <hake.huang@nxp.com>
The combination of
323126924474c9e7afab
broke this test, when __SIZEOF_DOUBLE__ != 8.
In that case the test will fail to build,
as the variables the code uses are left ifdef'ed out.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When both PRINTK and ASSERT are disabled, the firmware image will still
contain a symbol for assert_print function which increases the memory
footprint by 14 bytes. In this case the function doesn't do anything and
so these 14 bytes are not useful.
This change also reduces the memory footprint elsewhere such as in the
bluetooth subsystem which implements BT_ASSERT_VERBOSE. Now it will be
nop. On nRF52832 this is on the order of 300 - 400 bytes when configured
for peripheral only (just as an example).
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Separate out host(local) and FW(remote) statistics and in case of a
FW statistics timeout, return success with a magic value in the FW
statistics, this way atleast host statistics would be handy for
debugging instead of sending failure up.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
A write to the "ctrl_meas" register can cause the sensor to transition
from sleep to normal mode (which is default Kconfig settings). As per
BME280 datasheet, writes to the "config" register in normal mode may be
ignored. This can lead to use BME280_STANDBY_05MS and BME280_FILTER_OFF
instead of the values set by the application. To fix this, write to the
"config" register before "ctrl_meas" in the sensor init function.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
TCP implementation provided the parent net_context pointer to the
accept callback instead of the user_data pointer registered with
net_tcp_accept(). This worked fine with the socket integration, as
sockets explicitly registered parent context as user_data, however it
shouldn't be hardcoded like this at the TCP level.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Do not override the last known value in backend_ctx.error with the result
of flushing.
Any previous error would be cleared and the coredump would appear to have
succeeded.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The current I2C driver assumes that at least one byte will be read in CQ
(command queue) mode. However, when a 0-byte read is issued
(e.g., by cmd_i2c_scan),
The read handler uses (len - 1) to set the command queue length.
When len is 0, this underflows to 0xFF, leading to an incorrect transfer
length and possible crash.
To fix this, add a check in cq_mode_allowed() for reads with length 0:
-Fallback to PIO mode in such cases.
-Properly handle 0-byte reads by issuing STOP (E_FINISH) when the slave
address is acknowledged.
-Add appropriate handling for NACK conditions when the slave address is
not acknowledged.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Disconnect the L2CAP channel connection if the proposed MTU is less
than min MTU or more than local supported MTU.
The main scenes are as follows.
If the proposed MTU is less than MIN MTU.
1. The channel connection of client and server is established,
2. Client/server sends channel config REQ (MTU=50),
3. Peer replies channel config RQP (Unaccepted/success with MTU=30),
4. The client/server will repeat step 3~4 if the RSP is unacceptable.
With the change applied, the local will disconnect the L2CAP channel
connection in step 3.
If the proposed MTU is more than local supported MTU.
1. The channel connection of client and server is established,
2. Client/server sends channel config REQ (MTU=50),
3. Peer replies channel config RQP (Unaccepted/success with MTU=80),
4. The client/server will repeat step 3~4 if the RSP is unacceptable.
With the change applied, the local will disconnect the L2CAP channel
connection in step 3.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Based on TCP Spec., the outgoing TCP packets shoud use SND.NXT as
the seqnum. In Zephyr, the conn->seq works as the SND.UNA and the
conn->seq + conn->unacked_len works as the SND.NXT. Currently, it
uses SND.UNA in tcp_out() as the seqnum, which might get dropped
as old packets and could not deliver the message to the peer.
A few exceptions use SND.NXT - 1 as the seqnum are: keepalive,
zero-window-probe, FIN/SYN retransmissions. And, for closing a
connection, Zephyr won't send out FIN until all the data has been
ACKed, so the conn->unacked_len is 0 and it is ok to use conn->seq
as the SND.NXT.
Signed-off-by: Shrek Wang <inet_eman@outlook.com>
1. Add it51526bw SoC variant to it51xxx SoC series.
2. Create the .dtsi file with adjusted flash size for 512Kb (default = 1M).
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Keep data instance inside of data structure.
Avoid accessing global data or using pointers to out of
data instance.
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Change the callback `get_ongoing_call()` of the AG from synchronous to
asynchronous mode. It will help to avoid the Bluetooth host stack be
blocked in the context of callback `get_ongoing_call()`.
Add a function `bt_hfp_ag_ongoing_calls()` to set the ongoing calls and
reply the AT command `AT+CIND?` after the callback `get_ongoing_call()`
has been notified.
Add a delayable worker to avoid the AT command `AT+CIND?` never being
replied. After the time exceeds
@kconfig{CONFIG_BT_HFP_AG_GET_ONGOING_CALL_TIMEOUT}, the response of
the AT command `AT+CIND?` will be replied.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If the any value of Call, Call Setup, and Held Call indicators is not
zero in the response of `AT+CIND?`, get all calls via `AT+CLCC`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
For read-only access to fields, `lock/unlock` is unnecessary.
Remove unnecessary `lock/unlock` protection for read-only access
fields of AG.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Support the case that there are some calls existed before SLC
established.
Add a callback to get the ongoing calls one by one from upper layer
when the response of the AT command `AT+CIND=?` from HF has been sent.
And set the Call, Call Setup, and Held Call indicators and report the
values int the response of AT command `AT+CIND?`. Then report all
ongoing calls in the `+CLCC` response.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
It can be confusing for users browsing the API docs to not find any
documentation for the k_sem structure. This commit adds doxygen
comments so that it now shows up.
Fixeszephyrproject-rtos/zephyr#90608.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>