aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-ralink/mt7620.h
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-10-08 22:02:53 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:45:24 -0500
commitf576fb6a0700c76a68ca7b45a3cfbd70399b24ab (patch)
tree21223a4a74d70c02e03f95f566a483982da863d9 /arch/mips/include/asm/mach-ralink/mt7620.h
parent4248f7f121b755b272a3c77a1a5601faa6004350 (diff)
MIPS: ralink: cleanup the soc specific pinmux data
Before we had a pinctrl driver we used a custom OF api. This patch converts the soc specific pinmux data to a new set of structs. We also add some new pinmux setings. Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/8009/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/mach-ralink/mt7620.h')
-rw-r--r--arch/mips/include/asm/mach-ralink/mt7620.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h
index 7ff929005d15..a05c14c23155 100644
--- a/arch/mips/include/asm/mach-ralink/mt7620.h
+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
@@ -82,7 +82,6 @@
82#define MT7620_DDR2_SIZE_MIN 32 82#define MT7620_DDR2_SIZE_MIN 32
83#define MT7620_DDR2_SIZE_MAX 256 83#define MT7620_DDR2_SIZE_MAX 256
84 84
85#define MT7620_GPIO_MODE_I2C BIT(0)
86#define MT7620_GPIO_MODE_UART0_SHIFT 2 85#define MT7620_GPIO_MODE_UART0_SHIFT 2
87#define MT7620_GPIO_MODE_UART0_MASK 0x7 86#define MT7620_GPIO_MODE_UART0_MASK 0x7
88#define MT7620_GPIO_MODE_UART0(x) ((x) << MT7620_GPIO_MODE_UART0_SHIFT) 87#define MT7620_GPIO_MODE_UART0(x) ((x) << MT7620_GPIO_MODE_UART0_SHIFT)
@@ -94,16 +93,36 @@
94#define MT7620_GPIO_MODE_GPIO_UARTF 0x5 93#define MT7620_GPIO_MODE_GPIO_UARTF 0x5
95#define MT7620_GPIO_MODE_GPIO_I2S 0x6 94#define MT7620_GPIO_MODE_GPIO_I2S 0x6
96#define MT7620_GPIO_MODE_GPIO 0x7 95#define MT7620_GPIO_MODE_GPIO 0x7
97#define MT7620_GPIO_MODE_UART1 BIT(5) 96
98#define MT7620_GPIO_MODE_MDIO BIT(8) 97#define MT7620_GPIO_MODE_NAND 0
99#define MT7620_GPIO_MODE_RGMII1 BIT(9) 98#define MT7620_GPIO_MODE_SD 1
100#define MT7620_GPIO_MODE_RGMII2 BIT(10) 99#define MT7620_GPIO_MODE_ND_SD_GPIO 2
101#define MT7620_GPIO_MODE_SPI BIT(11) 100#define MT7620_GPIO_MODE_ND_SD_MASK 0x3
102#define MT7620_GPIO_MODE_SPI_REF_CLK BIT(12) 101#define MT7620_GPIO_MODE_ND_SD_SHIFT 18
103#define MT7620_GPIO_MODE_WLED BIT(13) 102
104#define MT7620_GPIO_MODE_JTAG BIT(15) 103#define MT7620_GPIO_MODE_PCIE_RST 0
105#define MT7620_GPIO_MODE_EPHY BIT(15) 104#define MT7620_GPIO_MODE_PCIE_REF 1
106#define MT7620_GPIO_MODE_WDT BIT(22) 105#define MT7620_GPIO_MODE_PCIE_GPIO 2
106#define MT7620_GPIO_MODE_PCIE_MASK 0x3
107#define MT7620_GPIO_MODE_PCIE_SHIFT 16
108
109#define MT7620_GPIO_MODE_WDT_RST 0
110#define MT7620_GPIO_MODE_WDT_REF 1
111#define MT7620_GPIO_MODE_WDT_GPIO 2
112#define MT7620_GPIO_MODE_WDT_MASK 0x3
113#define MT7620_GPIO_MODE_WDT_SHIFT 21
114
115#define MT7620_GPIO_MODE_I2C 0
116#define MT7620_GPIO_MODE_UART1 5
117#define MT7620_GPIO_MODE_MDIO 8
118#define MT7620_GPIO_MODE_RGMII1 9
119#define MT7620_GPIO_MODE_RGMII2 10
120#define MT7620_GPIO_MODE_SPI 11
121#define MT7620_GPIO_MODE_SPI_REF_CLK 12
122#define MT7620_GPIO_MODE_WLED 13
123#define MT7620_GPIO_MODE_JTAG 15
124#define MT7620_GPIO_MODE_EPHY 15
125#define MT7620_GPIO_MODE_PA 20
107 126
108static inline int mt7620_get_eco(void) 127static inline int mt7620_get_eco(void)
109{ 128{