Skip to content

Conversation

@bjarki-andreasen
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen commented Feb 13, 2025

Cherry pick the nRF TWIS driver and nRF TWIM RTIO patches from upstream

@bjarki-andreasen bjarki-andreasen force-pushed the cherry-pick-nrf-twis branch 2 times, most recently from b598a74 to e06e150 Compare February 13, 2025 13:00
@bjarki-andreasen bjarki-andreasen changed the title cherry-pick nRF TWIS driver cherry-pick nRF TWIS driver and TWIM RTIO patches Feb 20, 2025
The macros placing the DMA memory buffer in the appropriate
section in RAM was malformed. This PR fixes it.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit bb2833d)
Add nrf54h20 to test suite.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 37c3efc)
…suite

Add nrf54l15 cpuapp to test suite.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 7699361)
The buffer used for the TWIM DMA needs to be allocated to the
section provided with the memory-regions dt prop. The macros for
doing this where malformed. This commit fixes and cleans up the
macros.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 62815dd)
…quired

The DMA buffer needs to be used both for tx and rx if required.
Extend RTIO driver variant to use DMA buffer and copy received
data from it to user buffer.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 125752e)
Add nRF boards to the rtio_loopback sample.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 7d5a912)
Add nrf54h20 board support to the i2c rtio loopback sample.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 5c7f47d)
RTIO correctly declares tx buffers as const, however, the
existing I2C API and NRFX (SDK) drivers don't. Therefor cast the
const buf to non-const when passing the tx buf to the twim driver
from the RTIO call to avoid the const warning.

The tx buffer is being treated as const data naturally in the
NRFX driver, its just not declared as such since we reuse the
buffer for both RX and TX data.

Alternatively the SDK and "shim" drivers built on top of it need
to be updated, which is quite a bit of work :)

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 2e00923)
Add i2c_bus_short fixture to the rtio_loopback sample to ensure it
is only run on boards with the bus shorted. The i2c_bus_short
fixture is also used in the i2c_target_api test suite.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 846b468)
…o console

The harness was set to ztest, but the sample requires the console
harness to match on the "sample complete" line, its not actually
using ztest.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 7ee4011)
@bjarki-andreasen bjarki-andreasen merged commit 50128e3 into nrfconnect:main Feb 24, 2025
18 checks passed
@bjarki-andreasen bjarki-andreasen deleted the cherry-pick-nrf-twis branch February 24, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants