Skip to content

Commit d17c1a3

Browse files
author
Dinh Nguyen
committed
arm64: dts: stratix10: add i2c pins for pinctrl
Add the I2C pins definition to the Stratix10 devkit. This allows for the I2C driver to use pinctrl on the pins to allow for GPIO recovery. Signed-off-by: Dinh Nguyen <[email protected]> --- v2: remove underscores in node names
1 parent 21ab703 commit d17c1a3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@
6565
};
6666
};
6767

68+
&pinctrl0 {
69+
i2c1_pmx_func: i2c1-pmx-func {
70+
pinctrl-single,pins = <
71+
0x78 0x4 /* I2C1_SDA (IO6-B) PIN30SEL) */
72+
0x7c 0x4 /* I2C1_SCL (IO7-B) PIN31SEL */
73+
>;
74+
};
75+
76+
i2c1_pmx_func_gpio: i2c1-pmx-func-gpio {
77+
pinctrl-single,pins = <
78+
0x78 0x8 /* I2C1_SDA (IO6-B) PIN30SEL) */
79+
0x7c 0x8 /* I2C1_SCL (IO7-B) PIN31SEL */
80+
>;
81+
};
82+
};
83+
6884
&gpio1 {
6985
status = "okay";
7086
};
@@ -131,6 +147,13 @@
131147
i2c-sda-falling-time-ns = <890>; /* hcnt */
132148
i2c-sdl-falling-time-ns = <890>; /* lcnt */
133149

150+
pinctrl-names = "default", "gpio";
151+
pinctrl-0 = <&i2c1_pmx_func>;
152+
pinctrl-1 = <&i2c1_pmx_func_gpio>;
153+
154+
scl-gpios = <&portb 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
155+
sda-gpios = <&portb 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
156+
134157
adc@14 {
135158
compatible = "lltc,ltc2497";
136159
reg = <0x14>;

0 commit comments

Comments
 (0)