Skip to content
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

MCP23017: allow specification of the i2c bus #5650

Merged
merged 1 commit into from
Oct 15, 2023
Merged
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
10 changes: 10 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2810,6 +2810,16 @@ Params: gpiopin Gpio pin connected to the INTA output of the

mcp23008 Configure an MCP23008 instead.
noints Disable the interrupt GPIO line.
i2c0 Choose the I2C0 bus on GPIOs 0&1
i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45
i2c3 Choose the I2C3 bus (configure with the i2c3
overlay - BCM2711 only)
i2c4 Choose the I2C4 bus (configure with the i2c4
overlay - BCM2711 only)
i2c5 Choose the I2C5 bus (configure with the i2c5
overlay - BCM2711 only)
i2c6 Choose the I2C6 bus (configure with the i2c6
overlay - BCM2711 only)


Name: mcp23s17
Expand Down
36 changes: 34 additions & 2 deletions arch/arm/boot/dts/overlays/mcp23017-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
compatible = "brcm,bcm2835";

fragment@0 {
target = <&i2c1>;
target = <&i2cbus>;
__overlay__ {
status = "okay";
};
Expand All @@ -24,7 +24,7 @@
};

fragment@2 {
target = <&i2c1>;
target = <&i2cbus>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
Expand Down Expand Up @@ -58,12 +58,44 @@
};
};

frag100: fragment@100 {
target = <&i2c1>;
i2cbus: __overlay__ {
status = "okay";
};
};

fragment@101 {

Check failure on line 68 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
target = <&i2c0if>;

Check failure on line 69 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
__dormant__ {

Check failure on line 70 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
status = "okay";

Check failure on line 71 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
};

Check failure on line 72 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
};

fragment@102 {

Check failure on line 75 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
target = <&i2c0mux>;

Check failure on line 76 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
__dormant__ {

Check failure on line 77 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
status = "okay";

Check failure on line 78 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
};

Check failure on line 79 in arch/arm/boot/dts/overlays/mcp23017-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
};

__overrides__ {
gpiopin = <&mcp23017_pins>,"brcm,pins:0",
<&mcp23017_irq>,"interrupts:0";
addr = <&mcp23017>,"reg:0", <&mcp23017_pins>,"reg:0";
mcp23008 = <0>,"=3";
noints = <0>,"!1!4";
i2c0 = <&frag100>, "target:0=",<&i2c0>;
i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
<0>,"+101+102";
i2c3 = <&frag100>, "target?=0",
<&frag100>, "target-path=i2c3";
i2c4 = <&frag100>, "target?=0",
<&frag100>, "target-path=i2c4";
i2c5 = <&frag100>, "target?=0",
<&frag100>, "target-path=i2c5";
i2c6 = <&frag100>, "target?=0",
<&frag100>, "target-path=i2c6";
};
};