brcm63xx: Neufbox 6: fix switch by probing through DT
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.4 / 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 @@ -147,6 +147,75 @@ 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 + .fallback_sprom = {
69 + .type = SPROM_BCM43217,
70 + .pci_bus = 1,
71 + .pci_dev = 0,
72 + .board_fixups = dsl2751b_e1_fixups,
73 + .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups),
74 + },
75 +};
76 #endif /* CONFIG_BCM63XX_CPU_6318 */
77
78 /*
79 @@ -2126,6 +2195,7 @@ static const struct board_info __initcon
80 #ifdef CONFIG_BCM63XX_CPU_6318
81 &board_96318ref,
82 &board_96318ref_p300,
83 + &board_dsl_2751b_d1,
84 #endif
85 #ifdef CONFIG_BCM63XX_CPU_6328
86 &board_96328avng,
87 @@ -2219,6 +2289,7 @@ static struct of_device_id const bcm963x
88 #ifdef CONFIG_BCM63XX_CPU_6318
89 { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, },
90 { .compatible = "brcm,bcm96318ref_p300", .data = &board_96318ref_p300, },
91 + { .compatible = "d-link,dsl-275xb-d", .data = &board_dsl_2751b_d1, },
92 #endif
93 #ifdef CONFIG_BCM63XX_CPU_6328
94 { .compatible = "adb,a4001n", .data = &board_A4001N, },