brcm63xx: register serial through device tree
[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 @@ -143,6 +143,67 @@ 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_pci = 1,
26 + .use_fallback_sprom = 1,
27 +
28 + .has_enetsw = 1,
29 +
30 + .has_ohci0 = 1,
31 + .has_ehci0 = 1,
32 + .num_usbh_ports = 1,
33 +
34 + .enetsw = {
35 + .used_ports = {
36 + [0] = {
37 + .used = 1,
38 + .phy_id = 1,
39 + .name = "LAN4",
40 + },
41 + [1] = {
42 + .used = 1,
43 + .phy_id = 2,
44 + .name = "LAN3",
45 + },
46 + [2] = {
47 + .used = 1,
48 + .phy_id = 3,
49 + .name = "LAN2",
50 + },
51 + [3] = {
52 + .used = 1,
53 + .phy_id = 4,
54 + .name = "LAN1",
55 + },
56 + },
57 + },
58 +
59 + .fallback_sprom = {
60 + .type = SPROM_BCM43217,
61 + .pci_bus = 1,
62 + .pci_dev = 0,
63 + .board_fixups = ar5315u_fixups,
64 + .num_board_fixups = ARRAY_SIZE(ar5315u_fixups),
65 + },
66 +};
67 +
68 static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = {
69 { .offset = 96, .value = 0x2046 },
70 { .offset = 97, .value = 0xfe9d },
71 @@ -2526,6 +2587,7 @@ static const struct board_info __initcon
72 #ifdef CONFIG_BCM63XX_CPU_6318
73 &board_96318ref,
74 &board_96318ref_p300,
75 + &board_AR5315u,
76 &board_dsl_2751b_d1,
77 &board_FAST2704N,
78 #endif
79 @@ -2631,6 +2693,7 @@ static struct of_device_id const bcm963x
80 #ifdef CONFIG_BCM63XX_CPU_6318
81 { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, },
82 { .compatible = "brcm,bcm96318ref_p300", .data = &board_96318ref_p300, },
83 + { .compatible = "comtrend,ar-5315u", .data = &board_AR5315u, },
84 { .compatible = "d-link,dsl-275xb-d", .data = &board_dsl_2751b_d1, },
85 { .compatible = "sagem,f@st2704n", .data = &board_FAST2704N, },
86 #endif