Skip to contentSkip to conversation

ARM: DTS: da850: add node for i2c1

PATCH New Petr Kulhavy 2 participants 8 messages Apr 1, 2016 – Apr 7, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM: DTS: da850: add node for i2c1

This adds I2C-1 device tree node for the da850 platform

I've borrowed the first patch of the series from David Lechner from MUSB as it corrects the wrong addresses in the da850.dts files. The da850 was using the physical addresses after the "@" rather than the <reg> addresses as the convention says.

---
1.9.1

#1 lore raw

PATCH 1/3 dt: davinci: use proper address after @

From: David Lechner <[email protected]>

TI has been using the physical address in DT after the @ in device nodes. The device tree convention is to use the same address that is used for the reg property. This updates all davinci DT files to use the proper convention.

---
 arch/arm/boot/dts/da850-enbw-cmc.dts |  8 +++---
 arch/arm/boot/dts/da850-evm.dts      | 26 +++++++++---------
 arch/arm/boot/dts/da850.dtsi         | 52 ++++++++++++++++++------------------
 3 files changed, 43 insertions(+), 43 deletions(-)
arch/arm/boot/dts/da850-enbw-cmc.dts +4 -4
index 645549e14237..101d1a16b0ac 100644
@@ -16,14 +16,14 @@
 	compatible = "enbw,cmc", "ti,da850";
 	model = "EnBW CMC";
 
-	soc {
-		serial0: serial at 1c42000 {
+	soc at 1c00000 {
+		serial0: serial at 42000 {
 			status = "okay";
 		};
-		serial1: serial at 1d0c000 {
+		serial1: serial at 10c000 {
 			status = "okay";
 		};
-		serial2: serial at 1d0d000 {
+		serial2: serial at 10d000 {
 			status = "okay";
 		};
 	};
arch/arm/boot/dts/da850-evm.dts +13 -13
index ef061e9a2315..1a15db8e376b 100644
@@ -14,8 +14,8 @@
 	compatible = "ti,da850-evm", "ti,da850";
 	model = "DA850/AM1808/OMAP-L138 EVM";
 
-	soc {
-		pmx_core: pinmux at 1c14120 {
+	soc at 1c00000 {
+		pmx_core: pinmux at 14120 {
 			status = "okay";
 
 			mcasp0_pins: pinmux_mcasp0_pins {
@@ -30,19 +30,19 @@
 				>;
 			};
 		};
-		serial0: serial at 1c42000 {
+		serial0: serial at 42000 {
 			status = "okay";
 		};
-		serial1: serial at 1d0c000 {
+		serial1: serial at 10c000 {
 			status = "okay";
 		};
-		serial2: serial at 1d0d000 {
+		serial2: serial at 10d000 {
 			status = "okay";
 		};
-		rtc0: rtc at 1c23000 {
+		rtc0: rtc at 23000 {
 			status = "okay";
 		};
-		i2c0: i2c at 1c22000 {
+		i2c0: i2c at 22000 {
 			status = "okay";
 			clock-frequency = <100000>;
 			pinctrl-names = "default";
@@ -66,17 +66,17 @@
 			};
 
 		};
-		wdt: wdt at 1c21000 {
+		wdt: wdt at 21000 {
 			status = "okay";
 		};
-		mmc0: mmc at 1c40000 {
+		mmc0: mmc at 40000 {
 			max-frequency = <50000000>;
 			bus-width = <4>;
 			status = "okay";
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc0_pins>;
 		};
-		spi1: spi at 1f0e000 {
+		spi1: spi at 30e000 {
 			status = "okay";
 			pinctrl-names = "default";
 			pinctrl-0 = <&spi1_pins &spi1_cs0_pin>;
@@ -116,18 +116,18 @@
 				};
 			};
 		};
-		mdio: mdio at 1e24000 {
+		mdio: mdio at 224000 {
 			status = "okay";
 			pinctrl-names = "default";
 			pinctrl-0 = <&mdio_pins>;
 			bus_freq = <2200000>;
 		};
-		eth0: ethernet at 1e20000 {
+		eth0: ethernet at 220000 {
 			status = "okay";
 			pinctrl-names = "default";
 			pinctrl-0 = <&mii_pins>;
 		};
-		gpio: gpio at 1e26000 {
+		gpio: gpio at 226000 {
 			status = "okay";
 		};
 	};
arch/arm/boot/dts/da850.dtsi +26 -26

197 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/3 dt: davinci: use proper address after @

Quoted 9 lines · Petr Kulhavy

From: David Lechner <[email protected]>

TI has been using the physical address in DT after the @ in device nodes. The device tree convention is to use the same address that is used for the reg property. This updates all davinci DT files to use the proper convention.

Applied for v4.7. Fixed the subject prefix to "ARM: dts: davinci: " as is the convention for device tree updates.

Regards,
Sekhar

#3 lore raw

PATCH 1/3 dt: davinci: use proper address after @

Quoted 8 lines · Sekhar Nori
Quoted 7 lines · Petr Kulhavy

From: David Lechner <[email protected]>

TI has been using the physical address in DT after the @ in device nodes. The device tree convention is to use the same address that is used for the reg property. This updates all davinci DT files to use the proper convention.

Quoted 8 lines
Quoted 2 lines

Applied for v4.7. Fixed the subject prefix to "ARM: dts: davinci: " as is the convention for device tree updates.

Regards,
Sekhar

Thanks, Sekhar for applying the series.

Regards
Petr

#4 lore raw

PATCH 2/3 ARM: DTS: da850: add node for i2c1

In reply to Petr Kulhavy

da850 has two I2C controllers, but the node for i2c1 was missing. Add node for i2c1 controller and i2c1 pinmux pins.

---
 arch/arm/boot/dts/da850.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/da850.dtsi +14 -0
index 42948496b8f7..136c422204d3 100644
@@ -63,6 +63,12 @@
 					0x10 0x00002200 0x0000ff00
 				>;
 			};
+			i2c1_pins: pinmux_i2c1_pins {
+				pinctrl-single,bits = <
+				/* I2C1_SDA,I2C1_SCL */
+				0x10 0x00440000 0x00ff0000
+				>;
+			};
 			mmc0_pins: pinmux_mmc_pins {
 				pinctrl-single,bits = <
 					/* MMCSD0_DAT[3] MMCSD0_DAT[2]
@@ -226,6 +232,14 @@
 			#size-cells = <0>;
 			status = "disabled";
 		};
+		i2c1: i2c at 228000 {
+			compatible = "ti,davinci-i2c";
+			reg = <0x228000 0x1000>;
+			interrupts = <51>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
 		wdt: wdt at 21000 {
 			compatible = "ti,davinci-wdt";
 			reg = <0x21000 0x1000>;
Signature · 1 line
1.9.1
#5 lore raw

PATCH 2/3 ARM: DTS: da850: add node for i2c1

Quoted 13 lines · Petr Kulhavy

da850 has two I2C controllers, but the node for i2c1 was missing. Add node for i2c1 controller and i2c1 pinmux pins.

---
 arch/arm/boot/dts/da850.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/da850.dtsi +0 -0
index 42948496b8f7..136c422204d3 100644

arch/arm/boot/dts/da850.dtsi line 70

Quoted 8 lines
arch/arm/boot/dts/da850.dtsi +4 -0
@@ -63,6 +63,12 @@
 					0x10 0x00002200 0x0000ff00
 				>;
 			};
+			i2c1_pins: pinmux_i2c1_pins {
+				pinctrl-single,bits = <
 
+				/* I2C1_SDA,I2C1_SCL */
+				0x10 0x00440000 0x00ff0000

Indented these two lines one tab like its done elsewhere in the file and applied.

Thanks,
Sekhar

#6 lore raw

PATCH 3/3 ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for i2c1

In reply to Petr Kulhavy

Add OF_DEV_AUXDATA entry for second i2c on the da850 DT board driver to use i2c clock.

---
 arch/arm/mach-davinci/da8xx-dt.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-davinci/da8xx-dt.c +1 -0
index c4b5808ca7c1..880b94e64816 100644
@@ -32,6 +32,7 @@ static void __init da8xx_init_irq(void)
 
 static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
+	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01e28000, "i2c_davinci.2", NULL),
 	OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "davinci-wdt", NULL),
 	OF_DEV_AUXDATA("ti,da830-mmc", 0x01c40000, "da830-mmc.0", NULL),
 	OF_DEV_AUXDATA("ti,da850-ehrpwm", 0x01f00000, "ehrpwm", NULL),
Signature · 1 line
1.9.1
Applied
#7 lore raw

PATCH 3/3 ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for i2c1

Quoted 4 lines · Petr Kulhavy

Add OF_DEV_AUXDATA entry for second i2c on the da850 DT board driver to use i2c clock.

Applied.

Thanks,
Sekhar