38c92b110adc1da859f5a1964a18745dc022492d
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.4 / 561-board_WAP-5813n.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -13,6 +13,8 @@
4 #include <linux/kernel.h>
5 #include <linux/string.h>
6 #include <linux/pci_ids.h>
7 +#include <linux/platform_data/b53.h>
8 +#include <linux/spi/spi.h>
9 #include <asm/addrspace.h>
10 #include <bcm63xx_board.h>
11 #include <bcm63xx_cpu.h>
12 @@ -1681,6 +1683,48 @@ static struct board_info __initdata boar
13 .has_ohci0 = 1,
14 .has_ehci0 = 1,
15 };
16 +
17 +static struct sprom_fixup __initdata wap5813n_fixups[] = {
18 + { .offset = 97, .value = 0xfeed },
19 + { .offset = 98, .value = 0x15d1 },
20 + { .offset = 99, .value = 0xfb0d },
21 + { .offset = 113, .value = 0xfef7 },
22 + { .offset = 114, .value = 0x15f7 },
23 + { .offset = 115, .value = 0xfb1a },
24 +};
25 +
26 +static struct board_info __initdata board_WAP5813n = {
27 + .name = "96369R-1231N",
28 + .expected_cpu_id = 0x6368,
29 +
30 + .has_uart0 = 1,
31 + .has_pci = 1,
32 + .use_fallback_sprom = 1,
33 + .has_ohci0 = 1,
34 + .has_ehci0 = 1,
35 +
36 + .has_enetsw = 1,
37 + .enetsw = {
38 + .used_ports = {
39 + [4] = {
40 + .used = 1,
41 + .phy_id = 0xff,
42 + .bypass_link = 1,
43 + .force_speed = 1000,
44 + .force_duplex_full = 1,
45 + .name = "RGMII",
46 + },
47 + },
48 + },
49 +
50 + .fallback_sprom = {
51 + .type = SPROM_BCM43222,
52 + .pci_bus = 0,
53 + .pci_dev = 1,
54 + .board_fixups = wap5813n_fixups,
55 + .num_board_fixups = ARRAY_SIZE(wap5813n_fixups),
56 + },
57 +};
58 #endif /* CONFIG_BCM63XX_CPU_6368 */
59
60 /*
61 @@ -1917,6 +1961,7 @@ static const struct board_info __initcon
62 #ifdef CONFIG_BCM63XX_CPU_6368
63 &board_96368mvwg,
64 &board_96368mvngr,
65 + &board_WAP5813n,
66 #endif
67 #ifdef CONFIG_BCM63XX_CPU_63268
68 &board_963268bu_p300,
69 @@ -2009,6 +2054,7 @@ static struct of_device_id const bcm963x
70 #ifdef CONFIG_BCM63XX_CPU_6368
71 { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, },
72 { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },
73 + { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
74 #endif
75 #ifdef CONFIG_BCM63XX_CPU_63268
76 { .compatible = "brcm,bcm963268bu_p300", .data = &board_963268bu_p300, },