[source] ramips: backport MT7628 pinmux fixes

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 21 23:31:52 PST 2017


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/e142173e8dc5ddd923761581bcc877a786f3c2ff

commit e142173e8dc5ddd923761581bcc877a786f3c2ff
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Sat Nov 18 21:07:45 2017 +0100

    ramips: backport MT7628 pinmux fixes
    
    According to the datasheet the REFCLK pin is shared with GPIO#37 and
    the PERST pin is shared with GPIO#36.
    
    While at it fix a typo inside the pinmux setup code. The function is called
    refclk and not reclk.
    
    Update device tree source files accordingly.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/ramips/dts/DUZUN-DM06.dts             |  2 +-
 target/linux/ramips/dts/U7628-01.dtsi              |  2 +-
 target/linux/ramips/dts/VOCORE2.dtsi               |  2 +-
 .../0102-MIPS-ralink-Fix-MT7628-pinmux.patch       | 33 ++++++++++++++++++++++
 ...-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function | 31 ++++++++++++++++++++
 5 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/dts/DUZUN-DM06.dts b/target/linux/ramips/dts/DUZUN-DM06.dts
index 97625d8..c529b34 100644
--- a/target/linux/ramips/dts/DUZUN-DM06.dts
+++ b/target/linux/ramips/dts/DUZUN-DM06.dts
@@ -74,7 +74,7 @@
 	wm8960_mclk_pins: wm8960_mclk {
 		wm8960_mclk {
 			ralink,group = "refclk";
-			ralink,function = "reclk";
+			ralink,function = "refclk";
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/U7628-01.dtsi b/target/linux/ramips/dts/U7628-01.dtsi
index 142cc4c..34226a4 100644
--- a/target/linux/ramips/dts/U7628-01.dtsi
+++ b/target/linux/ramips/dts/U7628-01.dtsi
@@ -125,7 +125,7 @@
 &pinctrl {
 	state_default: pinctrl0 {
 		gpio {
-			ralink,group = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "perst", "wdt", "wled_an";
+			ralink,group = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "wdt", "wled_an";
 			ralink,function = "gpio";
 		};
 	};
diff --git a/target/linux/ramips/dts/VOCORE2.dtsi b/target/linux/ramips/dts/VOCORE2.dtsi
index dc1bd17..f7aec8e 100644
--- a/target/linux/ramips/dts/VOCORE2.dtsi
+++ b/target/linux/ramips/dts/VOCORE2.dtsi
@@ -12,7 +12,7 @@
 &pinctrl {
 	state_default: pinctrl0 {
 		gpio {
-			ralink,group = "wled_an", "perst", "wdt";
+			ralink,group = "wled_an", "refclk", "wdt";
 			ralink,function = "gpio";
 		};
 	};
diff --git a/target/linux/ramips/patches-4.9/0102-MIPS-ralink-Fix-MT7628-pinmux.patch b/target/linux/ramips/patches-4.9/0102-MIPS-ralink-Fix-MT7628-pinmux.patch
new file mode 100644
index 0000000..f2d1ab1
--- /dev/null
+++ b/target/linux/ramips/patches-4.9/0102-MIPS-ralink-Fix-MT7628-pinmux.patch
@@ -0,0 +1,33 @@
+From 8ef4b43cd3794d63052d85898e42424fd3b14d24 Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev at kresin.me>
+Date: Thu, 11 May 2017 08:11:14 +0200
+Subject: [PATCH 1/2] MIPS: ralink: Fix MT7628 pinmux
+
+According to the datasheet the REFCLK pin is shared with GPIO#37 and
+the PERST pin is shared with GPIO#36.
+
+Fixes: 53263a1c6852 ("MIPS: ralink: add mt7628an support")
+Signed-off-by: Mathias Kresin <dev at kresin.me>
+Acked-by: John Crispin <john at phrozen.org>
+Cc: Ralf Baechle <ralf at linux-mips.org>
+Cc: linux-mips at linux-mips.org
+Cc: <stable at vger.kernel.org> # 3.19+
+Patchwork: https://patchwork.linux-mips.org/patch/16046/
+Signed-off-by: James Hogan <jhogan at kernel.org>
+---
+ arch/mips/ralink/mt7620.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/ralink/mt7620.c
++++ b/arch/mips/ralink/mt7620.c
+@@ -141,8 +141,8 @@ static struct rt2880_pmx_func i2c_grp_mt
+ 	FUNC("i2c", 0, 4, 2),
+ };
+ 
+-static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) };
+-static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) };
++static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 37, 1) };
++static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 36, 1) };
+ static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) };
+ static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) };
+ 
diff --git a/target/linux/ramips/patches-4.9/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function b/target/linux/ramips/patches-4.9/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function
new file mode 100644
index 0000000..9c77840
--- /dev/null
+++ b/target/linux/ramips/patches-4.9/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function
@@ -0,0 +1,31 @@
+From 05a67cc258e75ac9758e6f13d26337b8be51162a Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev at kresin.me>
+Date: Thu, 11 May 2017 08:11:15 +0200
+Subject: [PATCH 2/2] MIPS: ralink: Fix typo in mt7628 pinmux function
+
+There is a typo inside the pinmux setup code. The function is called
+refclk and not reclk.
+
+Fixes: 53263a1c6852 ("MIPS: ralink: add mt7628an support")
+Signed-off-by: Mathias Kresin <dev at kresin.me>
+Acked-by: John Crispin <john at phrozen.org>
+Cc: Ralf Baechle <ralf at linux-mips.org>
+Cc: linux-mips at linux-mips.org
+Cc: <stable at vger.kernel.org> # 3.19+
+Patchwork: https://patchwork.linux-mips.org/patch/16047/
+Signed-off-by: James Hogan <jhogan at kernel.org>
+---
+ arch/mips/ralink/mt7620.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/ralink/mt7620.c
++++ b/arch/mips/ralink/mt7620.c
+@@ -141,7 +141,7 @@ static struct rt2880_pmx_func i2c_grp_mt
+ 	FUNC("i2c", 0, 4, 2),
+ };
+ 
+-static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 37, 1) };
++static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("refclk", 0, 37, 1) };
+ static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 36, 1) };
+ static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) };
+ static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) };



More information about the lede-commits mailing list