add support for LEDs on the NP28G board, thanks to kenny (closes: #2825)
SVN-Revision: 9781
This commit is contained in:
parent
7e83cf568a
commit
3befb653fa
@ -102,7 +102,12 @@ static void wp54_reset(void)
|
||||
gpio_set_value(ADM5120_GPIO_PIN3, 0);
|
||||
}
|
||||
|
||||
static void __init np2xg_setup(void)
|
||||
static void np28g_reset(void)
|
||||
{
|
||||
gpio_set_value(ADM5120_GPIO_PIN4, 0);
|
||||
}
|
||||
|
||||
static void __init np27g_setup(void)
|
||||
{
|
||||
gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
|
||||
gpio_direction_output(ADM5120_GPIO_PIN5, 0);
|
||||
@ -113,6 +118,20 @@ static void __init np2xg_setup(void)
|
||||
/* TODO: setup mac address */
|
||||
}
|
||||
|
||||
static void __init np28g_setup(void)
|
||||
{
|
||||
gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
|
||||
gpio_direction_output(ADM5120_GPIO_PIN5, 0);
|
||||
|
||||
gpio_request(ADM5120_GPIO_PIN4, NULL); /* for system reset */
|
||||
gpio_direction_output(ADM5120_GPIO_PIN4, 1);
|
||||
|
||||
/* setup data for flash0 device */
|
||||
adm5120_flash0_data.switch_bank = switch_bank_gpio5;
|
||||
|
||||
/* TODO: setup mac address */
|
||||
}
|
||||
|
||||
static void __init wp54_setup(void)
|
||||
{
|
||||
gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
|
||||
@ -121,7 +140,6 @@ static void __init wp54_setup(void)
|
||||
gpio_request(ADM5120_GPIO_PIN3, NULL); /* for system reset */
|
||||
gpio_direction_output(ADM5120_GPIO_PIN3, 1);
|
||||
|
||||
|
||||
/* setup data for flash0 device */
|
||||
adm5120_flash0_data.switch_bank = switch_bank_gpio5;
|
||||
|
||||
@ -147,15 +165,16 @@ static void __init wp54_wrt_setup(void)
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
ADM5120_BOARD_START(NP27G, "Compex NetPassage 27G")
|
||||
.board_setup = np2xg_setup,
|
||||
.board_setup = np27g_setup,
|
||||
.eth_num_ports = 5,
|
||||
.eth_vlans = np27g_vlans,
|
||||
.num_devices = ARRAY_SIZE(np2xg_devices),
|
||||
.devices = np2xg_devices,
|
||||
/* TODO: add PCI IRQ map */
|
||||
ADM5120_BOARD_END
|
||||
|
||||
ADM5120_BOARD_START(NP28G, "Compex NetPassage 28G")
|
||||
.board_setup = np2xg_setup,
|
||||
.board_setup = np28g_setup,
|
||||
.eth_num_ports = 4,
|
||||
.eth_vlans = np28g_vlans,
|
||||
.num_devices = ARRAY_SIZE(np2xg_devices),
|
||||
|
@ -89,21 +89,20 @@ LED_ARRAY(np27g) { /* FIXME: untested */
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL)
|
||||
LED_ARRAY(np28g) { /* FIXME: untested */
|
||||
LED_STD(ADM5120_GPIO_xxxx, "lan1", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "lan2", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "lan3", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "wan", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "wlan", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "usb1", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "usb2", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "usb3", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "usb4", NULL),
|
||||
LED_INV(ADM5120_GPIO_PIN2, "power", NULL),
|
||||
LED_STD(ADM5120_GPIO_xxxx, "diag", NULL),
|
||||
LED_ARRAY(np28g) {
|
||||
LED_INV(ADM5120_GPIO_PIN2, "diag", NULL),
|
||||
LED_INV(ADM5120_GPIO_PIN3, "power", NULL),
|
||||
LED_INV(ADM5120_GPIO_PIN6, "wan_cond", NULL),
|
||||
LED_INV(ADM5120_GPIO_PIN7, "wifi", NULL),
|
||||
LED_INV(ADM5120_GPIO_P0L2, "usb1", NULL),
|
||||
LED_INV(ADM5120_GPIO_P1L0, "lan1", NULL),
|
||||
LED_INV(ADM5120_GPIO_P1L2, "usb2", NULL),
|
||||
LED_INV(ADM5120_GPIO_P2L0, "lan2", NULL),
|
||||
LED_INV(ADM5120_GPIO_P2L2, "usb3", NULL),
|
||||
LED_INV(ADM5120_GPIO_P3L0, "lan3", NULL),
|
||||
LED_INV(ADM5120_GPIO_P3L2, "usb4", NULL),
|
||||
LED_INV(ADM5120_GPIO_P4L0, "wan", NULL),
|
||||
};
|
||||
#endif
|
||||
|
||||
LED_ARRAY(wp54g) {
|
||||
LED_INV(ADM5120_GPIO_PIN2, "diag", NULL),
|
||||
@ -240,6 +239,8 @@ LED_ARRAY(generic) {
|
||||
static struct mach_data machines[] __initdata = {
|
||||
MACH_DATA(MACH_ADM5120_GENERIC, generic),
|
||||
/* Compex */
|
||||
MACH_DATA(MACH_ADM5120_NP28G, np28g),
|
||||
MACH_DATA(MACH_ADM5120_NP28GHS, np28g),
|
||||
MACH_DATA(MACH_ADM5120_WP54AG, wp54g),
|
||||
MACH_DATA(MACH_ADM5120_WP54G, wp54g),
|
||||
MACH_DATA(MACH_ADM5120_WP54G_WRT, wp54g),
|
||||
@ -260,8 +261,6 @@ static struct mach_data machines[] __initdata = {
|
||||
MACH_DATA(MACH_ADM5120_RB_111, rb100),
|
||||
MACH_DATA(MACH_ADM5120_RB_112, rb100),
|
||||
MACH_DATA(MACH_ADM5120_NP27G, np27g),
|
||||
MACH_DATA(MACH_ADM5120_NP28G, np28g),
|
||||
MACH_DATA(MACH_ADM5120_NP28GHS, np28g),
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user