aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-xway.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-08-09 14:38:15 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-08-14 16:49:24 -0400
commit0fabc8354318f84efd942fe3017fff2326392094 (patch)
treebaca1bdbad6cb410edbbfdda1be40961667c4d53 /drivers/pinctrl/pinctrl-xway.c
parent89ebefe3890e44516a99fb3d21d015ec3b75e50c (diff)
pinctrl/lantiq: add missing gphy led setup
We found out how to set the gphy led pinmuxing. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-xway.c')
-rw-r--r--drivers/pinctrl/pinctrl-xway.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index e92132c76a6b..86c8cf82105b 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -102,6 +102,7 @@ enum xway_mux {
102 XWAY_MUX_EPHY, 102 XWAY_MUX_EPHY,
103 XWAY_MUX_DFE, 103 XWAY_MUX_DFE,
104 XWAY_MUX_SDIO, 104 XWAY_MUX_SDIO,
105 XWAY_MUX_GPHY,
105 XWAY_MUX_NONE = 0xffff, 106 XWAY_MUX_NONE = 0xffff,
106}; 107};
107 108
@@ -109,12 +110,12 @@ static const struct ltq_mfp_pin xway_mfp[] = {
109 /* pin f0 f1 f2 f3 */ 110 /* pin f0 f1 f2 f3 */
110 MFP_XWAY(GPIO0, GPIO, EXIN, NONE, TDM), 111 MFP_XWAY(GPIO0, GPIO, EXIN, NONE, TDM),
111 MFP_XWAY(GPIO1, GPIO, EXIN, NONE, NONE), 112 MFP_XWAY(GPIO1, GPIO, EXIN, NONE, NONE),
112 MFP_XWAY(GPIO2, GPIO, CGU, EXIN, NONE), 113 MFP_XWAY(GPIO2, GPIO, CGU, EXIN, GPHY),
113 MFP_XWAY(GPIO3, GPIO, CGU, NONE, PCI), 114 MFP_XWAY(GPIO3, GPIO, CGU, NONE, PCI),
114 MFP_XWAY(GPIO4, GPIO, STP, NONE, ASC), 115 MFP_XWAY(GPIO4, GPIO, STP, NONE, ASC),
115 MFP_XWAY(GPIO5, GPIO, STP, NONE, NONE), 116 MFP_XWAY(GPIO5, GPIO, STP, NONE, GPHY),
116 MFP_XWAY(GPIO6, GPIO, STP, GPT, ASC), 117 MFP_XWAY(GPIO6, GPIO, STP, GPT, ASC),
117 MFP_XWAY(GPIO7, GPIO, CGU, PCI, NONE), 118 MFP_XWAY(GPIO7, GPIO, CGU, PCI, GPHY),
118 MFP_XWAY(GPIO8, GPIO, CGU, NMI, NONE), 119 MFP_XWAY(GPIO8, GPIO, CGU, NMI, NONE),
119 MFP_XWAY(GPIO9, GPIO, ASC, SPI, EXIN), 120 MFP_XWAY(GPIO9, GPIO, ASC, SPI, EXIN),
120 MFP_XWAY(GPIO10, GPIO, ASC, SPI, NONE), 121 MFP_XWAY(GPIO10, GPIO, ASC, SPI, NONE),
@@ -151,10 +152,10 @@ static const struct ltq_mfp_pin xway_mfp[] = {
151 MFP_XWAY(GPIO41, GPIO, NONE, NONE, NONE), 152 MFP_XWAY(GPIO41, GPIO, NONE, NONE, NONE),
152 MFP_XWAY(GPIO42, GPIO, MDIO, NONE, NONE), 153 MFP_XWAY(GPIO42, GPIO, MDIO, NONE, NONE),
153 MFP_XWAY(GPIO43, GPIO, MDIO, NONE, NONE), 154 MFP_XWAY(GPIO43, GPIO, MDIO, NONE, NONE),
154 MFP_XWAY(GPIO44, GPIO, NONE, NONE, SIN), 155 MFP_XWAY(GPIO44, GPIO, NONE, GPHY, SIN),
155 MFP_XWAY(GPIO45, GPIO, NONE, NONE, SIN), 156 MFP_XWAY(GPIO45, GPIO, NONE, GPHY, SIN),
156 MFP_XWAY(GPIO46, GPIO, NONE, NONE, EXIN), 157 MFP_XWAY(GPIO46, GPIO, NONE, NONE, EXIN),
157 MFP_XWAY(GPIO47, GPIO, NONE, NONE, SIN), 158 MFP_XWAY(GPIO47, GPIO, NONE, GPHY, SIN),
158 MFP_XWAY(GPIO48, GPIO, EBU, NONE, NONE), 159 MFP_XWAY(GPIO48, GPIO, EBU, NONE, NONE),
159 MFP_XWAY(GPIO49, GPIO, EBU, NONE, NONE), 160 MFP_XWAY(GPIO49, GPIO, EBU, NONE, NONE),
160 MFP_XWAY(GPIO50, GPIO, NONE, NONE, NONE), 161 MFP_XWAY(GPIO50, GPIO, NONE, NONE, NONE),
@@ -208,6 +209,13 @@ static const unsigned pins_stp[] = {GPIO4, GPIO5, GPIO6};
208static const unsigned pins_nmi[] = {GPIO8}; 209static const unsigned pins_nmi[] = {GPIO8};
209static const unsigned pins_mdio[] = {GPIO42, GPIO43}; 210static const unsigned pins_mdio[] = {GPIO42, GPIO43};
210 211
212static const unsigned pins_gphy0_led0[] = {GPIO5};
213static const unsigned pins_gphy0_led1[] = {GPIO7};
214static const unsigned pins_gphy0_led2[] = {GPIO2};
215static const unsigned pins_gphy1_led0[] = {GPIO44};
216static const unsigned pins_gphy1_led1[] = {GPIO45};
217static const unsigned pins_gphy1_led2[] = {GPIO47};
218
211static const unsigned pins_ebu_a24[] = {GPIO13}; 219static const unsigned pins_ebu_a24[] = {GPIO13};
212static const unsigned pins_ebu_clk[] = {GPIO21}; 220static const unsigned pins_ebu_clk[] = {GPIO21};
213static const unsigned pins_ebu_cs1[] = {GPIO23}; 221static const unsigned pins_ebu_cs1[] = {GPIO23};
@@ -322,6 +330,12 @@ static const struct ltq_pin_group xway_grps[] = {
322 GRP_MUX("gnt4", PCI, pins_pci_gnt4), 330 GRP_MUX("gnt4", PCI, pins_pci_gnt4),
323 GRP_MUX("req4", PCI, pins_pci_gnt4), 331 GRP_MUX("req4", PCI, pins_pci_gnt4),
324 GRP_MUX("mdio", MDIO, pins_mdio), 332 GRP_MUX("mdio", MDIO, pins_mdio),
333 GRP_MUX("gphy0 led0", GPHY, pins_gphy0_led0),
334 GRP_MUX("gphy0 led1", GPHY, pins_gphy0_led1),
335 GRP_MUX("gphy0 lde2", GPHY, pins_gphy0_led2),
336 GRP_MUX("gphy1 led0", GPHY, pins_gphy1_led0),
337 GRP_MUX("gphy1 led1", GPHY, pins_gphy1_led1),
338 GRP_MUX("gphy1 lde2", GPHY, pins_gphy1_led2),
325}; 339};
326 340
327static const struct ltq_pin_group ase_grps[] = { 341static const struct ltq_pin_group ase_grps[] = {
@@ -365,6 +379,9 @@ static const char * const xway_nmi_grps[] = {"nmi"};
365 379
366/* ar9/vr9/gr9 */ 380/* ar9/vr9/gr9 */
367static const char * const xrx_mdio_grps[] = {"mdio"}; 381static const char * const xrx_mdio_grps[] = {"mdio"};
382static const char * const xrx_gphy_grps[] = {"gphy0 led0", "gphy0 led1",
383 "gphy0 led2", "gphy1 led0",
384 "gphy1 led1", "gphy1 led2"};
368static const char * const xrx_ebu_grps[] = {"ebu a23", "ebu a24", 385static const char * const xrx_ebu_grps[] = {"ebu a23", "ebu a24",
369 "ebu a25", "ebu cs1", 386 "ebu a25", "ebu cs1",
370 "ebu wait", "ebu clk", 387 "ebu wait", "ebu clk",
@@ -414,6 +431,7 @@ static const struct ltq_pmx_func xrx_funcs[] = {
414 {"pci", ARRAY_AND_SIZE(xrx_pci_grps)}, 431 {"pci", ARRAY_AND_SIZE(xrx_pci_grps)},
415 {"ebu", ARRAY_AND_SIZE(xrx_ebu_grps)}, 432 {"ebu", ARRAY_AND_SIZE(xrx_ebu_grps)},
416 {"mdio", ARRAY_AND_SIZE(xrx_mdio_grps)}, 433 {"mdio", ARRAY_AND_SIZE(xrx_mdio_grps)},
434 {"gphy", ARRAY_AND_SIZE(xrx_gphy_grps)},
417}; 435};
418 436
419static const struct ltq_pmx_func ase_funcs[] = { 437static const struct ltq_pmx_func ase_funcs[] = {