brcm63xx: refresh patches
[openwrt.git] / target / linux / brcm63xx / patches-3.14 / 536-board_fast2704.patch
1 From: Marcin Jurkowski <marcin1j@gmail.com>
2 Date: Thu, 31 Oct 2013 22:33:10 +0000
3 Subject: [PATCH] bcm63xx: Add kernel support for Sagemcom F@ST2704V2 ADSL
4  router
5
6 This adds kernel support support for Sagemcom F@st 2704 wireless ADSL
7 router.
8 It's a BCM6328-based 802.11n wireless router with USB port and ADSL2+
9 modem equipped with 64 MiB RAM and 8 MiB flash.
10
11 Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
12 ---
13 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
14 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
15 @@ -660,6 +660,122 @@ static struct board_info __initdata boar
16                 },
17         },
18  };
19 +
20 +static struct board_info __initdata board_FAST2704V2 = {
21 +       .name                           = "F@ST2704V2",
22 +       .expected_cpu_id                = 0x6328,
23 +
24 +       .has_uart0                      = 1,
25 +       .has_pci                        = 1,
26 +       .has_ohci0                      = 1,
27 +       .has_ehci0                      = 1,
28 +       .has_usbd                       = 1,
29 +
30 +       .has_enetsw                     = 1,
31 +
32 +       .enetsw = {
33 +               .used_ports = {
34 +                       [0] = {
35 +                               .used   = 1,
36 +                               .phy_id = 1,
37 +                               .name   = "Port 1",
38 +                       },
39 +                       [1] = {
40 +                               .used   = 1,
41 +                               .phy_id = 2,
42 +                               .name   = "Port 2",
43 +                       },
44 +                       [2] = {
45 +                               .used   = 1,
46 +                               .phy_id = 3,
47 +                               .name   = "Port 3",
48 +                       },
49 +                       [3] = {
50 +                               .used   = 1,
51 +                               .phy_id = 4,
52 +                               .name   = "Port 4",
53 +                       },
54 +               },
55 +       },
56 +
57 +       .leds = {
58 +               /* front LEDs */
59 +               {
60 +                       .name                   = "F@ST2704V2:green:power",
61 +                       .gpio                   = 4,
62 +                       .active_low             = 1,
63 +                       .default_trigger        = "default-on",
64 +               },
65 +               {
66 +                       .name                   = "F@ST2704V2:red:power",
67 +                       .gpio                   = 5,
68 +                       .active_low             = 1,
69 +               },
70 +               {
71 +                       .name                   = "F@ST2704V2:red:inet",
72 +                       .gpio                   = 2,
73 +                       .active_low             = 1,
74 +               },
75 +               {
76 +                       .name                   = "F@ST2704V2:green:dsl",
77 +                       .gpio                   = 3,
78 +                       .active_low             = 1,
79 +               },
80 +               {
81 +                       .name                   = "F@ST2704V2:green:inet",
82 +                       .gpio                   = 11,
83 +                       .active_low             = 1,
84 +               },
85 +               {
86 +                       .name                   = "F@ST2704V2:green:usb",
87 +                       .gpio                   = 1,
88 +                       .active_low             = 1,
89 +               },
90 +
91 +               /* side button LEDs */
92 +               {
93 +                       .name                   = "F@ST2704V2:green:wps",
94 +                       .gpio                   = 10,
95 +                       .active_low             = 1,
96 +               },
97 +
98 +               /* FIXME: can't control gpio0 line in "out" state, needs further investigation */
99 +               /*
100 +               {
101 +                       .name                   = "F@ST2704V2:green:rfkill",
102 +                       .gpio                   = 0,
103 +                       .active_low             = 1,
104 +               },
105 +               */
106 +
107 +       },
108 +       .buttons = {
109 +               {
110 +                       .desc                   = "reset",
111 +                       .gpio                   = 23,
112 +                       .active_low             = 1,
113 +                       .type                   = EV_KEY,
114 +                       .code                   = KEY_RESTART,
115 +                       .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
116 +               },
117 +               {
118 +                       .desc                   = "wps",
119 +                       .gpio                   = 24,
120 +                       .active_low             = 1,
121 +                       .type                   = EV_KEY,
122 +                       .code                   = KEY_WPS_BUTTON,
123 +                       .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
124 +               },
125 +               {
126 +                       .desc                   = "rfkill",
127 +                       .gpio                   = 15,
128 +                       .active_low             = 1,
129 +                       .type                   = EV_KEY,
130 +                       .code                   = KEY_WLAN,
131 +                       .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
132 +               },
133 +       },
134 +};
135  #endif /* CONFIG_BCM63XX_CPU_6328 */
136  
137  /*
138 @@ -3502,6 +3618,7 @@ static const struct board_info __initcon
139         &board_963281TAN,
140         &board_A4001N1,
141         &board_dsl_274xb_f1,
142 +       &board_FAST2704V2,
143  #endif
144  #ifdef CONFIG_BCM63XX_CPU_6338
145         &board_96338gw,
146 @@ -3577,6 +3694,7 @@ static struct of_device_id const bcm963x
147         { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, },
148         { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, },
149         { .compatible = "d-link,dsl-274xb-f", .data = &board_dsl_274xb_f1, },
150 +       { .compatible = "sagem,f@st2704v2", .data = &board_FAST2704V2, },
151  #endif
152  #ifdef CONFIG_BCM63XX_CPU_6338
153         { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },