From d198290d8250e6318cc31c15e7d017ef4441a438 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 31 May 2010 16:51:50 +0200 Subject: [ARM] pxa/z2: Add battery support into Zipit Z2 This patch adds support for the AER915 battery chip into Zipit Z2 platform file. Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/z2.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-pxa/z2.c') diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index d303c6929d32..1452c71805c1 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -451,6 +452,39 @@ static void __init z2_keys_init(void) static inline void z2_keys_init(void) {} #endif +/****************************************************************************** + * Battery + ******************************************************************************/ +#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) +static struct z2_battery_info batt_chip_info = { + .batt_I2C_bus = 0, + .batt_I2C_addr = 0x55, + .batt_I2C_reg = 2, + .charge_gpio = GPIO0_ZIPITZ2_AC_DETECT, + .min_voltage = 2400000, + .max_voltage = 3700000, + .batt_div = 69, + .batt_mult = 1000000, + .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION, + .batt_name = "Z2", +}; + +static struct i2c_board_info __initdata z2_i2c_board_info[] = { + { + I2C_BOARD_INFO("aer915", 0x55), + .platform_data = &batt_chip_info, + } +}; + +static void __init z2_i2c_init(void) +{ + pxa_set_i2c_info(NULL); + i2c_register_board_info(0, ARRAY_AND_SIZE(z2_i2c_board_info)); +} +#else +static inline void z2_i2c_init(void) {} +#endif + /****************************************************************************** * SSP Devices - WiFi and LCD control ******************************************************************************/ @@ -579,12 +613,14 @@ static void __init z2_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(z2_pin_config)); + pxa_set_ffuart_info(NULL); + pxa_set_btuart_info(NULL); + pxa_set_stuart_info(NULL); + z2_lcd_init(); z2_mmc_init(); z2_mkp_init(); - - pxa_set_i2c_info(NULL); - + z2_i2c_init(); z2_spi_init(); z2_nor_init(); z2_pwm_init(); -- cgit v1.2.2 From 8499ded85927ca84a246a6502018087e19b7df2c Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 31 May 2010 16:51:52 +0200 Subject: [ARM] pxa/z2: Register WM8750 This patch registers the WM8750 codec on a proper place on the ZipitZ2 machine after the WM8750 driver was converted to new API. Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/z2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/z2.c') diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 1452c71805c1..967e8cb8d6fc 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -473,7 +473,10 @@ static struct i2c_board_info __initdata z2_i2c_board_info[] = { { I2C_BOARD_INFO("aer915", 0x55), .platform_data = &batt_chip_info, - } + }, { + I2C_BOARD_INFO("wm8750", 0x1b), + }, + }; static void __init z2_i2c_init(void) -- cgit v1.2.2 From 320bbb86b3645ff8b13c13849adc90cff6a8918c Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 24 Jun 2010 16:02:09 +0200 Subject: [ARM] pxa/z2: Add regulator support Register TPS65021 regulator in Zipit Z2. Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/z2.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'arch/arm/mach-pxa/z2.c') diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 967e8cb8d6fc..07d8bd8c4c61 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -609,6 +610,75 @@ static void __init z2_spi_init(void) static inline void z2_spi_init(void) {} #endif +/****************************************************************************** + * Core power regulator + ******************************************************************************/ +#if defined(CONFIG_REGULATOR_TPS65023) || \ + defined(CONFIG_REGULATOR_TPS65023_MODULE) +static struct regulator_consumer_supply z2_tps65021_consumers[] = { + { + .supply = "vcc_core", + } +}; + +static struct regulator_init_data z2_tps65021_info[] = { + { + .constraints = { + .name = "vcc_core range", + .min_uV = 800000, + .max_uV = 1600000, + .always_on = 1, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + }, + .consumer_supplies = z2_tps65021_consumers, + .num_consumer_supplies = ARRAY_SIZE(z2_tps65021_consumers), + }, { + .constraints = { + .name = "DCDC2", + .min_uV = 3300000, + .max_uV = 3300000, + .always_on = 1, + }, + }, { + .constraints = { + .name = "DCDC3", + .min_uV = 1800000, + .max_uV = 1800000, + .always_on = 1, + }, + }, { + .constraints = { + .name = "LDO1", + .min_uV = 1000000, + .max_uV = 3150000, + .always_on = 1, + }, + }, { + .constraints = { + .name = "LDO2", + .min_uV = 1050000, + .max_uV = 3300000, + .always_on = 1, + }, + } +}; + +static struct i2c_board_info __initdata z2_pi2c_board_info[] = { + { + I2C_BOARD_INFO("tps65021", 0x48), + .platform_data = &z2_tps65021_info, + }, +}; + +static void __init z2_pmic_init(void) +{ + pxa27x_set_i2c_power_info(NULL); + i2c_register_board_info(1, ARRAY_AND_SIZE(z2_pi2c_board_info)); +} +#else +static inline void z2_pmic_init(void) {} +#endif + /****************************************************************************** * Machine init ******************************************************************************/ @@ -629,6 +699,7 @@ static void __init z2_init(void) z2_pwm_init(); z2_leds_init(); z2_keys_init(); + z2_pmic_init(); } MACHINE_START(ZIPIT2, "Zipit Z2") -- cgit v1.2.2 From 773108401d883a97dc624acf8c20f71e50a9a28a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 22 Jul 2010 17:47:15 +0200 Subject: [ARM] pxa/z2: Fix flash layout typo Signed-off-by: Marek Vasut --- arch/arm/mach-pxa/z2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/z2.c') diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 07d8bd8c4c61..f0d02288b4ca 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -164,7 +164,7 @@ static struct mtd_partition z2_flash_parts[] = { }, { .name = "U-Boot Environment", .offset = 0x40000, - .size = 0x60000, + .size = 0x20000, }, { .name = "Flash", .offset = 0x60000, -- cgit v1.2.2