aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAndrew Victor <linux@maxim.org.za>2008-01-23 03:32:17 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 10:00:32 -0500
commit1b41bdf68a72c1fd506ee3dbfbf954fd2eaef75c (patch)
tree163781e6480984fe948a5e22e826f684e0d4ab7d /arch/arm
parent2743f0c1dcca54d6c80b0de1273b3f4e90051a85 (diff)
[ARM] 4761/1: [AT91] Board-support for NEW_LEDs
Add NEW_LEDs support for the following boards: - Cogent CSB337 - Atmel AT91RM9200-DK - Atmel AT91RM9200-EK - Atmel AT91SAM9263-EK Mostly based on patch from David Brownell. Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/board-csb337.c24
-rw-r--r--arch/arm/mach-at91/board-dk.c10
-rw-r--r--arch/arm/mach-at91/board-ek.c21
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c26
4 files changed, 81 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index 51cb3c8cc601..0e2a11fc5bbd 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -215,6 +215,28 @@ static void __init csb300_add_device_buttons(void)
215static void __init csb300_add_device_buttons(void) {} 215static void __init csb300_add_device_buttons(void) {}
216#endif 216#endif
217 217
218static struct gpio_led csb_leds[] = {
219 { /* "led0", yellow */
220 .name = "led0",
221 .gpio = AT91_PIN_PB2,
222 .active_low = 1,
223 .default_trigger = "heartbeat",
224 },
225 { /* "led1", green */
226 .name = "led1",
227 .gpio = AT91_PIN_PB1,
228 .active_low = 1,
229 .default_trigger = "mmc0",
230 },
231 { /* "led2", yellow */
232 .name = "led2",
233 .gpio = AT91_PIN_PB0,
234 .active_low = 1,
235 .default_trigger = "ide-disk",
236 },
237};
238
239
218static void __init csb337_board_init(void) 240static void __init csb337_board_init(void)
219{ 241{
220 /* Serial */ 242 /* Serial */
@@ -236,6 +258,8 @@ static void __init csb337_board_init(void)
236 at91_add_device_mmc(0, &csb337_mmc_data); 258 at91_add_device_mmc(0, &csb337_mmc_data);
237 /* NOR flash */ 259 /* NOR flash */
238 platform_device_register(&csb_flash); 260 platform_device_register(&csb_flash);
261 /* LEDs */
262 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
239 /* Switches on CSB300 */ 263 /* Switches on CSB300 */
240 csb300_add_device_buttons(); 264 csb300_add_device_buttons();
241} 265}
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c
index 40c9e4331706..0a897efeba8e 100644
--- a/arch/arm/mach-at91/board-dk.c
+++ b/arch/arm/mach-at91/board-dk.c
@@ -183,6 +183,14 @@ static struct platform_device dk_flash = {
183 .num_resources = 1, 183 .num_resources = 1,
184}; 184};
185 185
186static struct gpio_led dk_leds[] = {
187 {
188 .name = "led0",
189 .gpio = AT91_PIN_PB2,
190 .active_low = 1,
191 .default_trigger = "heartbeat",
192 }
193};
186 194
187static void __init dk_board_init(void) 195static void __init dk_board_init(void)
188{ 196{
@@ -213,6 +221,8 @@ static void __init dk_board_init(void)
213 at91_add_device_nand(&dk_nand_data); 221 at91_add_device_nand(&dk_nand_data);
214 /* NOR Flash */ 222 /* NOR Flash */
215 platform_device_register(&dk_flash); 223 platform_device_register(&dk_flash);
224 /* LEDs */
225 at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
216 /* VGA */ 226 /* VGA */
217// dk_add_device_video(); 227// dk_add_device_video();
218} 228}
diff --git a/arch/arm/mach-at91/board-ek.c b/arch/arm/mach-at91/board-ek.c
index 53a5ef9e72ee..0574e50a30dd 100644
--- a/arch/arm/mach-at91/board-ek.c
+++ b/arch/arm/mach-at91/board-ek.c
@@ -141,6 +141,25 @@ static struct platform_device ek_flash = {
141 .num_resources = 1, 141 .num_resources = 1,
142}; 142};
143 143
144static struct gpio_led ek_leds[] = {
145 { /* "user led 1", DS2 */
146 .name = "green",
147 .gpio = AT91_PIN_PB0,
148 .active_low = 1,
149 .default_trigger = "mmc0",
150 },
151 { /* "user led 2", DS4 */
152 .name = "yellow",
153 .gpio = AT91_PIN_PB1,
154 .active_low = 1,
155 .default_trigger = "heartbeat",
156 },
157 { /* "user led 3", DS6 */
158 .name = "red",
159 .gpio = AT91_PIN_PB2,
160 .active_low = 1,
161 }
162};
144 163
145static void __init ek_board_init(void) 164static void __init ek_board_init(void)
146{ 165{
@@ -167,6 +186,8 @@ static void __init ek_board_init(void)
167#endif 186#endif
168 /* NOR Flash */ 187 /* NOR Flash */
169 platform_device_register(&ek_flash); 188 platform_device_register(&ek_flash);
189 /* LEDs */
190 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
170 /* VGA */ 191 /* VGA */
171// ek_add_device_video(); 192// ek_add_device_video();
172} 193}
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index a9dd59543ec7..2df0ff25d147 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -272,6 +272,30 @@ static struct atmel_ac97_data ek_ac97_data = {
272}; 272};
273 273
274 274
275/*
276 * LEDs ... these could all be PWM-driven, for variable brightness
277 */
278static struct gpio_led ek_leds[] = {
279 { /* "left" led, green, userled1, pwm1 */
280 .name = "ds1",
281 .gpio = AT91_PIN_PB8,
282 .active_low = 1,
283 .default_trigger = "mmc0",
284 },
285 { /* "right" led, green, userled2, pwm2 */
286 .name = "ds2",
287 .gpio = AT91_PIN_PC29,
288 .active_low = 1,
289 .default_trigger = "nand-disk",
290 },
291 { /* "power" led, yellow, pwm0 */
292 .name = "ds3",
293 .gpio = AT91_PIN_PB7,
294 .default_trigger = "heartbeat",
295 },
296};
297
298
275static void __init ek_board_init(void) 299static void __init ek_board_init(void)
276{ 300{
277 /* Serial */ 301 /* Serial */
@@ -297,6 +321,8 @@ static void __init ek_board_init(void)
297 at91_add_device_lcdc(&ek_lcdc_data); 321 at91_add_device_lcdc(&ek_lcdc_data);
298 /* AC97 */ 322 /* AC97 */
299 at91_add_device_ac97(&ek_ac97_data); 323 at91_add_device_ac97(&ek_ac97_data);
324 /* LEDs */
325 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
300} 326}
301 327
302MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") 328MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")