#include <bcm63xx_dev_usb_udc.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
+#include <linux/input.h>
#define PFX "board_bcm963xx: "
.active_low = 1,
},
},
+ .reset_buttons = {
+ {
+ .desc = "reset",
+ .gpio = 32,
+ .active_low = 1,
+ .type = EV_KEY,
+ .code = BTN_0,
+ .threshold = 3,
+ },
+ },
};
static struct board_info __initdata board_96348gw = {
.active_low = 1,
},
{
- .name = "ppp",
- .gpio = 3,
+ .name = "power",
+ .gpio = 0,
.active_low = 1,
+ .default_trigger = "default-on",
},
{
- .name = "ppp-fail",
+ .name = "stop",
+ .gpio = 1,
+ .active_low = 1,
+ },
+ {
+ .name = "line1",
.gpio = 4,
.active_low = 1,
},
{
- .name = "power",
- .gpio = 0,
+ .name = "line2",
+ .gpio = 5,
+ .active_low = 1,
+ },
+ { .name = "line3",
+ .gpio = 6,
.active_low = 1,
- .default_trigger = "default-on",
},
{
- .name = "stop",
- .gpio = 1,
+ .name = "tel",
+ .gpio = 7,
+ .active_low = 1,
+ },
+ {
+ .name = "eth",
+ .gpio = 35,
.active_low = 1,
},
},
+ .reset_buttons = {
+ {
+ .desc = "reset",
+ .gpio = 36,
+ .active_low = 1,
+ .type = EV_KEY,
+ .code = BTN_0,
+ .threshold = 3,
+ },
+ },
};
static struct board_info __initdata board_FAST2404 = {
.has_ohci0 = 1,
};
+static struct board_info __initdata board_rta1025w_16 = {
+ .name = "RTA1025W_16",
+ .expected_cpu_id = 0x6348,
+
+ .has_enet0 = 1,
+ .has_enet1 = 1,
+ .has_pci = 1,
+ .enet0 = {
+ .has_phy = 1,
+ .use_internal_phy = 1,
+ },
+ .enet1 = {
+ .force_speed_100 = 1,
+ .force_duplex_full = 1,
+ },
+};
#endif
/*
.has_ohci0 = 1,
.has_ehci0 = 1,
+
+ .leds = {
+ /*Each led on alice gate is bi-color so final char */
+ /* is r for red and g for green leds */
+ {
+ .name = "pwrr",
+ .gpio = 5,
+ .active_low = 1,
+ },
+ {
+ .name = "pwrg",
+ .gpio = 4,
+ .active_low = 1,
+ .default_trigger = "default-on",
+ },
+ {
+ .name = "wifir",
+ .gpio = 23,
+ .active_low = 1,
+ },
+ {
+ .name = "wifig",
+ .gpio = 22,
+ .active_low = 1,
+ },
+ {
+ .name = "usr1r",
+ .gpio = 27,
+ .active_low = 1,
+ },
+ {
+ .name = "usr1g",
+ .gpio = 26,
+ .active_low = 1,
+ },
+ {
+ .name = "usr2r",
+ .gpio = 30,
+ .active_low = 1,
+ },
+ {
+ .name = "usr2g",
+ .gpio = 29,
+ .active_low = 1,
+ },
+ },
+
+ .reset_buttons = {
+ {
+ .desc = "sw2",
+ .gpio = 37,
+ .active_low = 1,
+ .type = EV_KEY,
+ .code = BTN_0,
+ .threshold = 3,
+ },
+ },
+ /* sw1 is connected to gpio34*/
};
static struct board_info __initdata board_DWVS0 = {
&board_FAST2404,
&board_DV201AMR,
&board_96348gw_a,
+ &board_rta1025w_16,
#endif
#ifdef CONFIG_BCM63XX_CPU_6358
.dev.platform_data = &bcm63xx_led_data,
};
-struct gpio_buttons_platform_data bcm63xx_gpio_buttons_data = {
+static struct gpio_buttons_platform_data bcm63xx_gpio_buttons_data = {
.poll_interval = 20,
};
-struct platform_device bcm63xx_gpio_buttons_device = {
+static struct platform_device bcm63xx_gpio_buttons_device = {
.name = "gpio-buttons",
.id = 0,
.dev.platform_data = &bcm63xx_gpio_buttons_data,
platform_device_register(&bcm63xx_gpio_leds);
- bcm63xx_gpio_buttons_data.nbuttons = 1,
- bcm63xx_gpio_buttons_data.buttons = board.reset_btn;
+ if (board.reset_buttons) {
+ bcm63xx_gpio_buttons_data.nbuttons = ARRAY_SIZE(board.reset_buttons);
+ bcm63xx_gpio_buttons_data.buttons = board.reset_buttons;
- platform_device_register(&bcm63xx_gpio_buttons_device);
+ platform_device_register(&bcm63xx_gpio_buttons_device);
+ }
return 0;
}