brcm63xx: convert RTA1320 to dts
[15.05/openwrt.git] / target / linux / brcm63xx / patches-3.14 / 537-board_fast2504n.patch
1 From: Max Staudt <openwrt.max@enpas.org>
2 Date: Wed, 15 Jan 2014 18:51:13 +0000
3 Subject: [PATCH] brcm63xx: F@ST2504n board support (Linux-3.10.26)
4
5 Signed-off-by: Max Staudt <openwrt.max@enpas.org>
6 ---
7 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
8 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
9 @@ -3457,6 +3457,96 @@ static struct board_info __initdata boar
10         .devs = nb6_devices,
11         .num_devs = ARRAY_SIZE(nb6_devices),
12  };
13 +
14 +static struct board_info __initdata board_fast2504n = {
15 +       .name                           = "F@ST2504n",
16 +       .expected_cpu_id                = 0x6362,
17 +
18 +       .has_uart0                      = 1,
19 +
20 +       .has_enetsw                     = 1,
21 +
22 +       .enetsw = {
23 +               .used_ports = {
24 +                       [0] = {
25 +                               .used   = 1,
26 +                               .phy_id = 1,
27 +                               .name   = "Port 1",
28 +                       },
29 +
30 +                       [1] = {
31 +                               .used   = 1,
32 +                               .phy_id = 2,
33 +                               .name   = "Port 2",
34 +                       },
35 +
36 +                       [2] = {
37 +                               .used   = 1,
38 +                               .phy_id = 3,
39 +                               .name   = "Port 3",
40 +                       },
41 +
42 +                       [3] = {
43 +                               .used   = 1,
44 +                               .phy_id = 4,
45 +                               .name   = "Port 4",
46 +                       },
47 +               },
48 +       },
49 +
50 +       .leds = {
51 +               {
52 +                       .name           = "fast2504n:orange:power",
53 +                       .gpio           = 2,
54 +                       .active_low     = 1,
55 +               },
56 +               {
57 +                       .name           = "fast2504n:green:power",
58 +                       .gpio           = 10,
59 +                       .active_low     = 1,
60 +                       .default_trigger = "default-on",
61 +               },
62 +               {
63 +                       .name           = "fast2504n:red:internet",
64 +                       .gpio           = 26,
65 +                       .active_low     = 1,
66 +               },
67 +               {
68 +                       .name           = "fast2504n:green:ok",
69 +                       .gpio           = 28,
70 +                       .active_low     = 1,
71 +               },
72 +               {
73 +                       .name           = "fast2504n:orange:ok",
74 +                       .gpio           = 29,
75 +                       .active_low     = 1,
76 +               },
77 +               {
78 +                       .name           = "fast2504n:orange:wlan",
79 +                       .gpio           = 30,
80 +                       .active_low     = 1,
81 +               },
82 +       },
83 +
84 +       .buttons = {
85 +               {
86 +                       .desc           = "reset",
87 +                       .gpio           = 24,
88 +                       .type           = EV_KEY,
89 +                       .code           = KEY_RESTART,
90 +                       .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
91 +                       .active_low     = 1,
92 +               },
93 +               {
94 +                       .desc           = "wps",
95 +                       .gpio           = 25,
96 +                       .type           = EV_KEY,
97 +                       .code           = KEY_WPS_BUTTON,
98 +                       .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
99 +                       .active_low     = 1,
100 +               },
101 +       },
102 +};
103  #endif /* CONFIG_BCM63XX_CPU_6362 */
104  
105  /*
106 @@ -3674,6 +3764,7 @@ static const struct board_info __initcon
107  
108  #ifdef CONFIG_BCM63XX_CPU_6362
109         &board_nb6,
110 +       &board_fast2504n,
111  #endif
112  
113  #ifdef CONFIG_BCM63XX_CPU_6368
114 @@ -3747,6 +3838,7 @@ static struct of_device_id const bcm963x
115         { .compatible = "telsey,cpva642", .data = &board_CPVA642, },
116  #endif
117  #ifdef CONFIG_BCM63XX_CPU_6362
118 +       { .compatible = "sagem,f@st2504n", .data = &board_fast2504n, },
119         { .compatible = "sfr,nb6-ser-r0", .data = &board_nb6, },
120  #endif
121  #ifdef CONFIG_BCM63XX_CPU_6368