[PATCH 11/18] arm: dts: am642-evm: Add I2C nodes

Lokesh Vutla lokeshvutla at ti.com
Thu May 6 13:14:58 CEST 2021


Add I2C nodes for AM64 and enable pinmux for i2c0 for reading eeprom data.

Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
 arch/arm/dts/k3-am64-main.dtsi        | 44 +++++++++++++++++++++++++++
 arch/arm/dts/k3-am64.dtsi             |  2 ++
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 18 +++++++++++
 3 files changed, 64 insertions(+)

diff --git a/arch/arm/dts/k3-am64-main.dtsi b/arch/arm/dts/k3-am64-main.dtsi
index ff65857d1e..4b6cd6cc90 100644
--- a/arch/arm/dts/k3-am64-main.dtsi
+++ b/arch/arm/dts/k3-am64-main.dtsi
@@ -446,4 +446,48 @@
 		clocks = <&k3_clks 78 0>;
 		clock-names = "gpio";
 	};
+
+	main_i2c0: i2c at 20000000 {
+		compatible = "ti,am64-i2c", "ti,omap4-i2c";
+		reg = <0x0 0x20000000 0x0 0x100>;
+		interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clock-names = "fck";
+		clocks = <&k3_clks 102 2>;
+		power-domains = <&k3_pds 102 TI_SCI_PD_EXCLUSIVE>;
+	};
+
+	main_i2c1: i2c at 20010000 {
+		compatible = "ti,am64-i2c", "ti,omap4-i2c";
+		reg = <0x0 0x20010000 0x0 0x100>;
+		interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clock-names = "fck";
+		clocks = <&k3_clks 103 2>;
+		power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
+	};
+
+	main_i2c2: i2c at 20020000 {
+		compatible = "ti,am64-i2c", "ti,omap4-i2c";
+		reg = <0x00 0x20020000 0x0 0x100>;
+		interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clock-names = "fck";
+		clocks = <&k3_clks 104 2>;
+		power-domains = <&k3_pds 104 TI_SCI_PD_EXCLUSIVE>;
+	};
+
+	main_i2c3: i2c at 20030000 {
+		compatible = "ti,am64-i2c", "ti,omap4-i2c";
+		reg = <0x00 0x20030000 0x0 0x100>;
+		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clock-names = "fck";
+		clocks = <&k3_clks 105 2>;
+		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
+	};
 };
diff --git a/arch/arm/dts/k3-am64.dtsi b/arch/arm/dts/k3-am64.dtsi
index 0ae8c844c4..fde63463ca 100644
--- a/arch/arm/dts/k3-am64.dtsi
+++ b/arch/arm/dts/k3-am64.dtsi
@@ -28,6 +28,8 @@
 		serial6 = &main_uart4;
 		serial7 = &main_uart5;
 		serial8 = &main_uart6;
+		i2c0 = &main_i2c0;
+		i2c1 = &main_i2c1;
 	};
 
 	chosen { };
diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
index 6a2224af8e..3bab736a18 100644
--- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
@@ -28,6 +28,24 @@
 	};
 };
 
+&main_pmx0 {
+	u-boot,dm-spl;
+	main_i2c0_pins_default: main-i2c0-pins-default {
+		u-boot,dm-spl;
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
+			AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
+		>;
+	};
+};
+
+&main_i2c0 {
+	u-boot,dm-spl;
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c0_pins_default>;
+	clock-frequency = <400000>;
+};
+
 &main_uart0 {
 	u-boot,dm-spl;
 };
-- 
2.30.0



More information about the U-Boot mailing list