brcm63xx: Add profile and build image for Sagemcom F@ST2704V2 ADSL router
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-3.10 / 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 @@ -1480,6 +1480,122 @@ static struct board_info __initdata boar
16 },
17 };
18
19 +static struct board_info __initdata board_FAST2704V2 = {
20 + .name = "F@ST2704V2",
21 + .expected_cpu_id = 0x6328,
22 +
23 + .has_uart0 = 1,
24 + .has_pci = 1,
25 + .has_ohci0 = 1,
26 + .has_ehci0 = 1,
27 + .has_usbd = 1,
28 +
29 + .has_enetsw = 1,
30 +
31 + .enetsw = {
32 + .used_ports = {
33 + [0] = {
34 + .used = 1,
35 + .phy_id = 1,
36 + .name = "Port 1",
37 + },
38 + [1] = {
39 + .used = 1,
40 + .phy_id = 2,
41 + .name = "Port 2",
42 + },
43 + [2] = {
44 + .used = 1,
45 + .phy_id = 3,
46 + .name = "Port 3",
47 + },
48 + [3] = {
49 + .used = 1,
50 + .phy_id = 4,
51 + .name = "Port 4",
52 + },
53 + },
54 + },
55 +
56 + .leds = {
57 + /* front LEDs */
58 + {
59 + .name = "F@ST2704V2:green:power",
60 + .gpio = 4,
61 + .active_low = 1,
62 + .default_trigger = "default-on",
63 + },
64 + {
65 + .name = "F@ST2704V2:red:power",
66 + .gpio = 5,
67 + .active_low = 1,
68 + },
69 + {
70 + .name = "F@ST2704V2:red:inet",
71 + .gpio = 2,
72 + .active_low = 1,
73 + },
74 + {
75 + .name = "F@ST2704V2:green:dsl",
76 + .gpio = 3,
77 + .active_low = 1,
78 + },
79 + {
80 + .name = "F@ST2704V2:green:inet",
81 + .gpio = 11,
82 + .active_low = 1,
83 + },
84 + {
85 + .name = "F@ST2704V2:green:usb",
86 + .gpio = 1,
87 + .active_low = 1,
88 + },
89 +
90 + /* side button LEDs */
91 + {
92 + .name = "F@ST2704V2:green:wps",
93 + .gpio = 10,
94 + .active_low = 1,
95 + },
96 +
97 + /* FIXME: can't control gpio0 line in "out" state, needs further investigation */
98 + /*
99 + {
100 + .name = "F@ST2704V2:green:rfkill",
101 + .gpio = 0,
102 + .active_low = 1,
103 + },
104 + */
105 +
106 + },
107 + .buttons = {
108 + {
109 + .desc = "reset",
110 + .gpio = 23,
111 + .active_low = 1,
112 + .type = EV_KEY,
113 + .code = KEY_RESTART,
114 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
115 + },
116 + {
117 + .desc = "wps",
118 + .gpio = 24,
119 + .active_low = 1,
120 + .type = EV_KEY,
121 + .code = KEY_WPS_BUTTON,
122 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
123 + },
124 + {
125 + .desc = "rfkill",
126 + .gpio = 15,
127 + .active_low = 1,
128 + .type = EV_KEY,
129 + .code = KEY_WLAN,
130 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
131 + },
132 + },
133 +};
134 +
135 static struct board_info __initdata board_rta1025w_16 = {
136 .name = "RTA1025W_16",
137 .expected_cpu_id = 0x6348,
138 @@ -3828,6 +3944,7 @@ static const struct board_info __initcon
139 &board_963281TAN,
140 &board_963281T_TEF,
141 &board_dsl_274xb_f1,
142 + &board_FAST2704V2,
143 #endif
144 #ifdef CONFIG_BCM63XX_CPU_6338
145 &board_96338gw,