bcm63xx: add unmodded SERCOMM AD1018 support
[openwrt/openwrt.git] / target / linux / bcm63xx / patches-5.4 / 561-board_AD1018.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -357,6 +357,73 @@ static struct board_info __initdata boar
4 },
5 };
6
7 +static struct sprom_fixup __initdata ad1018_fixups[] = {
8 + { .offset = 6, .value = 0x1c00 },
9 + { .offset = 65, .value = 0x1256 },
10 + { .offset = 96, .value = 0x2046 },
11 + { .offset = 97, .value = 0xfe69 },
12 + { .offset = 98, .value = 0x1726 },
13 + { .offset = 99, .value = 0xfa5c },
14 + { .offset = 112, .value = 0x2046 },
15 + { .offset = 113, .value = 0xfea8 },
16 + { .offset = 114, .value = 0x1978 },
17 + { .offset = 115, .value = 0xfa26 },
18 + { .offset = 161, .value = 0x2222 },
19 + { .offset = 169, .value = 0x2222 },
20 + { .offset = 171, .value = 0x2222 },
21 + { .offset = 173, .value = 0x2222 },
22 + { .offset = 174, .value = 0x4444 },
23 + { .offset = 175, .value = 0x2222 },
24 + { .offset = 176, .value = 0x4444 },
25 +};
26 +
27 +static struct board_info __initdata board_AD1018 = {
28 + .name = "96328avngr",
29 + .expected_cpu_id = 0x6328,
30 +
31 + .has_pci = 1,
32 + .use_fallback_sprom = 1,
33 +
34 + .has_ohci0 = 1,
35 + .has_ehci0 = 1,
36 + .num_usbh_ports = 1,
37 +
38 + .has_enetsw = 1,
39 +
40 + .enetsw = {
41 + .used_ports = {
42 + [0] = {
43 + .used = 1,
44 + .phy_id = 1,
45 + .name = "FIBRE",
46 + },
47 + [1] = {
48 + .used = 1,
49 + .phy_id = 2,
50 + .name = "LAN3",
51 + },
52 + [2] = {
53 + .used = 1,
54 + .phy_id = 3,
55 + .name = "LAN2",
56 + },
57 + [3] = {
58 + .used = 1,
59 + .phy_id = 4,
60 + .name = "LAN1",
61 + },
62 + },
63 + },
64 +
65 + .fallback_sprom = {
66 + .type = SPROM_BCM43217,
67 + .pci_bus = 1,
68 + .pci_dev = 0,
69 + .board_fixups = ad1018_fixups,
70 + .num_board_fixups = ARRAY_SIZE(ad1018_fixups),
71 + },
72 +};
73 +
74 static struct sprom_fixup __initdata ar5381u_fixups[] = {
75 { .offset = 97, .value = 0xfee5 },
76 { .offset = 98, .value = 0x157c },
77 @@ -2605,6 +2672,7 @@ static const struct board_info __initcon
78 #endif
79 #ifdef CONFIG_BCM63XX_CPU_6328
80 &board_96328avng,
81 + &board_AD1018,
82 &board_AR5381u,
83 &board_AR5387un,
84 &board_963281TAN,
85 @@ -2719,6 +2787,8 @@ static struct of_device_id const bcm963x
86 { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, },
87 { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, },
88 { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, },
89 + { .compatible = "sercomm,ad1018", .data = &board_AD1018, },
90 + { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, },
91 #endif
92 #ifdef CONFIG_BCM63XX_CPU_6338
93 { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },