|
@@ -218,3 +218,126 @@ static struct lp5523_platform_data rx51_lp5523_platform_data = {
|
|
#endif
|
|
#endif
|
|
|
|
|
|
static struct omap2_mcspi_device_config wl1251_mcspi_config = {
|
|
static struct omap2_mcspi_device_config wl1251_mcspi_config = {
|
|
|
|
+ .turbo_mode = 0,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct omap2_mcspi_device_config mipid_mcspi_config = {
|
|
|
|
+ .turbo_mode = 0,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
|
|
|
|
+ .turbo_mode = 0,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
|
|
|
|
+ [RX51_SPI_WL1251] = {
|
|
|
|
+ .modalias = "wl1251",
|
|
|
|
+ .bus_num = 4,
|
|
|
|
+ .chip_select = 0,
|
|
|
|
+ .max_speed_hz = 48000000,
|
|
|
|
+ .mode = SPI_MODE_3,
|
|
|
|
+ .controller_data = &wl1251_mcspi_config,
|
|
|
|
+ .platform_data = &wl1251_pdata,
|
|
|
|
+ },
|
|
|
|
+ [RX51_SPI_MIPID] = {
|
|
|
|
+ .modalias = "acx565akm",
|
|
|
|
+ .bus_num = 1,
|
|
|
|
+ .chip_select = 2,
|
|
|
|
+ .max_speed_hz = 6000000,
|
|
|
|
+ .controller_data = &mipid_mcspi_config,
|
|
|
|
+ },
|
|
|
|
+ [RX51_SPI_TSC2005] = {
|
|
|
|
+ .modalias = "tsc2005",
|
|
|
|
+ .bus_num = 1,
|
|
|
|
+ .chip_select = 0,
|
|
|
|
+ .max_speed_hz = 6000000,
|
|
|
|
+ .controller_data = &tsc2005_mcspi_config,
|
|
|
|
+ .platform_data = &tsc2005_pdata,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device rx51_battery_device = {
|
|
|
|
+ .name = "rx51-battery",
|
|
|
|
+ .id = -1,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static void rx51_charger_set_power(bool on)
|
|
|
|
+{
|
|
|
|
+ gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static struct isp1704_charger_data rx51_charger_data = {
|
|
|
|
+ .set_power = rx51_charger_set_power,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device rx51_charger_device = {
|
|
|
|
+ .name = "isp1704_charger",
|
|
|
|
+ .dev = {
|
|
|
|
+ .platform_data = &rx51_charger_data,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static void __init rx51_charger_init(void)
|
|
|
|
+{
|
|
|
|
+ WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO,
|
|
|
|
+ GPIOF_OUT_INIT_HIGH, "isp1704_reset"));
|
|
|
|
+
|
|
|
|
+ platform_device_register(&rx51_battery_device);
|
|
|
|
+ platform_device_register(&rx51_charger_device);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
|
|
|
+
|
|
|
|
+#define RX51_GPIO_CAMERA_LENS_COVER 110
|
|
|
|
+#define RX51_GPIO_CAMERA_FOCUS 68
|
|
|
|
+#define RX51_GPIO_CAMERA_CAPTURE 69
|
|
|
|
+#define RX51_GPIO_KEYPAD_SLIDE 71
|
|
|
|
+#define RX51_GPIO_LOCK_BUTTON 113
|
|
|
|
+#define RX51_GPIO_PROXIMITY 89
|
|
|
|
+
|
|
|
|
+#define RX51_GPIO_DEBOUNCE_TIMEOUT 10
|
|
|
|
+
|
|
|
|
+static struct gpio_keys_button rx51_gpio_keys[] = {
|
|
|
|
+ {
|
|
|
|
+ .desc = "Camera Lens Cover",
|
|
|
|
+ .type = EV_SW,
|
|
|
|
+ .code = SW_CAMERA_LENS_COVER,
|
|
|
|
+ .gpio = RX51_GPIO_CAMERA_LENS_COVER,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
|
|
|
+ }, {
|
|
|
|
+ .desc = "Camera Focus",
|
|
|
|
+ .type = EV_KEY,
|
|
|
|
+ .code = KEY_CAMERA_FOCUS,
|
|
|
|
+ .gpio = RX51_GPIO_CAMERA_FOCUS,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
|
|
|
+ }, {
|
|
|
|
+ .desc = "Camera Capture",
|
|
|
|
+ .type = EV_KEY,
|
|
|
|
+ .code = KEY_CAMERA,
|
|
|
|
+ .gpio = RX51_GPIO_CAMERA_CAPTURE,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
|
|
|
+ }, {
|
|
|
|
+ .desc = "Lock Button",
|
|
|
|
+ .type = EV_KEY,
|
|
|
|
+ .code = KEY_SCREENLOCK,
|
|
|
|
+ .gpio = RX51_GPIO_LOCK_BUTTON,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
|
|
|
+ }, {
|
|
|
|
+ .desc = "Keypad Slide",
|
|
|
|
+ .type = EV_SW,
|
|
|
|
+ .code = SW_KEYPAD_SLIDE,
|
|
|
|
+ .gpio = RX51_GPIO_KEYPAD_SLIDE,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
|
|
|
+ }, {
|
|
|
|
+ .desc = "Proximity Sensor",
|
|
|
|
+ .type = EV_SW,
|
|
|
|
+ .code = SW_FRONT_PROXIMITY,
|
|
|
|
+ .gpio = RX51_GPIO_PROXIMITY,
|
|
|
|
+ .active_low = 0,
|
|
|
|
+ .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
|
|
|
+ }
|