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

i2c-mux and i2c-pwm overlay updates for alternate i2c buses #5443

Merged
merged 2 commits into from
Apr 24, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,22 @@ Params: pca9542 Select the NXP PCA9542 device

addr Change I2C address of the device (default 0x70)

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 I2C3 bus (configure with the i2c3
overlay - BCM2711 only)

i2c5 Choose the I2C5 bus (configure with the i2c4
overlay - BCM2711 only)

i2c6 Choose the I2C6 bus (configure with the i2c6
overlay - BCM2711 only)


[ The i2c-mux-pca9548a overlay has been deleted. See i2c-mux. ]

Expand All @@ -1841,6 +1857,16 @@ Name: i2c-pwm-pca9685a
Info: Adds support for an NXP PCA9685A I2C PWM controller on i2c_arm
Load: dtoverlay=i2c-pwm-pca9685a,<param>=<val>
Params: addr I2C address of PCA9685A (default 0x40)
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 I2C3 bus (configure with the i2c3
overlay - BCM2711 only)
i2c5 Choose the I2C5 bus (configure with the i2c4
overlay - BCM2711 only)
i2c6 Choose the I2C6 bus (configure with the i2c6
overlay - BCM2711 only)


Name: i2c-rtc
Expand Down
40 changes: 37 additions & 3 deletions arch/arm/boot/dts/overlays/i2c-mux-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
compatible = "brcm,bcm2835";

fragment@0 {
target = <&i2c_arm>;
target = <&i2cbus>;
__dormant__ {
#address-cells = <1>;
#size-cells = <0>;
Expand All @@ -34,7 +34,7 @@
};

fragment@1 {
target = <&i2c_arm>;
target = <&i2cbus>;
__dormant__ {
#address-cells = <1>;
#size-cells = <0>;
Expand Down Expand Up @@ -71,7 +71,7 @@
};

fragment@2 {
target = <&i2c_arm>;
target = <&i2cbus>;
__dormant__ {
#address-cells = <1>;
#size-cells = <0>;
Expand Down Expand Up @@ -127,6 +127,27 @@
};
};

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

fragment@101 {
target = <&i2c0if>;
__dormant__ {
status = "okay";
};
};

fragment@102 {
target = <&i2c0mux>;
__dormant__ {
status = "okay";
};
};

__overrides__ {
pca9542 = <0>, "+0";
pca9545 = <0>, "+1";
Expand All @@ -135,5 +156,18 @@
addr = <&pca9542>,"reg:0",
<&pca9545>,"reg:0",
<&pca9548>,"reg:0";

i2c0 = <&frag100>, "target:0=",<&i2c0>,
<0>,"+101+102";
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";
};
};
37 changes: 36 additions & 1 deletion arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
compatible = "brcm,bcm2835";

fragment@0 {
target = <&i2c_arm>;
target = <&i2cbus>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
Expand All @@ -20,7 +20,42 @@
};
};
};


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

fragment@101 {
target = <&i2c0if>;
__dormant__ {
status = "okay";
};
};

fragment@102 {
target = <&i2c0mux>;
__dormant__ {
status = "okay";
};
};

__overrides__ {
addr = <&pca>,"reg:0";
i2c0 = <&frag100>, "target:0=",<&i2c0>,
<0>,"+101+102";
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";
};
};