From c9d8230e316abb6a480f6bda85edf859896e9ab6 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 5 Jul 2010 16:31:40 +0300 Subject: omap: mux: Remove old mux code All mach-omap2 omaps should now use the new mux code. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index abdf321c2d4..5ddf15664ff 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include -- cgit v1.2.3 From 000d534ed7adf976652921f0bdd1dae14484bce8 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 2 Aug 2010 13:18:02 +0300 Subject: omap: rx51: Set regulator V28 always on It seems that the battery cover sensor in Nokia N900 is powered from the V28 domain. Now if this regulator is disabled it causes that the gpio 160 reads only zero which effectively causes uSD removal detection. Currently the bootloader enabled V28 is kept on but this may change in the future according to comment in drivers/regulator/core.c: regulator_has_full_constraints. Also if there are any consumers on the V28 domain doing regulator_enable regulator_disable cycle the V28 will be disabled after that. Prepare for these by defining the V28 as always_on regulator. Signed-off-by: Jarkko Nikula Cc: Adrian Hunter Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 5ddf15664ff..3d95534215d 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -361,6 +361,7 @@ static struct regulator_init_data rx51_vaux1 = { .name = "V28", .min_uV = 2800000, .max_uV = 2800000, + .always_on = true, /* due battery cover sensor */ .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE -- cgit v1.2.3 From 87581fd4a9c038dc18684b9336f2c59eee1710cc Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 2 Aug 2010 13:18:02 +0300 Subject: omap: rx51: Add platform_data for tlv320aic3x with reset gpionumber Proper operation of the tlv320aic3x audio codec requires that reset sequencing is done in pair with supply voltages when using the regulator framework. Add the codec reset gpio used in Nokia RX51 to tlv320aic3x data. Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 3d95534215d..e350f0bf8cd 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -32,6 +32,8 @@ #include #include +#include + #include "mux.h" #include "hsmmc.h" @@ -707,6 +709,10 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .vio = &rx51_vio, }; +static struct aic3x_pdata rx51_aic3x_data __initdata = { + .gpio_reset = 60, +}; + static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { { I2C_BOARD_INFO("twl5030", 0x48), @@ -719,6 +725,7 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { { I2C_BOARD_INFO("tlv320aic3x", 0x18), + .platform_data = &rx51_aic3x_data, }, }; -- cgit v1.2.3 From 5c7d9bbec6415a00860e4ee482a794c940ba8733 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 2 Aug 2010 13:18:02 +0300 Subject: omap: rx51: Use REGULATOR_SUPPLY macro when initializingregulator consumers There is REGULATOR_SUPPLY macro available for initializing the struct regulator_consumer_supply so use it where applicable (all other supplies than vdds_sdi) as it improves the readability. Signed-off-by: Jarkko Nikula Acked-by: Eduardo Valentin Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 43 +++++++--------------------- 1 file changed, 11 insertions(+), 32 deletions(-) (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e350f0bf8cd..b4c3dd7863a 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -301,48 +301,27 @@ static struct omap2_hsmmc_info mmc[] __initdata = { {} /* Terminator */ }; -static struct regulator_consumer_supply rx51_vmmc1_supply = { - .supply = "vmmc", - .dev_name = "mmci-omap-hs.0", -}; +static struct regulator_consumer_supply rx51_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); -static struct regulator_consumer_supply rx51_vaux3_supply = { - .supply = "vmmc", - .dev_name = "mmci-omap-hs.1", -}; +static struct regulator_consumer_supply rx51_vaux3_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); -static struct regulator_consumer_supply rx51_vsim_supply = { - .supply = "vmmc_aux", - .dev_name = "mmci-omap-hs.1", -}; +static struct regulator_consumer_supply rx51_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { /* tlv320aic3x analog supplies */ - { - .supply = "AVDD", - .dev_name = "2-0018", - }, - { - .supply = "DRVDD", - .dev_name = "2-0018", - }, + REGULATOR_SUPPLY("AVDD", "2-0018"), + REGULATOR_SUPPLY("DRVDD", "2-0018"), /* Keep vmmc as last item. It is not iterated for newer boards */ - { - .supply = "vmmc", - .dev_name = "mmci-omap-hs.1", - }, + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), }; static struct regulator_consumer_supply rx51_vio_supplies[] = { /* tlv320aic3x digital supplies */ - { - .supply = "IOVDD", - .dev_name = "2-0018" - }, - { - .supply = "DVDD", - .dev_name = "2-0018" - }, + REGULATOR_SUPPLY("IOVDD", "2-0018"), + REGULATOR_SUPPLY("DVDD", "2-0018"), }; #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) -- cgit v1.2.3 From 64d066918272db2a851e4884e38f264fd6b3c07b Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 2 Aug 2010 13:18:03 +0300 Subject: omap: rx51: Add supply and data for the tpa6130a2 headphoneamplifier With these and upcoming change to tpa6130a2 driver it's possible to add support for the TPA6130A2 headphone amplifier. Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index b4c3dd7863a..3c3f975520e 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -33,6 +33,7 @@ #include #include +#include #include "mux.h" #include "hsmmc.h" @@ -314,6 +315,8 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { /* tlv320aic3x analog supplies */ REGULATOR_SUPPLY("AVDD", "2-0018"), REGULATOR_SUPPLY("DRVDD", "2-0018"), + /* tpa6130a2 */ + REGULATOR_SUPPLY("Vdd", "2-0060"), /* Keep vmmc as last item. It is not iterated for newer boards */ REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), }; @@ -692,6 +695,11 @@ static struct aic3x_pdata rx51_aic3x_data __initdata = { .gpio_reset = 60, }; +static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = { + .id = TPA6130A2, + .power_gpio = 98, +}; + static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { { I2C_BOARD_INFO("twl5030", 0x48), @@ -706,6 +714,10 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { I2C_BOARD_INFO("tlv320aic3x", 0x18), .platform_data = &rx51_aic3x_data, }, + { + I2C_BOARD_INFO("tpa6130a2", 0x60), + .platform_data = &rx51_tpa6130a2_data, + } }; static int __init rx51_i2c_init(void) -- cgit v1.2.3 From 70b5d7377ec8640d5e5ff8c70da218fc20bef0c2 Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Mon, 2 Aug 2010 13:18:03 +0300 Subject: omap: tsl2563 ALS support for Nokia N900 This commit will enable usage of tsl2563 ambient light sensor on Nokia N900. Signed-off-by: Ameya Palande Signed-off-by: Mathias Nyman Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 3c3f975520e..a3a396ca2d3 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -35,6 +35,8 @@ #include #include +#include <../drivers/staging/iio/light/tsl2563.h> + #include "mux.h" #include "hsmmc.h" @@ -53,6 +55,12 @@ enum { static struct wl12xx_platform_data wl1251_pdata; +#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) +static struct tsl2563_platform_data rx51_tsl2563_platform_data = { + .cover_comp_gain = 16, +}; +#endif + static struct omap2_mcspi_device_config wl1251_mcspi_config = { .turbo_mode = 0, .single_channel = 1, @@ -714,6 +722,12 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { I2C_BOARD_INFO("tlv320aic3x", 0x18), .platform_data = &rx51_aic3x_data, }, +#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) + { + I2C_BOARD_INFO("tsl2563", 0x29), + .platform_data = &rx51_tsl2563_platform_data, + }, +#endif { I2C_BOARD_INFO("tpa6130a2", 0x60), .platform_data = &rx51_tpa6130a2_data, -- cgit v1.2.3