summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinh Nguyen <Dinh.Nguyen@freescale.com>2011-03-22 10:17:45 -0500
committerDinh Nguyen <Dinh.Nguyen@freescale.com>2011-03-22 10:17:45 -0500
commitcb912be86437d400415ea6dd3a0c0bc12526cdab (patch)
tree25f76e116e6c49ee7b4371ae272e1b9ee6b824a1
parent204c15242e0802e8d17dfdf7acc1681cbd445157 (diff)
ENGR00140971 Add support for LVDS & touchscreen on MX53 ARD RevB brd
MX53 ARD Rev.B board uses a different LVDS and touchscreen panel. This patch adds support for the panel with the new touchscreen. Also adds function calls that returns the correct board ID for MX53 ARD Rev.A and Rev.B boards. Signed-off-by: Mahesh Mahadevan <Mahesh.Mahadevan@freescale.com> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
-rw-r--r--arch/arm/mach-mx5/mx53_ard.c35
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h2
2 files changed, 34 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/mx53_ard.c b/arch/arm/mach-mx5/mx53_ard.c
index 0f28942ba317..d37633836c91 100644
--- a/arch/arm/mach-mx5/mx53_ard.c
+++ b/arch/arm/mach-mx5/mx53_ard.c
@@ -733,6 +733,16 @@ static struct pca953x_platform_data mx53_i2c_max7310_platdata = {
.setup = mx53_ard_max7310_setup,
};
+/* Used only for ARD Rev B boards */
+static int p1003_ts_hw_status(void)
+{
+ return gpio_get_value(ARD_TS_INT);
+}
+
+static struct p1003_ts_platform_data p1003_ts_data = {
+ .hw_status = p1003_ts_hw_status,
+};
+
static struct i2c_board_info mxc_i2c1_board_info[] __initdata = {
{
.type = "cs42888",
@@ -1153,9 +1163,12 @@ static void __init mx53_ard_io_init(void)
gpio_request(ARD_FPGA_INT_B, "fpga-int");
gpio_direction_input(ARD_FPGA_INT_B);
- gpio_request(ARD_TS_INT, "ts-int");
- gpio_direction_input(ARD_TS_INT);
- gpio_free(ARD_TS_INT);
+ /* ARD Rev B boards use a different Touchscreen, only for Rev A */
+ if (board_is_mx53_ard_a()) {
+ gpio_request(ARD_TS_INT, "ts-int");
+ gpio_direction_input(ARD_TS_INT);
+ gpio_free(ARD_TS_INT);
+ }
}
/* Config CS1 settings for ethernet controller */
@@ -1254,10 +1267,18 @@ static void __init mxc_board_init(void)
mxc_register_device(&mxc_iim_device, &iim_data);
mxc_register_device(&mxc_pwm1_device, &mxc_pwm1_platform_data);
+ /* Rev B boards use a different LVDS Panel */
+ if (board_is_mx53_ard_b()) {
+ mxc_pwm1_backlight_data.pwm_period_ns = 50000;
+ }
mxc_register_device(&mxc_pwm1_backlight_device,
&mxc_pwm1_backlight_data);
mxc_register_device(&mxc_pwm2_device, &mxc_pwm2_platform_data);
+ /* Rev B boards use a different LVDS Panel */
+ if (board_is_mx53_ard_b()) {
+ mxc_pwm2_backlight_data.pwm_period_ns = 50000;
+ }
mxc_register_device(&mxc_pwm2_backlight_device,
&mxc_pwm2_backlight_data);
@@ -1284,6 +1305,14 @@ static void __init mxc_board_init(void)
ARRAY_SIZE(mxc_dataflash_device));
i2c_register_board_info(1, mxc_i2c1_board_info,
ARRAY_SIZE(mxc_i2c1_board_info));
+
+ /* Rev B boards use a different touchscreen */
+ if (board_is_mx53_ard_b()) {
+ strcpy(mxc_i2c2_board_info[0].type, "p1003_fwv33");
+ mxc_i2c2_board_info[0].addr = 0x41;
+ mxc_i2c2_board_info[0].platform_data = &p1003_ts_data;
+ }
+
i2c_register_board_info(2, mxc_i2c2_board_info,
ARRAY_SIZE(mxc_i2c2_board_info));
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index 31382603913b..9b651b1c7cab 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -95,6 +95,8 @@ extern unsigned int system_rev;
#define board_is_mx53_arm2() (cpu_is_mx53() && board_is_rev(BOARD_REV_2))
#define board_is_mx53_evk_a() (cpu_is_mx53() && board_is_rev(BOARD_REV_1))
#define board_is_mx53_evk_b() (cpu_is_mx53() && board_is_rev(BOARD_REV_3))
+#define board_is_mx53_ard_a() (cpu_is_mx53() && board_is_rev(BOARD_REV_1))
+#define board_is_mx53_ard_b() (cpu_is_mx53() && board_is_rev(BOARD_REV_2))
#endif
#include <mach/mxc.h>