bcm63xx: add a fixup for ath9k devices
[openwrt.git] / target / linux / brcm63xx / patches-3.3 / 520-bcm63xx-add-support-for-96368MVWG-board.patch
1 From eeacc2529942051504bc957726aa178671344421 Mon Sep 17 00:00:00 2001
2 From: Maxime Bizon <mbizon@freebox.fr>
3 Date: Wed, 20 Jan 2010 16:21:30 +0100
4 Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
5
6 ---
7  arch/mips/bcm63xx/boards/board_bcm963xx.c          |   95 ++++++++++++++++++++
8  .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h |    2 +
9  2 files changed, 97 insertions(+), 0 deletions(-)
10
11 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
12 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
13 @@ -2017,6 +2017,80 @@ static struct board_info __initdata boar
14  #endif
15  
16  /*
17 + * known 6368 boards
18 + */
19 +#ifdef CONFIG_BCM63XX_CPU_6368
20 +static struct board_info __initdata board_96368mvwg = {
21 +       .name                           = "96368MVWG",
22 +       .expected_cpu_id                = 0x6368,
23 +
24 +       .has_uart0                      = 1,
25 +       .has_pci                        = 1,
26 +       .has_enetsw                     = 1,
27 +
28 +       .enetsw = {
29 +               .used_ports = {
30 +                       [1] = {
31 +                               .used   = 1,
32 +                               .phy_id = 2,
33 +                               .name   = "port1",
34 +                       },
35 +
36 +                       [2] = {
37 +                               .used   = 1,
38 +                               .phy_id = 3,
39 +                               .name   = "port2",
40 +                       },
41 +
42 +                       [4] = {
43 +                               .used   = 1,
44 +                               .phy_id = 0x12,
45 +                               .external_phy = 1,
46 +                               .name   = "port0",
47 +                       },
48 +
49 +                       [5] = {
50 +                               .used   = 1,
51 +                               .phy_id = 0x11,
52 +                               .external_phy = 1,
53 +                               .name   = "port3",
54 +                       },
55 +               },
56 +       },
57 +
58 +       .leds = {
59 +               {
60 +                       .name           = "adsl",
61 +                       .gpio           = 2,
62 +                       .active_low     = 1,
63 +               },
64 +               {
65 +                       .name           = "ppp",
66 +                       .gpio           = 5,
67 +               },
68 +               {
69 +                       .name           = "power",
70 +                       .gpio           = 22,
71 +                       .active_low     = 1,
72 +                       .default_trigger = "default-on",
73 +               },
74 +               {
75 +                       .name           = "wps",
76 +                       .gpio           = 23,
77 +                       .active_low     = 1,
78 +               },
79 +               {
80 +                       .name           = "ppp-fail",
81 +                       .gpio           = 31,
82 +               },
83 +       },
84 +
85 +       .has_ohci0 = 1,
86 +       .has_ehci0 = 1,
87 +};
88 +#endif
89 +
90 +/*
91   * all boards
92   */
93  static const struct board_info __initdata *bcm963xx_boards[] = {
94 @@ -2065,6 +2139,10 @@ static const struct board_info __initdat
95         &board_HW553,
96         &board_spw303v,
97  #endif
98 +
99 +#ifdef CONFIG_BCM63XX_CPU_6368
100 +       &board_96368mvwg,
101 +#endif
102  };
103  
104  static void __init nb4_nvram_fixup(void)
105 @@ -2242,12 +2320,25 @@ void __init board_prom_init(void)
106         if (board.has_pci) {
107                 if (BCMCPU_IS_6348())
108                         val |= GPIO_MODE_6348_G2_PCI;
109 +
110 +               if (BCMCPU_IS_6368())
111 +                       val |= GPIO_MODE_6368_PCI_REQ1 |
112 +                               GPIO_MODE_6368_PCI_GNT1 |
113 +                               GPIO_MODE_6368_PCI_INTB |
114 +                               GPIO_MODE_6368_PCI_REQ0 |
115 +                               GPIO_MODE_6368_PCI_GNT0;
116         }
117  #endif
118  
119         if (board.has_pccard) {
120                 if (BCMCPU_IS_6348())
121                         val |= GPIO_MODE_6348_G1_MII_PCCARD;
122 +
123 +               if (BCMCPU_IS_6368())
124 +                       val |= GPIO_MODE_6368_PCMCIA_CD1 |
125 +                               GPIO_MODE_6368_PCMCIA_CD2 |
126 +                               GPIO_MODE_6368_PCMCIA_VS1 |
127 +                               GPIO_MODE_6368_PCMCIA_VS2;
128         }
129  
130         if (board.has_enet0 && !board.enet0.use_internal_phy) {