Skip to contentSkip to conversation

Add i2c dt-binding and device node for Mediatek MT2701 Soc

PATCH Superseded Jun Gao 1 participant 3 messages Mar 3, 2017

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jun Gao

author
#0 lore raw

v3 cover Add i2c dt-binding and device node for Mediatek MT2701 Soc

This patch series based on v4.10-rc2, include MT2701 i2c dt-binding and device node.

changes since v2:
- Modify commit message
- Revise dt-binding documentation

changes since v1:
- Modify commit message

Dependent on "Add clock and power domain DT nodes for Mediatek MT2701"[1].

[1] http://lists.infradead.org/pipermail/linux-mediatek/2016-December/007637.html

Jun Gao (2):
dt-bindings: i2c: Add Mediatek MT2701 i2c binding
arm: dts: Add Mediatek MT2701 i2c device node

 .../devicetree/bindings/i2c/i2c-mt6577.txt         |   11 ++---
 arch/arm/boot/dts/mt2701-evb.dts                   |   44 ++++++++++++++++++++
 arch/arm/boot/dts/mt2701.dtsi                      |   42 +++++++++++++++++++
 3 files changed, 92 insertions(+), 5 deletions(-)

--
1.7.9.5

author
#1 lore raw

PATCH v3 1/2 dt-bindings: i2c: Add Mediatek MT2701 i2c binding

From: Jun Gao <[email protected]>

Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to modify i2c driver.

---
 .../devicetree/bindings/i2c/i2c-mt6577.txt         |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/i2c/i2c-mt6577.txt +6 -5
index 0ce6fa3..27dbbf9 100644
@@ -4,11 +4,12 @@ The Mediatek's I2C controller is used to interface with I2C devices.
 
 Required properties:
   - compatible: value should be either of the following.
-      (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
-      (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
-      (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
-      (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
-      (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
+	"mediatek,mt2701-i2c"
+	"mediatek,mt6577-i2c"
+	"mediatek,mt6589-i2c"
+	"mediatek,mt8127-i2c"
+	"mediatek,mt8135-i2c"
+	"mediatek,mt8173-i2c"
   - reg: physical base address of the controller and dma base, length of memory
     mapped region.
   - interrupts: interrupt number to the cpu.
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH v3 2/2 arm: dts: Add Mediatek MT2701 i2c device node

In reply to Jun Gao

From: Jun Gao <[email protected]>

Add MT2701 i2c device node.

---
 arch/arm/boot/dts/mt2701-evb.dts |   44 ++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt2701.dtsi    |   42 ++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
arch/arm/boot/dts/mt2701-evb.dts +44 -0
index 082ca88..a908e94 100644
@@ -24,6 +24,50 @@
 	};
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins_a>;
+	status = "okay";
+};
+
+&pio {
+	i2c0_pins_a: i2c0 at 0 {
+		pins1 {
+			pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>,
+				 <MT2701_PIN_76_SCL0__FUNC_SCL0>;
+			bias-disable;
+		};
+	};
+
+	i2c1_pins_a: i2c1 at 0 {
+		pins1 {
+			pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>,
+				 <MT2701_PIN_58_SCL1__FUNC_SCL1>;
+			bias-disable;
+		};
+	};
+
+	i2c2_pins_a: i2c2 at 0 {
+		pins1 {
+			pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>,
+				 <MT2701_PIN_78_SCL2__FUNC_SCL2>;
+			bias-disable;
+		};
+	};
+};
+
 &uart0 {
 	status = "okay";
 };
arch/arm/boot/dts/mt2701.dtsi +42 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.9.5