Skip to content

boards: raspberrypi: rpi_pico: Remove i2c1 node (again) #79461

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions boards/kws/pico_spe/pico_spe.dts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,5 @@ zephyr_udc0: &usbd {
};

pico_spi: &spi1 {};
pico_i2c0: &i2c0 {};
pico_i2c1: &i2c1 {};
pico_i2c: &i2c0 {};
pico_serial: &uart0 {};
3 changes: 1 addition & 2 deletions boards/pimoroni/pico_plus2/pico_plus2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ zephyr_udc0: &usbd {


pico_spi: &spi0 {};
pico_i2c0: &i2c0 {};
pico_i2c1: &i2c1 {};
pico_i2c: &i2c0 {};
pico_serial: &uart0 {};
stemma_qt_i2c: &i2c0 {};
8 changes: 0 additions & 8 deletions boards/raspberrypi/common/rpi_pico-pinctrl-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@
};
};

i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_P6>, <I2C1_SCL_P7>;
input-enable;
input-schmitt-enable;
};
};

Comment on lines -26 to -33
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pico-examples use the same pinmux for I2C1 as was defined before this PR, i.e. using GPIO6 and GPIO7. I think that the vendor's examples should be considered a strong enough precedent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajf58 @kartben

#45131 (comment)

This topic has already been discussed and agreed upon, and it violates that, so it needs to be restored.
If you would like to raise a separate issue to re-enable it, that is welcome.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petejohanson @carlescufi @yonsch

I'm sorry to bring up an old topic, but I would like to consult with someone who reviewed a similar issue in the past.

The board's pinctrl settings are preferred to be "minimal", and rpi_pico also follows this policy, as stated in [the past discussion https://github.com//pull/45131#discussion_r872782328.

Due to my carelessness in this review #60384 , I re-added the i2c1 settings, However as stated in the discussion above, there is already a consensus among developers to keep it minimal, so I think it would be better to revert (delete) it.
This also aims to keep the shield definition neutral.

@ajf58 seems to have a different opinion, but since it would overwrite the current consensus, I think it would be better to discuss it as a separate issue.

I would like to hear your opinion on this point.

spi0_default: spi0_default {
group1 {
pinmux = <SPI0_CSN_P17>, <SPI0_SCK_P18>, <SPI0_TX_P19>;
Expand Down
10 changes: 1 addition & 9 deletions boards/raspberrypi/rpi_pico/rpi_pico-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@
pinctrl-names = "default";
};

&i2c1 {
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "disabled";
clock-frequency = <I2C_BITRATE_FAST>;
};

&spi0 {
clock-frequency = <DT_FREQ_M(8)>;
status = "okay";
Expand Down Expand Up @@ -155,6 +148,5 @@ zephyr_udc0: &usbd {
};

pico_spi: &spi0 {};
pico_i2c0: &i2c0 {};
pico_i2c1: &i2c1 {};
pico_i2c: &i2c0 {};
pico_serial: &uart0 {};
7 changes: 0 additions & 7 deletions boards/raspberrypi/rpi_pico2/rpi_pico2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ gpio0_lo: &gpio0 {
status = "okay";
};

&i2c1 {
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
};

&adc {
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
};

arduino_spi: &pico_spi {};
arduino_i2c: &pico_i2c0 {};
arduino_i2c: &pico_i2c {};
arduino_serial: &pico_serial {};
8 changes: 7 additions & 1 deletion boards/shields/waveshare_ups/boards/rpi_pico.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@
&pinctrl {
i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_P6>, <I2C1_SCL_P7>;
input-enable;
input-schmitt-enable;
bias-pull-up;
};
};
};

&pico_i2c1 {
&i2c1 {
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};
2 changes: 1 addition & 1 deletion boards/shields/waveshare_ups/waveshare_pico_ups_b.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

&pico_i2c1 {
&i2c1 {
waveshare_pico_ups: ina219@43 {
status = "okay";
compatible = "ti,ina219";
Expand Down
3 changes: 1 addition & 2 deletions boards/waveshare/rp2040_zero/rp2040_zero.dts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,5 @@ zephyr_udc0: &usbd {
};

pico_spi: &spi0 {};
pico_i2c0: &i2c0 {};
pico_i2c1: &i2c1 {};
pico_i2c: &i2c0 {};
pico_serial: &uart0 {};
3 changes: 1 addition & 2 deletions boards/wiznet/w5500_evb_pico/w5500_evb_pico.dts
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,4 @@ zephyr_udc0: &usbd {
};

pico_spi: &spi0 {};
pico_i2c0: &i2c0 {};
pico_i2c1: &i2c1 {};
pico_i2c: &i2c0 {};
3 changes: 1 addition & 2 deletions boards/wiznet/w5500_evb_pico2/w5500_evb_pico2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,5 @@ zephyr_udc0: &usbd {
};

pico_spi: &spi0 {};
pico_i2c0: &i2c0 {};
pico_i2c1: &i2c1 {};
pico_i2c: &i2c0 {};
pico_serial: &uart0 {};