-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
boards: stm32: Fix Arduino I2C on Nucleo-WL55JC #76948
base: main
Are you sure you want to change the base?
Conversation
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.
Otherwise LGTM
93879ba
to
b23ed52
Compare
&i2c2 { | ||
pinctrl-0 = <&i2c2_scl_pa12 &i2c2_sda_pa11>; | ||
&i2c3 { | ||
pinctrl-0 = <&i2c3_scl_pb13 &i2c3_sda_pb14>; | ||
pinctrl-names = "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.
That's right on CN8 A4 (PB14) & A5 (PB13) are i2c3 pins
but that's also right that on Arduino connector CN5 D15 (PA12) and D14 (PA11) are i2c2 pins.
Is it needed to remove i2c2 node ?
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.
good point. I can keep its configuration in the devicetree but leave it as disabled
by default. wdyt?
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.
From the shield PoV, most of the time, I2C is connected on the Arduino connector CN5 pin10 & 9 = D15/D14
and the arduino header pin 5 ( = A5) is used for another function.
Example of x_nucleo_iks4a1,
&arduino_i2c {
...
irq-gpios = <&arduino_header 5 GPIO_ACTIVE_HIGH>; /* A5 */
...};
Is there any side-effect changing the i2c node for the arduino connector ?
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.
can keep its configuration in the devicetree but leave i
yes, please
@kartben A Rebase would be needed. |
b23ed52
to
d20c852
Compare
Fixed wrong I2C bus being enabled (i2c2 instead of i2c3) and corresponding arduino nexus mappings so that I2C works correctly on Arduino shields attached to Nucleo-WL55JC. Signed-off-by: Benjamin Cabé <[email protected]>
d20c852
to
c198779
Compare
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.
Is it really an fix/improvement tough? The pins of the existing configuration are labeled SCL/SDA on the board.
In a quick search at the arduino store the few boards listed also seem to assume the I2C pins to be available on D14/15.
Also the newer Mikroe shields seem to use the D14/D15 pins.
As well as the X-Nucleo boards I know, all use the D14/15 pins.
Arduino Uno up to the latest Rev4 seem to have wired both these options together, so I'm wondering if there still that many old shields with A4/A5 pins used for I2C.
What do you think about using the arduino_i2c
label only for D14/D15 on boards with an uno header and introduce a separate node label as fallback option that shields using I2C only on A4/A5 define and boards may define if they provide I2C on that pins?
Fixed wrong I2C bus being enabled (i2c2 instead of i2c3) and corresponding arduino nexus mappings so that I2C works correctly on Arduino shields attached to Nucleo-WL55JC.