-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add support for I2C on STM32F7 family and on STM32F723E-DISCO board #8716
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
Codecov Report
@@ Coverage Diff @@
## master #8716 +/- ##
=======================================
Coverage 52.45% 52.45%
=======================================
Files 200 200
Lines 25121 25121
Branches 5244 5244
=======================================
Hits 13176 13176
Misses 9823 9823
Partials 2122 2122Continue to review full report at Codecov.
|
ydamigos
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.
|
@ydamigos, thanks for the pointer. Given there is already a PR opened about that issue, I believe it's better to discuss it there. In addition the fix is now conflicting with the changes introduced by PR#5224, and it more work is needed to understand how to handle a NACK in slave mode. I'll therefore just drop that commit from the pull request. |
|
And I have just added an additional cleanup commit to make @ulfalizer happy. |
erwango
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.
One comment.
Otherwise, could you update help message for I2C_STM32_V2. Message is not quite clear but we should be explicit that drivers now supports F7 (while previously it was 'compatible': I agree this is subtle :-))
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.
Should be 'n' by default.
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.
@erwango We enable buses on board level when there is a peripheral (e.g. WM8994 or touch panel in this case) that needs them, aren't we?
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.
@ydamigos : we should configure them, and this is what is done here. But activation should always be done in application and not default.
Aim is that several developers on the same board know what is the base components for the board so they only enable what they need. But they don't have to bother disabling what other developers may have enabled meanwhile.
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.
@erwango We need to clean up board _defconfig files then.
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.
|
@erwango: I have just done the requested changes, i.e. I updated the |
dbkinder
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.
Doc changes LGTM, thanks.
|
I have just pushed a new version to solve the conflict due the merge of USB OTG FS support. There is no code change beside solving conflicts. |
The STM32F7 uses the V2 version of the STM32 I2C controller. Add the corresponding Kconfig, DTS, DTS fixup and pinmux entries. Signed-off-by: Aurelien Jarno <[email protected]>
Enable the support for the 3 I2C buses of the STM32F723E-DISCO board, connected respectively to the WM8994, the Arduino V3/STMOD+ and the touch panel. Signed-off-by: Aurelien Jarno <[email protected]>
Bool symbols implicitly default to 'n'. A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you want to override a 'default y' on the base definition of the symbol. It isn't used like that on any of these symbols though, and is inconsistent. This will make the auto-generated Kconfig documentation have "No defaults. Implicitly defaults to n." as well, which is clearer than 'default n if ...' This is basically reapplying commit 133a299 ("drivers: i2c: Kconfig: Remove redundant 'default n' properties"), which has been partially reverted in commit c7875b7 ("i2c: stm32_v2: implement slave support"). Signed-off-by: Aurelien Jarno <[email protected]>
|
I have just pushed a new version to solve the conflict due the merge of USB OTG HS support. There is no code change beside solving conflicts. |
This patch series adds support for I2C bus of the STM32F7 family, enables it on the STM32F723E-DISCO board, and finally fixes an issue found while testing the I2C support in interrupt mode.
I have tested it using by communicating with the WM8994 chip on the STM32F723E-DISCO board.