brcm63xx: add preliminary support for D-Link DSL-2751B E1
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.14 / 567-board_dsl-2751b_e1.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -263,6 +263,141 @@ static struct board_info __initdata boar
4 },
5 },
6 };
7 +
8 +static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = {
9 + { .offset = 96, .value = 0x2046 },
10 + { .offset = 97, .value = 0xfe9d },
11 + { .offset = 98, .value = 0x1854 },
12 + { .offset = 99, .value = 0xfa59 },
13 + { .offset = 112, .value = 0x2046 },
14 + { .offset = 113, .value = 0xfe79 },
15 + { .offset = 114, .value = 0x17f5 },
16 + { .offset = 115, .value = 0xfa47 },
17 + { .offset = 161, .value = 0x2222 },
18 + { .offset = 162, .value = 0x2222 },
19 + { .offset = 169, .value = 0x2222 },
20 + { .offset = 170, .value = 0x2222 },
21 + { .offset = 171, .value = 0x5555 },
22 + { .offset = 172, .value = 0x5555 },
23 + { .offset = 173, .value = 0x4444 },
24 + { .offset = 174, .value = 0x4444 },
25 + { .offset = 175, .value = 0x5555 },
26 + { .offset = 176, .value = 0x5555 },
27 +};
28 +
29 +static struct board_info __initdata board_dsl_2751b_d1 = {
30 + .name = "AW5200B",
31 + .expected_cpu_id = 0x6318,
32 +
33 + .has_uart0 = 1,
34 + .has_pci = 1,
35 + .use_fallback_sprom = 1,
36 +
37 + .has_enetsw = 1,
38 +
39 + .has_ohci0 = 1,
40 + .has_ehci0 = 1,
41 + .num_usbh_ports = 1,
42 +
43 + .enetsw = {
44 + .used_ports = {
45 + [0] = {
46 + .used = 1,
47 + .phy_id = 1,
48 + .name = "Port 1",
49 + },
50 + [1] = {
51 + .used = 1,
52 + .phy_id = 2,
53 + .name = "Port 2",
54 + },
55 + [2] = {
56 + .used = 1,
57 + .phy_id = 3,
58 + .name = "Port 3",
59 + },
60 + [3] = {
61 + .used = 1,
62 + .phy_id = 4,
63 + .name = "Port 4",
64 + },
65 + },
66 + },
67 +
68 + .leds = {
69 + {
70 + .name = "dsl-275xb:green:power",
71 + .gpio = 3,
72 + .active_low = 1,
73 + .default_trigger = "default-on",
74 + },
75 + {
76 + .name = "dsl-275xb:green:inet",
77 + .gpio = 8,
78 + .active_low = 1,
79 + },
80 + {
81 + .name = "dsl-275xb:red:inet-fail",
82 + .gpio = 9,
83 + .active_low = 1,
84 + },
85 + {
86 + .name = "dsl-275xb:red:post-failed",
87 + .gpio = 11,
88 + .active_low = 1,
89 + },
90 + {
91 + .name = "dsl-275xb:wps:blue",
92 + .gpio = 16,
93 + .active_low = 1,
94 + },
95 + {
96 + .name = "dsl-275xb:green:dsl",
97 + .gpio = 17,
98 + .active_low = 1,
99 + },
100 + {
101 + .name = "dsl-275xb:green:usb",
102 + .gpio = 49, /* FIXME: does not work! */
103 + .active_low = 1,
104 + },
105 + },
106 +
107 + .buttons = {
108 + {
109 + .desc = "wlan",
110 + .gpio = 2,
111 + .active_low = 1,
112 + .type = EV_KEY,
113 + .code = KEY_WLAN,
114 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
115 + },
116 + {
117 + .desc = "wps",
118 + .gpio = 33,
119 + .active_low = 1,
120 + .type = EV_KEY,
121 + .code = KEY_WPS_BUTTON,
122 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
123 + },
124 + {
125 + .desc = "reset",
126 + .gpio = 34,
127 + .active_low = 1,
128 + .type = EV_KEY,
129 + .code = KEY_RESTART,
130 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
131 + },
132 + },
133 +
134 + .fallback_sprom = {
135 + .type = SPROM_BCM43217,
136 + .pci_bus = 1,
137 + .pci_dev = 0,
138 + .board_fixups = dsl2751b_e1_fixups,
139 + .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups),
140 + },
141 +};
142 #endif
143
144 /*
145 @@ -5264,6 +5399,7 @@ static const struct board_info __initcon
146 #ifdef CONFIG_BCM63XX_CPU_6318
147 &board_96318ref,
148 &board_96318ref_p300,
149 + &board_dsl_2751b_d1,
150 #endif
151 #ifdef CONFIG_BCM63XX_CPU_6328
152 &board_96328avng,