From: Dinh Nguyen <dinguyen@kernel.org>
To: robh+dt@kernel.org, mark.rutland@arm.com, krzysztof.kozlowski@linaro.org
Cc: dinguyen@kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: dts: stratix10: add i2c pins for pinctrl
Date: Mon, 23 Jan 2023 13:27:12 -0600 [thread overview]
Message-ID: <20230123192712.84537-2-dinguyen@kernel.org> (raw)
In-Reply-To: <20230123192712.84537-1-dinguyen@kernel.org>
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>
---
.../dts/altera/socfpga_stratix10_socdk.dts | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
index 17752ca743e5..beda04b9380b 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 @@ sdmmca-ecc@ff8c8c00 {
};
};
+&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 @@ &i2c1 {
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>;
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-23 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 19:27 [PATCH 1/2] arm64: dts: add pinctrl-single property for Stratix10/Agilex Dinh Nguyen
2023-01-23 19:27 ` Dinh Nguyen [this message]
2023-01-23 19:30 ` [PATCH 2/2] arm64: dts: stratix10: add i2c pins for pinctrl Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230123192712.84537-2-dinguyen@kernel.org \
--to=dinguyen@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).