-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: i2c: Introduce GD32 I2C driver #41506
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
Conversation
|
Use i2c_gd32_reg_dump() to track i2c runtime state, looks it can help us to learn how the i2c work. |
8210ef3 to
28a17db
Compare
|
I think i2c functional work is done, only some document work left. |
|
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
77d9208 to
4bbb31d
Compare
upgrade hal_gigadevice to get i2c clock frequency boundary definition. Signed-off-by: HaiLong Yang <[email protected]>
Add gd32 i2c interface support. Signed-off-by: HaiLong Yang <[email protected]>
teburd
left a comment
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.
Looking good to me
|
@nandojve please take a look |
Add an interrupt driven i2c driver for gd32 i2c peripheral. The transmit and reception method refer from GD32 SoCs user manual. Particularly, reception method choose the solution B. There have some wait for state ready logic in the driver. It cause by i2c device internal state change slower than i2c driver. Signed-off-by: HaiLong Yang <[email protected]>
Add i2c0 interface to gd32f450i_eval board. Signed-off-by: HaiLong Yang <[email protected]>
Add gd32f450i_eval board with AT2402C eeprom. Signed-off-by: HaiLong Yang <[email protected]>
nandojve
left a comment
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.
LGTM!
Add a interrupt driven gd32 i2c driver.
Support transfer mode: Standard-mode, Fast-mode and Fast-mode Puls.
For GD32 SoCs, normally Standard-mode and Fast-mode are supported. Some SoCs, like GD32VF103xx, support Fast-mode Puls too. Since Standard-mode(up to 100kbit/s) and Fast-mode(up to 400kbit/s) is too slow, I use the interrupts to driven the data transfer.
There still have some known issue which list in below:
More GD32 work #38657