diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/cpufreq.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 64 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/cpu-sa1110.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/cpu-omap.c | 1 |
6 files changed, 143 insertions, 8 deletions
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c index 467d899fbe7..e548ba74a4d 100644 --- a/arch/arm/mach-imx/cpufreq.c +++ b/arch/arm/mach-imx/cpufreq.c @@ -269,7 +269,6 @@ static int __init imx_cpufreq_driver_init(struct cpufreq_policy *policy) return -EINVAL; policy->cur = policy->min = policy->max = imx_get_speed(0); - policy->governor = CPUFREQ_DEFAULT_GOVERNOR; policy->cpuinfo.min_freq = 8000; policy->cpuinfo.max_freq = 200000; /* Manual states, that PLL stabilizes in two CLK32 periods */ diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index d901dcbe806..b0921622566 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -20,22 +20,23 @@ */ #include <linux/kernel.h> -#include <linux/init.h> #include <linux/platform_device.h> #include <linux/delay.h> +#include <linux/i2c.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> #include <linux/input.h> -#include <linux/workqueue.h> #include <asm/hardware.h> +#include <asm/gpio.h> + #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/flash.h> #include <asm/mach/map.h> -#include <asm/arch/gpio.h> +#include <asm/arch/tps65010.h> #include <asm/arch/mux.h> #include <asm/arch/tc.h> #include <asm/arch/irda.h> @@ -342,6 +343,20 @@ static struct platform_device *h2_devices[] __initdata = { &h2_mcbsp1_device, }; +static struct i2c_board_info __initdata h2_i2c_board_info[] = { + { + I2C_BOARD_INFO("tps65010", 0x48), + .type = "tps65010", + .irq = OMAP_GPIO_IRQ(58), + }, + /* TODO when driver support is ready: + * - isp1301 OTG transceiver + * - optional ov9640 camera sensor at 0x30 + * - pcf9754 for aGPS control + * - ... etc + */ +}; + static void __init h2_init_smc91x(void) { if ((omap_request_gpio(0)) < 0) { @@ -446,6 +461,14 @@ static void __init h2_init(void) omap_board_config = h2_config; omap_board_config_size = ARRAY_SIZE(h2_config); omap_serial_init(); + + /* irq for tps65010 chip */ + omap_cfg_reg(W4_GPIO58); + if (gpio_request(58, "tps65010") == 0) + gpio_direction_input(58); + + i2c_register_board_info(1, h2_i2c_board_info, + ARRAY_SIZE(h2_i2c_board_info)); } static void __init h2_map_io(void) @@ -453,6 +476,22 @@ static void __init h2_map_io(void) omap1_map_common_io(); } +#ifdef CONFIG_TPS65010 +static int __init h2_tps_init(void) +{ + if (!machine_is_omap_h2()) + return 0; + + /* gpio3 for SD, gpio4 for VDD_DSP */ + /* FIXME send power to DSP iff it's configured */ + + /* Enable LOW_PWR */ + tps65010_set_low_pwr(ON); + return 0; +} +fs_initcall(h2_tps_init); +#endif + MACHINE_START(OMAP_H2, "TI-H2") /* Maintainer: Imre Deak <imre.deak@nokia.com> */ .phys_io = 0xfff00000, diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4167f348097..4f84ae273a1 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -21,6 +21,7 @@ #include <linux/platform_device.h> #include <linux/errno.h> #include <linux/workqueue.h> +#include <linux/i2c.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> @@ -29,12 +30,14 @@ #include <asm/setup.h> #include <asm/page.h> #include <asm/hardware.h> +#include <asm/gpio.h> + #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/flash.h> #include <asm/mach/map.h> -#include <asm/arch/gpio.h> +#include <asm/arch/tps65010.h> #include <asm/arch/gpioexpander.h> #include <asm/arch/irqs.h> #include <asm/arch/mux.h> @@ -454,6 +457,19 @@ static struct omap_board_config_kernel h3_config[] = { { OMAP_TAG_LCD, &h3_lcd_config }, }; +static struct i2c_board_info __initdata h3_i2c_board_info[] = { + { + I2C_BOARD_INFO("tps65010", 0x48), + .type = "tps65013", + /* .irq = OMAP_GPIO_IRQ(??), */ + }, + /* TODO when driver support is ready: + * - isp1301 OTG transceiver + * - optional ov9640 camera sensor at 0x30 + * - ... + */ +}; + #define H3_NAND_RB_GPIO_PIN 10 static int nand_dev_ready(struct nand_platform_data *data) @@ -487,6 +503,10 @@ static void __init h3_init(void) omap_board_config = h3_config; omap_board_config_size = ARRAY_SIZE(h3_config); omap_serial_init(); + + /* FIXME setup irq for tps65013 chip */ + i2c_register_board_info(1, h3_i2c_board_info, + ARRAY_SIZE(h3_i2c_board_info)); } static void __init h3_init_smc91x(void) @@ -511,6 +531,23 @@ static void __init h3_map_io(void) omap1_map_common_io(); } +#ifdef CONFIG_TPS65010 +static int __init h3_tps_init(void) +{ + if (!machine_is_omap_h3()) + return 0; + + /* gpio4 for SD, gpio3 for VDD_DSP */ + /* FIXME send power to DSP iff it's configured */ + + /* Enable LOW_PWR */ + tps65013_set_low_pwr(ON); + + return 0; +} +fs_initcall(h3_tps_init); +#endif + MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") /* Maintainer: Texas Instruments, Inc. */ .phys_io = 0xfff00000, diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 1825781f435..5db182da322 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -32,18 +32,21 @@ #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/interrupt.h> +#include <linux/i2c.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <asm/hardware.h> +#include <asm/gpio.h> + #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/flash.h> -#include <asm/arch/gpio.h> #include <asm/arch/usb.h> +#include <asm/arch/tps65010.h> #include <asm/arch/mux.h> #include <asm/arch/tc.h> #include <asm/arch/common.h> @@ -180,6 +183,19 @@ static struct platform_device *osk5912_devices[] __initdata = { &osk5912_mcbsp1_device, }; +static struct i2c_board_info __initdata osk_i2c_board_info[] = { + { + I2C_BOARD_INFO("tps65010", 0x48), + .type = "tps65010", + .irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)), + }, + /* TODO when driver support is ready: + * - aic23 audio chip at 0x1a + * - on Mistral, 24c04 eeprom at 0x50 + * - optionally on Mistral, ov9640 camera sensor at 0x30 + */ +}; + static void __init osk_init_smc91x(void) { if ((omap_request_gpio(0)) < 0) { @@ -452,6 +468,14 @@ static void __init osk_init(void) omap_board_config_size = ARRAY_SIZE(osk_config); USB_TRANSCEIVER_CTRL_REG |= (3 << 1); + /* irq for tps65010 chip */ + /* bootloader effectively does: omap_cfg_reg(U19_1610_MPUIO1); */ + if (gpio_request(OMAP_MPUIO(1), "tps65010") == 0) + gpio_direction_input(OMAP_MPUIO(1)); + + i2c_register_board_info(1, osk_i2c_board_info, + ARRAY_SIZE(osk_i2c_board_info)); + omap_serial_init(); osk_mistral_init(); } @@ -461,6 +485,44 @@ static void __init osk_map_io(void) omap1_map_common_io(); } +#ifdef CONFIG_TPS65010 +static int __init osk_tps_init(void) +{ + if (!machine_is_omap_osk()) + return 0; + + /* Let LED1 (D9) blink */ + tps65010_set_led(LED1, BLINK); + + /* Disable LED 2 (D2) */ + tps65010_set_led(LED2, OFF); + + /* Set GPIO 1 HIGH to disable VBUS power supply; + * OHCI driver powers it up/down as needed. + */ + tps65010_set_gpio_out_value(GPIO1, HIGH); + + /* Set GPIO 2 low to turn on LED D3 */ + tps65010_set_gpio_out_value(GPIO2, HIGH); + + /* Set GPIO 3 low to take ethernet out of reset */ + tps65010_set_gpio_out_value(GPIO3, LOW); + + /* gpio4 for VDD_DSP */ + /* FIXME send power to DSP iff it's configured */ + + /* Enable LOW_PWR */ + tps65010_set_low_pwr(ON); + + /* Switch VLDO2 to 3.0V for AIC23 */ + tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V + | TPS_LDO1_ENABLE); + + return 0; +} +fs_initcall(osk_tps_init); +#endif + MACHINE_START(OMAP_OSK, "TI-OSK") /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ .phys_io = 0xfff00000, diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 78f4c134604..36b47ff5af1 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c @@ -331,7 +331,6 @@ static int __init sa1110_cpu_init(struct cpufreq_policy *policy) if (policy->cpu != 0) return -EINVAL; policy->cur = policy->min = policy->max = sa11x0_getspeed(0); - policy->governor = CPUFREQ_DEFAULT_GOVERNOR; policy->cpuinfo.min_freq = 59000; policy->cpuinfo.max_freq = 287000; policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index a0c71dca237..c0d63b0c61c 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c @@ -108,7 +108,6 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) if (policy->cpu != 0) return -EINVAL; policy->cur = policy->min = policy->max = omap_getspeed(0); - policy->governor = CPUFREQ_DEFAULT_GOVERNOR; policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000; policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |