brcm63xx: Add DT support for 96368MVWG
[openwrt.git] / target / linux / brcm63xx / patches-3.14 / 531-board_AR-5387un.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -166,6 +166,116 @@ static struct board_info __initdata boar
4         },
5  };
6  
7 +static struct sprom_fixup __initdata ar5387un_fixups[] = {
8 +       { .offset = 2, .value = 0x05bb },
9 +       { .offset = 65, .value = 0x1204 },
10 +       { .offset = 78, .value = 0x0303 },
11 +       { .offset = 79, .value = 0x0202 },
12 +       { .offset = 80, .value = 0xff02 },
13 +       { .offset = 87, .value = 0x0315 },
14 +       { .offset = 88, .value = 0x0315 },
15 +       { .offset = 96, .value = 0x2048 },
16 +       { .offset = 97, .value = 0xff11 },
17 +       { .offset = 98, .value = 0x1567 },
18 +       { .offset = 99, .value = 0xfb24 },
19 +       { .offset = 100, .value = 0x3e3c },
20 +       { .offset = 101, .value = 0x4038 },
21 +       { .offset = 102, .value = 0xfe7f },
22 +       { .offset = 103, .value = 0x1279 },
23 +       { .offset = 112, .value = 0x2048 },
24 +       { .offset = 113, .value = 0xff03 },
25 +       { .offset = 114, .value = 0x154c },
26 +       { .offset = 115, .value = 0xfb27 },
27 +       { .offset = 116, .value = 0x3e3c },
28 +       { .offset = 117, .value = 0x4038 },
29 +       { .offset = 118, .value = 0xfe87 },
30 +       { .offset = 119, .value = 0x1233 },
31 +       { .offset = 203, .value = 0x2226 },
32 +};
33 +
34 +static struct board_info __initdata board_AR5387un = {
35 +       .name                                   = "96328A-1441N1",
36 +       .of_board_id                            = "comtrend,ar-5387un",
37 +       .expected_cpu_id                        = 0x6328,
38 +
39 +       .has_uart0                              = 1,
40 +       .has_pci                                = 1,
41 +       .use_fallback_sprom             = 1,
42 +       .has_ohci0                              = 1,
43 +       .has_ehci0                              = 1,
44 +       .num_usbh_ports                         = 1,
45 +       .has_enetsw                             = 1,
46 +
47 +       .enetsw = {
48 +               .used_ports = {
49 +                       [0] = {
50 +                               .used           = 1,
51 +                               .phy_id         = 1,
52 +                               .name           = "Port 1",
53 +                       },
54 +                       [1] = {
55 +                               .used           = 1,
56 +                               .phy_id         = 2,
57 +                               .name           = "Port 2",
58 +                       },
59 +                       [2] = {
60 +                               .used           = 1,
61 +                               .phy_id         = 3,
62 +                               .name           = "Port 3",
63 +                       },
64 +                       [3] = {
65 +                               .used           = 1,
66 +                               .phy_id         = 4,
67 +                               .name           = "Port 4",
68 +                       },
69 +               },
70 +       },
71 +
72 +       .leds = {
73 +               {
74 +                       .name                   = "AR-5387un:green:power",
75 +                       .gpio                   = 8,
76 +                       .default_trigger        = "default-on",
77 +               },
78 +               {
79 +                       .name                   = "AR-5387un:red:power",
80 +                       .gpio                   = 4,
81 +               },
82 +               {
83 +                       .name                   = "AR-5387un:green:inet",
84 +                       .gpio                   = 7,
85 +               },
86 +               {
87 +                       .name                   = "AR-5387un:red:inet",
88 +                       .gpio                   = 1,
89 +               },
90 +               {
91 +                       .name                   = "AR-5387un:green:dsl",
92 +                       .gpio                   = 11,
93 +                       .active_low             = 1,
94 +               },
95 +       },
96 +
97 +       .buttons = {
98 +               {
99 +                       .desc                   = "reset",
100 +                       .gpio                   = 23,
101 +                       .active_low             = 1,
102 +                       .type                   = EV_KEY,
103 +                       .code                   = KEY_RESTART,
104 +                       .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
105 +               },
106 +       },
107 +
108 +       .fallback_sprom = {
109 +               .type                           = SPROM_BCM43225,
110 +               .pci_bus                        = 1,
111 +               .pci_dev                        = 0,
112 +               .board_fixups                   = ar5387un_fixups,
113 +               .num_board_fixups               = ARRAY_SIZE(ar5387un_fixups),
114 +       },
115 +};
116 +
117  static struct board_info __initdata board_963281TAN = {
118         .name                           = "963281TAN",
119         .of_board_id                    = "brcm,bcm963281TAN",
120 @@ -2826,6 +2936,7 @@ static const struct board_info __initcon
121  #endif
122  #ifdef CONFIG_BCM63XX_CPU_6328
123         &board_96328avng,
124 +       &board_AR5387un,
125         &board_963281TAN,
126         &board_A4001N1,
127         &board_dsl_274xb_f1,