brcm63xx: Add DT support for 96368MVWG
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-3.14 / 564-board_P870HW-51a_v2.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -4183,6 +4183,97 @@ static struct sprom_fixup __initdata vr3
4 { .offset = 115, .value = 0xfad9 },
5 };
6
7 +static struct board_info __initdata board_P870HW51A_V2 = {
8 + .name = "P870HW-51a_v2",
9 + .of_board_id = "zyxel,p870hw-51a-v2",
10 + .expected_cpu_id = 0x6368,
11 +
12 + .has_uart0 = 1,
13 + .has_pci = 1,
14 + .use_fallback_sprom = 1,
15 + .has_ohci0 = 1,
16 + .has_ehci0 = 1,
17 +
18 + .has_enetsw = 1,
19 + .enetsw = {
20 + .used_ports = {
21 + [0] = {
22 + .used = 1,
23 + .phy_id = 1,
24 + .name = "port1",
25 + },
26 + [1] = {
27 + .used = 1,
28 + .phy_id = 2,
29 + .name = "port2",
30 + },
31 + [2] = {
32 + .used = 1,
33 + .phy_id = 3,
34 + .name = "port3",
35 + },
36 + [3] = {
37 + .used = 1,
38 + .phy_id = 4,
39 + .name = "port4",
40 + },
41 + },
42 + },
43 +
44 + .leds = {
45 + {
46 + .name = "P870HW-51a:green:power",
47 + .gpio = 0,
48 + .default_trigger = "default-on",
49 + },
50 + {
51 + .name = "P870HW-51a:green:dsl",
52 + .gpio = 2,
53 + .active_low = 1,
54 + },
55 + {
56 + .name = "P870HW-51a:green:inet",
57 + .gpio = 22,
58 + .active_low = 1,
59 + },
60 + {
61 + .name = "P870HW-51a:orange:wps",
62 + .gpio = 24,
63 + .active_low = 1,
64 + },
65 + {
66 + .name = "P870HW-51a:red:inet",
67 + .gpio = 33,
68 + .active_low = 1,
69 + },
70 + },
71 +
72 + .buttons = {
73 + {
74 + .desc = "reset",
75 + .gpio = 34,
76 + .type = EV_KEY,
77 + .code = KEY_RESTART,
78 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
79 + .active_low = 1,
80 + },
81 + {
82 + .desc = "wps",
83 + .gpio = 35,
84 + .type = EV_KEY,
85 + .code = KEY_WPS_BUTTON,
86 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
87 + .active_low = 1,
88 + },
89 + },
90 +
91 + .fallback_sprom = {
92 + .type = SPROM_BCM4318,
93 + .pci_bus = 0,
94 + .pci_dev = 1,
95 + },
96 +};
97 +
98 static struct board_info __initdata board_VR3025u = {
99 .name = "96368M-1541N",
100 .of_board_id = "comtrend,vr-3025u",
101 @@ -4886,6 +4977,7 @@ static const struct board_info __initcon
102 #ifdef CONFIG_BCM63XX_CPU_6368
103 &board_96368mvwg,
104 &board_96368mvngr,
105 + &board_P870HW51A_V2,
106 &board_VR3025u,
107 &board_VR3025un,
108 &board_WAP5813n,