build/patch/kernel/archive/odroidxu4-5.12/0068-ODROID-C4-arm64-dts-add-i2c2-i2c3-node.patch

86 lines
1.9 KiB
Diff

From f8246f96e5b3175ab30366ff7d6e71f4574f5388 Mon Sep 17 00:00:00 2001
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 13 May 2020 10:37:28 +0900
Subject: [PATCH 068/109] ODROID-C4: arm64/dts: add i2c2, i2c3 node
Change-Id: Id75f935111744ff6945791deefef20f897dc98ac
(cherry picked from commit 3f4b2ffd0905946175c478baa65361695e78e0de)
---
.../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
index 7e79168356ef..d618bcd78594 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
@@ -13,6 +13,8 @@ / {
aliases {
ethernet0 = &ethmac;
+ i2c0 = &i2c2;
+ i2c1 = &i2c3;
serial0 = &uart_AO;
serial1 = &uart_A;
};
@@ -79,6 +81,57 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c2 {
+ status = "okay";
+
+ /*
+ * 40 Pin Header : SDA(GPIOX.17->3 Pin)
+ * SCL(GPIOX.18->5 Pin)
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_master_pins1>;
+
+ /* default 400k */
+ clock-frequency = <400000>;
+};
+
+&i2c3 {
+ /* default i2c clock-frequency is 100Khz */
+ status = "okay";
+
+ /*
+ * 40 Pin Header : SDA(GPIOA.14->27 Pin)
+ * SCL(GPIOA.15->28 Pin)
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_master_pins2>;
+
+ /* default 100k */
+ clock-frequency = <100000>;
+};
+
+&periphs_pinctrl {
+ i2c2_master_pins1: i2c2-master-pins1 {
+ mux {
+ groups = "i2c2_sda_x",
+ "i2c2_sck_x";
+ function = "i2c2";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c3_master_pins2: i2c3-master-pins2 {
+ mux {
+ groups = "i2c3_sda_a",
+ "i2c3_sck_a";
+ function = "i2c3";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+};
+
&pwm_AO_cd {
pinctrl-0 = <&pwm_ao_d_e_pins>;
pinctrl-names = "default";
--
2.25.1