Skip to content

Commit c5b6bda

Browse files
amboarshenki
authored andcommitted
ARM: dts: rainier: Describe GPIO mux on I2C3
We have a 4-bus mux whose output is selected by two GPIO inputs. Wire it up in the devicetree and ensure the output is enabled by hogging the appropriate line. Signed-off-by: Andrew Jeffery <[email protected]> Signed-off-by: Joel Stanley <[email protected]>
1 parent e687308 commit c5b6bda

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
aliases {
1414
serial4 = &uart5;
15+
i2c16 = &i2c2mux0;
16+
i2c17 = &i2c2mux1;
17+
i2c18 = &i2c2mux2;
18+
i2c19 = &i2c2mux3;
1519
};
1620

1721
chosen {
@@ -68,6 +72,41 @@
6872
};
6973
};
7074

75+
i2c2mux: i2cmux {
76+
compatible = "i2c-mux-gpio";
77+
#address-cells = <1>;
78+
#size-cells = <0>;
79+
status = "okay";
80+
81+
i2c-parent = <&i2c2>;
82+
mux-gpios = <&gpio0 ASPEED_GPIO(G, 4) GPIO_ACTIVE_HIGH>,
83+
<&gpio0 ASPEED_GPIO(G, 5) GPIO_ACTIVE_HIGH>;
84+
idle-state = <0>;
85+
86+
i2c2mux0: i2c@0 {
87+
#address-cells = <1>;
88+
#size-cells = <0>;
89+
reg = <0>;
90+
};
91+
92+
i2c2mux1: i2c@1 {
93+
#address-cells = <1>;
94+
#size-cells = <0>;
95+
reg = <1>;
96+
};
97+
98+
i2c2mux2: i2c@2 {
99+
#address-cells = <1>;
100+
#size-cells = <0>;
101+
reg = <2>;
102+
};
103+
104+
i2c2mux3: i2c@3 {
105+
#address-cells = <1>;
106+
#size-cells = <0>;
107+
reg = <3>;
108+
};
109+
};
71110
};
72111

73112
&gpio0 {
@@ -109,6 +148,13 @@
109148
output-high;
110149
line-name = "mclr_vpp";
111150
};
151+
152+
i2c3_mux_oe_n {
153+
gpio-hog;
154+
gpios = <ASPEED_GPIO(G, 6) GPIO_ACTIVE_LOW>;
155+
output-high;
156+
line-name = "I2C3_MUX_OE_N";
157+
};
112158
};
113159

114160
&emmc_controller {

0 commit comments

Comments
 (0)