e512148be839b44064322716da95cf1f59cadec9
[openwrt.git] / target / linux / brcm63xx / patches-3.14 / 562-board_VR-3025u.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -4145,6 +4145,116 @@ static struct board_info __initdata boar
4         .has_ehci0 = 1,
5  };
6  
7 +static struct sprom_fixup __initdata vr3025u_fixups[] = {
8 +       { .offset = 97, .value = 0xfeb3 },
9 +       { .offset = 98, .value = 0x1618 },
10 +       { .offset = 99, .value = 0xfab0 },
11 +       { .offset = 113, .value = 0xfed1 },
12 +       { .offset = 114, .value = 0x1609 },
13 +       { .offset = 115, .value = 0xfad9 },
14 +};
15 +
16 +static struct board_info __initdata board_VR3025u = {
17 +       .name                                   = "96368M-1541N",
18 +       .expected_cpu_id                = 0x6368,
19 +
20 +       .has_uart0                              = 1,
21 +       .has_pci                                = 1,
22 +       .use_fallback_sprom                     = 1,
23 +       .has_ohci0                              = 1,
24 +       .has_ehci0                              = 1,
25 +
26 +       .has_enetsw                             = 1,
27 +       .enetsw = {
28 +               .used_ports = {
29 +                       [0] = {
30 +                               .used           = 1,
31 +                               .phy_id         = 1,
32 +                               .name           = "port1",
33 +                       },
34 +                       [1] = {
35 +                               .used           = 1,
36 +                               .phy_id         = 2,
37 +                               .name           = "port2",
38 +                       },
39 +                       [2] = {
40 +                               .used           = 1,
41 +                               .phy_id         = 3,
42 +                               .name           = "port3",
43 +                       },
44 +                       [3] = {
45 +                               .used           = 1,
46 +                               .phy_id         = 4,
47 +                               .name           = "port4",
48 +                       },
49 +               },
50 +       },
51 +
52 +       .leds = {
53 +               {
54 +                       .name           = "VR-3025u:green:dsl",
55 +                       .gpio           = 2,
56 +                       .active_low     = 1,
57 +               },
58 +               {
59 +                       .name           = "VR-3025u:green:inet",
60 +                       .gpio           = 5,
61 +               },
62 +               {
63 +                       .name           = "VR-3025u:green:lan1",
64 +                       .gpio           = 6,
65 +                       .active_low     = 1,
66 +               },
67 +               {
68 +                       .name           = "VR-3025u:green:lan2",
69 +                       .gpio           = 7,
70 +                       .active_low     = 1,
71 +               },
72 +               {
73 +                       .name           = "VR-3025u:green:lan3",
74 +                       .gpio           = 8,
75 +                       .active_low     = 1,
76 +               },
77 +               {
78 +                       .name           = "VR-3025u:green:lan4",
79 +                       .gpio           = 9,
80 +                       .active_low     = 1,
81 +               },
82 +               {
83 +                       .name           = "VR-3025u:green:power",
84 +                       .gpio           = 22,
85 +                       .default_trigger = "default-on",
86 +               },
87 +               {
88 +                       .name           = "VR-3025u:red:power",
89 +                       .gpio           = 24,
90 +               },
91 +               {
92 +                       .name           = "VR-3025u:red:inet",
93 +                       .gpio           = 31,
94 +               },
95 +       },
96 +
97 +       .buttons = {
98 +               {
99 +                       .desc                   = "reset",
100 +                       .gpio                   = 34,
101 +                       .type                   = EV_KEY,
102 +                       .code                   = KEY_RESTART,
103 +                       .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
104 +                       .active_low             = 1,
105 +               },
106 +       },
107 +
108 +       .fallback_sprom = {
109 +               .type                           = SPROM_BCM43222,
110 +               .pci_bus                        = 0,
111 +               .pci_dev                        = 1,
112 +               .board_fixups                   = vr3025u_fixups,
113 +               .num_board_fixups               = ARRAY_SIZE(vr3025u_fixups),
114 +       },
115 +};
116 +
117  static struct b53_platform_data WAP5813n_b53_pdata = {
118         .alias = "eth0",
119  };
120 @@ -4634,6 +4744,7 @@ static const struct board_info __initcon
121  #ifdef CONFIG_BCM63XX_CPU_6368
122         &board_96368mvwg,
123         &board_96368mvngr,
124 +       &board_VR3025u,
125         &board_WAP5813n,
126  #endif
127  #ifdef CONFIG_BCM63XX_CPU_63268
128 @@ -4714,6 +4825,7 @@ static struct of_device_id const bcm963x
129  #ifdef CONFIG_BCM63XX_CPU_6368
130         { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, },
131         { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },
132 +       { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, },
133         { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
134  #endif
135  #ifdef CONFIG_BCM63XX_CPU_63268