Re: [OpenWrt-Devel] [PATCH] ralink: mt7621 fix pinctrl config

2015-03-17 Thread John Crispin
Hi,

some comments inline


On 17/03/2015 08:24, wengbj wrote:
 From: zouxf fl.serv...@t-firefly.com
 
 Signed-off-by: zouxf fl.serv...@t-firefly.com
 ---
  target/linux/ramips/dts/mt7621.dtsi|   18 +++---
  .../patches-3.18/0062-mt7621-fix-pinctrl.patch |   58 
 
  2 files changed, 67 insertions(+), 9 deletions(-)
  create mode 100644 
 target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch
 
 diff --git a/target/linux/ramips/dts/mt7621.dtsi 
 b/target/linux/ramips/dts/mt7621.dtsi
 index 50cd144..f09ec3e 100644
 --- a/target/linux/ramips/dts/mt7621.dtsi
 +++ b/target/linux/ramips/dts/mt7621.dtsi
 @@ -123,38 +123,38 @@
   };
   i2c_pins: i2c {
   i2c {
 - lantiq,group = i2c;
 - lantiq,function = i2c;
 + ralink,group = i2c;
 + ralink,function = i2c;
   };
   };
   uart1_pins: uart1 {
   uart1 {
   ralink,group = uart1;
 - ralink,function = uart;
 + ralink,function = uart1;

the group is uart1 but the function should stay at uart. function
describes what the pins do. they are supposed to be uart pins. this is
the same for all occurences inside this patch.

please resend a patch that only fixes the i2c naming error.

John


   };
   };
   uart2_pins: uart2 {
   uart2 {
   ralink,group = uart2;
 - ralink,function = uart;
 + ralink,function = uart2;


here aswell
   };
   };
   uart3_pins: uart3 {
   uart3 {
   ralink,group = uart3;
 - ralink,function = uart;
 + ralink,function = uart3;
   };
   };
   rgmii1_pins: rgmii1 {
   rgmii1 {
   ralink,group = rgmii1;
 - ralink,function = rgmii;
 + ralink,function = rgmii1;
   };
   };
   rgmii2_pins: rgmii2 {
   rgmii2 {
   ralink,group = rgmii2;
 - ralink,function = rgmii;
 + ralink,function = rgmii2;
   };
   };
   mdio_pins: mdio {
 @@ -172,11 +172,11 @@
   nand_pins: nand {
   spi-nand {
   ralink,group = spi;
 - ralink,function = nand;
 + ralink,function = nand1;
   };
   sdhci-nand {
   ralink,group = sdhci;
 - ralink,function = nand;
 + ralink,function = nand2;
   };
   };
   sdhci_pins: sdhci {
 diff --git a/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch 
 b/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch
 new file mode 100644
 index 000..a963e5f
 --- /dev/null
 +++ b/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch
 @@ -0,0 +1,58 @@
 +Index: linux-3.18.8/arch/mips/ralink/mt7621.c
 +===
 +--- linux-3.18.8.orig/arch/mips/ralink/mt7621.c  2015-03-17 
 10:46:49.290956084 +0800
  linux-3.18.8/arch/mips/ralink/mt7621.c   2015-03-17 14:54:21.823186689 
 +0800
 +@@ -32,8 +32,8 @@
 + 
 + #define MT7621_GPIO_MODE_UART1  1
 + #define MT7621_GPIO_MODE_I2C2
 +-#define MT7621_GPIO_MODE_UART2  3
 +-#define MT7621_GPIO_MODE_UART3  5
 ++#define MT7621_GPIO_MODE_UART2  5
 ++#define MT7621_GPIO_MODE_UART3  3
 + #define MT7621_GPIO_MODE_JTAG   7
 + #define MT7621_GPIO_MODE_WDT_MASK   0x3
 + #define MT7621_GPIO_MODE_WDT_SHIFT  8
 +@@ -53,10 +53,10 @@
 + #define MT7621_GPIO_MODE_SDHCI_SHIFT18
 + #define MT7621_GPIO_MODE_SDHCI_GPIO 1
 + 
 +-static struct rt2880_pmx_func uart1_grp[] =  { FUNC(uart, 0, 1, 2) };
 ++static struct rt2880_pmx_func uart1_grp[] =  { FUNC(uart1, 0, 1, 2) };
 + static struct rt2880_pmx_func i2c_grp[] =  { FUNC(i2c, 0, 3, 2) };
 +-static struct rt2880_pmx_func uart3_grp[] = { FUNC(uart, 0, 5, 4) };
 +-static struct rt2880_pmx_func uart2_grp[] = { FUNC(uart, 0, 9, 4) };
 ++static struct rt2880_pmx_func uart3_grp[] = { FUNC(uart2, 0, 5, 4) };
 ++static struct rt2880_pmx_func uart2_grp[] = { FUNC(uart3, 0, 9, 4) };
 + static struct rt2880_pmx_func jtag_grp[] = { FUNC(jtag, 0, 13, 5) };
 + 

[OpenWrt-Devel] [PATCH] ralink: mt7621 fix pinctrl config

2015-03-17 Thread wengbj
From: zouxf fl.serv...@t-firefly.com

Signed-off-by: zouxf fl.serv...@t-firefly.com
---
 target/linux/ramips/dts/mt7621.dtsi|   18 +++---
 .../patches-3.18/0062-mt7621-fix-pinctrl.patch |   58 
 2 files changed, 67 insertions(+), 9 deletions(-)
 create mode 100644 
target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch

diff --git a/target/linux/ramips/dts/mt7621.dtsi 
b/target/linux/ramips/dts/mt7621.dtsi
index 50cd144..f09ec3e 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -123,38 +123,38 @@
};
i2c_pins: i2c {
i2c {
-   lantiq,group = i2c;
-   lantiq,function = i2c;
+   ralink,group = i2c;
+   ralink,function = i2c;
};
};
uart1_pins: uart1 {
uart1 {
ralink,group = uart1;
-   ralink,function = uart;
+   ralink,function = uart1;
};
};
uart2_pins: uart2 {
uart2 {
ralink,group = uart2;
-   ralink,function = uart;
+   ralink,function = uart2;
};
};
uart3_pins: uart3 {
uart3 {
ralink,group = uart3;
-   ralink,function = uart;
+   ralink,function = uart3;
};
};
rgmii1_pins: rgmii1 {
rgmii1 {
ralink,group = rgmii1;
-   ralink,function = rgmii;
+   ralink,function = rgmii1;
};
};
rgmii2_pins: rgmii2 {
rgmii2 {
ralink,group = rgmii2;
-   ralink,function = rgmii;
+   ralink,function = rgmii2;
};
};
mdio_pins: mdio {
@@ -172,11 +172,11 @@
nand_pins: nand {
spi-nand {
ralink,group = spi;
-   ralink,function = nand;
+   ralink,function = nand1;
};
sdhci-nand {
ralink,group = sdhci;
-   ralink,function = nand;
+   ralink,function = nand2;
};
};
sdhci_pins: sdhci {
diff --git a/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch 
b/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch
new file mode 100644
index 000..a963e5f
--- /dev/null
+++ b/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch
@@ -0,0 +1,58 @@
+Index: linux-3.18.8/arch/mips/ralink/mt7621.c
+===
+--- linux-3.18.8.orig/arch/mips/ralink/mt7621.c2015-03-17 
10:46:49.290956084 +0800
 linux-3.18.8/arch/mips/ralink/mt7621.c 2015-03-17 14:54:21.823186689 
+0800
+@@ -32,8 +32,8 @@
+ 
+ #define MT7621_GPIO_MODE_UART11
+ #define MT7621_GPIO_MODE_I2C  2
+-#define MT7621_GPIO_MODE_UART23
+-#define MT7621_GPIO_MODE_UART35
++#define MT7621_GPIO_MODE_UART25
++#define MT7621_GPIO_MODE_UART33
+ #define MT7621_GPIO_MODE_JTAG 7
+ #define MT7621_GPIO_MODE_WDT_MASK 0x3
+ #define MT7621_GPIO_MODE_WDT_SHIFT8
+@@ -53,10 +53,10 @@
+ #define MT7621_GPIO_MODE_SDHCI_SHIFT  18
+ #define MT7621_GPIO_MODE_SDHCI_GPIO   1
+ 
+-static struct rt2880_pmx_func uart1_grp[] =  { FUNC(uart, 0, 1, 2) };
++static struct rt2880_pmx_func uart1_grp[] =  { FUNC(uart1, 0, 1, 2) };
+ static struct rt2880_pmx_func i2c_grp[] =  { FUNC(i2c, 0, 3, 2) };
+-static struct rt2880_pmx_func uart3_grp[] = { FUNC(uart, 0, 5, 4) };
+-static struct rt2880_pmx_func uart2_grp[] = { FUNC(uart, 0, 9, 4) };
++static struct rt2880_pmx_func uart3_grp[] = { FUNC(uart2, 0, 5, 4) };
++static struct rt2880_pmx_func uart2_grp[] = { FUNC(uart3, 0, 9, 4) };
+ static struct rt2880_pmx_func jtag_grp[] = { FUNC(jtag, 0, 13, 5) };
+ static struct rt2880_pmx_func wdt_grp[] = {
+   FUNC(wdt rst, 0, 18, 1),
+@@ -67,22 +67,22 @@
+   FUNC(pcie refclk, MT7621_GPIO_MODE_PCIE_REF, 19, 1)
+ };
+ static struct rt2880_pmx_func mdio_grp[] = { FUNC(mdio, 0, 20, 2) };
+-static struct rt2880_pmx_func rgmii2_grp[] = { FUNC(rgmii, 0, 22, 12) };
++static struct