brcm63xx: Add Comtrend AR-5315u support
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.4 / 579-board_AR-5315u.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -148,6 +148,68 @@ static struct board_info __initdata boar
4 },
5 };
6
7 +static struct sprom_fixup __initdata ar5315u_fixups[] = {
8 + { .offset = 6, .value = 0x1c00 },
9 + { .offset = 65, .value = 0x1255 },
10 + { .offset = 97, .value = 0xfe55 },
11 + { .offset = 98, .value = 0x171d },
12 + { .offset = 99, .value = 0xfa42 },
13 + { .offset = 113, .value = 0xfeb7 },
14 + { .offset = 114, .value = 0x18cd },
15 + { .offset = 115, .value = 0xfa4f },
16 + { .offset = 162, .value = 0x6444 },
17 + { .offset = 170, .value = 0x6444 },
18 + { .offset = 172, .value = 0x6444 },
19 +};
20 +
21 +static struct board_info __initdata board_AR5315u = {
22 + .name = "96318A-1441N1",
23 + .expected_cpu_id = 0x6318,
24 +
25 + .has_uart0 = 1,
26 + .has_pci = 1,
27 + .use_fallback_sprom = 1,
28 +
29 + .has_enetsw = 1,
30 +
31 + .has_ohci0 = 1,
32 + .has_ehci0 = 1,
33 + .num_usbh_ports = 1,
34 +
35 + .enetsw = {
36 + .used_ports = {
37 + [0] = {
38 + .used = 1,
39 + .phy_id = 1,
40 + .name = "LAN4",
41 + },
42 + [1] = {
43 + .used = 1,
44 + .phy_id = 2,
45 + .name = "LAN3",
46 + },
47 + [2] = {
48 + .used = 1,
49 + .phy_id = 3,
50 + .name = "LAN2",
51 + },
52 + [3] = {
53 + .used = 1,
54 + .phy_id = 4,
55 + .name = "LAN1",
56 + },
57 + },
58 + },
59 +
60 + .fallback_sprom = {
61 + .type = SPROM_BCM43217,
62 + .pci_bus = 1,
63 + .pci_dev = 0,
64 + .board_fixups = ar5315u_fixups,
65 + .num_board_fixups = ARRAY_SIZE(ar5315u_fixups),
66 + },
67 +};
68 +
69 static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = {
70 { .offset = 96, .value = 0x2046 },
71 { .offset = 97, .value = 0xfe9d },
72 @@ -2616,6 +2678,7 @@ static const struct board_info __initcon
73 #ifdef CONFIG_BCM63XX_CPU_6318
74 &board_96318ref,
75 &board_96318ref_p300,
76 + &board_AR5315u,
77 &board_dsl_2751b_d1,
78 &board_FAST2704N,
79 #endif
80 @@ -2721,6 +2784,7 @@ static struct of_device_id const bcm963x
81 #ifdef CONFIG_BCM63XX_CPU_6318
82 { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, },
83 { .compatible = "brcm,bcm96318ref_p300", .data = &board_96318ref_p300, },
84 + { .compatible = "comtrend,ar-5315u", .data = &board_AR5315u, },
85 { .compatible = "d-link,dsl-275xb-d", .data = &board_dsl_2751b_d1, },
86 { .compatible = "sagem,f@st2704n", .data = &board_FAST2704N, },
87 #endif