brcm63xx: Add DT support for 963281TAN
[openwrt.git] / target / linux / brcm63xx / patches-3.14 / 563-board_VR-3025un.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -4283,6 +4283,117 @@ static struct board_info __initdata boar
4         },
5  };
6  
7 +static struct sprom_fixup __initdata vr3025un_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_VR3025un = {
17 +       .name                                   = "96368M-1341N",
18 +       .of_board_id                    = "comtrend,vr-3025un",
19 +       .expected_cpu_id                = 0x6368,
20 +
21 +       .has_uart0                              = 1,
22 +       .has_pci                                = 1,
23 +       .use_fallback_sprom                     = 1,
24 +       .has_ohci0                              = 1,
25 +       .has_ehci0                              = 1,
26 +
27 +       .has_enetsw                             = 1,
28 +       .enetsw = {
29 +               .used_ports = {
30 +                       [0] = {
31 +                               .used           = 1,
32 +                               .phy_id         = 1,
33 +                               .name           = "port1",
34 +                       },
35 +                       [1] = {
36 +                               .used           = 1,
37 +                               .phy_id         = 2,
38 +                               .name           = "port2",
39 +                       },
40 +                       [2] = {
41 +                               .used           = 1,
42 +                               .phy_id         = 3,
43 +                               .name           = "port3",
44 +                       },
45 +                       [3] = {
46 +                               .used           = 1,
47 +                               .phy_id         = 4,
48 +                               .name           = "port4",
49 +                       },
50 +               },
51 +       },
52 +
53 +       .leds = {
54 +               {
55 +                       .name           = "VR-3025un:green:dsl",
56 +                       .gpio           = 2,
57 +                       .active_low     = 1,
58 +               },
59 +               {
60 +                       .name           = "VR-3025un:green:inet",
61 +                       .gpio           = 5,
62 +               },
63 +               {
64 +                       .name           = "VR-3025un:green:lan1",
65 +                       .gpio           = 6,
66 +                       .active_low     = 1,
67 +               },
68 +               {
69 +                       .name           = "VR-3025un:green:lan2",
70 +                       .gpio           = 7,
71 +                       .active_low     = 1,
72 +               },
73 +               {
74 +                       .name           = "VR-3025un:green:lan3",
75 +                       .gpio           = 8,
76 +                       .active_low     = 1,
77 +               },
78 +               {
79 +                       .name           = "VR-3025un:green:iptv",
80 +                       .gpio           = 9,
81 +                       .active_low     = 1,
82 +               },
83 +               {
84 +                       .name           = "VR-3025un:green:power",
85 +                       .gpio           = 22,
86 +                       .default_trigger = "default-on",
87 +               },
88 +               {
89 +                       .name           = "VR-3025un:red:power",
90 +                       .gpio           = 24,
91 +               },
92 +               {
93 +                       .name           = "VR-3025un:red:inet",
94 +                       .gpio           = 31,
95 +               },
96 +       },
97 +
98 +       .buttons = {
99 +               {
100 +                       .desc                   = "reset",
101 +                       .gpio                   = 34,
102 +                       .type                   = EV_KEY,
103 +                       .code                   = KEY_RESTART,
104 +                       .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
105 +                       .active_low             = 1,
106 +               },
107 +       },
108 +
109 +       .fallback_sprom = {
110 +               .type                           = SPROM_BCM43222,
111 +               .pci_bus                        = 0,
112 +               .pci_dev                        = 1,
113 +               .board_fixups                   = vr3025un_fixups,
114 +               .num_board_fixups               = ARRAY_SIZE(vr3025un_fixups),
115 +       },
116 +};
117 +
118  static struct b53_platform_data WAP5813n_b53_pdata = {
119         .alias = "eth0",
120  };
121 @@ -4774,6 +4885,7 @@ static const struct board_info __initcon
122         &board_96368mvwg,
123         &board_96368mvngr,
124         &board_VR3025u,
125 +       &board_VR3025un,
126         &board_WAP5813n,
127  #endif
128  #ifdef CONFIG_BCM63XX_CPU_63268