diff options
Diffstat (limited to 'arch/arm/mach-omap2')
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 87 |
1 files changed, 52 insertions, 35 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index df83b4dae6b..311910b52e8 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -140,6 +140,9 @@ static int __init omap3h1_spi_init(void) { return 0; } + + + static struct mpu_platform_data mpu_data = { .int_config = 0x00, .level_shifter = 0, @@ -164,13 +167,15 @@ static struct lm3530_platform_data omap3h1_backlight_platform_data = { .brt_val = 0x64, /* initial brightness */ }; + + static struct mxt_platform_data mxt_data = { .irqflags = IRQF_TRIGGER_FALLING, }; static struct platform_device bcm20702_bluetooth_device = { .name = "bcm20702_bluetooth", - .id = -1, + .id = -1, }; static struct regulator_init_data omap3h1_vbat_data = { @@ -179,13 +184,13 @@ static struct regulator_init_data omap3h1_vbat_data = { static struct fixed_voltage_config omap3h1_vbat_pdata = { .supply_name = "VBAT", - .microvolts = 3800000, - .init_data = &omap3h1_vbat_data, - .gpio = -EINVAL, + .microvolts = 3800000, + .init_data = &omap3h1_vbat_data, + .gpio = -EINVAL, }; static struct platform_device omap3h1_vbat = { - .name = "reg-fixed-voltage", + .name = "reg-fixed-voltage", .id = -1, .dev = { .platform_data = &omap3h1_vbat_pdata, @@ -194,7 +199,7 @@ static struct platform_device omap3h1_vbat = { static struct regulator_init_data tps65910_dummy = { .supply_regulator = "VBAT", - .constraints.always_on = true, + .constraints.always_on = true, }; static struct regulator_init_data tps65910_3v3 = { @@ -202,10 +207,10 @@ static struct regulator_init_data tps65910_3v3 = { .constraints = { .min_uV = 3300000, .max_uV = 3300000, - .valid_modes_mask = REGULATOR_MODE_NORMAL, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, - .always_on = true, - .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = true, + .apply_uV = true, }, }; @@ -214,10 +219,10 @@ static struct regulator_init_data tps65910_1v8 = { .constraints = { .min_uV = 1800000, .max_uV = 1800000, - .valid_modes_mask = REGULATOR_MODE_NORMAL, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, - .always_on = true, - .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = true, + .apply_uV = true, }, }; @@ -228,14 +233,15 @@ static struct regulator_consumer_supply tps65910_vdd1_supply[] = { static struct regulator_init_data tps65910_vdd1 = { .supply_regulator = "VBAT", .constraints = { + .name = "vdd_mpu", .min_uV = 900000, .max_uV = 1350000, - .valid_modes_mask = REGULATOR_MODE_NORMAL, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, - //.always_on = 1, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + //.always_on = 1, }, - .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd1_supply), - .consumer_supplies = tps65910_vdd1_supply, + .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd1_supply), + .consumer_supplies = tps65910_vdd1_supply, }; static struct regulator_consumer_supply tps65910_vdd2_supply[] = { @@ -245,33 +251,34 @@ static struct regulator_consumer_supply tps65910_vdd2_supply[] = { static struct regulator_init_data tps65910_vdd2 = { .supply_regulator = "VBAT", .constraints = { + .name = "vdd_core", .min_uV = 900000, .max_uV = 1200000, - .valid_modes_mask = REGULATOR_MODE_NORMAL, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, - //.always_on = 1, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + //.always_on = 1, }, - .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd2_supply), - .consumer_supplies = tps65910_vdd2_supply, + .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd2_supply), + .consumer_supplies = tps65910_vdd2_supply, }; static struct tps65910_board omap3h1_tps65910_pdata = { .irq = 7 + OMAP_INTC_START, .en_ck32k_xtal = true, - .tps65910_pmic_init_data[TPS65910_REG_VRTC] = &tps65910_dummy, - .tps65910_pmic_init_data[TPS65910_REG_VIO] = &tps65910_1v8, - .tps65910_pmic_init_data[TPS65910_REG_VDD1] = &tps65910_vdd1, - .tps65910_pmic_init_data[TPS65910_REG_VDD2] = &tps65910_vdd2, - .tps65910_pmic_init_data[TPS65910_REG_VDD3] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VRTC] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VIO] = &tps65910_1v8, + .tps65910_pmic_init_data[TPS65910_REG_VDD1] = &tps65910_vdd1, + .tps65910_pmic_init_data[TPS65910_REG_VDD2] = &tps65910_vdd2, + .tps65910_pmic_init_data[TPS65910_REG_VDD3] = &tps65910_dummy, .tps65910_pmic_init_data[TPS65910_REG_VDIG1] = &tps65910_1v8, .tps65910_pmic_init_data[TPS65910_REG_VDIG2] = &tps65910_dummy, - .tps65910_pmic_init_data[TPS65910_REG_VPLL] = &tps65910_1v8, - .tps65910_pmic_init_data[TPS65910_REG_VDAC] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VPLL] = &tps65910_1v8, + .tps65910_pmic_init_data[TPS65910_REG_VDAC] = &tps65910_dummy, .tps65910_pmic_init_data[TPS65910_REG_VAUX1] = &tps65910_dummy, .tps65910_pmic_init_data[TPS65910_REG_VAUX2] = &tps65910_3v3, - .tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &tps65910_3v3, - .tps65910_pmic_init_data[TPS65910_REG_VMMC] = &tps65910_3v3, + .tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &tps65910_3v3, + .tps65910_pmic_init_data[TPS65910_REG_VMMC] = &tps65910_3v3, }; static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = { @@ -281,8 +288,8 @@ static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = { }, { I2C_BOARD_INFO("mpu6515", 0x68), - // This is needed for the interrupt wake. IH_GPIO_BASE changed in 3.10 kernel - //.irq = (IH_GPIO_BASE + MPUIRQ_GPIO), + // This is needed for the interrupt wake. IH_GPIO_BASE changed in 3.10 + // .irq = (IH_GPIO_BASE + MPUIRQ_GPIO), .platform_data = &mpu_data, }, { @@ -306,9 +313,19 @@ static struct i2c_board_info __initdata omap3h1_i2c3_board_info[] = { static int __init omap3_h1_i2c_init(void) { + /* Ugly hack: In Linux 3.10 we need to request an IRQ through + * gpio_to_irq. This means it can't be set at compile time, and + * must be done at runtime. In other words, here. + */ + gpio_request_one(ATMEL_MXT_GPIO, GPIOF_IN, "atmel_mxt_ts CHG"); omap3h1_i2c1_board_info[3].irq = gpio_to_irq(ATMEL_MXT_GPIO); + gpio_request_one(MPUIRQ_GPIO, GPIOF_IN, "mpu6515 gpio CHG"); + omap3h1_i2c1_board_info[1].irq = gpio_to_irq(MPUIRQ_GPIO); + + /* Register buses */ + omap_register_i2c_bus(1, 400, omap3h1_i2c1_board_info, ARRAY_SIZE(omap3h1_i2c1_board_info)); omap_register_i2c_bus(3, 400, omap3h1_i2c3_board_info, ARRAY_SIZE(omap3h1_i2c3_board_info)); return 0; |