brcm63xx: move buttons and leds to dts files
[openwrt.git] / target / linux / brcm63xx / patches-3.18 / 531-board_AR-5387un.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -143,6 +143,79 @@ 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 +       .expected_cpu_id                        = 0x6328,
37 +
38 +       .has_uart0                              = 1,
39 +       .has_pci                                = 1,
40 +       .use_fallback_sprom             = 1,
41 +       .has_ohci0                              = 1,
42 +       .has_ehci0                              = 1,
43 +       .num_usbh_ports                         = 1,
44 +       .has_enetsw                             = 1,
45 +
46 +       .enetsw = {
47 +               .used_ports = {
48 +                       [0] = {
49 +                               .used           = 1,
50 +                               .phy_id         = 1,
51 +                               .name           = "Port 1",
52 +                       },
53 +                       [1] = {
54 +                               .used           = 1,
55 +                               .phy_id         = 2,
56 +                               .name           = "Port 2",
57 +                       },
58 +                       [2] = {
59 +                               .used           = 1,
60 +                               .phy_id         = 3,
61 +                               .name           = "Port 3",
62 +                       },
63 +                       [3] = {
64 +                               .used           = 1,
65 +                               .phy_id         = 4,
66 +                               .name           = "Port 4",
67 +                       },
68 +               },
69 +       },
70 +
71 +       .fallback_sprom = {
72 +               .type                           = SPROM_BCM43225,
73 +               .pci_bus                        = 1,
74 +               .pci_dev                        = 0,
75 +               .board_fixups                   = ar5387un_fixups,
76 +               .num_board_fixups               = ARRAY_SIZE(ar5387un_fixups),
77 +       },
78 +};
79 +
80  static struct board_info __initdata board_963281TAN = {
81         .name                           = "963281TAN",
82         .expected_cpu_id                = 0x6328,
83 @@ -1581,6 +1654,7 @@ static const struct board_info __initcon
84  #endif
85  #ifdef CONFIG_BCM63XX_CPU_6328
86         &board_96328avng,
87 +       &board_AR5387un,
88         &board_963281TAN,
89         &board_A4001N1,
90         &board_dsl_274xb_f1,
91 @@ -1651,6 +1725,7 @@ static struct of_device_id const bcm963x
92         { .compatible = "adb,a4001n1", .data = &board_A4001N1, },
93         { .compatible = "brcm,bcm963281TAN", .data = &board_963281TAN, },
94         { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, },
95 +       { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, },
96         { .compatible = "d-link,dsl-274xb-f", .data = &board_dsl_274xb_f1, },
97  #endif
98  #ifdef CONFIG_BCM63XX_CPU_6338