1d153c85a325a4937e8cfbe5f2a004b44fc82b3c
[openwrt.git] / target / linux / brcm63xx / patches-3.14 / 505-board_spw500v.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -640,6 +640,84 @@ static struct board_info __initdata boar
4                 },
5         },
6  };
7 +
8 +static struct sprom_fixup __initdata spw500v_fixups[] = {
9 +       { .offset = 46, .value = 0x3046 },
10 +       { .offset = 47, .value = 0x15a7 },
11 +       { .offset = 48, .value = 0xfa89 },
12 +       { .offset = 49, .value = 0xfe79 },
13 +       { .offset = 57, .value = 0x6a49 },
14 +};
15 +
16 +static struct board_info __initdata board_spw500v = {
17 +       .name                           = "SPW500V",
18 +       .expected_cpu_id                = 0x6348,
19 +
20 +       .has_uart0                      = 1,
21 +       .has_enet0                      = 1,
22 +       .has_pci                        = 1,
23 +       .use_fallback_sprom             = 1,
24 +
25 +       .enet0 = {
26 +               .has_phy                = 1,
27 +               .use_internal_phy       = 1,
28 +       },
29 +
30 +       .has_dsp                        = 1,
31 +       .dsp = {
32 +               .gpio_rst               = 6,
33 +               .gpio_int               = 34,
34 +               .ext_irq                = 2,
35 +               .cs                     = 2,
36 +       },
37 +
38 +       .leds = {
39 +               {
40 +                       .name           = "SPW500V:red:power",
41 +                       .gpio           = 1,
42 +                       .active_low     = 1,
43 +               },
44 +               {
45 +                       .name           = "SPW500V:green:power",
46 +                       .gpio           = 0,
47 +                       .active_low     = 1,
48 +                       .default_trigger = "default-on",
49 +               },
50 +               {
51 +                       .name           = "SPW500V:green:ppp",
52 +                       .gpio           = 3,
53 +                       .active_low     = 1,
54 +               },
55 +               {       .name           = "SPW500V:green:pstn",
56 +                       .gpio           = 28,
57 +                       .active_low     = 1,
58 +               },
59 +               {
60 +                       .name           = "SPW500V:green:voip",
61 +                       .gpio           = 32,
62 +                       .active_low     = 1,
63 +               },
64 +       },
65 +
66 +       .buttons = {
67 +               {
68 +                       .desc           = "reset",
69 +                       .gpio           = 33,
70 +                       .active_low     = 1,
71 +                       .type           = EV_KEY,
72 +                       .code           = KEY_RESTART,
73 +                       .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
74 +               },
75 +       },
76 +
77 +       .fallback_sprom = {
78 +               .type                   = SPROM_BCM4318,
79 +               .pci_bus                = 0,
80 +               .pci_dev                = 1,
81 +               .board_fixups           = spw500v_fixups,
82 +               .num_board_fixups       = ARRAY_SIZE(spw500v_fixups),
83 +       },
84 +};
85  #endif /* CONFIG_BCM63XX_CPU_6348 */
86  
87  /*
88 @@ -1232,6 +1310,7 @@ static const struct board_info __initcon
89         &board_96348gw_a,
90         &board_rta1025w_16,
91         &board_96348_D4PW,
92 +       &board_spw500v,
93  #endif
94  
95  #ifdef CONFIG_BCM63XX_CPU_6358
96 @@ -1269,6 +1348,7 @@ static struct of_device_id const bcm963x
97         { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, },
98         { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, },
99         { .compatible = "sagem,f@st2404", .data = &board_FAST2404, },
100 +       { .compatible = "t-com,spw500v", .data = &board_spw500v, },
101  #endif
102  #ifdef CONFIG_BCM63XX_CPU_6358
103         { .compatible = "alcatel,rg100a", .data = &board_96358vw2, },