msm7627a: Add support for evaluation board platform
This patch adds support for Evaluation Board (EVB) Platform
with msm 7x27a
Change-Id: I03e31b4d7be800760cc124aec2496bb5c621565b
diff --git a/target/msm7627a/init.c b/target/msm7627a/init.c
index 476df5f..875781d 100644
--- a/target/msm7627a/init.c
+++ b/target/msm7627a/init.c
@@ -47,6 +47,7 @@
#define MSM7X27A_QRD1 3756
#define MSM7X25A_SURF 3772
#define MSM7X25A_FFA 3771
+#define MSM7X27A_EVB 3934
#define LINUX_MACHTYPE MSM7X27A_SURF
@@ -62,6 +63,8 @@
unsigned hw_platform = 0;
unsigned target_msm_id = 0;
+int machine_is_7x27a_evb();
+
/* for these partitions, start will be offset by either what we get from
* smem, or from the above offset if smem is not useful. Also, we should
* probably have smem_ptable code populate our flash_ptable.
@@ -135,9 +138,15 @@
/* Display splash screen if enabled */
#if DISPLAY_SPLASH_SCREEN
- display_init();
- dprintf(SPEW, "Diplay initialized\n");
- display_image_on_screen();
+ /* EVB platform comes with a new display panel, Until
+ * support for new panel is added disable splash screen
+ * for EVB
+ */
+ if (!machine_is_7x27a_evb()) {
+ display_init();
+ dprintf(SPEW, "Diplay initialized\n");
+ display_image_on_screen();
+ }
#endif
if (target_is_emmc_boot()) {
@@ -257,6 +266,9 @@
case 0xB:
hw_platform = MSM7X27A_QRD1;
break;
+ case 0xC:
+ hw_platform = MSM7X27A_EVB;
+ break;
default:
if (target_msm_id == MSM7225A
|| target_msm_id == MSM7625A
@@ -398,3 +410,11 @@
return rc;
}
#endif
+
+int machine_is_7x27a_evb()
+{
+ if (board_machtype() == MSM7X27A_EVB)
+ return 1;
+ else
+ return 0;
+}
diff --git a/target/msm7627a/keypad.c b/target/msm7627a/keypad.c
index 9b16248..386a40a 100644
--- a/target/msm7627a/keypad.c
+++ b/target/msm7627a/keypad.c
@@ -47,8 +47,12 @@
static unsigned int halibut_row_gpios_qrd[] = { 31, 32 };
static unsigned int halibut_col_gpios_qrd[] = { 36, 37 };
+static unsigned int halibut_row_gpios_evb[] = { 31 };
+static unsigned int halibut_col_gpios_evb[] = { 36, 37 };
+
#define KEYMAP_INDEX(row, col) ((row)*ARRAY_SIZE(halibut_col_gpios) + (col))
#define KEYMAP_INDEX_QRD(row, col) ((row)*ARRAY_SIZE(halibut_col_gpios_qrd) + (col))
+#define KEYMAP_INDEX_EVB(row, col) ((row)*ARRAY_SIZE(halibut_col_gpios_evb) + (col))
static const unsigned short halibut_keymap[ARRAY_SIZE(halibut_col_gpios) *
ARRAY_SIZE(halibut_row_gpios)] = {
@@ -91,6 +95,14 @@
[KEYMAP_INDEX_QRD(0, 1)] = KEY_VOLUMEDOWN,
};
+static const unsigned short halibut_keymap_evb[ARRAY_SIZE(halibut_col_gpios_evb)
+ *
+ ARRAY_SIZE
+ (halibut_row_gpios_evb)] = {
+ [KEYMAP_INDEX_EVB(0, 0)] = KEY_VOLUMEUP,
+ [KEYMAP_INDEX_EVB(0, 1)] = KEY_VOLUMEDOWN,
+};
+
static struct gpio_keypad_info halibut_keypad_info_surf = {
.keymap = halibut_keymap,
.output_gpios = halibut_row_gpios,
@@ -113,6 +125,17 @@
.flags = GPIOKPF_DRIVE_INACTIVE,
};
+static struct gpio_keypad_info halibut_keypad_info_evb = {
+ .keymap = halibut_keymap_evb,
+ .output_gpios = halibut_row_gpios_evb,
+ .input_gpios = halibut_col_gpios_evb,
+ .noutputs = ARRAY_SIZE(halibut_row_gpios_evb),
+ .ninputs = ARRAY_SIZE(halibut_col_gpios_evb),
+ .settle_time = 5 /* msec */ ,
+ .poll_time = 20 /* msec */ ,
+ .flags = GPIOKPF_DRIVE_INACTIVE,
+};
+
void keypad_init(void)
{
unsigned int mach_id;
@@ -120,6 +143,8 @@
if (mach_id == LINUX_MACHTYPE_7x27A_QRD)
gpio_keypad_init(&halibut_keypad_info_qrd);
+ else if (machine_is_7x27a_evb())
+ gpio_keypad_init(&halibut_keypad_info_evb);
else
gpio_keypad_init(&halibut_keypad_info_surf);
}