brcm63xx: move MAGIC to dts
[15.05/openwrt.git] / target / linux / brcm63xx / patches-3.14 / 534-board_hw556.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -12,6 +12,7 @@
4  #include <linux/string.h>
5  #include <linux/gpio_keys.h>
6  #include <linux/input.h>
7 +#include <linux/pci_ids.h>
8  #include <linux/platform_device.h>
9  #include <linux/rtl8367.h>
10  #include <asm/addrspace.h>
11 @@ -1489,6 +1490,93 @@ static struct board_info __initdata boar
12         },
13  };
14  
15 +static struct board_info __initdata board_HW556_C = {
16 +       .name                                   = "HW556_C",
17 +       .expected_cpu_id                        = 0x6358,
18 +
19 +       .has_uart0                              = 1,
20 +       .has_pci                                = 1,
21 +       .has_ohci0                              = 1,
22 +       .has_ehci0                              = 1,
23 +       .num_usbh_ports                         = 2,
24 +
25 +       .has_caldata                            = 1,
26 +       .caldata = {
27 +               {
28 +                       .vendor                 = PCI_VENDOR_ID_RALINK,
29 +                       .caldata_offset         = 0xeffe00,
30 +                       .slot                   = 1,
31 +                       .eeprom                 = "rt2x00.eeprom",
32 +               },
33 +       },
34 +
35 +       .has_enet1                              = 1,
36 +       .enet1 = {
37 +               .has_phy                        = 1,
38 +               .phy_id                         = 0,
39 +               .force_speed_100                = 1,
40 +               .force_duplex_full              = 1,
41 +       },
42 +};
43 +static struct board_info __initdata board_HW556_A = {
44 +       .name                                   = "HW556_A",
45 +       .expected_cpu_id                        = 0x6358,
46 +
47 +       .has_uart0                              = 1,
48 +       .has_pci                                = 1,
49 +       .has_ohci0                              = 1,
50 +       .has_ehci0                              = 1,
51 +       .num_usbh_ports                         = 2,
52 +
53 +       .has_caldata                            = 1,
54 +       .caldata = {
55 +               {
56 +                       .vendor                 = PCI_VENDOR_ID_ATHEROS,
57 +                       .caldata_offset         = 0xf7e000,
58 +                       .slot                   = 1,
59 +                       .endian_check           = 1,
60 +                       .led_pin                = 2,
61 +               },
62 +       },
63 +
64 +       .has_enet1                              = 1,
65 +       .enet1 = {
66 +               .has_phy                        = 1,
67 +               .phy_id                         = 0,
68 +               .force_speed_100                = 1,
69 +               .force_duplex_full              = 1,
70 +       },
71 +};
72 +static struct board_info __initdata board_HW556_B = {
73 +       .name                                   = "HW556_B",
74 +       .expected_cpu_id                        = 0x6358,
75 +
76 +       .has_uart0                              = 1,
77 +       .has_pci                                = 1,
78 +       .has_ohci0                              = 1,
79 +       .has_ehci0                              = 1,
80 +       .num_usbh_ports                         = 2,
81 +
82 +       .has_caldata                            = 1,
83 +       .caldata = {
84 +               {
85 +                       .vendor                 = PCI_VENDOR_ID_ATHEROS,
86 +                       .caldata_offset         = 0xefe000,
87 +                       .slot                   = 1,
88 +                       .endian_check           = 1,
89 +                       .led_pin                = 2,
90 +               },
91 +       },
92 +
93 +       .has_enet1                              = 1,
94 +       .enet1 = {
95 +               .has_phy                        = 1,
96 +               .phy_id                         = 0,
97 +               .force_speed_100                = 1,
98 +               .force_duplex_full              = 1,
99 +       },
100 +};
101 +
102   /* T-Home Speedport W 303V Typ B */
103  static struct board_info __initdata board_spw303v = {
104         .name                   = "96358-502V",
105 @@ -1750,6 +1838,9 @@ static const struct board_info __initcon
106         &board_nb4_fxc_r1,
107         &board_ct6373_1,
108         &board_HW553,
109 +       &board_HW556_A,
110 +       &board_HW556_B,
111 +       &board_HW556_C,
112         &board_spw303v,
113         &board_DVAG3810BN,
114  #endif
115 @@ -1820,6 +1911,9 @@ static struct of_device_id const bcm963x
116         { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, },
117         { .compatible = "d-link,dva-g3810bn/tl", .data = &board_DVAG3810BN, },
118         { .compatible = "huawei,hg553", .data = &board_HW553, },
119 +       { .compatible = "huawei,hg556a-a", .data = &board_HW556_A, },
120 +       { .compatible = "huawei,hg556a-b", .data = &board_HW556_B, },
121 +       { .compatible = "huawei,hg556a-c", .data = &board_HW556_C, },
122         { .compatible = "pirelli,a226g", .data = &board_DWVS0, },
123         { .compatible = "pirelli,a226m", .data = &board_DWVS0, },
124         { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, },