0386dc83088d59da1910b3eb99c22a08a6dedec5
[openwrt/openwrt.git] / target / linux / bcm63xx / patches-5.4 / 653-board_bcm6369-comtrend-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 @@ -1977,6 +1979,47 @@ static struct board_info __initdata boar
13 },
14 },
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_pci = 1,
31 + .has_ohci0 = 1,
32 + .has_ehci0 = 1,
33 +
34 + .has_enetsw = 1,
35 + .enetsw = {
36 + .used_ports = {
37 + [4] = {
38 + .used = 1,
39 + .phy_id = 0xff,
40 + .bypass_link = 1,
41 + .force_speed = 1000,
42 + .force_duplex_full = 1,
43 + .name = "RGMII",
44 + },
45 + },
46 + },
47 +
48 + .use_fallback_sprom = 1,
49 + .fallback_sprom = {
50 + .type = SPROM_BCM43222,
51 + .pci_bus = 0,
52 + .pci_dev = 1,
53 + .board_fixups = wap5813n_fixups,
54 + .num_board_fixups = ARRAY_SIZE(wap5813n_fixups),
55 + },
56 +};
57 #endif /* CONFIG_BCM63XX_CPU_6368 */
58
59 /*
60 @@ -2067,6 +2110,7 @@ static const struct board_info __initcon
61 #ifdef CONFIG_BCM63XX_CPU_6368
62 &board_96368mvwg,
63 &board_96368mvngr,
64 + &board_WAP5813n,
65 #endif /* CONFIG_BCM63XX_CPU_6368 */
66 };
67
68 @@ -2166,6 +2210,7 @@ static struct of_device_id const bcm963x
69 #ifdef CONFIG_BCM63XX_CPU_6368
70 { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, },
71 { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },
72 + { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
73 #endif /* CONFIG_BCM63XX_CPU_6368 */
74 #ifdef CONFIG_BCM63XX_CPU_63268
75 #endif /* CONFIG_BCM63XX_CPU_63268 */