Skip to contentSkip to conversation

ARM: dts: OMAP5: Add i2c aliases

PATCH Superseded Nishanth Menon 2 participants 7 messages Oct 15, 2013 – Oct 21, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: OMAP5: Add i2c aliases

Currently, i2c1 and i2c5 defer probe due to pinctrl dependencies. This changes the i2c ID each bus is registered with in i2c-dev interface.

As a result of this, many userspace tools break and there is no consistent manner to fix the same if the i2c dev interface have no consistent numbering. Provide alias to allow ordering the i2c devices correctly.

---

 arch/arm/boot/dts/omap5.dtsi |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/omap5.dtsi +5 -0
index e18ee7e..8970deb 100644
@@ -21,6 +21,11 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
+		i2c4 = &i2c5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Nishanth Menon

Currently, i2c1 and i2c5 defer probe due to pinctrl dependencies. This changes the i2c ID each bus is registered with in i2c-dev interface.

As a result of this, many userspace tools break and there is no consistent manner to fix the same if the i2c dev interface have no consistent numbering. Provide alias to allow ordering the i2c devices correctly.

This looks good Nishanth. Shouldn't we just go ahead and fix these for all OMAPs/AMxx devices which would have the same problem as OMAP5 ;)

Quoted 24 lines

---

 arch/arm/boot/dts/omap5.dtsi |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/omap5.dtsi +5 -0
index e18ee7e..8970deb 100644
@@ -21,6 +21,11 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
+		i2c4 = &i2c5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
#2 lore raw
Quoted 5 lines · Rajendra Nayak
Quoted 4 lines · Nishanth Menon

Currently, i2c1 and i2c5 defer probe due to pinctrl dependencies. This changes the i2c ID each bus is registered with in i2c-dev interface.

Quoted 7 lines
Quoted 4 lines

As a result of this, many userspace tools break and there is no consistent manner to fix the same if the i2c dev interface have no consistent numbering. Provide alias to allow ordering the i2c devices correctly.

This looks good Nishanth. Shouldn't we just go ahead and fix these for all OMAPs/AMxx devices which would have the same problem as OMAP5 ;)

yes ofcourse. i can do a couple of patches:
1 - for all OMAPs
2 - for all AM platforms.

Quoted 27 lines
Quoted 24 lines

---

 arch/arm/boot/dts/omap5.dtsi |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/omap5.dtsi +5 -0
index e18ee7e..8970deb 100644
@@ -21,6 +21,11 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
+		i2c4 = &i2c5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
Signature · 2 lines
Regards,
Nishanth Menon
#3 lore raw

v2 cover ARM: dts: OMAP2+: add i2c aliases

Add i2c aliases for OMAP and AM processor dts nodes to ensure proper i2c ordering. Based on Benoit's for_13/dts branch[1]

Changes in V2:
- Following Rajendra's suggestion, done for all OMAP and AM series SoCs, where i2c is defined.

V1: https://patchwork.kernel.org/patch/3046671/

Nishanth Menon (2):
ARM: dts: OMAP3+: Add i2c aliases
ARM: dts: AM33xx+: Add i2c aliases

 arch/arm/boot/dts/am33xx.dtsi |    3 +++
 arch/arm/boot/dts/am4372.dtsi |    3 +++
 arch/arm/boot/dts/dra7.dtsi   |    5 +++++
 arch/arm/boot/dts/omap3.dtsi  |    3 +++
 arch/arm/boot/dts/omap4.dtsi  |    4 ++++
 arch/arm/boot/dts/omap5.dtsi  |    5 +++++
 6 files changed, 23 insertions(+)

[1] https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts

Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v2 1/2 ARM: dts: OMAP3+: Add i2c aliases

Currently, on OMAP5, i2c1 and i2c5 defer probe due to pinctrl dependencies. This changes the i2c ID each bus is registered with in i2c-dev interface. As a result of this, many userspace tools break and there is no consistent manner to fix the same if the i2c dev interface have no consistent numbering.

Since this could happen for other OMAP derivatives, provide i2c alias for all OMAP3+ SoCs to allow ordering the i2c devices correctly.

---
 arch/arm/boot/dts/dra7.dtsi  |    5 +++++
 arch/arm/boot/dts/omap3.dtsi |    3 +++
 arch/arm/boot/dts/omap4.dtsi |    4 ++++
 arch/arm/boot/dts/omap5.dtsi |    5 +++++
 4 files changed, 17 insertions(+)
arch/arm/boot/dts/dra7.dtsi +5 -0
index e723b52..f62f24a 100644
@@ -20,6 +20,11 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
+		i2c4 = &i2c5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
arch/arm/boot/dts/omap3.dtsi +3 -0
index 4f3778a..d9160e7 100644
@@ -19,6 +19,9 @@
 	interrupt-parent = <&intc>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
arch/arm/boot/dts/omap4.dtsi +4 -0
index decff2a..269bf83 100644
@@ -17,6 +17,10 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
arch/arm/boot/dts/omap5.dtsi +5 -0
index e18ee7e..8970deb 100644
@@ -21,6 +21,11 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		i2c0 = &i2c1;
+		i2c1 = &i2c2;
+		i2c2 = &i2c3;
+		i2c3 = &i2c4;
+		i2c4 = &i2c5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v2 2/2 ARM: dts: AM33xx+: Add i2c aliases

In reply to Nishanth Menon

Provide alias to allow ordering the i2c devices correctly.

---
 arch/arm/boot/dts/am33xx.dtsi |    3 +++
 arch/arm/boot/dts/am4372.dtsi |    3 +++
 2 files changed, 6 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +3 -0
index 09f16a0..defc0d5 100644
@@ -18,6 +18,9 @@
 	interrupt-parent = <&intc>;
 
 	aliases {
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
 		serial0 = &uart0;
 		serial1 = &uart1;
 		serial2 = &uart2;
arch/arm/boot/dts/am4372.dtsi +3 -0
index 4944b1a..c7c3160 100644
@@ -18,6 +18,9 @@
 
 
 	aliases {
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
 		serial0 = &uart0;
 	};
 
Signature · 1 line
1.7.9.5
Acked-by on the v2 series
#6 lore raw

Re: [PATCH V2 0/2] ARM: dts: OMAP2+: add i2c aliases

In reply to Nishanth Menon
Quoted 6 lines · Nishanth Menon

Add i2c aliases for OMAP and AM processor dts nodes to ensure proper i2c ordering. Based on Benoit's for_13/dts branch[1]

Changes in V2:
- Following Rajendra's suggestion, done for all OMAP and AM series SoCs, where i2c is defined.

Thanks Nishanth.

Quoted 17 lines

V1: https://patchwork.kernel.org/patch/3046671/

Nishanth Menon (2):
ARM: dts: OMAP3+: Add i2c aliases
ARM: dts: AM33xx+: Add i2c aliases

 arch/arm/boot/dts/am33xx.dtsi |    3 +++
 arch/arm/boot/dts/am4372.dtsi |    3 +++
 arch/arm/boot/dts/dra7.dtsi   |    5 +++++
 arch/arm/boot/dts/omap3.dtsi  |    3 +++
 arch/arm/boot/dts/omap4.dtsi  |    4 ++++
 arch/arm/boot/dts/omap5.dtsi  |    5 +++++
 6 files changed, 23 insertions(+)

[1] https://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts