-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlays: Factor out the common i2c bus selection
Create an i2c-buses.dtsi to hold all of the common I2C bus selection logic, and refactor existing overlays to use it. This patch should have no functional change overall except to increase the range of options for some overlays. There is a slightly ugly mechanism for overriding the default bus, where the mux nodes may or may not need to be enabled. Signed-off-by: Phil Elwell <[email protected]>
- Loading branch information
Showing
18 changed files
with
202 additions
and
903 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Common i2c buses, and dtparams to select them | ||
|
||
/ { | ||
compatible = "brcm,bcm2835"; | ||
|
||
busfrag: fragment@100 { | ||
target = <&i2c_arm>; | ||
i2cbus: __overlay__ { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
fragment@101 { | ||
target = <&i2c0if>; | ||
#ifdef ENABLE_I2C0_MUX | ||
__overlay__ { | ||
#else | ||
__dormant__ { | ||
#endif | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
fragment@102 { | ||
target = <&i2c0mux>; | ||
#ifdef ENABLE_I2C0_MUX | ||
__overlay__ { | ||
#else | ||
__dormant__ { | ||
#endif | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
i2c0 = <&busfrag>,"target:0=",<&i2c0>, | ||
<&busfrag>, "target-path?=0", | ||
<0>,"+101+102"; | ||
i2c_csi_dsi = <&busfrag>,"target:0=",<&i2c_csi_dsi>, | ||
<&busfrag>, "target-path?=0", | ||
<0>,"+101+102"; | ||
i2c_csi_dsi0 = <&busfrag>, "target:0=",<&i2c_csi_dsi0>, | ||
<&busfrag>, "target-path?=0", | ||
<0>,"+101+102"; | ||
i2c1 = <&busfrag>,"target:0=",<&i2c1>, | ||
<&busfrag>, "target-path?=0", | ||
<0>,"-101-102"; | ||
i2c2 = <&busfrag>, "target?=0", | ||
<&busfrag>, "target-path=i2c2", | ||
<0>,"-101-102"; | ||
i2c3 = <&busfrag>, "target?=0", | ||
<&busfrag>, "target-path=i2c3", | ||
<0>,"-101-102"; | ||
i2c4 = <&busfrag>, "target?=0", | ||
<&busfrag>, "target-path=i2c4", | ||
<0>,"-101-102"; | ||
i2c5 = <&busfrag>, "target?=0", | ||
<&busfrag>, "target-path=i2c5", | ||
<0>,"-101-102"; | ||
i2c6 = <&busfrag>, "target?=0", | ||
<&busfrag>, "target-path=i2c6", | ||
<0>,"-101-102"; | ||
i2c-path = <&busfrag>, "target?=0", | ||
<&busfrag>, "target-path", | ||
<0>,"-101-102"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.