summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/altera
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@kernel.org>2023-01-23 22:08:23 +0300
committerDinh Nguyen <dinguyen@kernel.org>2023-01-23 22:43:03 +0300
commitd17c1a3d6a091afdc3b65116faa98d3363082f6a (patch)
tree9b93e573347a3bd87396a4eec96e37f6d1360d71 /arch/arm64/boot/dts/altera
parent21ab7031cbff8c6b6f608234e18ffe0473e98f9d (diff)
downloadlinux-d17c1a3d6a091afdc3b65116faa98d3363082f6a.tar.xz
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 <dinguyen@kernel.org> --- v2: remove underscores in node names
Diffstat (limited to 'arch/arm64/boot/dts/altera')
-rw-r--r--arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
index 17752ca743e5..38ae674f2f02 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
@@ -65,6 +65,22 @@
};
};
+&pinctrl0 {
+ i2c1_pmx_func: i2c1-pmx-func {
+ pinctrl-single,pins = <
+ 0x78 0x4 /* I2C1_SDA (IO6-B) PIN30SEL) */
+ 0x7c 0x4 /* I2C1_SCL (IO7-B) PIN31SEL */
+ >;
+ };
+
+ i2c1_pmx_func_gpio: i2c1-pmx-func-gpio {
+ pinctrl-single,pins = <
+ 0x78 0x8 /* I2C1_SDA (IO6-B) PIN30SEL) */
+ 0x7c 0x8 /* I2C1_SCL (IO7-B) PIN31SEL */
+ >;
+ };
+};
+
&gpio1 {
status = "okay";
};
@@ -131,6 +147,13 @@
i2c-sda-falling-time-ns = <890>; /* hcnt */
i2c-sdl-falling-time-ns = <890>; /* lcnt */
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&i2c1_pmx_func>;
+ pinctrl-1 = <&i2c1_pmx_func_gpio>;
+
+ scl-gpios = <&portb 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&portb 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+
adc@14 {
compatible = "lltc,ltc2497";
reg = <0x14>;