-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Renesas: Add DTC support for SPI and I2C drivers #97959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Renesas: Add DTC support for SPI and I2C drivers #97959
Conversation
|
@KhiemNguyenT Please do not assign draft PRs, let the bot do the assignment when the PR becomes ready to review. |
Add dtc device support for i2c and spi node Signed-off-by: Quy Tran <[email protected]>
Support DTC transfer for I2C module on rsk_rx130_512kb board Signed-off-by: Minh Tang <[email protected]>
This commit is to add DTC transfer feature for both SPI controller mode and peripheral mode on board RSK-RX130-512KB Signed-off-by: Minh Tang <[email protected]>
19babff to
0045087
Compare
|
| bool do_rx_now; | ||
| bool do_tx; | ||
| rspi_str_tranmode_t rx_data_tran_mode; | ||
| rspi_str_tranmode_t tx_data_tran_mode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move these 2 line 35
| /* dtc device handle */ | ||
| const struct device *dtc; | ||
| /* TX */ | ||
| uint8_t tx_dtc_activation_irq; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the uint8_t at the end
| transfer_info_t tx_dtc_info; | ||
| /* RX */ | ||
| uint8_t rx_dtc_activation_irq; | ||
| transfer_info_t rx_dtc_info; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
| uint8_t slv_addr; | ||
| struct i2c_msg *msgs; | ||
| uint8_t num_msgs; | ||
| uint8_t num_processed_msgs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-position the attributes for better alignment
| goto end; | ||
| } | ||
| #endif /* CONFIG_SPI_RENESAS_RX_DTC */ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how dtc works, but you start the transfer above (and you did provide the buffers to it), but here you anyway call the R_RSPI_Write/R_RSPI_Read functions as before? (is it what's really going to trigger the transfer, or is this a mistake?)



Based on #93498 merged, add Data Transfer Controller (DTC) support for SPI and I2C driver of Renesas RX