[openwrt/openwrt] ramips: Add i2c support for mt7620n

LEDE Commits lede-commits at lists.infradead.org
Mon May 14 21:39:53 PDT 2018


blogic pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/a0685deec458bf81128ded8e992b33c32dce63ca

commit a0685deec458bf81128ded8e992b33c32dce63ca
Author: Matthias Badaire <mbadaire at gmail.com>
AuthorDate: Tue May 8 15:42:05 2018 +0200

    ramips: Add i2c support for mt7620n
    
    I2c is supported on mt7620n like on mt7620a when checking the datasheet
    
    Signed-off-by: Matthias Badaire <mbadaire at gmail.com>
---
 target/linux/ramips/dts/mt7620n.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/target/linux/ramips/dts/mt7620n.dtsi b/target/linux/ramips/dts/mt7620n.dtsi
index 4eb1dde..91d124c 100644
--- a/target/linux/ramips/dts/mt7620n.dtsi
+++ b/target/linux/ramips/dts/mt7620n.dtsi
@@ -160,6 +160,22 @@
 			status = "disabled";
 		};
 
+		i2c: i2c at 900 {
+			compatible = "ralink,rt2880-i2c";
+			reg = <0x900 0x100>;
+
+			resets = <&rstctrl 16>;
+			reset-names = "i2c";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&i2c_pins>;
+		};
+
 		spi0: spi at b00 {
 			compatible = "ralink,mt7620a-spi", "ralink,rt2880-spi";
 			reg = <0xb00 0x40>;
@@ -192,6 +208,13 @@
 			pinctrl-0 = <&spi_cs1>;
 		};
 
+		i2c_pins: i2c {
+			i2c {
+				ralink,group = "i2c";
+				ralink,function = "i2c";
+			};
+		};
+
 		uartlite: uartlite at c00 {
 			compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
 			reg = <0xc00 0x100>;



More information about the lede-commits mailing list