brcm63xx: VH4032N: add the SPROM fixups
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.14 / 577-board_VH4032N.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -2266,6 +2266,106 @@ static struct board_info __initdata boar
4 },
5 };
6
7 +static struct sprom_fixup __initdata vh4032n_fixups[] = {
8 + { .offset = 2, .value = 0x04d2 },
9 + { .offset = 4, .value = 0x4350 },
10 + { .offset = 65, .value = 0x1300 },
11 + { .offset = 68, .value = 0x0402 },
12 + { .offset = 70, .value = 0x0090 },
13 + { .offset = 71, .value = 0x4c19 },
14 + { .offset = 72, .value = 0x2345 },
15 + { .offset = 87, .value = 0x0315 },
16 + { .offset = 88, .value = 0x0315 },
17 + { .offset = 96, .value = 0x2048 },
18 + { .offset = 97, .value = 0xfed7 },
19 + { .offset = 98, .value = 0x15a6 },
20 + { .offset = 99, .value = 0xfaee },
21 + { .offset = 100, .value = 0x3e3a },
22 + { .offset = 101, .value = 0x3a36 },
23 + { .offset = 102, .value = 0xff7f },
24 + { .offset = 103, .value = 0x11b9 },
25 + { .offset = 104, .value = 0xfc53 },
26 + { .offset = 105, .value = 0xffe6 },
27 + { .offset = 106, .value = 0xfdd2 },
28 + { .offset = 107, .value = 0xfe49 },
29 + { .offset = 108, .value = 0xff6a },
30 + { .offset = 109, .value = 0x136e },
31 + { .offset = 110, .value = 0xfbed },
32 + { .offset = 111, .value = 0x0000 },
33 + { .offset = 112, .value = 0x2048 },
34 + { .offset = 113, .value = 0xfee2 },
35 + { .offset = 114, .value = 0x15e5 },
36 + { .offset = 115, .value = 0xfaed },
37 + { .offset = 116, .value = 0x3e3a },
38 + { .offset = 117, .value = 0x3a36 },
39 + { .offset = 118, .value = 0xffc8 },
40 + { .offset = 119, .value = 0x12b8 },
41 + { .offset = 120, .value = 0xfca1 },
42 + { .offset = 121, .value = 0xff9b },
43 + { .offset = 122, .value = 0x122a },
44 + { .offset = 123, .value = 0xfcc8 },
45 + { .offset = 124, .value = 0xff95 },
46 + { .offset = 125, .value = 0x146b },
47 + { .offset = 126, .value = 0xfbba },
48 + { .offset = 127, .value = 0x0000 },
49 + { .offset = 161, .value = 0x0000 },
50 + { .offset = 162, .value = 0x0000 },
51 + { .offset = 169, .value = 0x0000 },
52 + { .offset = 170, .value = 0x0000 },
53 + { .offset = 171, .value = 0x0000 },
54 + { .offset = 172, .value = 0x0000 },
55 + { .offset = 173, .value = 0x0000 },
56 + { .offset = 174, .value = 0x0000 },
57 + { .offset = 175, .value = 0x0000 },
58 + { .offset = 176, .value = 0x0000 },
59 + { .offset = 219, .value = 0x1108 },
60 +};
61 +
62 +static struct board_info __initdata board_VH4032N = {
63 + .name = "VH4032N",
64 + .expected_cpu_id = 0x6368,
65 +
66 + .has_pci = 1,
67 + .use_fallback_sprom = 1,
68 + .has_ohci0 = 1,
69 + .has_ehci0 = 1,
70 + .num_usbh_ports = 2,
71 +
72 + .has_enetsw = 1,
73 + .enetsw = {
74 + .used_ports = {
75 + [0] = {
76 + .used = 1,
77 + .phy_id = 1,
78 + .name = "LAN4",
79 + },
80 + [1] = {
81 + .used = 1,
82 + .phy_id = 2,
83 + .name = "LAN3",
84 + },
85 + [2] = {
86 + .used = 1,
87 + .phy_id = 3,
88 + .name = "LAN2",
89 + },
90 + [3] = {
91 + .used = 1,
92 + .phy_id = 4,
93 + .name = "LAN1",
94 + },
95 + },
96 + },
97 +
98 + .fallback_sprom = {
99 + .type = SPROM_BCM43222,
100 + .pci_bus = 0,
101 + .pci_dev = 1,
102 + .board_fixups = vh4032n_fixups,
103 + .num_board_fixups = ARRAY_SIZE(vh4032n_fixups),
104 + },
105 +};
106 +
107 static struct sprom_fixup __initdata wap5813n_fixups[] = {
108 { .offset = 97, .value = 0xfeed },
109 { .offset = 98, .value = 0x15d1 },
110 @@ -2548,6 +2648,7 @@ static const struct board_info __initcon
111 &board_HG622,
112 &board_HG655b,
113 &board_P870HW51A_V2,
114 + &board_VH4032N,
115 &board_VR3025u,
116 &board_VR3025un,
117 &board_VR3026e,
118 @@ -2659,6 +2760,7 @@ static struct of_device_id const bcm963x
119 { .compatible = "huawei,hg655b", .data = &board_HG655b, },
120 { .compatible = "netgear,dgnd3700v1", .data = &board_DGND3700v1_3800B, },
121 { .compatible = "netgear,evg2000", .data = &board_EVG2000, },
122 + { .compatible = "observa,vh4032n", .data = &board_VH4032N, },
123 { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
124 #endif
125 #ifdef CONFIG_BCM63XX_CPU_63268