Skip to contentSkip to conversation

ARM: dts: keystone-k2g-evm: Add I2C nodes and enable I2C0 on K2G EVM

PATCH Superseded Franklin S Cooper Jr 1 participant 3 messages Sep 8, 2017 Device tree bindings

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover ARM: dts: keystone-k2g-evm: Add I2C nodes and enable I2C0 on K2G EVM

Add I2C DT nodes for 66AK2G. Also enable I2C0 in K2G EVM which is needed to access the I2C EEPROM.

Version 2 changes:
No real changes. Split patches into their own patchset

Murali Karicheri (1):
ARM: dts: keystone-k2g-evm: Add I2C EEPROM DT entry

Vitaly Andrianov (1):
ARM: dts: keystone-k2g: Add I2C nodes

 arch/arm/boot/dts/keystone-k2g-evm.dts | 19 ++++++++++++++++++
 arch/arm/boot/dts/keystone-k2g.dtsi    | 36 ++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
Signature · 1 line
2.9.4.dirty
#1 lore raw

PATCH v2 1/2 ARM: dts: keystone-k2g: Add I2C nodes

From: Vitaly Andrianov <[email protected]>

Add nodes for the various I2C instances.

---
 arch/arm/boot/dts/keystone-k2g.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm/boot/dts/keystone-k2g.dtsi +36 -0
index 826b286..8a98d76 100644
@@ -28,6 +28,9 @@
 
 	aliases {
 		serial0 = &uart0;
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
 		rproc0 = &dsp0;
 	};
 
@@ -133,6 +136,39 @@
 			clocks = <&k2g_clks 0x0009 1>;
 		};
 
+		i2c0: i2c at 2530000 {
+			compatible = "ti,keystone-i2c";
+			reg = <0x02530000 0x400>;
+			clocks = <&k2g_clks 0x003a 0>;
+			power-domains = <&k2g_pds 0x003a>;
+			interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c1: i2c at 2530400 {
+			compatible = "ti,keystone-i2c";
+			reg = <0x02530400 0x400>;
+			clocks = <&k2g_clks 0x003b 0>;
+			power-domains = <&k2g_pds 0x003b>;
+			interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c at 2530800 {
+			compatible = "ti,keystone-i2c";
+			reg = <0x02530800 0x400>;
+			clocks = <&k2g_clks 0x003c 0>;
+			power-domains = <&k2g_pds 0x003c>;
+			interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		kirq0: keystone_irq at 026202a0 {
 			compatible = "ti,keystone-irq";
 			interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
Signature · 1 line
2.9.4.dirty
#2 lore raw

PATCH v2 2/2 ARM: dts: keystone-k2g-evm: Add I2C EEPROM DT entry

In reply to Franklin S Cooper Jr

From: Murali Karicheri <[email protected]>

K2G EVM has an onboard I2C EEPROM connected to I2C0. This patch adds the necessary DT entry for the AT24CM01 EEPROM.

---
 arch/arm/boot/dts/keystone-k2g-evm.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/keystone-k2g-evm.dts +19 -0
index f462f10..a6ad5fc 100644
@@ -81,6 +81,14 @@
 			K2G_CORE_IOPAD(0x1110) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE0)	/* mmc1_cmd.mmc1_cmd */
 		>;
 	};
+
+	i2c0_pins: pinmux_i2c0_pins {
+		pinctrl-single,pins = <
+			K2G_CORE_IOPAD(0x137c) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
+			K2G_CORE_IOPAD(0x1380) (BUFFER_CLASS_B | PIN_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
+		>;
+	};
+
 };
 
 &uart0 {
@@ -112,3 +120,14 @@
 	memory-region = <&dsp_common_memory>;
 	status = "okay";
 };
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+
+	eeprom at 50 {
+		compatible = "atmel,24c1024";
+		reg = <0x50>;
+	};
+};
Signature · 1 line
2.9.4.dirty