diff options
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard.c')
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c index 2852bd58edae..ac337d264093 100644 --- a/arch/arm/mach-mx3/mx31moboard.c +++ b/arch/arm/mach-mx3/mx31moboard.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/leds.h> | ||
24 | #include <linux/memory.h> | 25 | #include <linux/memory.h> |
25 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
26 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
@@ -72,6 +73,9 @@ static unsigned int moboard_pins[] = { | |||
72 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, MX31_PIN_USBOTG_DIR__USBOTG_DIR, | 73 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, MX31_PIN_USBOTG_DIR__USBOTG_DIR, |
73 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, MX31_PIN_USBOTG_STP__USBOTG_STP, | 74 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, MX31_PIN_USBOTG_STP__USBOTG_STP, |
74 | MX31_PIN_USB_OC__GPIO1_30, | 75 | MX31_PIN_USB_OC__GPIO1_30, |
76 | /* LEDs */ | ||
77 | MX31_PIN_SVEN0__GPIO2_0, MX31_PIN_STX0__GPIO2_1, | ||
78 | MX31_PIN_SRX0__GPIO2_2, MX31_PIN_SIMPD0__GPIO2_3, | ||
75 | }; | 79 | }; |
76 | 80 | ||
77 | static struct physmap_flash_data mx31moboard_flash_data = { | 81 | static struct physmap_flash_data mx31moboard_flash_data = { |
@@ -201,8 +205,39 @@ static struct fsl_usb2_platform_data usb_pdata = { | |||
201 | .phy_mode = FSL_USB2_PHY_ULPI, | 205 | .phy_mode = FSL_USB2_PHY_ULPI, |
202 | }; | 206 | }; |
203 | 207 | ||
208 | static struct gpio_led mx31moboard_leds[] = { | ||
209 | { | ||
210 | .name = "coreboard-led-0:red:running", | ||
211 | .default_trigger = "heartbeat", | ||
212 | .gpio = IOMUX_TO_GPIO(MX31_PIN_SVEN0), | ||
213 | }, { | ||
214 | .name = "coreboard-led-1:red", | ||
215 | .gpio = IOMUX_TO_GPIO(MX31_PIN_STX0), | ||
216 | }, { | ||
217 | .name = "coreboard-led-2:red", | ||
218 | .gpio = IOMUX_TO_GPIO(MX31_PIN_SRX0), | ||
219 | }, { | ||
220 | .name = "coreboard-led-3:red", | ||
221 | .gpio = IOMUX_TO_GPIO(MX31_PIN_SIMPD0), | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | static struct gpio_led_platform_data mx31moboard_led_pdata = { | ||
226 | .num_leds = ARRAY_SIZE(mx31moboard_leds), | ||
227 | .leds = mx31moboard_leds, | ||
228 | }; | ||
229 | |||
230 | static struct platform_device mx31moboard_leds_device = { | ||
231 | .name = "leds-gpio", | ||
232 | .id = -1, | ||
233 | .dev = { | ||
234 | .platform_data = &mx31moboard_led_pdata, | ||
235 | }, | ||
236 | }; | ||
237 | |||
204 | static struct platform_device *devices[] __initdata = { | 238 | static struct platform_device *devices[] __initdata = { |
205 | &mx31moboard_flash, | 239 | &mx31moboard_flash, |
240 | &mx31moboard_leds_device, | ||
206 | }; | 241 | }; |
207 | 242 | ||
208 | static int mx31moboard_baseboard; | 243 | static int mx31moboard_baseboard; |