Skip to content

Commit

Permalink
MCP23017: allow the specification of the i2c bus
Browse files Browse the repository at this point in the history
Analogous to i2c-rtc-overlay.dts
  • Loading branch information
janisstreib committed Oct 15, 2023
1 parent 392b984 commit 938957b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2811,6 +2811,10 @@ 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


Name: mcp23s17
Info: Configures the MCP23S08/17 SPI GPIO expanders.
Expand Down
14 changes: 12 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,22 @@
};
};

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

__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 comments on commit 938957b

Please sign in to comment.