Merge "target: msm8226: Fix spmi lockup issue"
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 23a0736..4b887f0 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -65,7 +65,6 @@
#include "mmc.h"
#include "devinfo.h"
#include "board.h"
-
#include "scm.h"
extern bool target_use_signed_kernel(void);
@@ -124,7 +123,7 @@
/* Assuming unauthorized kernel image by default */
static int auth_kernel_img = 0;
-static device_info device = {DEVICE_MAGIC, 0, 0, 0};
+static device_info device = {DEVICE_MAGIC, 0, 0, 0, 0};
struct atag_ptbl_entry
{
@@ -161,6 +160,7 @@
char charger_screen_enabled[MAX_RSP_SIZE];
char sn_buf[13];
char display_panel_buf[MAX_PANEL_BUF_SIZE];
+char panel_display_mode[MAX_RSP_SIZE];
extern int emmc_recovery_init(void);
@@ -521,6 +521,12 @@
/* Perform target specific cleanup */
target_uninit();
+ /* Turn off splash screen if enabled */
+#if DISPLAY_SPLASH_SCREEN
+ target_display_shutdown();
+#endif
+
+
dprintf(INFO, "booting linux @ %p, ramdisk @ %p (%d), tags/device tree @ %p\n",
entry, ramdisk, ramdisk_size, tags_phys);
@@ -604,6 +610,49 @@
}
}
+static bool check_format_bit()
+{
+ bool ret = false;
+ int index;
+ uint64_t offset;
+ struct boot_selection_info *in = NULL;
+ char *buf = NULL;
+
+ index = partition_get_index("bootselect");
+ if (index == INVALID_PTN)
+ {
+ dprintf(INFO, "Unable to locate /bootselect partition\n");
+ return ret;
+ }
+ offset = partition_get_offset(index);
+ if(!offset)
+ {
+ dprintf(INFO, "partition /bootselect doesn't exist\n");
+ return ret;
+ }
+ buf = (char *) memalign(CACHE_LINE, ROUNDUP(page_size, CACHE_LINE));
+ ASSERT(buf);
+ if (mmc_read(offset, (unsigned int *)buf, page_size))
+ {
+ dprintf(INFO, "mmc read failure /bootselect %d\n", page_size);
+ free(buf);
+ return ret;
+ }
+ in = (struct boot_selection_info *) buf;
+ if ((in->signature == BOOTSELECT_SIGNATURE) &&
+ (in->version == BOOTSELECT_VERSION)) {
+ if ((in->state_info & BOOTSELECT_FORMAT) &&
+ !(in->state_info & BOOTSELECT_FACTORY))
+ ret = true;
+ } else {
+ dprintf(CRITICAL, "Signature: 0x%08x or version: 0x%08x mismatched of /bootselect\n",
+ in->signature, in->version);
+ ASSERT(0);
+ }
+ free(buf);
+ return ret;
+}
+
int boot_linux_from_mmc(void)
{
struct boot_img_hdr *hdr = (void*) buf;
@@ -626,6 +675,9 @@
uint32_t dt_actual;
uint32_t dt_hdr_size;
#endif
+ if (check_format_bit())
+ boot_into_recovery = 1;
+
if (!boot_into_recovery) {
memset(ffbm_mode_string, '\0', sizeof(ffbm_mode_string));
rcode = get_ffbm(ffbm_mode_string, sizeof(ffbm_mode_string));
@@ -1914,6 +1966,16 @@
fastboot_okay("");
}
+void cmd_oem_select_display_panel(const char *arg, void *data, unsigned size)
+{
+ dprintf(INFO, "Selecting display panel %s\n", arg);
+ if (arg)
+ strlcpy(device.display_panel, arg,
+ sizeof(device.display_panel));
+ write_device_info(&device);
+ fastboot_okay("");
+}
+
void cmd_oem_unlock(const char *arg, void *data, unsigned sz)
{
if(!device.is_unlocked)
@@ -1926,13 +1988,15 @@
void cmd_oem_devinfo(const char *arg, void *data, unsigned sz)
{
- char response[64];
+ char response[128];
snprintf(response, sizeof(response), "\tDevice tampered: %s", (device.is_tampered ? "true" : "false"));
fastboot_info(response);
snprintf(response, sizeof(response), "\tDevice unlocked: %s", (device.is_unlocked ? "true" : "false"));
fastboot_info(response);
snprintf(response, sizeof(response), "\tCharger screen enabled: %s", (device.charger_screen_enabled ? "true" : "false"));
fastboot_info(response);
+ snprintf(response, sizeof(response), "\tDisplay panel: %s", (device.display_panel));
+ fastboot_info(response);
fastboot_okay("");
}
@@ -2145,6 +2209,8 @@
cmd_oem_enable_charger_screen);
fastboot_register("oem disable-charger-screen",
cmd_oem_disable_charger_screen);
+ fastboot_register("oem select-display-panel",
+ cmd_oem_select_display_panel);
/* publish variables and their values */
fastboot_publish("product", TARGET(BOARD));
fastboot_publish("kernel", "lk");
@@ -2168,6 +2234,10 @@
device.charger_screen_enabled);
fastboot_publish("charger-screen-enabled",
(const char *) charger_screen_enabled);
+ snprintf(panel_display_mode, MAX_RSP_SIZE, "%s",
+ device.display_panel);
+ fastboot_publish("display-panel",
+ (const char *) panel_display_mode);
}
void aboot_init(const struct app_descriptor *app)
@@ -2191,6 +2261,14 @@
read_device_info(&device);
+ /* Display splash screen if enabled */
+#if DISPLAY_SPLASH_SCREEN
+ dprintf(SPEW, "Display Init: Start\n");
+ target_display_init(device.display_panel);
+ dprintf(SPEW, "Display Init: Done\n");
+#endif
+
+
target_serialno((unsigned char *) sn_buf);
dprintf(SPEW,"serial number: %s\n",sn_buf);
diff --git a/app/aboot/devinfo.h b/app/aboot/devinfo.h
index 558aaf9..a0d8743 100644
--- a/app/aboot/devinfo.h
+++ b/app/aboot/devinfo.h
@@ -1,5 +1,5 @@
/*
- * * Copyright (c) 2011, The Linux Foundation. All rights reserved.
+ * * Copyright (c) 2011,2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -34,6 +34,7 @@
#define DEVICE_MAGIC "ANDROID-BOOT!"
#define DEVICE_MAGIC_SIZE 13
+#define MAX_PANEL_ID_LEN 64
struct device_info
{
@@ -41,6 +42,7 @@
bool is_unlocked;
bool is_tampered;
bool charger_screen_enabled;
+ char display_panel[MAX_PANEL_ID_LEN];
};
#endif
diff --git a/app/aboot/fastboot.c b/app/aboot/fastboot.c
index 67bd760..b4e4922 100644
--- a/app/aboot/fastboot.c
+++ b/app/aboot/fastboot.c
@@ -2,7 +2,7 @@
* Copyright (c) 2009, Google Inc.
* All rights reserved.
*
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -302,24 +302,38 @@
static int usb_write(void *buf, unsigned len)
{
int r;
+ uint32_t xfer;
+ unsigned char *_buf = buf;
+ int count = 0;
if (fastboot_state == STATE_ERROR)
goto oops;
- req->buf = PA((addr_t)buf);
- req->length = len;
- req->complete = req_complete;
- r = udc_request_queue(in, req);
- if (r < 0) {
- dprintf(INFO, "usb_write() queue failed\n");
- goto oops;
+ while (len > 0) {
+ xfer = (len > MAX_USBFS_BULK_SIZE) ? MAX_USBFS_BULK_SIZE : len;
+ req->buf = PA((addr_t)_buf);
+ req->length = xfer;
+ req->complete = req_complete;
+ r = udc_request_queue(in, req);
+ if (r < 0) {
+ dprintf(INFO, "usb_write() queue failed\n");
+ goto oops;
+ }
+ event_wait(&txn_done);
+ if (txn_status < 0) {
+ dprintf(INFO, "usb_write() transaction failed\n");
+ goto oops;
+ }
+
+ count += req->length;
+ _buf += req->length;
+ len -= req->length;
+
+ /* short transfer? */
+ if (req->length != xfer) break;
}
- event_wait(&txn_done);
- if (txn_status < 0) {
- dprintf(INFO, "usb_write() transaction failed\n");
- goto oops;
- }
- return req->length;
+
+ return count;
oops:
fastboot_state = STATE_ERROR;
diff --git a/app/aboot/recovery.h b/app/aboot/recovery.h
index fa034e0..204312b 100644
--- a/app/aboot/recovery.h
+++ b/app/aboot/recovery.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,11 +29,22 @@
#ifndef _BOOTLOADER_RECOVERY_H
#define _BOOTLOADER_RECOVERY_H
-#define UPDATE_MAGIC "MSM-RADIO-UPDATE"
-#define UPDATE_MAGIC_SIZE 16
-#define UPDATE_VERSION 0x00010000
-#define FFBM_MODE_BUF_SIZE 8
+#define UPDATE_MAGIC "MSM-RADIO-UPDATE"
+#define UPDATE_MAGIC_SIZE 16
+#define UPDATE_VERSION 0x00010000
+#define FFBM_MODE_BUF_SIZE 8
+#define BOOTSELECT_SIGNATURE ('B' | ('S' << 8) | ('e' << 16) | ('l' << 24))
+#define BOOTSELECT_VERSION 0x00010001
+#define BOOTSELECT_FORMAT (1 << 31)
+#define BOOTSELECT_FACTORY (1 << 30)
+/* bootselect partition format structure */
+struct boot_selection_info {
+ uint32_t signature; // Contains value BOOTSELECT_SIGNATURE defined above
+ uint32_t version;
+ uint32_t boot_partition_selection; // Decodes which partitions to boot: 0-Windows,1-Android
+ uint32_t state_info; // Contains factory and format bit as definded above
+};
/* Recovery Message */
struct recovery_message {
diff --git a/dev/gcdb/display/gcdb_display.c b/dev/gcdb/display/gcdb_display.c
index 52a6ae7..4a15406 100755
--- a/dev/gcdb/display/gcdb_display.c
+++ b/dev/gcdb/display/gcdb_display.c
@@ -257,11 +257,11 @@
memcpy(dsi_video_mode_phy_db.laneCfg, panel_lane_config, LANE_SIZE);
}
-int gcdb_display_init(uint32_t rev, void *base)
+int gcdb_display_init(const char *panel_name, uint32_t rev, void *base)
{
int ret = NO_ERROR;
- if (!oem_panel_select(&panelstruct, &(panel.panel_info),
+ if (!oem_panel_select(panel_name, &panelstruct, &(panel.panel_info),
&dsi_video_mode_phy_db)) {
dprintf(CRITICAL, "Target panel init not found!\n");
ret = ERR_NOT_SUPPORTED;
diff --git a/dev/gcdb/display/gcdb_display.h b/dev/gcdb/display/gcdb_display.h
index 6259896..b2fb974 100755
--- a/dev/gcdb/display/gcdb_display.h
+++ b/dev/gcdb/display/gcdb_display.h
@@ -58,7 +58,7 @@
struct msm_panel_info *pinfo);
int target_ldo_ctrl(uint8_t enable);
-int gcdb_display_init(uint32_t rev, void *base);
+int gcdb_display_init(const char *panel_name, uint32_t rev, void *base);
void gcdb_display_shutdown();
#endif /*_GCDB_DISPLAY_H_ */
diff --git a/dev/gcdb/display/include/panel_jdi_1080p_video.h b/dev/gcdb/display/include/panel_jdi_1080p_video.h
index e390da4..187d85e 100755
--- a/dev/gcdb/display/include/panel_jdi_1080p_video.h
+++ b/dev/gcdb/display/include/panel_jdi_1080p_video.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -54,7 +54,7 @@
/* Panel resolution */
/*---------------------------------------------------------------------------*/
static struct panel_resolution jdi_1080p_video_panel_res = {
- 1080, 1920, 96, 64, 16, 0, 3, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 1080, 1920, 96, 64, 16, 0, 4, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/*---------------------------------------------------------------------------*/
@@ -149,7 +149,7 @@
/* Panel Timing */
/*---------------------------------------------------------------------------*/
static const uint32_t jdi_1080p_video_timings[] = {
- 0xe1, 0x37, 0x25, 0x00, 0x67, 0x6b, 0x2a, 0x3a, 0x59, 0x03, 0x04, 0x00
+ 0xe7, 0x36, 0x24, 0x00, 0x66, 0x6a, 0x2a, 0x3a, 0x2d, 0x03, 0x04, 0x00
};
diff --git a/dev/gcdb/display/include/panel_nt35590_720p_video.h b/dev/gcdb/display/include/panel_nt35590_720p_video.h
index ce740a7..9dff1a3 100755
--- a/dev/gcdb/display/include/panel_nt35590_720p_video.h
+++ b/dev/gcdb/display/include/panel_nt35590_720p_video.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -54,7 +54,7 @@
/* Panel resolution */
/*---------------------------------------------------------------------------*/
static struct panel_resolution nt35590_720p_video_panel_res = {
- 720, 1280, 140, 164, 8, 0, 6, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 720, 1280, 140, 164, 8, 0, 6, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/*---------------------------------------------------------------------------*/
@@ -2387,475 +2387,488 @@
0x29, 0x00, 0xFF, 0xFF, };
+static char nt35590_720p_video_on_cmd464[] = {
+0x02, 0x00, 0x29, 0xC0,
+0xFF, 0x00, 0xFF, 0xFF, };
+
+
+static char nt35590_720p_video_on_cmd465[] = {
+0x06, 0x00, 0x29, 0xC0,
+0x3B, 0x03, 0x06, 0x03,
+0x02, 0x02, 0xFF, 0xFF, };
+
+
static struct mipi_dsi_cmd nt35590_720p_video_on_command[] = {
-{ 0x8 , nt35590_720p_video_on_cmd0},
-{ 0x8 , nt35590_720p_video_on_cmd1},
-{ 0x8 , nt35590_720p_video_on_cmd2},
-{ 0x8 , nt35590_720p_video_on_cmd3},
-{ 0x8 , nt35590_720p_video_on_cmd4},
-{ 0x8 , nt35590_720p_video_on_cmd5},
-{ 0x8 , nt35590_720p_video_on_cmd6},
-{ 0x8 , nt35590_720p_video_on_cmd7},
-{ 0x8 , nt35590_720p_video_on_cmd8},
-{ 0x8 , nt35590_720p_video_on_cmd9},
-{ 0x8 , nt35590_720p_video_on_cmd10},
-{ 0x8 , nt35590_720p_video_on_cmd11},
-{ 0x8 , nt35590_720p_video_on_cmd12},
-{ 0x8 , nt35590_720p_video_on_cmd13},
-{ 0x8 , nt35590_720p_video_on_cmd14},
-{ 0x8 , nt35590_720p_video_on_cmd15},
-{ 0x8 , nt35590_720p_video_on_cmd16},
-{ 0x8 , nt35590_720p_video_on_cmd17},
-{ 0x8 , nt35590_720p_video_on_cmd18},
-{ 0x8 , nt35590_720p_video_on_cmd19},
-{ 0x8 , nt35590_720p_video_on_cmd20},
-{ 0x8 , nt35590_720p_video_on_cmd21},
-{ 0x8 , nt35590_720p_video_on_cmd22},
-{ 0x8 , nt35590_720p_video_on_cmd23},
-{ 0x8 , nt35590_720p_video_on_cmd24},
-{ 0x8 , nt35590_720p_video_on_cmd25},
-{ 0x8 , nt35590_720p_video_on_cmd26},
-{ 0x8 , nt35590_720p_video_on_cmd27},
-{ 0x8 , nt35590_720p_video_on_cmd28},
-{ 0x8 , nt35590_720p_video_on_cmd29},
-{ 0x8 , nt35590_720p_video_on_cmd30},
-{ 0x8 , nt35590_720p_video_on_cmd31},
-{ 0x8 , nt35590_720p_video_on_cmd32},
-{ 0x8 , nt35590_720p_video_on_cmd33},
-{ 0x8 , nt35590_720p_video_on_cmd34},
-{ 0x8 , nt35590_720p_video_on_cmd35},
-{ 0x8 , nt35590_720p_video_on_cmd36},
-{ 0x8 , nt35590_720p_video_on_cmd37},
-{ 0x8 , nt35590_720p_video_on_cmd38},
-{ 0x8 , nt35590_720p_video_on_cmd39},
-{ 0x8 , nt35590_720p_video_on_cmd40},
-{ 0x8 , nt35590_720p_video_on_cmd41},
-{ 0x8 , nt35590_720p_video_on_cmd42},
-{ 0x8 , nt35590_720p_video_on_cmd43},
-{ 0x8 , nt35590_720p_video_on_cmd44},
-{ 0x8 , nt35590_720p_video_on_cmd45},
-{ 0x8 , nt35590_720p_video_on_cmd46},
-{ 0x8 , nt35590_720p_video_on_cmd47},
-{ 0x8 , nt35590_720p_video_on_cmd48},
-{ 0x8 , nt35590_720p_video_on_cmd49},
-{ 0x8 , nt35590_720p_video_on_cmd50},
-{ 0x8 , nt35590_720p_video_on_cmd51},
-{ 0x8 , nt35590_720p_video_on_cmd52},
-{ 0x8 , nt35590_720p_video_on_cmd53},
-{ 0x8 , nt35590_720p_video_on_cmd54},
-{ 0x8 , nt35590_720p_video_on_cmd55},
-{ 0x8 , nt35590_720p_video_on_cmd56},
-{ 0x8 , nt35590_720p_video_on_cmd57},
-{ 0x8 , nt35590_720p_video_on_cmd58},
-{ 0x8 , nt35590_720p_video_on_cmd59},
-{ 0x8 , nt35590_720p_video_on_cmd60},
-{ 0x8 , nt35590_720p_video_on_cmd61},
-{ 0x8 , nt35590_720p_video_on_cmd62},
-{ 0x8 , nt35590_720p_video_on_cmd63},
-{ 0x8 , nt35590_720p_video_on_cmd64},
-{ 0x8 , nt35590_720p_video_on_cmd65},
-{ 0x8 , nt35590_720p_video_on_cmd66},
-{ 0x8 , nt35590_720p_video_on_cmd67},
-{ 0x8 , nt35590_720p_video_on_cmd68},
-{ 0x8 , nt35590_720p_video_on_cmd69},
-{ 0x8 , nt35590_720p_video_on_cmd70},
-{ 0x8 , nt35590_720p_video_on_cmd71},
-{ 0x8 , nt35590_720p_video_on_cmd72},
-{ 0x8 , nt35590_720p_video_on_cmd73},
-{ 0x8 , nt35590_720p_video_on_cmd74},
-{ 0x8 , nt35590_720p_video_on_cmd75},
-{ 0x8 , nt35590_720p_video_on_cmd76},
-{ 0x8 , nt35590_720p_video_on_cmd77},
-{ 0x8 , nt35590_720p_video_on_cmd78},
-{ 0x8 , nt35590_720p_video_on_cmd79},
-{ 0x8 , nt35590_720p_video_on_cmd80},
-{ 0x8 , nt35590_720p_video_on_cmd81},
-{ 0x8 , nt35590_720p_video_on_cmd82},
-{ 0x8 , nt35590_720p_video_on_cmd83},
-{ 0x8 , nt35590_720p_video_on_cmd84},
-{ 0x8 , nt35590_720p_video_on_cmd85},
-{ 0x8 , nt35590_720p_video_on_cmd86},
-{ 0x8 , nt35590_720p_video_on_cmd87},
-{ 0x8 , nt35590_720p_video_on_cmd88},
-{ 0x8 , nt35590_720p_video_on_cmd89},
-{ 0x8 , nt35590_720p_video_on_cmd90},
-{ 0x8 , nt35590_720p_video_on_cmd91},
-{ 0x8 , nt35590_720p_video_on_cmd92},
-{ 0x8 , nt35590_720p_video_on_cmd93},
-{ 0x8 , nt35590_720p_video_on_cmd94},
-{ 0x8 , nt35590_720p_video_on_cmd95},
-{ 0x8 , nt35590_720p_video_on_cmd96},
-{ 0x8 , nt35590_720p_video_on_cmd97},
-{ 0x8 , nt35590_720p_video_on_cmd98},
-{ 0x8 , nt35590_720p_video_on_cmd99},
-{ 0x8 , nt35590_720p_video_on_cmd100},
-{ 0x8 , nt35590_720p_video_on_cmd101},
-{ 0x8 , nt35590_720p_video_on_cmd102},
-{ 0x8 , nt35590_720p_video_on_cmd103},
-{ 0x8 , nt35590_720p_video_on_cmd104},
-{ 0x8 , nt35590_720p_video_on_cmd105},
-{ 0x8 , nt35590_720p_video_on_cmd106},
-{ 0x8 , nt35590_720p_video_on_cmd107},
-{ 0x8 , nt35590_720p_video_on_cmd108},
-{ 0x8 , nt35590_720p_video_on_cmd109},
-{ 0x8 , nt35590_720p_video_on_cmd110},
-{ 0x8 , nt35590_720p_video_on_cmd111},
-{ 0x8 , nt35590_720p_video_on_cmd112},
-{ 0x8 , nt35590_720p_video_on_cmd113},
-{ 0x8 , nt35590_720p_video_on_cmd114},
-{ 0x8 , nt35590_720p_video_on_cmd115},
-{ 0x8 , nt35590_720p_video_on_cmd116},
-{ 0x8 , nt35590_720p_video_on_cmd117},
-{ 0x8 , nt35590_720p_video_on_cmd118},
-{ 0x8 , nt35590_720p_video_on_cmd119},
-{ 0x8 , nt35590_720p_video_on_cmd120},
-{ 0x8 , nt35590_720p_video_on_cmd121},
-{ 0x8 , nt35590_720p_video_on_cmd122},
-{ 0x8 , nt35590_720p_video_on_cmd123},
-{ 0x8 , nt35590_720p_video_on_cmd124},
-{ 0x8 , nt35590_720p_video_on_cmd125},
-{ 0x8 , nt35590_720p_video_on_cmd126},
-{ 0x8 , nt35590_720p_video_on_cmd127},
-{ 0x8 , nt35590_720p_video_on_cmd128},
-{ 0x8 , nt35590_720p_video_on_cmd129},
-{ 0x8 , nt35590_720p_video_on_cmd130},
-{ 0x8 , nt35590_720p_video_on_cmd131},
-{ 0x8 , nt35590_720p_video_on_cmd132},
-{ 0x8 , nt35590_720p_video_on_cmd133},
-{ 0x8 , nt35590_720p_video_on_cmd134},
-{ 0x8 , nt35590_720p_video_on_cmd135},
-{ 0x8 , nt35590_720p_video_on_cmd136},
-{ 0x8 , nt35590_720p_video_on_cmd137},
-{ 0x8 , nt35590_720p_video_on_cmd138},
-{ 0x8 , nt35590_720p_video_on_cmd139},
-{ 0x8 , nt35590_720p_video_on_cmd140},
-{ 0x8 , nt35590_720p_video_on_cmd141},
-{ 0x8 , nt35590_720p_video_on_cmd142},
-{ 0x8 , nt35590_720p_video_on_cmd143},
-{ 0x8 , nt35590_720p_video_on_cmd144},
-{ 0x8 , nt35590_720p_video_on_cmd145},
-{ 0x8 , nt35590_720p_video_on_cmd146},
-{ 0x8 , nt35590_720p_video_on_cmd147},
-{ 0x8 , nt35590_720p_video_on_cmd148},
-{ 0x8 , nt35590_720p_video_on_cmd149},
-{ 0x8 , nt35590_720p_video_on_cmd150},
-{ 0x8 , nt35590_720p_video_on_cmd151},
-{ 0x8 , nt35590_720p_video_on_cmd152},
-{ 0x8 , nt35590_720p_video_on_cmd153},
-{ 0x8 , nt35590_720p_video_on_cmd154},
-{ 0x8 , nt35590_720p_video_on_cmd155},
-{ 0x8 , nt35590_720p_video_on_cmd156},
-{ 0x8 , nt35590_720p_video_on_cmd157},
-{ 0x8 , nt35590_720p_video_on_cmd158},
-{ 0x8 , nt35590_720p_video_on_cmd159},
-{ 0x8 , nt35590_720p_video_on_cmd160},
-{ 0x8 , nt35590_720p_video_on_cmd161},
-{ 0x8 , nt35590_720p_video_on_cmd162},
-{ 0x8 , nt35590_720p_video_on_cmd163},
-{ 0x8 , nt35590_720p_video_on_cmd164},
-{ 0x8 , nt35590_720p_video_on_cmd165},
-{ 0x8 , nt35590_720p_video_on_cmd166},
-{ 0x8 , nt35590_720p_video_on_cmd167},
-{ 0x8 , nt35590_720p_video_on_cmd168},
-{ 0x8 , nt35590_720p_video_on_cmd169},
-{ 0x8 , nt35590_720p_video_on_cmd170},
-{ 0x8 , nt35590_720p_video_on_cmd171},
-{ 0x8 , nt35590_720p_video_on_cmd172},
-{ 0x8 , nt35590_720p_video_on_cmd173},
-{ 0x8 , nt35590_720p_video_on_cmd174},
-{ 0x8 , nt35590_720p_video_on_cmd175},
-{ 0x8 , nt35590_720p_video_on_cmd176},
-{ 0x8 , nt35590_720p_video_on_cmd177},
-{ 0x8 , nt35590_720p_video_on_cmd178},
-{ 0x8 , nt35590_720p_video_on_cmd179},
-{ 0x8 , nt35590_720p_video_on_cmd180},
-{ 0x8 , nt35590_720p_video_on_cmd181},
-{ 0x8 , nt35590_720p_video_on_cmd182},
-{ 0x8 , nt35590_720p_video_on_cmd183},
-{ 0x8 , nt35590_720p_video_on_cmd184},
-{ 0x8 , nt35590_720p_video_on_cmd185},
-{ 0x8 , nt35590_720p_video_on_cmd186},
-{ 0x8 , nt35590_720p_video_on_cmd187},
-{ 0x8 , nt35590_720p_video_on_cmd188},
-{ 0x8 , nt35590_720p_video_on_cmd189},
-{ 0x8 , nt35590_720p_video_on_cmd190},
-{ 0x8 , nt35590_720p_video_on_cmd191},
-{ 0x8 , nt35590_720p_video_on_cmd192},
-{ 0x8 , nt35590_720p_video_on_cmd193},
-{ 0x8 , nt35590_720p_video_on_cmd194},
-{ 0x8 , nt35590_720p_video_on_cmd195},
-{ 0x8 , nt35590_720p_video_on_cmd196},
-{ 0x8 , nt35590_720p_video_on_cmd197},
-{ 0x8 , nt35590_720p_video_on_cmd198},
-{ 0x8 , nt35590_720p_video_on_cmd199},
-{ 0x8 , nt35590_720p_video_on_cmd200},
-{ 0x8 , nt35590_720p_video_on_cmd201},
-{ 0x8 , nt35590_720p_video_on_cmd202},
-{ 0x8 , nt35590_720p_video_on_cmd203},
-{ 0x8 , nt35590_720p_video_on_cmd204},
-{ 0x8 , nt35590_720p_video_on_cmd205},
-{ 0x8 , nt35590_720p_video_on_cmd206},
-{ 0x8 , nt35590_720p_video_on_cmd207},
-{ 0x8 , nt35590_720p_video_on_cmd208},
-{ 0x8 , nt35590_720p_video_on_cmd209},
-{ 0x8 , nt35590_720p_video_on_cmd210},
-{ 0x8 , nt35590_720p_video_on_cmd211},
-{ 0x8 , nt35590_720p_video_on_cmd212},
-{ 0x8 , nt35590_720p_video_on_cmd213},
-{ 0x8 , nt35590_720p_video_on_cmd214},
-{ 0x8 , nt35590_720p_video_on_cmd215},
-{ 0x8 , nt35590_720p_video_on_cmd216},
-{ 0x8 , nt35590_720p_video_on_cmd217},
-{ 0x8 , nt35590_720p_video_on_cmd218},
-{ 0x8 , nt35590_720p_video_on_cmd219},
-{ 0x8 , nt35590_720p_video_on_cmd220},
-{ 0x8 , nt35590_720p_video_on_cmd221},
-{ 0x8 , nt35590_720p_video_on_cmd222},
-{ 0x8 , nt35590_720p_video_on_cmd223},
-{ 0x8 , nt35590_720p_video_on_cmd224},
-{ 0x8 , nt35590_720p_video_on_cmd225},
-{ 0x8 , nt35590_720p_video_on_cmd226},
-{ 0x8 , nt35590_720p_video_on_cmd227},
-{ 0x8 , nt35590_720p_video_on_cmd228},
-{ 0x8 , nt35590_720p_video_on_cmd229},
-{ 0x8 , nt35590_720p_video_on_cmd230},
-{ 0x8 , nt35590_720p_video_on_cmd231},
-{ 0x8 , nt35590_720p_video_on_cmd232},
-{ 0x8 , nt35590_720p_video_on_cmd233},
-{ 0x8 , nt35590_720p_video_on_cmd234},
-{ 0x8 , nt35590_720p_video_on_cmd235},
-{ 0x8 , nt35590_720p_video_on_cmd236},
-{ 0x8 , nt35590_720p_video_on_cmd237},
-{ 0x8 , nt35590_720p_video_on_cmd238},
-{ 0x8 , nt35590_720p_video_on_cmd239},
-{ 0x8 , nt35590_720p_video_on_cmd240},
-{ 0x8 , nt35590_720p_video_on_cmd241},
-{ 0x8 , nt35590_720p_video_on_cmd242},
-{ 0x8 , nt35590_720p_video_on_cmd243},
-{ 0x8 , nt35590_720p_video_on_cmd244},
-{ 0x8 , nt35590_720p_video_on_cmd245},
-{ 0x8 , nt35590_720p_video_on_cmd246},
-{ 0x8 , nt35590_720p_video_on_cmd247},
-{ 0x8 , nt35590_720p_video_on_cmd248},
-{ 0x8 , nt35590_720p_video_on_cmd249},
-{ 0x8 , nt35590_720p_video_on_cmd250},
-{ 0x8 , nt35590_720p_video_on_cmd251},
-{ 0x8 , nt35590_720p_video_on_cmd252},
-{ 0x8 , nt35590_720p_video_on_cmd253},
-{ 0x8 , nt35590_720p_video_on_cmd254},
-{ 0x8 , nt35590_720p_video_on_cmd255},
-{ 0x8 , nt35590_720p_video_on_cmd256},
-{ 0x8 , nt35590_720p_video_on_cmd257},
-{ 0x8 , nt35590_720p_video_on_cmd258},
-{ 0x8 , nt35590_720p_video_on_cmd259},
-{ 0x8 , nt35590_720p_video_on_cmd260},
-{ 0x8 , nt35590_720p_video_on_cmd261},
-{ 0x8 , nt35590_720p_video_on_cmd262},
-{ 0x8 , nt35590_720p_video_on_cmd263},
-{ 0x8 , nt35590_720p_video_on_cmd264},
-{ 0x8 , nt35590_720p_video_on_cmd265},
-{ 0x8 , nt35590_720p_video_on_cmd266},
-{ 0x8 , nt35590_720p_video_on_cmd267},
-{ 0x8 , nt35590_720p_video_on_cmd268},
-{ 0x8 , nt35590_720p_video_on_cmd269},
-{ 0x8 , nt35590_720p_video_on_cmd270},
-{ 0x8 , nt35590_720p_video_on_cmd271},
-{ 0x8 , nt35590_720p_video_on_cmd272},
-{ 0x8 , nt35590_720p_video_on_cmd273},
-{ 0x8 , nt35590_720p_video_on_cmd274},
-{ 0x8 , nt35590_720p_video_on_cmd275},
-{ 0x8 , nt35590_720p_video_on_cmd276},
-{ 0x8 , nt35590_720p_video_on_cmd277},
-{ 0x8 , nt35590_720p_video_on_cmd278},
-{ 0x8 , nt35590_720p_video_on_cmd279},
-{ 0x8 , nt35590_720p_video_on_cmd280},
-{ 0x8 , nt35590_720p_video_on_cmd281},
-{ 0x8 , nt35590_720p_video_on_cmd282},
-{ 0x8 , nt35590_720p_video_on_cmd283},
-{ 0x8 , nt35590_720p_video_on_cmd284},
-{ 0x8 , nt35590_720p_video_on_cmd285},
-{ 0x8 , nt35590_720p_video_on_cmd286},
-{ 0x8 , nt35590_720p_video_on_cmd287},
-{ 0x8 , nt35590_720p_video_on_cmd288},
-{ 0x8 , nt35590_720p_video_on_cmd289},
-{ 0x8 , nt35590_720p_video_on_cmd290},
-{ 0x8 , nt35590_720p_video_on_cmd291},
-{ 0x8 , nt35590_720p_video_on_cmd292},
-{ 0x8 , nt35590_720p_video_on_cmd293},
-{ 0x8 , nt35590_720p_video_on_cmd294},
-{ 0x8 , nt35590_720p_video_on_cmd295},
-{ 0x8 , nt35590_720p_video_on_cmd296},
-{ 0x8 , nt35590_720p_video_on_cmd297},
-{ 0x8 , nt35590_720p_video_on_cmd298},
-{ 0x8 , nt35590_720p_video_on_cmd299},
-{ 0x8 , nt35590_720p_video_on_cmd300},
-{ 0x8 , nt35590_720p_video_on_cmd301},
-{ 0x8 , nt35590_720p_video_on_cmd302},
-{ 0x8 , nt35590_720p_video_on_cmd303},
-{ 0x8 , nt35590_720p_video_on_cmd304},
-{ 0x8 , nt35590_720p_video_on_cmd305},
-{ 0x8 , nt35590_720p_video_on_cmd306},
-{ 0x8 , nt35590_720p_video_on_cmd307},
-{ 0x8 , nt35590_720p_video_on_cmd308},
-{ 0x8 , nt35590_720p_video_on_cmd309},
-{ 0x8 , nt35590_720p_video_on_cmd310},
-{ 0x8 , nt35590_720p_video_on_cmd311},
-{ 0x8 , nt35590_720p_video_on_cmd312},
-{ 0x8 , nt35590_720p_video_on_cmd313},
-{ 0x8 , nt35590_720p_video_on_cmd314},
-{ 0x8 , nt35590_720p_video_on_cmd315},
-{ 0x8 , nt35590_720p_video_on_cmd316},
-{ 0x8 , nt35590_720p_video_on_cmd317},
-{ 0x8 , nt35590_720p_video_on_cmd318},
-{ 0x8 , nt35590_720p_video_on_cmd319},
-{ 0x8 , nt35590_720p_video_on_cmd320},
-{ 0x8 , nt35590_720p_video_on_cmd321},
-{ 0x8 , nt35590_720p_video_on_cmd322},
-{ 0x8 , nt35590_720p_video_on_cmd323},
-{ 0x8 , nt35590_720p_video_on_cmd324},
-{ 0x8 , nt35590_720p_video_on_cmd325},
-{ 0x8 , nt35590_720p_video_on_cmd326},
-{ 0x8 , nt35590_720p_video_on_cmd327},
-{ 0x8 , nt35590_720p_video_on_cmd328},
-{ 0x8 , nt35590_720p_video_on_cmd329},
-{ 0x8 , nt35590_720p_video_on_cmd330},
-{ 0x8 , nt35590_720p_video_on_cmd331},
-{ 0x8 , nt35590_720p_video_on_cmd332},
-{ 0x8 , nt35590_720p_video_on_cmd333},
-{ 0x8 , nt35590_720p_video_on_cmd334},
-{ 0x8 , nt35590_720p_video_on_cmd335},
-{ 0x8 , nt35590_720p_video_on_cmd336},
-{ 0x8 , nt35590_720p_video_on_cmd337},
-{ 0x8 , nt35590_720p_video_on_cmd338},
-{ 0x8 , nt35590_720p_video_on_cmd339},
-{ 0x8 , nt35590_720p_video_on_cmd340},
-{ 0x8 , nt35590_720p_video_on_cmd341},
-{ 0x8 , nt35590_720p_video_on_cmd342},
-{ 0x8 , nt35590_720p_video_on_cmd343},
-{ 0x8 , nt35590_720p_video_on_cmd344},
-{ 0x8 , nt35590_720p_video_on_cmd345},
-{ 0x8 , nt35590_720p_video_on_cmd346},
-{ 0x8 , nt35590_720p_video_on_cmd347},
-{ 0x8 , nt35590_720p_video_on_cmd348},
-{ 0x8 , nt35590_720p_video_on_cmd349},
-{ 0x8 , nt35590_720p_video_on_cmd350},
-{ 0x8 , nt35590_720p_video_on_cmd351},
-{ 0x8 , nt35590_720p_video_on_cmd352},
-{ 0x8 , nt35590_720p_video_on_cmd353},
-{ 0x8 , nt35590_720p_video_on_cmd354},
-{ 0x8 , nt35590_720p_video_on_cmd355},
-{ 0x8 , nt35590_720p_video_on_cmd356},
-{ 0x8 , nt35590_720p_video_on_cmd357},
-{ 0x8 , nt35590_720p_video_on_cmd358},
-{ 0x8 , nt35590_720p_video_on_cmd359},
-{ 0x8 , nt35590_720p_video_on_cmd360},
-{ 0x8 , nt35590_720p_video_on_cmd361},
-{ 0x8 , nt35590_720p_video_on_cmd362},
-{ 0x8 , nt35590_720p_video_on_cmd363},
-{ 0x8 , nt35590_720p_video_on_cmd364},
-{ 0x8 , nt35590_720p_video_on_cmd365},
-{ 0x8 , nt35590_720p_video_on_cmd366},
-{ 0x8 , nt35590_720p_video_on_cmd367},
-{ 0x8 , nt35590_720p_video_on_cmd368},
-{ 0x8 , nt35590_720p_video_on_cmd369},
-{ 0x8 , nt35590_720p_video_on_cmd370},
-{ 0x8 , nt35590_720p_video_on_cmd371},
-{ 0x8 , nt35590_720p_video_on_cmd372},
-{ 0x8 , nt35590_720p_video_on_cmd373},
-{ 0x8 , nt35590_720p_video_on_cmd374},
-{ 0x8 , nt35590_720p_video_on_cmd375},
-{ 0x8 , nt35590_720p_video_on_cmd376},
-{ 0x8 , nt35590_720p_video_on_cmd377},
-{ 0x8 , nt35590_720p_video_on_cmd378},
-{ 0x8 , nt35590_720p_video_on_cmd379},
-{ 0x8 , nt35590_720p_video_on_cmd380},
-{ 0x8 , nt35590_720p_video_on_cmd381},
-{ 0x8 , nt35590_720p_video_on_cmd382},
-{ 0x8 , nt35590_720p_video_on_cmd383},
-{ 0x8 , nt35590_720p_video_on_cmd384},
-{ 0x8 , nt35590_720p_video_on_cmd385},
-{ 0x8 , nt35590_720p_video_on_cmd386},
-{ 0x8 , nt35590_720p_video_on_cmd387},
-{ 0x8 , nt35590_720p_video_on_cmd388},
-{ 0x8 , nt35590_720p_video_on_cmd389},
-{ 0x8 , nt35590_720p_video_on_cmd390},
-{ 0x8 , nt35590_720p_video_on_cmd391},
-{ 0x8 , nt35590_720p_video_on_cmd392},
-{ 0x8 , nt35590_720p_video_on_cmd393},
-{ 0x8 , nt35590_720p_video_on_cmd394},
-{ 0x8 , nt35590_720p_video_on_cmd395},
-{ 0x8 , nt35590_720p_video_on_cmd396},
-{ 0x8 , nt35590_720p_video_on_cmd397},
-{ 0x8 , nt35590_720p_video_on_cmd398},
-{ 0x8 , nt35590_720p_video_on_cmd399},
-{ 0x8 , nt35590_720p_video_on_cmd400},
-{ 0x8 , nt35590_720p_video_on_cmd401},
-{ 0x8 , nt35590_720p_video_on_cmd402},
-{ 0x8 , nt35590_720p_video_on_cmd403},
-{ 0x8 , nt35590_720p_video_on_cmd404},
-{ 0x8 , nt35590_720p_video_on_cmd405},
-{ 0x8 , nt35590_720p_video_on_cmd406},
-{ 0x8 , nt35590_720p_video_on_cmd407},
-{ 0x8 , nt35590_720p_video_on_cmd408},
-{ 0x8 , nt35590_720p_video_on_cmd409},
-{ 0x8 , nt35590_720p_video_on_cmd410},
-{ 0x8 , nt35590_720p_video_on_cmd411},
-{ 0x8 , nt35590_720p_video_on_cmd412},
-{ 0x8 , nt35590_720p_video_on_cmd413},
-{ 0x8 , nt35590_720p_video_on_cmd414},
-{ 0x8 , nt35590_720p_video_on_cmd415},
-{ 0x8 , nt35590_720p_video_on_cmd416},
-{ 0x8 , nt35590_720p_video_on_cmd417},
-{ 0x8 , nt35590_720p_video_on_cmd418},
-{ 0x8 , nt35590_720p_video_on_cmd419},
-{ 0x8 , nt35590_720p_video_on_cmd420},
-{ 0x8 , nt35590_720p_video_on_cmd421},
-{ 0x8 , nt35590_720p_video_on_cmd422},
-{ 0x8 , nt35590_720p_video_on_cmd423},
-{ 0x8 , nt35590_720p_video_on_cmd424},
-{ 0x8 , nt35590_720p_video_on_cmd425},
-{ 0x8 , nt35590_720p_video_on_cmd426},
-{ 0x8 , nt35590_720p_video_on_cmd427},
-{ 0x8 , nt35590_720p_video_on_cmd428},
-{ 0x8 , nt35590_720p_video_on_cmd429},
-{ 0x8 , nt35590_720p_video_on_cmd430},
-{ 0x8 , nt35590_720p_video_on_cmd431},
-{ 0x8 , nt35590_720p_video_on_cmd432},
-{ 0x8 , nt35590_720p_video_on_cmd433},
-{ 0x8 , nt35590_720p_video_on_cmd434},
-{ 0x8 , nt35590_720p_video_on_cmd435},
-{ 0x8 , nt35590_720p_video_on_cmd436},
-{ 0x8 , nt35590_720p_video_on_cmd437},
-{ 0x8 , nt35590_720p_video_on_cmd438},
-{ 0x8 , nt35590_720p_video_on_cmd439},
-{ 0x8 , nt35590_720p_video_on_cmd440},
-{ 0x8 , nt35590_720p_video_on_cmd441},
-{ 0x8 , nt35590_720p_video_on_cmd442},
-{ 0x8 , nt35590_720p_video_on_cmd443},
-{ 0x8 , nt35590_720p_video_on_cmd444},
-{ 0x8 , nt35590_720p_video_on_cmd445},
-{ 0x8 , nt35590_720p_video_on_cmd446},
-{ 0x8 , nt35590_720p_video_on_cmd447},
-{ 0x8 , nt35590_720p_video_on_cmd448},
-{ 0x8 , nt35590_720p_video_on_cmd449},
-{ 0x8 , nt35590_720p_video_on_cmd450},
-{ 0x8 , nt35590_720p_video_on_cmd451},
-{ 0x8 , nt35590_720p_video_on_cmd452},
-{ 0x8 , nt35590_720p_video_on_cmd453},
-{ 0x8 , nt35590_720p_video_on_cmd454},
-{ 0x8 , nt35590_720p_video_on_cmd455},
-{ 0x8 , nt35590_720p_video_on_cmd456},
-{ 0x8 , nt35590_720p_video_on_cmd457},
-{ 0x8 , nt35590_720p_video_on_cmd458},
-{ 0x8 , nt35590_720p_video_on_cmd459},
-{ 0x8 , nt35590_720p_video_on_cmd460},
-{ 0x8 , nt35590_720p_video_on_cmd461},
-{ 0x8 , nt35590_720p_video_on_cmd462},
-{ 0x8 , nt35590_720p_video_on_cmd463}
+{ 0x8 , nt35590_720p_video_on_cmd0, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd1, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd2, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd3, 0x10},
+{ 0x8 , nt35590_720p_video_on_cmd4, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd5, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd6, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd7, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd8, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd9, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd10, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd11, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd12, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd13, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd14, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd15, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd16, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd17, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd18, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd19, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd20, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd21, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd22, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd23, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd24, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd25, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd26, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd27, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd28, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd29, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd30, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd31, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd32, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd33, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd34, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd35, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd36, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd37, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd38, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd39, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd40, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd41, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd42, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd43, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd44, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd45, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd46, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd47, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd48, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd49, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd50, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd51, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd52, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd53, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd54, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd55, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd56, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd57, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd58, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd59, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd60, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd61, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd62, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd63, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd64, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd65, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd66, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd67, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd68, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd69, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd70, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd71, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd72, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd73, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd74, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd75, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd76, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd77, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd78, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd79, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd80, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd81, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd82, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd83, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd84, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd85, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd86, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd87, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd88, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd89, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd90, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd91, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd92, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd93, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd94, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd95, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd96, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd97, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd98, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd99, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd100, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd101, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd102, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd103, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd104, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd105, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd106, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd107, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd108, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd109, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd110, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd111, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd112, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd113, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd114, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd115, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd116, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd117, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd118, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd119, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd120, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd121, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd122, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd123, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd124, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd125, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd126, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd127, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd128, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd129, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd130, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd131, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd132, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd133, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd134, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd135, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd136, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd137, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd138, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd139, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd140, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd141, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd142, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd143, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd144, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd145, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd146, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd147, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd148, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd149, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd150, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd151, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd152, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd153, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd154, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd155, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd156, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd157, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd158, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd159, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd160, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd161, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd162, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd163, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd164, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd165, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd166, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd167, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd168, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd169, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd170, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd171, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd172, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd173, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd174, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd175, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd176, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd177, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd178, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd179, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd180, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd181, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd182, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd183, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd184, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd185, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd186, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd187, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd188, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd189, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd190, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd191, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd192, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd193, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd194, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd195, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd196, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd197, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd198, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd199, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd200, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd201, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd202, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd203, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd204, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd205, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd206, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd207, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd208, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd209, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd210, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd211, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd212, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd213, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd214, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd215, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd216, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd217, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd218, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd219, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd220, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd221, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd222, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd223, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd224, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd225, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd226, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd227, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd228, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd229, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd230, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd231, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd232, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd233, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd234, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd235, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd236, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd237, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd238, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd239, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd240, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd241, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd242, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd243, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd244, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd245, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd246, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd247, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd248, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd249, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd250, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd251, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd252, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd253, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd254, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd255, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd256, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd257, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd258, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd259, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd260, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd261, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd262, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd263, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd264, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd265, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd266, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd267, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd268, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd269, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd270, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd271, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd272, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd273, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd274, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd275, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd276, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd277, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd278, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd279, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd280, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd281, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd282, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd283, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd284, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd285, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd286, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd287, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd288, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd289, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd290, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd291, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd292, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd293, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd294, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd295, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd296, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd297, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd298, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd299, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd300, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd301, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd302, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd303, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd304, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd305, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd306, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd307, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd308, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd309, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd310, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd311, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd312, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd313, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd314, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd315, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd316, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd317, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd318, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd319, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd320, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd321, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd322, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd323, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd324, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd325, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd326, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd327, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd328, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd329, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd330, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd331, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd332, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd333, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd334, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd335, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd336, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd337, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd338, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd339, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd340, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd341, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd342, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd343, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd344, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd345, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd346, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd347, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd348, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd349, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd350, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd351, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd352, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd353, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd354, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd355, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd356, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd357, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd358, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd359, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd360, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd361, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd362, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd363, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd364, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd365, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd366, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd367, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd368, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd369, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd370, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd371, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd372, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd373, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd374, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd375, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd376, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd377, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd378, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd379, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd380, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd381, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd382, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd383, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd384, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd385, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd386, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd387, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd388, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd389, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd390, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd391, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd392, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd393, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd394, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd395, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd396, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd397, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd398, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd399, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd400, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd401, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd402, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd403, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd404, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd405, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd406, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd407, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd408, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd409, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd410, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd411, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd412, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd413, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd414, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd415, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd416, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd417, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd418, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd419, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd420, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd421, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd422, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd423, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd424, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd425, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd426, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd427, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd428, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd429, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd430, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd431, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd432, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd433, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd434, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd435, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd436, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd437, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd438, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd439, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd440, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd441, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd442, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd443, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd444, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd445, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd446, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd447, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd448, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd449, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd450, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd451, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd452, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd453, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd454, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd455, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd456, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd457, 0x64},
+{ 0x8 , nt35590_720p_video_on_cmd458, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd459, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd460, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd461, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd462, 0x00},
+{ 0x8 , nt35590_720p_video_on_cmd463, 0x78},
+{ 0x8 , nt35590_720p_video_on_cmd464, 0x00},
+{ 0xc , nt35590_720p_video_on_cmd465, 0x00}
};
-#define NT35590_720P_VIDEO_ON_COMMAND 464
+#define NT35590_720P_VIDEO_ON_COMMAND 466
static char nt35590_720p_videooff_cmd0[] = {
@@ -2869,8 +2882,8 @@
static struct mipi_dsi_cmd nt35590_720p_video_off_command[] = {
-{ 0x4 , nt35590_720p_videooff_cmd0},
-{ 0x4 , nt35590_720p_videooff_cmd1}
+{ 0x4 , nt35590_720p_videooff_cmd0, 0x32},
+{ 0x4 , nt35590_720p_videooff_cmd1, 0x78}
};
#define NT35590_720P_VIDEO_OFF_COMMAND 2
diff --git a/dev/gcdb/display/panel_display.c b/dev/gcdb/display/panel_display.c
index 4651051..e34d966 100644
--- a/dev/gcdb/display/panel_display.c
+++ b/dev/gcdb/display/panel_display.c
@@ -38,6 +38,7 @@
#include <err.h>
#include <reg.h>
#include <mdp5.h>
+#include <string.h>
/*---------------------------------------------------------------------------*/
@@ -325,3 +326,28 @@
return ret;
}
+
+int32_t panel_name_to_id(struct panel_list supp_panels[],
+ uint32_t supp_panels_size,
+ const char *panel_name)
+{
+ uint32_t i;
+ int32_t panel_id = ERR_NOT_FOUND;
+
+ if (!panel_name) {
+ dprintf(CRITICAL, "Invalid panel name\n");
+ return panel_id;
+ }
+
+ /* Remove any leading whitespaces */
+ panel_name += strspn(panel_name, " ");
+ for (i = 0; i < supp_panels_size; i++) {
+ if (!strncmp(panel_name, supp_panels[i].name,
+ MAX_PANEL_ID_LEN)) {
+ panel_id = supp_panels[i].id;
+ break;
+ }
+ }
+
+ return panel_id;
+}
diff --git a/dev/gcdb/display/panel_display.h b/dev/gcdb/display/panel_display.h
index d805715..676bd69 100755
--- a/dev/gcdb/display/panel_display.h
+++ b/dev/gcdb/display/panel_display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,6 +44,8 @@
#define DUAL_PIPE_FLAG 0x2
#define PIPE_SWAP_FLAG 0x4
#define SPLIT_DISPLAY_FLAG 0x8
+
+#define MAX_PANEL_ID_LEN 64
/*---------------------------------------------------------------------------*/
/* struct definition */
/*---------------------------------------------------------------------------*/
@@ -60,6 +62,10 @@
struct backlight *backlightinfo;
};
+struct panel_list {
+ char name[MAX_PANEL_ID_LEN];
+ uint32_t id;
+};
/*---------------------------------------------------------------------------*/
/* API */
@@ -79,4 +85,7 @@
int oem_panel_on();
int oem_panel_off();
+/* OEM support API */
+int32_t panel_name_to_id(struct panel_list supp_panels[],
+ uint32_t supp_panels_size, const char *panel_name);
#endif /*_PLATFORM_DISPLAY_H_ */
diff --git a/dev/pmic/pm8x41/include/pm8x41.h b/dev/pmic/pm8x41/include/pm8x41.h
index 82d3c1d..512657f 100644
--- a/dev/pmic/pm8x41/include/pm8x41.h
+++ b/dev/pmic/pm8x41/include/pm8x41.h
@@ -201,8 +201,10 @@
int pm8x41_ldo_control(struct pm8x41_ldo *ldo, uint8_t enable);
uint8_t pm8x41_get_pmic_rev();
uint8_t pm8x41_get_pon_reason();
+uint32_t pm8x41_get_pwrkey_is_pressed();
void pm8x41_config_output_mpp(struct pm8x41_mpp *mpp);
void pm8x41_enable_mpp(struct pm8x41_mpp *mpp, enum mpp_en_ctl enable);
uint8_t pm8x41_get_is_cold_boot();
void pm8x41_diff_clock_ctrl(uint8_t enable);
+void pm8x41_clear_pmic_watchdog(void);
#endif
diff --git a/dev/pmic/pm8x41/include/pm8x41_hw.h b/dev/pmic/pm8x41/include/pm8x41_hw.h
index 7664f37..a1c2e6d 100644
--- a/dev/pmic/pm8x41/include/pm8x41_hw.h
+++ b/dev/pmic/pm8x41/include/pm8x41_hw.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -78,9 +78,11 @@
#define PON_RESIN_N_RESET_S2_CTL 0x846 /* bit 7: S2_RESET_EN, bit 0:3 : RESET_TYPE */
#define PON_PS_HOLD_RESET_CTL 0x85A /* bit 7: S2_RESET_EN, bit 0:3 : RESET_TYPE */
#define PON_PS_HOLD_RESET_CTL2 0x85B
+#define PMIC_WD_RESET_S2_CTL2 0x857
/* PON Peripheral register bit values */
#define RESIN_ON_INT_BIT 1
+#define KPDPWR_ON_INT_BIT 0
#define RESIN_BARK_INT_BIT 4
#define S2_RESET_EN_BIT 7
diff --git a/dev/pmic/pm8x41/include/pm_vib.h b/dev/pmic/pm8x41/include/pm_vib.h
new file mode 100644
index 0000000..9b10327
--- /dev/null
+++ b/dev/pmic/pm8x41/include/pm_vib.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef __DEV_PMIC_VIB_VIBRATOR_H
+#define __DEV_PMIC_VIB_VIBRATOR_H
+
+#define QPNP_VIB_EN_CTL 0x1c046
+#define QPNP_VIB_VTG_CTL 0x1c041
+#define QPNP_VIB_VTG_SET_MASK 0x1F
+#define QPNP_VIB_DEFAULT_VTG_LVL 22
+
+void pm_vib_turn_on(void);
+void pm_vib_turn_off(void);
+#endif/* __DEV_PMIC_VIB_VIBRATOR_H */
diff --git a/dev/pmic/pm8x41/pm8x41.c b/dev/pmic/pm8x41/pm8x41.c
index 4ea7643..035c442 100644
--- a/dev/pmic/pm8x41/pm8x41.c
+++ b/dev/pmic/pm8x41/pm8x41.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -219,6 +219,19 @@
return (rt_sts & BIT(RESIN_ON_INT_BIT));
}
+/* Return 1 if power key is pressed */
+uint32_t pm8x41_get_pwrkey_is_pressed()
+{
+ uint8_t pwr_sts = 0;
+
+ pwr_sts = REG_READ(PON_INT_RT_STS);
+
+ if (pwr_sts & BIT(KPDPWR_ON_INT_BIT))
+ return 1;
+ else
+ return 0;
+}
+
void pm8x41_v2_reset_configure(uint8_t reset_type)
{
uint8_t val;
@@ -461,3 +474,8 @@
return batt_is_broken;
}
+
+void pm8x41_clear_pmic_watchdog(void)
+{
+ pm8x41_reg_write(PMIC_WD_RESET_S2_CTL2, 0x0);
+}
diff --git a/dev/pmic/pm8x41/pm8x41_vib.c b/dev/pmic/pm8x41/pm8x41_vib.c
new file mode 100644
index 0000000..7dbba77
--- /dev/null
+++ b/dev/pmic/pm8x41/pm8x41_vib.c
@@ -0,0 +1,60 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <bits.h>
+#include <debug.h>
+#include <reg.h>
+#include <pm8x41.h>
+#include <pm_vib.h>
+
+#define QPNP_VIB_EN BIT(7)
+
+/* Turn on vibrator */
+void pm_vib_turn_on(void)
+{
+ uint8_t val;
+
+ val = pm8x41_reg_read(QPNP_VIB_VTG_CTL);
+ val &= ~QPNP_VIB_VTG_SET_MASK;
+ val |= (QPNP_VIB_DEFAULT_VTG_LVL & QPNP_VIB_VTG_SET_MASK);
+ pm8x41_reg_write(QPNP_VIB_VTG_CTL, val);
+
+ val = pm8x41_reg_read(QPNP_VIB_EN_CTL);
+ val |= QPNP_VIB_EN;
+ pm8x41_reg_write(QPNP_VIB_EN_CTL, val);
+}
+
+/* Turn off vibrator */
+void pm_vib_turn_off(void)
+{
+ uint8_t val;
+
+ val = pm8x41_reg_read(QPNP_VIB_EN_CTL);
+ val &= ~QPNP_VIB_EN;
+ pm8x41_reg_write(QPNP_VIB_EN_CTL, val);
+}
diff --git a/dev/pmic/pm8x41/rules.mk b/dev/pmic/pm8x41/rules.mk
index 1cecf27..3713a4e 100644
--- a/dev/pmic/pm8x41/rules.mk
+++ b/dev/pmic/pm8x41/rules.mk
@@ -6,3 +6,8 @@
$(LOCAL_DIR)/pm8x41.o \
$(LOCAL_DIR)/pm8x41_adc.o \
$(LOCAL_DIR)/pm8x41_wled.o
+
+ifeq ($(ENABLE_PON_VIB_SUPPORT),true)
+OBJS += \
+ $(LOCAL_DIR)/pm8x41_vib.o
+endif
diff --git a/dev/vib/include/vibrator.h b/dev/vib/include/vibrator.h
new file mode 100644
index 0000000..d6fb8bf
--- /dev/null
+++ b/dev/vib/include/vibrator.h
@@ -0,0 +1,37 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef __DEV_VIB_VIBRATOR_H
+#define __DEV_VIB_VIBRATOR_H
+
+#define VIB_TIMER_DEFAULT_TIMEOUT 250
+
+void vib_turn_on(void);
+void vib_turn_off(void);
+void vib_timed_turn_on(const uint32_t);
+void wait_vib_timeout(void);
+#endif /* __DEV_VIB_VIBRATOR_H */
diff --git a/dev/vib/rules.mk b/dev/vib/rules.mk
new file mode 100644
index 0000000..e9e1d10
--- /dev/null
+++ b/dev/vib/rules.mk
@@ -0,0 +1,6 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+INCLUDES += -I$(LOCAL_DIR)/include
+
+OBJS += \
+ $(LOCAL_DIR)/vibrator.o
diff --git a/dev/vib/vibrator.c b/dev/vib/vibrator.c
new file mode 100644
index 0000000..e8cb8c7
--- /dev/null
+++ b/dev/vib/vibrator.c
@@ -0,0 +1,83 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <debug.h>
+#include <reg.h>
+#include <stdlib.h>
+#include <kernel/timer.h>
+#include <platform/timer.h>
+#include <vibrator.h>
+#include <pm_vib.h>
+
+#define CHECK_VIB_TIMER_FREQUENCY 50
+
+static struct timer vib_timer;
+static uint32_t vib_timeout;
+
+/* Function to turn on vibrator */
+void vib_turn_on()
+{
+ pm_vib_turn_on();
+}
+
+/* Function to turn off vibrator */
+void vib_turn_off()
+{
+ pm_vib_turn_off();
+}
+
+/* Function to turn off vibrator when the vib_timer is expired. */
+static enum handler_return vib_timer_func(struct timer *v_timer, void *arg)
+{
+ timer_cancel(&vib_timer);
+ vib_turn_off();
+ vib_timeout=1;
+
+ return INT_RESCHEDULE;
+}
+
+/*
+ * Function to turn on vibrator.
+ * vibrate_time - the time of phone vibrate.
+ */
+void vib_timed_turn_on(const uint32_t vibrate_time)
+{
+ vib_turn_on();
+ vib_timeout=0;
+ timer_initialize(&vib_timer);
+ timer_set_oneshot(&vib_timer, vibrate_time, vib_timer_func, NULL);
+}
+
+/* Wait for vibrator timer expired */
+void wait_vib_timeout(void)
+{
+ while (!vib_timeout) {
+ /* every 50ms to check if the vibrator timer is timeout*/
+ thread_sleep(CHECK_VIB_TIMER_FREQUENCY);
+ }
+}
diff --git a/include/dev/udc.h b/include/dev/udc.h
index 0dd1f86..aa1aadd 100644
--- a/include/dev/udc.h
+++ b/include/dev/udc.h
@@ -34,7 +34,7 @@
struct udc_request {
void *buf;
unsigned length;
- void (*complete)(struct udc_request *req, unsigned actual, int status);
+ void (*complete)();
void *context;
};
diff --git a/include/target.h b/include/target.h
index 45f1605..dfd5521 100644
--- a/include/target.h
+++ b/include/target.h
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2008 Travis Geiselbrecht
*
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
@@ -51,5 +51,6 @@
struct mmc_device *target_mmc_device();
bool target_display_panel_node(char *pbuf, uint16_t buf_size);
-
+void target_display_init(const char *panel_name);
+void target_display_shutdown(void);
#endif
diff --git a/platform/apq8084/include/platform/iomap.h b/platform/apq8084/include/platform/iomap.h
index b7e3eda..6e1e38b 100644
--- a/platform/apq8084/include/platform/iomap.h
+++ b/platform/apq8084/include/platform/iomap.h
@@ -183,7 +183,7 @@
#define INT_CTRL 0x110
#define CMD_MODE_DMA_SW_TRIGGER 0x090
-#define EOT_PACKET_CTRL 0x0C8
+#define EOT_PACKET_CTRL 0x0CC
#define MISR_CMD_CTRL 0x0A0
#define MISR_VIDEO_CTRL 0x0A4
#define VIDEO_MODE_CTRL 0x010
diff --git a/platform/msm8226/include/platform/iomap.h b/platform/msm8226/include/platform/iomap.h
index 1f1b335..5b537e8 100644
--- a/platform/msm8226/include/platform/iomap.h
+++ b/platform/msm8226/include/platform/iomap.h
@@ -202,7 +202,7 @@
#define INT_CTRL 0x110
#define CMD_MODE_DMA_SW_TRIGGER 0x090
-#define EOT_PACKET_CTRL 0x0C8
+#define EOT_PACKET_CTRL 0x0CC
#define MISR_CMD_CTRL 0x0A0
#define MISR_VIDEO_CTRL 0x0A4
#define VIDEO_MODE_CTRL 0x010
diff --git a/platform/msm8974/include/platform/iomap.h b/platform/msm8974/include/platform/iomap.h
index 5c9d7dc..182f454 100644
--- a/platform/msm8974/include/platform/iomap.h
+++ b/platform/msm8974/include/platform/iomap.h
@@ -256,7 +256,7 @@
#define INT_CTRL 0x110
#define CMD_MODE_DMA_SW_TRIGGER 0x090
-#define EOT_PACKET_CTRL 0x0C8
+#define EOT_PACKET_CTRL 0x0CC
#define MISR_CMD_CTRL 0x0A0
#define MISR_VIDEO_CTRL 0x0A4
#define VIDEO_MODE_CTRL 0x010
diff --git a/platform/msm_shared/board.c b/platform/msm_shared/board.c
index 3e93888..5591ecd 100644
--- a/platform/msm_shared/board.c
+++ b/platform/msm_shared/board.c
@@ -88,7 +88,7 @@
board.pmic_info[0].pmic_type = board_info_v7.pmic_type;
board.pmic_info[0].pmic_version = board_info_v7.pmic_version;
}
- else if (format == 8)
+ else if (format == 8 || format == 9)
{
board_info_len = sizeof(board_info_v8);
diff --git a/platform/msm_shared/crypto5_eng.c b/platform/msm_shared/crypto5_eng.c
index 3fecd61..17fbf88 100644
--- a/platform/msm_shared/crypto5_eng.c
+++ b/platform/msm_shared/crypto5_eng.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -348,14 +348,21 @@
void *ctx_ptr,
crypto_auth_alg_type auth_alg)
{
- crypto_SHA256_ctx *sha256_ctx = (crypto_SHA256_ctx *) ctx_ptr;
- uint32_t i = 0;
- uint32_t iv_len = SHA256_INIT_VECTOR_SIZE;
- uint32_t *auth_iv = sha256_ctx->auth_iv;
- uint32_t seg_cfg_val;
- uint32_t total_bytes_to_write = sha256_ctx->bytes_to_write;
- uint32_t bytes_to_write = total_bytes_to_write;
- uint32_t burst_mask;
+ crypto_SHA256_ctx *sha256_ctx = (crypto_SHA256_ctx *) ctx_ptr;
+ crypto_SHA1_ctx *sha1_ctx = (crypto_SHA1_ctx *) ctx_ptr;
+ uint32_t i = 0;
+ uint32_t iv_len = 0;
+ uint32_t *auth_iv = sha1_ctx->auth_iv;
+ uint32_t seg_cfg_val;
+
+ if(auth_alg == CRYPTO_AUTH_ALG_SHA1)
+ {
+ iv_len = SHA1_INIT_VECTOR_SIZE;
+ }
+ else if(auth_alg == CRYPTO_AUTH_ALG_SHA256)
+ {
+ iv_len = SHA256_INIT_VECTOR_SIZE;
+ }
seg_cfg_val = crypto5_get_sha_cfg(ctx_ptr, auth_alg);
@@ -368,7 +375,9 @@
/* Initialize CE pointers. */
REG_WRITE_QUEUE_INIT(dev);
- REG_WRITE_QUEUE(dev, CRYPTO_AUTH_SEG_CFG(dev->base), seg_cfg_val);
+ /* For authentication operation set the encryption cfg reg to 0 as per HPG */
+ REG_WRITE_QUEUE(dev, CRYPTO_ENCR_SEG_CFG(dev->base), 0);
+ REG_WRITE_QUEUE(dev, CRYPTO_AUTH_SEG_CFG(dev->base), seg_cfg_val);
for (i = 0; i < iv_len; i++)
{
@@ -378,31 +387,77 @@
REG_WRITE_QUEUE(dev, CRYPTO_AUTH_IVn(dev->base, i), (*(auth_iv + i)));
}
- /* Check if the transfer length is a 8 beat burst multiple. */
- burst_mask = CRYPTO_BURST_LEN - 1;
- if (bytes_to_write & burst_mask)
- {
- /* Add trailer to make it a burst multiple. */
- total_bytes_to_write = (bytes_to_write + burst_mask) & (~burst_mask);
- }
-
- sha256_ctx->bytes_to_write = total_bytes_to_write;
-
/* Typecast with crypto_SHA1_ctx because offset of auth_bytecnt
* in both crypto_SHA1_ctx and crypto_SHA256_ctx are same.
*/
- REG_WRITE_QUEUE(dev, CRYPTO_AUTH_BYTECNTn(dev->base, 0), ((crypto_SHA1_ctx *) ctx_ptr)->auth_bytecnt[0]);
- REG_WRITE_QUEUE(dev, CRYPTO_AUTH_BYTECNTn(dev->base, 1), ((crypto_SHA1_ctx *) ctx_ptr)->auth_bytecnt[1]);
+ REG_WRITE_QUEUE(dev, CRYPTO_AUTH_BYTECNTn(dev->base, 0), ((crypto_SHA1_ctx *) ctx_ptr)->auth_bytecnt[0]);
+ REG_WRITE_QUEUE(dev, CRYPTO_AUTH_BYTECNTn(dev->base, 1), ((crypto_SHA1_ctx *) ctx_ptr)->auth_bytecnt[1]);
+}
- /* Assume no header, always. */
- REG_WRITE_QUEUE(dev, CRYPTO_AUTH_SEG_START(dev->base), 0);
+/* Function: crypto5_set_auth_cfg
+ * Arg : dev, ptr to data buffer, buffer_size, burst_mask for alignment
+ * Return : aligned buffer incase of unaligned data_ptr and total no. of bytes
+ * passed to crypto HW(includes header and trailer size).
+ * Flow : If data buffer is aligned, we just configure the crypto auth
+ * registers for start, size of data etc. If buffer is unaligned
+ * we align it to burst(64-byte) boundary and also make the no. of
+ * bytes a multiple of 64 for bam and then configure the registers
+ * for header/trailer settings.
+ */
- REG_WRITE_QUEUE(dev, CRYPTO_AUTH_SEG_SIZE(dev->base), bytes_to_write);
- REG_WRITE_QUEUE(dev, CRYPTO_SEG_SIZE(dev->base), total_bytes_to_write);
- REG_WRITE_QUEUE(dev, CRYPTO_GOPROC(dev->base), GOPROC_GO);
+static void crypto5_set_auth_cfg(struct crypto_dev *dev, uint8_t **buffer,
+ uint8_t *data_ptr,
+ uint32_t burst_mask,
+ uint32_t bytes_to_write,
+ uint32_t *total_bytes_to_write)
+{
+ uint32_t minor_ver = 0;
+ uint32_t auth_seg_start = 0;
+ /* Bits 23:16 - minor version */
+ minor_ver = (readl(CRYPTO_VERSION(dev->base)) & 0x00FF0000) >> 16;
+
+ /* A H/W bug on Crypto 5.0.0 enforces a rule that the desc lengths must
+ * be burst aligned. Here we use the header/trailer crypto register settings.
+ * buffer : The previous 64 byte aligned address for data_ptr.
+ * CRYPTO_AUTH_SEG_START : Number of bytes to skip to reach the address data_ptr.
+ * CRYPTO_AUTH_SEG_SIZE : Number of bytes to be sent to crypto HW.
+ * CRYPTO_SEG_SIZE : CRYPTO_AUTH_SEG_START + CRYPTO_AUTH_SEG_SIZE.
+ * Function: We pick a previous 64 byte aligned address buffer, and tell crypto to
+ * skip (data_ptr - buffer) number of bytes.
+ * This bug is fixed in 5.1.0 onwards.*/
+
+ if(minor_ver == 0)
+ {
+ if ((uint32_t) data_ptr & (CRYPTO_BURST_LEN - 1))
+ {
+ dprintf(CRITICAL, "Data start not aligned at burst length.\n");
+
+ *buffer = (uint8_t *)ROUNDDOWN((uint32_t)data_ptr, CRYPTO_BURST_LEN);
+
+ /* Header & Trailer */
+ *total_bytes_to_write = ((bytes_to_write +(data_ptr - *buffer) + burst_mask) & (~burst_mask));
+
+ auth_seg_start = (data_ptr - *buffer);
+ }
+ else
+ {
+ /* No header */
+ /* Add trailer to make it a burst multiple as 5.0.x HW mandates data to be a multiple of 64. */
+ *total_bytes_to_write = (bytes_to_write + burst_mask) & (~burst_mask);
+ }
+ }
+ else
+ {
+ /* No header. 5.1 crypto HW doesnt require alignment as partial reads and writes are possible*/
+ *total_bytes_to_write = bytes_to_write;
+ }
+
+ REG_WRITE_QUEUE(dev, CRYPTO_AUTH_SEG_START(dev->base), auth_seg_start);
+ REG_WRITE_QUEUE(dev, CRYPTO_AUTH_SEG_SIZE(dev->base), bytes_to_write);
+ REG_WRITE_QUEUE(dev, CRYPTO_SEG_SIZE(dev->base), *total_bytes_to_write);
+ REG_WRITE_QUEUE(dev, CRYPTO_GOPROC(dev->base), GOPROC_GO);
REG_WRITE_QUEUE_DONE(dev, BAM_DESC_LOCK_FLAG | BAM_DESC_INT_FLAG);
-
REG_WRITE_EXEC(&dev->bam, 1, CRYPTO_WRITE_PIPE_INDEX);
}
@@ -414,19 +469,23 @@
crypto_SHA256_ctx *sha256_ctx = (crypto_SHA256_ctx *) ctx_ptr;
uint32_t wr_flags = BAM_DESC_NWD_FLAG | BAM_DESC_INT_FLAG | BAM_DESC_EOT_FLAG;
uint32_t ret_status;
+ uint8_t *buffer = NULL;
+ uint32_t total_bytes_to_write = 0;
- /* A H/W bug on Crypto 5.0.0 enforces a rule that the desc lengths must be burst aligned. */
- if ((uint32_t) data_ptr & (CRYPTO_BURST_LEN - 1))
+ crypto5_set_auth_cfg(dev, &buffer, data_ptr, CRYPTO_BURST_LEN - 1, sha256_ctx->bytes_to_write,
+ &total_bytes_to_write);
+
+ if(buffer)
{
- dprintf(CRITICAL, "Crypto send data failed\n");
- dprintf(CRITICAL, "Data start not aligned at burst length.\n");
- ret_status = CRYPTO_ERR_FAIL;
- goto CRYPTO_SEND_DATA_ERR;
+ arch_clean_invalidate_cache_range((addr_t) buffer, total_bytes_to_write);
+
+ bam_status = ADD_WRITE_DESC(&dev->bam, buffer, total_bytes_to_write, wr_flags);
}
-
- arch_clean_invalidate_cache_range((addr_t) data_ptr, sha256_ctx->bytes_to_write);
-
- bam_status = ADD_WRITE_DESC(&dev->bam, data_ptr, sha256_ctx->bytes_to_write, wr_flags);
+ else
+ {
+ arch_clean_invalidate_cache_range((addr_t) data_ptr, total_bytes_to_write);
+ bam_status = ADD_WRITE_DESC(&dev->bam, data_ptr, total_bytes_to_write, wr_flags);
+ }
if (bam_status)
{
diff --git a/platform/msm_shared/debug.c b/platform/msm_shared/debug.c
index 3349db7..28c053e 100644
--- a/platform/msm_shared/debug.c
+++ b/platform/msm_shared/debug.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2009, Google Inc.
* All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -39,6 +39,10 @@
#include <platform/timer.h>
#include <platform.h>
+#if PON_VIB_SUPPORT
+#include <vibrator.h>
+#endif
+
static void write_dcc(char c)
{
uint32_t timeout = 10;
@@ -134,6 +138,9 @@
void platform_halt(void)
{
+#if PON_VIB_SUPPORT
+ vib_turn_off();
+#endif
if (set_download_mode(NORMAL_DLOAD) == 0)
{
dprintf(CRITICAL, "HALT: reboot into dload mode...\n");
diff --git a/platform/msm_shared/display.c b/platform/msm_shared/display.c
index e9b1e7b..03a1bb0 100644
--- a/platform/msm_shared/display.c
+++ b/platform/msm_shared/display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -184,7 +184,7 @@
break;
case MIPI_VIDEO_PANEL:
dprintf(INFO, "Turn on MIPI_VIDEO_PANEL.\n");
- ret = mdp_dsi_video_on();
+ ret = mdp_dsi_video_on(pinfo);
if (ret)
goto msm_display_on_out;
ret = mipi_dsi_on();
@@ -193,7 +193,7 @@
break;
case MIPI_CMD_PANEL:
dprintf(INFO, "Turn on MIPI_CMD_PANEL.\n");
- ret = mdp_dma_on();
+ ret = mdp_dma_on(pinfo);
if (ret)
goto msm_display_on_out;
mdp_rev = mdp_get_revision();
@@ -221,7 +221,7 @@
break;
case EDP_PANEL:
dprintf(INFO, "Turn on EDP PANEL.\n");
- ret = mdp_edp_on();
+ ret = mdp_edp_on(pinfo);
if (ret)
goto msm_display_on_out;
break;
diff --git a/platform/msm_shared/hsusb.c b/platform/msm_shared/hsusb.c
index 02a15db..a739f9b 100644
--- a/platform/msm_shared/hsusb.c
+++ b/platform/msm_shared/hsusb.c
@@ -2,7 +2,7 @@
* Copyright (c) 2008, Google Inc.
* All rights reserved.
*
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -476,7 +476,7 @@
static struct udc_request *ep0req;
static void
-ep0_setup_ack_complete(struct udc_endpoint *ep, struct usb_request *req)
+ep0_setup_ack_complete()
{
uint32_t mode;
diff --git a/platform/msm_shared/image_verify.c b/platform/msm_shared/image_verify.c
index cf1253f..edca3bc 100644
--- a/platform/msm_shared/image_verify.c
+++ b/platform/msm_shared/image_verify.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013-2014 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -99,6 +99,23 @@
goto cleanup;
}
+ /*
+ * Calculate hash of image and save calculated hash on TZ.
+ */
+ hash_size =
+ (hash_type == CRYPTO_AUTH_ALG_SHA256) ? SHA256_SIZE : SHA1_SIZE;
+ hash_find(image_ptr, image_size, (unsigned char *)&digest, hash_type);
+#ifdef TZ_SAVE_KERNEL_HASH
+ if (hash_type == CRYPTO_AUTH_ALG_SHA256) {
+ save_kernel_hash_cmd(digest);
+ dprintf(INFO, "Image hash saved.\n");
+ } else
+ dprintf(INFO, "image_verify: hash is not SHA-256.\n");
+#endif
+
+ /*
+ * Decrypt the pre-calculated expected image hash.
+ */
ret = image_decrypt_signature(signature_ptr, plain_text);
if (ret == -1) {
dprintf(CRITICAL, "ERROR: Image Invalid! Decryption failed!\n");
@@ -106,17 +123,8 @@
}
/*
- * Calculate hash of image for comparison
+ * Compare the expected hash with the calculated hash.
*/
- hash_size =
- (hash_type == CRYPTO_AUTH_ALG_SHA256) ? SHA256_SIZE : SHA1_SIZE;
- hash_find(image_ptr, image_size, (unsigned char *)&digest, hash_type);
-#ifdef TZ_SAVE_KERNEL_HASH
- if (hash_type == CRYPTO_AUTH_ALG_SHA256)
- save_kernel_hash_cmd(digest);
- else
- dprintf(INFO, "image_verify: hash is not SHA-256.\n");
-#endif
if (memcmp(plain_text, digest, hash_size) != 0) {
dprintf(CRITICAL,
"ERROR: Image Invalid! Please use another image!\n");
diff --git a/platform/msm_shared/include/mdp3.h b/platform/msm_shared/include/mdp3.h
index 8dff686..9ca4abf 100644
--- a/platform/msm_shared/include/mdp3.h
+++ b/platform/msm_shared/include/mdp3.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -56,5 +56,5 @@
/* defining no-op functions that are implemented only for mdp5 */
int mdp_edp_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
-int mdp_edp_on(void);
+int mdp_edp_on(struct msm_panel_info *pinfo);
int mdp_edp_off(void);
diff --git a/platform/msm_shared/include/mdp4.h b/platform/msm_shared/include/mdp4.h
index c988dee..d979645 100644
--- a/platform/msm_shared/include/mdp4.h
+++ b/platform/msm_shared/include/mdp4.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -104,7 +104,7 @@
void mdp_disable(void);
void mdp_start_dma(void);
int mdp_dsi_video_off();
-int mdp_dsi_video_on();
+int mdp_dsi_video_on(struct msm_panel_info *pinfo);
int mdp_dsi_video_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
int mdp_lcdc_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
int mdp_lcdc_on();
@@ -114,7 +114,7 @@
/* defining no-op functions that are implemented only for mdp5 */
int mdp_edp_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
-int mdp_edp_on(void);
+int mdp_edp_on(struct msm_panel_info *pinfo);
int mdp_edp_off(void);
#endif
diff --git a/platform/msm_shared/include/mdp5.h b/platform/msm_shared/include/mdp5.h
index 149162f..54dc82f 100644
--- a/platform/msm_shared/include/mdp5.h
+++ b/platform/msm_shared/include/mdp5.h
@@ -34,6 +34,8 @@
#define MDP_VP_0_RGB_0_BASE REG_MDP(0x1E00)
#define MDP_VP_0_RGB_1_BASE REG_MDP(0x2200)
+#define MDP_VP_0_DMA_0_BASE REG_MDP(0x2A00)
+#define MDP_VP_0_DMA_1_BASE REG_MDP(0x2E00)
#define PIPE_SSPP_SRC0_ADDR 0x14
#define PIPE_SSPP_SRC_YSTRIDE 0x24
@@ -86,6 +88,8 @@
#define MDSS_MDP_HW_REV_103 MDSS_MDP_REV(1, 3, 0) /* 8084 v1.0 */
#define MDSS_MDP_HW_REV_200 MDSS_MDP_REV(2, 0, 0) /* 8092 v1.0 */
+#define MDSS_MAX_LINE_BUF_WIDTH 2048
+
#define MDP_HW_REV REG_MDP(0x0100)
#define MDP_INTR_EN REG_MDP(0x0110)
#define MDP_INTR_CLEAR REG_MDP(0x0118)
@@ -143,16 +147,8 @@
#define MDP_CLK_CTRL6 REG_MDP(0x03C4)
#define MDP_CLK_CTRL7 REG_MDP(0x04D0)
-#define MMSS_MDP_CLIENT_ID_UNUSED 0x00000000
-#define MMSS_MDP_1_1_CLIENT_ID_RGB0 0x00000007
-#define MMSS_MDP_1_2_CLIENT_ID_RGB0 0x00000010
-#define MMSS_MDP_1_2_CLIENT_ID_RGB1 0x00000011
-
-#define MMSS_MDP_MAX_SMP_SIZE 0x00001000
-#define MMSS_MDP_SMP_ALLOC_W_0 REG_MDP(0x0180)
-#define MMSS_MDP_SMP_ALLOC_W_1 REG_MDP(0x0184)
-#define MMSS_MDP_SMP_ALLOC_R_0 REG_MDP(0x0230)
-#define MMSS_MDP_SMP_ALLOC_R_1 REG_MDP(0x0234)
+#define MMSS_MDP_SMP_ALLOC_W_BASE REG_MDP(0x0180)
+#define MMSS_MDP_SMP_ALLOC_R_BASE REG_MDP(0x0230)
#define MDP_QOS_REMAPPER_CLASS_0 REG_MDP(0x02E0)
#define MDP_QOS_REMAPPER_CLASS_1 REG_MDP(0x02E4)
@@ -182,10 +178,10 @@
int mdp_dsi_video_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
int mipi_dsi_cmd_config(struct fbcon_config mipi_fb_cfg,
unsigned short num_of_lanes);
-int mdp_dsi_video_on(void);
-int mdp_dma_on(void);
+int mdp_dsi_video_on(struct msm_panel_info *pinfo);
+int mdp_dma_on(struct msm_panel_info *pinfo);
int mdp_edp_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
-int mdp_edp_on(void);
+int mdp_edp_on(struct msm_panel_info *pinfo);
int mdp_edp_off(void);
void mdp_disable(void);
diff --git a/platform/msm_shared/include/mmc_sdhci.h b/platform/msm_shared/include/mmc_sdhci.h
index 1eb9745..d704d8c 100644
--- a/platform/msm_shared/include/mmc_sdhci.h
+++ b/platform/msm_shared/include/mmc_sdhci.h
@@ -294,6 +294,7 @@
uint32_t pwrctl_base; /* Base address for power control registers */
uint16_t bus_width; /* Bus width used */
uint32_t max_clk_rate; /* Max clock rate supported */
+ uint8_t hs400_support; /* SDHC HS400 mode supported or not */
};
/* mmc device structure */
diff --git a/platform/msm_shared/include/msm_panel.h b/platform/msm_shared/include/msm_panel.h
index 1d8ebad..4407074 100755
--- a/platform/msm_shared/include/msm_panel.h
+++ b/platform/msm_shared/include/msm_panel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -189,6 +189,8 @@
uint32_t wait_cycle;
uint32_t clk_rate;
uint32_t rotation;
+ /* Enable if DMA pipe used for handoff */
+ uint32_t use_dma_pipe;
char lowpowerstop;
struct lcd_panel_info lcd;
diff --git a/platform/msm_shared/include/scm.h b/platform/msm_shared/include/scm.h
index b2ae7a9..6b9efb5 100644
--- a/platform/msm_shared/include/scm.h
+++ b/platform/msm_shared/include/scm.h
@@ -174,6 +174,9 @@
#define SCM_SVC_ES 0x10
#define SCM_SAVE_PARTITION_HASH_ID 0x01
+#define SCM_SVC_PWR 0x9
+#define SCM_IO_DISABLE_PMIC_ARBITER 0x1
+
enum ap_ce_channel_type {
AP_CE_REGISTER_USE = 0,
AP_CE_ADM_USE = 1
@@ -187,6 +190,8 @@
void set_tamper_fuse_cmd();
+int scm_halt_pmic_arbiter();
+
/**
* struct scm_command - one SCM command buffer
* @len: total available memory for command and response
diff --git a/platform/msm_shared/include/shutdown_detect.h b/platform/msm_shared/include/shutdown_detect.h
new file mode 100644
index 0000000..23690c9
--- /dev/null
+++ b/platform/msm_shared/include/shutdown_detect.h
@@ -0,0 +1,33 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __PLATFORM_MSM_SHARED_SHUTDOWN_DETECT_H
+#define __PLATFORM_MSM_SHARED_SHUTDOWN_DETECT_H
+
+void shutdown_detect(void);
+#endif /* __PLATFORM_MSM_SHARED_SHUTDOWN_DETECT_H */
diff --git a/platform/msm_shared/mdp3.c b/platform/msm_shared/mdp3.c
index d83fa9e..2cde8ea 100644
--- a/platform/msm_shared/mdp3.c
+++ b/platform/msm_shared/mdp3.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -169,7 +169,7 @@
return mdp_rev;
}
-int mdp_dsi_video_on()
+int mdp_dsi_video_on(struct msm_panel_info *pinfo)
{
int ret = 0;
@@ -178,7 +178,7 @@
return ret;
}
-int mdp_dma_on()
+int mdp_dma_on(struct msm_panel_info *pinfo)
{
int ret = 0;
mdelay(100);
@@ -202,7 +202,7 @@
return NO_ERROR;
}
-int mdp_edp_on(void)
+int mdp_edp_on(struct msm_panel_info *pinfo)
{
return NO_ERROR;
}
diff --git a/platform/msm_shared/mdp4.c b/platform/msm_shared/mdp4.c
index b3ade80..7b7c0cf 100644
--- a/platform/msm_shared/mdp4.c
+++ b/platform/msm_shared/mdp4.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -229,7 +229,7 @@
writel(0x00000003, MDP_OVERLAYPROC0_CFG);
}
-int mdp_dma_on(void)
+int mdp_dma_on(struct msm_panel_info *pinfo)
{
int ret = 0;
@@ -364,7 +364,7 @@
return ret;
}
-int mdp_dsi_video_on()
+int mdp_dsi_video_on(struct msm_panel_info *pinfo)
{
int ret = NO_ERROR;
@@ -414,7 +414,7 @@
return NO_ERROR;
}
-int mdp_edp_on(void)
+int mdp_edp_on(struct msm_panel_info *pinfo)
{
return NO_ERROR;
}
diff --git a/platform/msm_shared/mdp5.c b/platform/msm_shared/mdp5.c
index 2cbf408..e1106bf 100644
--- a/platform/msm_shared/mdp5.c
+++ b/platform/msm_shared/mdp5.c
@@ -79,10 +79,10 @@
writel(0x40000000, MDP_CLK_CTRL4);
}
-static void mdss_rgb_pipe_config(struct fbcon_config *fb, struct msm_panel_info
+static void mdss_source_pipe_config(struct fbcon_config *fb, struct msm_panel_info
*pinfo, uint32_t pipe_base)
{
- uint32_t src_size, out_size, stride;
+ uint32_t src_size, out_size, stride, pipe_swap;
uint32_t fb_off = 0;
/* write active region size*/
@@ -91,11 +91,13 @@
if (pinfo->lcdc.dual_pipe) {
out_size = (fb->height << 16) + (fb->width / 2);
- if ((pinfo->lcdc.pipe_swap == TRUE) && (pipe_base ==
- MDP_VP_0_RGB_0_BASE))
+ pipe_swap = (pinfo->lcdc.pipe_swap == TRUE) ? 1 : 0;
+
+ if (pipe_swap && ((pipe_base == MDP_VP_0_RGB_0_BASE) ||
+ (pipe_base == MDP_VP_0_DMA_0_BASE)))
fb_off = (pinfo->xres / 2);
- else if ((pinfo->lcdc.pipe_swap != TRUE) && (pipe_base ==
- MDP_VP_0_RGB_1_BASE))
+ else if (!pipe_swap && ((pipe_base == MDP_VP_0_RGB_1_BASE) ||
+ (pipe_base == MDP_VP_0_DMA_1_BASE)))
fb_off = (pinfo->xres / 2);
}
@@ -150,32 +152,67 @@
}
}
-void mdss_smp_setup(struct msm_panel_info *pinfo)
+static uint32_t mdss_smp_alloc(uint32_t client_id, uint32_t smp_cnt,
+ uint32_t fixed_smp_cnt, uint32_t free_smp_offset)
{
- uint32_t smp_cnt = 0, reg_rgb0 = 0, reg_rgb1 = 0, shift = 0;
- uint32_t xres, bpp;
- uint32_t rgb0_client_id = MMSS_MDP_CLIENT_ID_UNUSED;
- uint32_t rgb1_client_id = MMSS_MDP_1_2_CLIENT_ID_RGB1;
- uint32_t mdss_mdp_rev = readl(MDP_HW_REV);
+ uint32_t i, j;
+ uint32_t reg_val = 0;
- xres = pinfo->xres;
- bpp = pinfo->bpp;
-
- if (mdss_mdp_rev == MDSS_MDP_HW_REV_100
- || mdss_mdp_rev >= MDSS_MDP_HW_REV_102)
- rgb0_client_id = MMSS_MDP_1_2_CLIENT_ID_RGB0;
- else if (mdss_mdp_rev >= MDSS_MDP_HW_REV_101)
- rgb0_client_id = MMSS_MDP_1_1_CLIENT_ID_RGB0;
-
- if (pinfo->lcdc.dual_pipe) {
- /* Each pipe driving half the screen */
- xres /= 2;
+ for (i = fixed_smp_cnt, j = 0; i < smp_cnt; i++) {
+ /* max 3 MMB per register */
+ reg_val |= client_id << (((j++) % 3) * 8);
+ if ((j % 3) == 0) {
+ writel(reg_val, MMSS_MDP_SMP_ALLOC_W_BASE +
+ free_smp_offset);
+ writel(reg_val, MMSS_MDP_SMP_ALLOC_R_BASE +
+ free_smp_offset);
+ reg_val = 0;
+ free_smp_offset += 4;
+ }
}
- smp_cnt = ((xres) * (bpp / 8) * 2) +
- MMSS_MDP_MAX_SMP_SIZE - 1;
+ if (j % 3) {
+ writel(reg_val, MMSS_MDP_SMP_ALLOC_W_BASE + free_smp_offset);
+ writel(reg_val, MMSS_MDP_SMP_ALLOC_R_BASE + free_smp_offset);
+ free_smp_offset += 4;
+ }
- smp_cnt /= MMSS_MDP_MAX_SMP_SIZE;
+ return free_smp_offset;
+}
+
+static void mdss_smp_setup(struct msm_panel_info *pinfo, uint32_t left_pipe,
+ uint32_t right_pipe)
+
+{
+ uint32_t left_sspp_client_id, right_sspp_client_id;
+ uint32_t bpp = 3, free_smp_offset = 0, xres = MDSS_MAX_LINE_BUF_WIDTH;
+ uint32_t smp_cnt, smp_size = 4096, fixed_smp_cnt = 0;
+ uint32_t mdss_mdp_rev = readl(MDP_HW_REV);
+
+ if ((mdss_mdp_rev >= MDSS_MDP_HW_REV_103) &&
+ (mdss_mdp_rev < MDSS_MDP_HW_REV_200)) {
+ smp_size = 8192;
+ fixed_smp_cnt = 2;
+ free_smp_offset = 0xC;
+ }
+
+ if (pinfo->use_dma_pipe)
+ right_sspp_client_id = 0xD; /* 13 */
+ else
+ right_sspp_client_id = 0x11; /* 17 */
+
+ if (MDSS_IS_MAJOR_MINOR_MATCHING(mdss_mdp_rev, MDSS_MDP_HW_REV_101))
+ left_sspp_client_id = (pinfo->use_dma_pipe) ? 0x4 : 0x07; /* 4 or 7 */
+ else
+ left_sspp_client_id = (pinfo->use_dma_pipe) ? 0xA : 0x10; /* 10 or 16 */
+
+ /* Each pipe driving half the screen */
+ if (pinfo->lcdc.dual_pipe)
+ xres /= 2;
+
+ /* bpp = bytes per pixel of input image */
+ smp_cnt = (xres * bpp * 2) + smp_size - 1;
+ smp_cnt /= smp_size;
if (smp_cnt > 4) {
dprintf(CRITICAL, "ERROR: %s: Out of SMP's, cnt=%d! \n", __func__,
@@ -183,31 +220,21 @@
ASSERT(0); /* Max 4 SMPs can be allocated per client */
}
- writel(smp_cnt * 0x40, MDP_VP_0_RGB_0_BASE + REQPRIORITY_FIFO_WATERMARK0);
- writel(smp_cnt * 0x80, MDP_VP_0_RGB_0_BASE + REQPRIORITY_FIFO_WATERMARK1);
- writel(smp_cnt * 0xc0, MDP_VP_0_RGB_0_BASE + REQPRIORITY_FIFO_WATERMARK2);
+ writel(smp_cnt * 0x40, left_pipe + REQPRIORITY_FIFO_WATERMARK0);
+ writel(smp_cnt * 0x80, left_pipe + REQPRIORITY_FIFO_WATERMARK1);
+ writel(smp_cnt * 0xc0, left_pipe + REQPRIORITY_FIFO_WATERMARK2);
if (pinfo->lcdc.dual_pipe) {
- writel(smp_cnt * 0x40, MDP_VP_0_RGB_1_BASE + REQPRIORITY_FIFO_WATERMARK0);
- writel(smp_cnt * 0x80, MDP_VP_0_RGB_1_BASE + REQPRIORITY_FIFO_WATERMARK1);
- writel(smp_cnt * 0xc0, MDP_VP_0_RGB_1_BASE + REQPRIORITY_FIFO_WATERMARK2);
+ writel(smp_cnt * 0x40, right_pipe + REQPRIORITY_FIFO_WATERMARK0);
+ writel(smp_cnt * 0x80, right_pipe + REQPRIORITY_FIFO_WATERMARK1);
+ writel(smp_cnt * 0xc0, right_pipe + REQPRIORITY_FIFO_WATERMARK2);
}
- while((smp_cnt > 0) && !(shift > 16)) {
- reg_rgb0 |= ((rgb0_client_id) << (shift));
- reg_rgb1 |= ((rgb1_client_id) << (shift));
- smp_cnt--;
- shift += 8;
- }
-
- /* Allocate SMP blocks */
- writel(reg_rgb0, MMSS_MDP_SMP_ALLOC_W_0);
- writel(reg_rgb0, MMSS_MDP_SMP_ALLOC_R_0);
-
- if (pinfo->lcdc.dual_pipe) {
- writel(reg_rgb1, MMSS_MDP_SMP_ALLOC_W_1);
- writel(reg_rgb1, MMSS_MDP_SMP_ALLOC_R_1);
- }
+ free_smp_offset = mdss_smp_alloc(left_sspp_client_id, smp_cnt,
+ fixed_smp_cnt, free_smp_offset);
+ if (pinfo->lcdc.dual_pipe)
+ mdss_smp_alloc(right_sspp_client_id, smp_cnt, fixed_smp_cnt,
+ free_smp_offset);
}
void mdss_intf_tg_setup(struct msm_panel_info *pinfo, uint32_t intf_base)
@@ -298,7 +325,7 @@
void mdss_layer_mixer_setup(struct fbcon_config *fb, struct msm_panel_info
*pinfo)
{
- uint32_t mdp_rgb_size, height, width;
+ uint32_t mdp_rgb_size, height, width, val;
height = fb->height;
width = fb->width;
@@ -321,7 +348,10 @@
writel(0xFF, MDP_VP_0_MIXER_0_BASE + LAYER_3_BLEND0_FG_ALPHA);
/* Baselayer for layer mixer 0 */
- writel(0x0000200, MDP_CTL_0_BASE + CTL_LAYER_0);
+ if (pinfo->use_dma_pipe)
+ writel(0x0040000, MDP_CTL_0_BASE + CTL_LAYER_0);
+ else
+ writel(0x0000200, MDP_CTL_0_BASE + CTL_LAYER_0);
if (pinfo->lcdc.dual_pipe) {
writel(mdp_rgb_size, MDP_VP_0_MIXER_1_BASE + LAYER_0_OUT_SIZE);
@@ -336,10 +366,11 @@
writel(0xFF, MDP_VP_0_MIXER_1_BASE + LAYER_3_BLEND0_FG_ALPHA);
/* Baselayer for layer mixer 1 */
+ val = pinfo->use_dma_pipe ? 0x200000 : 0x1000;
if (pinfo->lcdc.split_display)
- writel(0x1000, MDP_CTL_1_BASE + CTL_LAYER_1);
+ writel(val, MDP_CTL_1_BASE + CTL_LAYER_1);
else
- writel(0x01000, MDP_CTL_0_BASE + CTL_LAYER_1);
+ writel(val, MDP_CTL_0_BASE + CTL_LAYER_1);
}
}
@@ -370,6 +401,7 @@
int ret = NO_ERROR;
struct lcdc_panel_info *lcdc = NULL;
uint32_t intf_sel = 0x100;
+ uint32_t left_pipe, right_pipe;
mdss_intf_tg_setup(pinfo, MDP_INTF_1_BASE);
@@ -378,14 +410,23 @@
mdp_clk_gating_ctrl();
+ if (pinfo->use_dma_pipe) {
+ left_pipe = MDP_VP_0_DMA_0_BASE;
+ right_pipe = MDP_VP_0_DMA_1_BASE;
+ } else {
+ left_pipe = MDP_VP_0_RGB_0_BASE;
+ right_pipe = MDP_VP_0_RGB_1_BASE;
+ }
+
mdss_vbif_setup();
- mdss_smp_setup(pinfo);
+ mdss_smp_setup(pinfo, left_pipe, right_pipe);
mdss_qos_remapper_setup();
- mdss_rgb_pipe_config(fb, pinfo, MDP_VP_0_RGB_0_BASE);
+ mdss_source_pipe_config(fb, pinfo, left_pipe);
+
if (pinfo->lcdc.dual_pipe)
- mdss_rgb_pipe_config(fb, pinfo, MDP_VP_0_RGB_1_BASE);
+ mdss_source_pipe_config(fb, pinfo, right_pipe);
mdss_layer_mixer_setup(fb, pinfo);
@@ -409,24 +450,31 @@
{
int ret = NO_ERROR;
struct lcdc_panel_info *lcdc = NULL;
+ uint32_t left_pipe, right_pipe;
mdss_intf_tg_setup(pinfo, MDP_INTF_0_BASE);
+ if (pinfo->use_dma_pipe) {
+ left_pipe = MDP_VP_0_DMA_0_BASE;
+ right_pipe = MDP_VP_0_DMA_1_BASE;
+ } else {
+ left_pipe = MDP_VP_0_RGB_0_BASE;
+ right_pipe = MDP_VP_0_RGB_1_BASE;
+ }
+
mdp_clk_gating_ctrl();
mdss_vbif_setup();
- mdss_smp_setup(pinfo);
+ mdss_smp_setup(pinfo, left_pipe, right_pipe);
mdss_qos_remapper_setup();
- mdss_rgb_pipe_config(fb, pinfo, MDP_VP_0_RGB_0_BASE);
+ mdss_source_pipe_config(fb, pinfo, left_pipe);
if (pinfo->lcdc.dual_pipe)
- mdss_rgb_pipe_config(fb, pinfo, MDP_VP_0_RGB_1_BASE);
-
+ mdss_source_pipe_config(fb, pinfo, right_pipe);
mdss_layer_mixer_setup(fb, pinfo);
-
if (pinfo->lcdc.dual_pipe)
writel(0x181F10, MDP_CTL_0_BASE + CTL_TOP);
else
@@ -445,6 +493,7 @@
{
uint32_t intf_sel = BIT(8);
int ret = NO_ERROR;
+ uint32_t left_pipe, right_pipe;
struct lcdc_panel_info *lcdc = NULL;
uint32_t mdss_mdp_intf_off = 0;
@@ -471,13 +520,22 @@
writel(intf_sel, MDP_DISP_INTF_SEL);
+ if (pinfo->use_dma_pipe) {
+ left_pipe = MDP_VP_0_DMA_0_BASE;
+ right_pipe = MDP_VP_0_DMA_1_BASE;
+ } else {
+ left_pipe = MDP_VP_0_RGB_0_BASE;
+ right_pipe = MDP_VP_0_RGB_1_BASE;
+ }
+
mdss_vbif_setup();
- mdss_smp_setup(pinfo);
+ mdss_smp_setup(pinfo, left_pipe, right_pipe);
mdss_qos_remapper_setup();
- mdss_rgb_pipe_config(fb, pinfo, MDP_VP_0_RGB_0_BASE);
+ mdss_source_pipe_config(fb, pinfo, left_pipe);
+
if (pinfo->lcdc.dual_pipe)
- mdss_rgb_pipe_config(fb, pinfo, MDP_VP_0_RGB_1_BASE);
+ mdss_source_pipe_config(fb, pinfo, right_pipe);
mdss_layer_mixer_setup(fb, pinfo);
@@ -492,13 +550,18 @@
return ret;
}
-int mdp_dsi_video_on(void)
+int mdp_dsi_video_on(struct msm_panel_info *pinfo)
{
- int ret = NO_ERROR;
- writel(0x32048, MDP_CTL_0_BASE + CTL_FLUSH);
- writel(0x32090, MDP_CTL_1_BASE + CTL_FLUSH);
+ if (pinfo->use_dma_pipe) {
+ writel(0x22840, MDP_CTL_0_BASE + CTL_FLUSH);
+ writel(0x25080, MDP_CTL_1_BASE + CTL_FLUSH);
+ } else {
+ writel(0x22048, MDP_CTL_0_BASE + CTL_FLUSH);
+ writel(0x24090, MDP_CTL_1_BASE + CTL_FLUSH);
+ }
writel(0x01, MDP_INTF_1_TIMING_ENGINE_EN + mdss_mdp_intf_offset());
- return ret;
+
+ return NO_ERROR;
}
int mdp_dsi_video_off()
@@ -531,10 +594,15 @@
return NO_ERROR;
}
-int mdp_dma_on(void)
+int mdp_dma_on(struct msm_panel_info *pinfo)
{
- writel(0x32048, MDP_CTL_0_BASE + CTL_FLUSH);
- writel(0x32090, MDP_CTL_1_BASE + CTL_FLUSH);
+ if (pinfo->use_dma_pipe) {
+ writel(0x22840, MDP_CTL_0_BASE + CTL_FLUSH);
+ writel(0x25080, MDP_CTL_1_BASE + CTL_FLUSH);
+ } else {
+ writel(0x22048, MDP_CTL_0_BASE + CTL_FLUSH);
+ writel(0x24090, MDP_CTL_1_BASE + CTL_FLUSH);
+ }
writel(0x01, MDP_CTL_0_BASE + CTL_START);
return NO_ERROR;
}
@@ -544,9 +612,12 @@
}
-int mdp_edp_on(void)
+int mdp_edp_on(struct msm_panel_info *pinfo)
{
- writel(0x32048, MDP_CTL_0_BASE + CTL_FLUSH);
+ if (pinfo->use_dma_pipe)
+ writel(0x22840, MDP_CTL_0_BASE + CTL_FLUSH);
+ else
+ writel(0x22048, MDP_CTL_0_BASE + CTL_FLUSH);
writel(0x01, MDP_INTF_0_TIMING_ENGINE_EN + mdss_mdp_intf_offset());
return NO_ERROR;
}
diff --git a/platform/msm_shared/mipi_dsi.c b/platform/msm_shared/mipi_dsi.c
index 4b86359..3fa2e28 100644
--- a/platform/msm_shared/mipi_dsi.c
+++ b/platform/msm_shared/mipi_dsi.c
@@ -599,7 +599,7 @@
writel(0, DSI_CTRL);
- writel(0, DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, DSI_ERR_INT_MASK0);
DST_FORMAT = 0; // RGB565
dprintf(SPEW, "DSI_Video_Mode - Dst Format: RGB565\n");
@@ -680,7 +680,7 @@
writel(0x0000001e, DSI_CLK_CTRL);
writel(0x0000003e, DSI_CLK_CTRL);
- writel(0x10000000, DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, DSI_ERR_INT_MASK0);
// writel(0, DSI_CTRL);
@@ -713,9 +713,9 @@
writel(interleav << 30 | 0 << 24 | 0 << 20 | DLNx_EN << 4 | 0x105,
DSI_CTRL);
mdelay(10);
- writel(0x10000000, DSI_COMMAND_MODE_DMA_CTRL);
+ writel(0x14000000, DSI_COMMAND_MODE_DMA_CTRL);
writel(0x10000000, DSI_MISR_CMD_CTRL);
- writel(0x00000040, DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, DSI_ERR_INT_MASK0);
writel(0x1, DSI_EOT_PACKET_CTRL);
// writel(0x0, MDP_OVERLAYPROC0_START);
mdp_start_dma();
@@ -944,7 +944,7 @@
writel(0, ctl_base + CTRL);
- writel(0, ctl_base + DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, ctl_base + ERR_INT_MASK0);
writel(0x02020202, ctl_base + INT_CTRL);
@@ -1091,7 +1091,7 @@
writel(0, DSI_CTRL);
- writel(0, DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, DSI_ERR_INT_MASK0);
writel(0x02020202, DSI_INT_CTRL);
@@ -1191,7 +1191,7 @@
writel(0, ctl_base + CTRL);
- writel(0, ctl_base + ERR_INT_MASK0);
+ writel(0x13ff3fe0, ctl_base + ERR_INT_MASK0);
writel(0x02020202, ctl_base + INT_CTRL);
@@ -1207,8 +1207,9 @@
writel(0x13c2c, ctl_base + COMMAND_MODE_MDP_DCS_CMD_CTRL);
writel(interleav << 30 | 0 << 24 | 0 << 20 | lane_en << 4 | 0x105,
ctl_base + CTRL);
- writel(0x10000000, ctl_base + COMMAND_MODE_DMA_CTRL);
+ writel(0x14000000, ctl_base + COMMAND_MODE_DMA_CTRL);
writel(0x10000000, ctl_base + MISR_CMD_CTRL);
+ writel(0x1, ctl_base + EOT_PACKET_CTRL);
#endif
return 0;
@@ -1240,7 +1241,7 @@
writel(0x0000001e, DSI_CLK_CTRL);
writel(0x0000003e, DSI_CLK_CTRL);
- writel(0x10000000, DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, DSI_ERR_INT_MASK0);
DST_FORMAT = 8; // RGB888
@@ -1269,9 +1270,9 @@
writel(0x13c2c, DSI_COMMAND_MODE_MDP_DCS_CMD_CTRL);
writel(interleav << 30 | 0 << 24 | 0 << 20 | DLNx_EN << 4 | 0x105,
DSI_CTRL);
- writel(0x10000000, DSI_COMMAND_MODE_DMA_CTRL);
+ writel(0x14000000, DSI_COMMAND_MODE_DMA_CTRL);
writel(0x10000000, DSI_MISR_CMD_CTRL);
- writel(0x00000040, DSI_ERR_INT_MASK0);
+ writel(0x13ff3fe0, DSI_ERR_INT_MASK0);
writel(0x1, DSI_EOT_PACKET_CTRL);
return NO_ERROR;
diff --git a/platform/msm_shared/mipi_dsi_phy.c b/platform/msm_shared/mipi_dsi_phy.c
index 62cabf0..834b335 100644
--- a/platform/msm_shared/mipi_dsi_phy.c
+++ b/platform/msm_shared/mipi_dsi_phy.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -199,9 +199,9 @@
void mdss_dsi_uniphy_pll_lock_detect_setting(uint32_t ctl_base)
{
- writel(0x04, ctl_base + 0x0264); /* LKDetect CFG2 */
+ writel(0x0c, ctl_base + 0x0264); /* LKDetect CFG2 */
udelay(100);
- writel(0x05, ctl_base + 0x0264); /* LKDetect CFG2 */
+ writel(0x0d, ctl_base + 0x0264); /* LKDetect CFG2 */
mdelay(1);
}
diff --git a/platform/msm_shared/mmc_sdhci.c b/platform/msm_shared/mmc_sdhci.c
index 0883c53..f7a82f3 100644
--- a/platform/msm_shared/mmc_sdhci.c
+++ b/platform/msm_shared/mmc_sdhci.c
@@ -844,9 +844,15 @@
/* Run the clock @ 400 Mhz */
if (host->caps.hs400_support && mmc_card_supports_hs400_mode(card))
{
- clock_config_mmc(host->msm_host->slot, SDHCI_CLK_400MHZ);
/* Save the timing value, before changing the clock */
MMC_SAVE_TIMING(host, MMC_HS400_TIMING);
+ /*
+ * Set the MCI_CLK divider before changing the sdcc core
+ * core clk to ensure card receives no more than 200 MHZ
+ * clock frequency
+ */
+ sdhci_msm_set_mci_clk(host);
+ clock_config_mmc(host->msm_host->slot, SDHCI_CLK_400MHZ);
}
else
{
@@ -993,6 +999,10 @@
/* Save the timing value, before changing the clock */
MMC_SAVE_TIMING(host, MMC_HS400_TIMING);
sdhci_set_uhs_mode(host, SDHCI_SDR104_MODE);
+ /*
+ * Enable HS400 mode
+ */
+ sdhci_msm_set_mci_clk(host);
/* 7. Execute Tuning for hs400 mode */
if ((mmc_ret = sdhci_msm_execute_tuning(host, width)))
@@ -1025,6 +1035,7 @@
host->base = cfg->sdhc_base;
host->sdhc_event = &sdhc_event;
+ host->caps.hs400_support = cfg->hs400_support;
data = (struct sdhci_msm_data *) malloc(sizeof(struct sdhci_msm_data));
ASSERT(data);
@@ -1690,7 +1701,16 @@
else
cmd.cmd_index = CMD18_READ_MULTIPLE_BLOCK;
- cmd.argument = blk_addr;
+ /*
+ * Standard emmc cards use byte mode addressing
+ * convert the block address to byte address before
+ * sending the command
+ */
+ if (card->type == MMC_TYPE_STD_MMC)
+ cmd.argument = blk_addr * card->block_size;
+ else
+ cmd.argument = blk_addr;
+
cmd.cmd_type = SDHCI_CMD_TYPE_NORMAL;
cmd.resp_type = SDHCI_CMD_RESP_R1;
cmd.trans_mode = SDHCI_MMC_READ;
@@ -1762,7 +1782,16 @@
else
cmd.cmd_index = CMD25_WRITE_MULTIPLE_BLOCK;
- cmd.argument = blk_addr;
+ /*
+ * Standard emmc cards use byte mode addressing
+ * convert the block address to byte address before
+ * sending the command
+ */
+ if (card->type == MMC_TYPE_STD_MMC)
+ cmd.argument = blk_addr * card->block_size;
+ else
+ cmd.argument = blk_addr;
+
cmd.cmd_type = SDHCI_CMD_TYPE_NORMAL;
cmd.resp_type = SDHCI_CMD_RESP_R1;
cmd.trans_mode = SDHCI_MMC_WRITE;
@@ -1824,7 +1853,15 @@
else
cmd.cmd_index = CMD32_ERASE_WR_BLK_START;
- cmd.argument = erase_start;
+ /*
+ * Standard emmc cards use byte mode addressing
+ * convert the block address to byte address before
+ * sending the command
+ */
+ if (card->type == MMC_TYPE_STD_MMC)
+ cmd.argument = erase_start * card->block_size;
+ else
+ cmd.argument = erase_start;
cmd.cmd_type = SDHCI_CMD_TYPE_NORMAL;
cmd.resp_type = SDHCI_CMD_RESP_R1;
@@ -1859,7 +1896,15 @@
else
cmd.cmd_index = CMD33_ERASE_WR_BLK_END;
- cmd.argument = erase_end;
+ /*
+ * Standard emmc cards use byte mode addressing
+ * convert the block address to byte address before
+ * sending the command
+ */
+ if (card->type == MMC_TYPE_STD_MMC)
+ cmd.argument = erase_end * card->block_size;
+ else
+ cmd.argument = erase_end;
cmd.cmd_type = SDHCI_CMD_TYPE_NORMAL;
cmd.resp_type = SDHCI_CMD_RESP_R1;
diff --git a/platform/msm_shared/rules.mk b/platform/msm_shared/rules.mk
index 7f48e01..98f1da0 100755
--- a/platform/msm_shared/rules.mk
+++ b/platform/msm_shared/rules.mk
@@ -132,7 +132,8 @@
$(LOCAL_DIR)/crypto5_wrapper.o \
$(LOCAL_DIR)/dev_tree.o \
$(LOCAL_DIR)/gpio.o \
- $(LOCAL_DIR)/dload_util.o
+ $(LOCAL_DIR)/dload_util.o \
+ $(LOCAL_DIR)/shutdown_detect.o
endif
ifeq ($(PLATFORM),mpq8092)
@@ -171,7 +172,8 @@
$(LOCAL_DIR)/qpic_nand.o \
$(LOCAL_DIR)/dev_tree.o \
$(LOCAL_DIR)/scm.o \
- $(LOCAL_DIR)/gpio.o
+ $(LOCAL_DIR)/gpio.o \
+ $(LOCAL_DIR)/shutdown_detect.o
endif
ifeq ($(PLATFORM),apq8084)
diff --git a/platform/msm_shared/scm.c b/platform/msm_shared/scm.c
index 8adc0d2..5592f20 100644
--- a/platform/msm_shared/scm.c
+++ b/platform/msm_shared/scm.c
@@ -29,6 +29,8 @@
#include <stdlib.h>
#include <string.h>
#include <err.h>
+#include <asm.h>
+#include <bits.h>
#include <arch/ops.h>
#include "scm.h"
@@ -41,6 +43,14 @@
# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
+#define SCM_CLASS_REGISTER (0x2 << 8)
+#define SCM_MASK_IRQS BIT(5)
+#define SCM_ATOMIC(svc, cmd, n) ((((((svc) & 0x3f) << 10)|((cmd) & 0x3ff)) << 12) | \
+ SCM_CLASS_REGISTER | \
+ SCM_MASK_IRQS | \
+ ((n) & 0xf))
+
+
/**
* alloc_scm_command() - Allocate an SCM command
* @cmd_size: size of the command buffer
@@ -122,6 +132,32 @@
}
/**
+* scm_call_automic: Make scm call with one or no argument
+* @svc: service id
+* @cmd: command id
+* @ arg1: argument
+*/
+
+static int scm_call_atomic(uint32_t svc, uint32_t cmd, uint32_t arg1)
+{
+ uint32_t context_id;
+ register uint32_t r0 __asm__("r0") = SCM_ATOMIC(svc, cmd, 1);
+ register uint32_t r1 __asm__("r1") = &context_id;
+ register uint32_t r2 __asm__("r2") = arg1;
+
+ __asm__ volatile(
+ __asmeq("%0", "r0")
+ __asmeq("%1", "r0")
+ __asmeq("%2", "r1")
+ __asmeq("%3", "r2")
+ "smc #0 @ switch to secure world\n"
+ : "=r" (r0)
+ : "r" (r0), "r" (r1), "r" (r2)
+ : "r3");
+ return r0;
+}
+
+/**
* scm_call() - Send an SCM command
* @svc_id: service identifier
* @cmd_id: command identifier
@@ -561,3 +597,11 @@
return resp_buf;
}
+int scm_halt_pmic_arbiter()
+{
+ int ret = 0;
+
+ ret = scm_call_atomic(SCM_SVC_PWR, SCM_IO_DISABLE_PMIC_ARBITER, 0);
+
+ return ret;
+}
diff --git a/platform/msm_shared/sdhci.c b/platform/msm_shared/sdhci.c
index 547f4ec..9c4e8ed 100644
--- a/platform/msm_shared/sdhci.c
+++ b/platform/msm_shared/sdhci.c
@@ -264,13 +264,6 @@
REG_WRITE16(host, ctrl, SDHCI_HOST_CTRL2_REG);
- /*
- * SDHC spec does not have matching UHS mode
- * So we use Vendor specific registers to enable
- * HS400 mode
- */
- sdhci_msm_set_mci_clk(host);
-
/* Run the clock back */
sdhci_clk_supply(host, clk_val);
}
diff --git a/platform/msm_shared/shutdown_detect.c b/platform/msm_shared/shutdown_detect.c
new file mode 100644
index 0000000..a51c9ae
--- /dev/null
+++ b/platform/msm_shared/shutdown_detect.c
@@ -0,0 +1,160 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <debug.h>
+#include <reg.h>
+#include <stdlib.h>
+#include <pm8x41.h>
+#include <pm8x41_hw.h>
+#include <kernel/timer.h>
+#include <platform/timer.h>
+#include <shutdown_detect.h>
+
+/* sleep clock is 32.768 khz, 0x8000 count per second */
+#define MPM_SLEEP_TIMETICK_COUNT 0x8000
+#define PWRKEY_LONG_PRESS_COUNT 0xC000
+#define QPNP_DEFAULT_TIMEOUT 250
+#define PWRKEY_DETECT_FREQUENCY 50
+
+static struct timer pon_timer;
+static uint32_t pon_timer_complete = 0;
+
+/*
+ * Function to check if the the power key is pressed long enough.
+ * Return 0 if boot time more than PWRKEY_LONG_PRESS_COUNT.
+ * Return 1 if boot time less than PWRKEY_LONG_PRESS_COUNT.
+ */
+static uint32_t is_pwrkey_time_expired()
+{
+ /* power on button tied in with PMIC KPDPWR. */
+ uint32_t sclk_count = platform_get_sclk_count();
+
+ /* Here check if the long press power-key lasts for 1.5s */
+ if (sclk_count > PWRKEY_LONG_PRESS_COUNT)
+ return 0;
+ else
+ return 1;
+}
+
+/*
+ * Function to check if the power on reason is power key triggered.
+ * Return 1 if it is triggered by power key.
+ * Return 0 if it is not triggered by power key.
+ */
+static uint32_t is_pwrkey_pon_reason()
+{
+ uint8_t pon_reason = pm8x41_get_pon_reason();
+
+ if (pm8x41_get_is_cold_boot() && (pon_reason == KPDPWR_N))
+ return 1;
+ else
+ return 0;
+}
+
+/*
+ * Main timer handle: check every PWRKEY_DETECT_FREQUENCY to see
+ * if power key is pressed.
+ * Shutdown the device if power key is release before
+ * (PWRKEY_LONG_PRESS_COUNT/MPM_SLEEP_TIMETICK_COUNT) seconds.
+ */
+static enum handler_return long_press_pwrkey_timer_func(struct timer *p_timer,
+ void *arg)
+{
+ uint32_t sclk_count = platform_get_sclk_count();
+
+ /*
+ * The following condition is treated as the power key
+ * is pressed long enough.
+ * 1. if the power key is pressed last for PWRKEY_LONG_PRESS_COUNT.
+ */
+ if (sclk_count > PWRKEY_LONG_PRESS_COUNT) {
+ timer_cancel(p_timer);
+ pon_timer_complete = 1;
+ } else {
+ if (pm8x41_get_pwrkey_is_pressed()) {
+ /*
+ * For normal man response is > 0.1 secs, so we use 0.05 secs default
+ * for software to be safely detect if there is a key release action.
+ */
+ timer_set_oneshot(p_timer, PWRKEY_DETECT_FREQUENCY,
+ long_press_pwrkey_timer_func, NULL);
+ } else {
+ shutdown_device();
+ }
+ }
+
+ return INT_RESCHEDULE;
+}
+
+/*
+ * Function to wait until the power key is pressed long enough
+ */
+static void wait_for_long_pwrkey_pressed()
+{
+ uint32_t sclk_count = 0;
+
+ while (!pon_timer_complete) {
+ sclk_count = platform_get_sclk_count();
+ if (sclk_count > PWRKEY_LONG_PRESS_COUNT) {
+ timer_cancel(&pon_timer);
+ break;
+ }
+ }
+}
+
+/*
+ * Function to support for shutdown detection
+ * If below condition is met, the function will shut down
+ * the device. Otherwise it will do nothing and return to
+ * normal boot.
+ * condition:
+ * 1. it is triggered by power key &&
+ * 2. the power key is released before
+ * (PWRKEY_LONG_PRESS_COUNT/MPM_SLEEP_TIMETICK_COUNT) seconds.
+ */
+void shutdown_detect()
+{
+ /*
+ * If it is booted by power key tirigger.
+ * Initialize pon_timer and call long_press_pwrkey_timer_func
+ * function to check if the power key is last press long enough.
+ */
+ if (is_pwrkey_pon_reason() && is_pwrkey_time_expired()) {
+ timer_initialize(&pon_timer);
+ timer_set_oneshot(&pon_timer, 0, long_press_pwrkey_timer_func, NULL);
+
+ /*
+ * Wait until long press power key timeout
+ *
+ * It will be confused to end users if we shutdown the device
+ * after the splash screen displayed. But it can be moved the
+ * wait here if the boot time is much more considered.
+ */
+ wait_for_long_pwrkey_pressed();
+ }
+}
diff --git a/platform/msm_shared/uart_dm.c b/platform/msm_shared/uart_dm.c
index f551a7a..c92a34f 100644
--- a/platform/msm_shared/uart_dm.c
+++ b/platform/msm_shared/uart_dm.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <stdlib.h>
#include <debug.h>
+#include <kernel/thread.h>
#include <reg.h>
#include <sys/types.h>
#include <platform/iomap.h>
@@ -339,6 +340,8 @@
}
}
+ //We need to make sure the DM_NO_CHARS_FOR_TX&DM_TF are are programmed atmoically.
+ enter_critical_section();
/* We are here. FIFO is ready to be written. */
/* Write number of characters to be written */
writel(num_of_chars, MSM_BOOT_UART_DM_NO_CHARS_FOR_TX(base));
@@ -366,6 +369,7 @@
tx_char_left = num_of_chars - (i + 1) * 4;
tx_data = tx_data + num_chars_written;
}
+ exit_critical_section();
return MSM_BOOT_UART_DM_E_SUCCESS;
}
diff --git a/project/msm8226.mk b/project/msm8226.mk
index 1e94e03..2c97294 100644
--- a/project/msm8226.mk
+++ b/project/msm8226.mk
@@ -10,6 +10,9 @@
EMMC_BOOT := 1
ENABLE_SDHCI_SUPPORT := 1
+#enable power on vibrator feature
+ENABLE_PON_VIB_SUPPORT := true
+
#DEFINES += WITH_DEBUG_DCC=1
DEFINES += WITH_DEBUG_UART=1
DEFINES += WITH_DEBUG_LOG_BUF=1
@@ -26,6 +29,10 @@
#Disable thumb mode
ENABLE_THUMB := false
+ifeq ($(ENABLE_PON_VIB_SUPPORT),true)
+DEFINES += PON_VIB_SUPPORT=1
+endif
+
ifeq ($(ENABLE_SDHCI_SUPPORT),1)
DEFINES += MMC_SDHCI_SUPPORT=1
endif
diff --git a/project/msm8610.mk b/project/msm8610.mk
index 72eaf81..5bcad33 100644
--- a/project/msm8610.mk
+++ b/project/msm8610.mk
@@ -10,8 +10,12 @@
EMMC_BOOT := 1
ENABLE_SDHCI_SUPPORT := 1
+#enable power on vibrator feature
+ENABLE_PON_VIB_SUPPORT := true
+
#DEFINES += WITH_DEBUG_DCC=1
DEFINES += WITH_DEBUG_UART=1
+DEFINES += WITH_DEBUG_LOG_BUF=1
#DEFINES += WITH_DEBUG_FBCON=1
DEFINES += DEVICE_TREE=1
#DEFINES += MMC_BOOT_BAM=1
@@ -28,6 +32,10 @@
#is with the linker and file a bug report.
ENABLE_THUMB := false
+ifeq ($(ENABLE_PON_VIB_SUPPORT),true)
+DEFINES += PON_VIB_SUPPORT=1
+endif
+
ifeq ($(ENABLE_SDHCI_SUPPORT),1)
DEFINES += MMC_SDHCI_SUPPORT=1
endif
diff --git a/target/apq8084/oem_panel.c b/target/apq8084/oem_panel.c
index eeae271..3b487c6 100644
--- a/target/apq8084/oem_panel.c
+++ b/target/apq8084/oem_panel.c
@@ -153,7 +153,7 @@
return ret;
}
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
struct msm_panel_info *pinfo,
struct mdss_dsi_phy_ctrl *phy_db)
{
diff --git a/target/apq8084/target_display.c b/target/apq8084/target_display.c
old mode 100644
new mode 100755
index 517ea1b..fd6f766
--- a/target/apq8084/target_display.c
+++ b/target/apq8084/target_display.c
@@ -242,16 +242,16 @@
return NO_ERROR;
}
-void display_init(void)
+void target_display_init(const char *panel_name)
{
uint32_t ret = 0;
- ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+ ret = gcdb_display_init(panel_name, MDP_REV_50, MIPI_FB_ADDR);
if (ret) {
msm_display_off();
}
}
-void display_shutdown(void)
+void target_display_shutdown(void)
{
gcdb_display_shutdown();
}
diff --git a/target/init.c b/target/init.c
index 7875a4f..8eeb906 100644
--- a/target/init.c
+++ b/target/init.c
@@ -146,6 +146,14 @@
return false;
}
+__WEAK void target_display_init(const char *panel_name)
+{
+}
+
+__WEAK void target_display_shutdown(void)
+{
+}
+
__WEAK uint8_t target_panel_auto_detect_enabled()
{
return 0;
diff --git a/target/msm7627a/init.c b/target/msm7627a/init.c
index 502cb54..41c9611 100644
--- a/target/msm7627a/init.c
+++ b/target/msm7627a/init.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2009, Google Inc.
* All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -186,12 +186,6 @@
keypad_init();
#endif
- /* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
- display_init();
- dprintf(SPEW, "Diplay initialized\n");
-#endif
-
if (target_is_emmc_boot()) {
/* Must wait for modem-up before we can intialize MMC.
*/
diff --git a/target/msm7627a/target_display.c b/target/msm7627a/target_display.c
old mode 100644
new mode 100755
index 0c4d073..94270b5
--- a/target/msm7627a/target_display.c
+++ b/target/msm7627a/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -69,7 +69,7 @@
}
return ret;
}
-void display_init(void)
+void target_display_init(const char *panel_name)
{
unsigned mach_type;
mach_type = board_machtype();
@@ -155,7 +155,7 @@
display_enabled = 1;
}
-void display_shutdown(void)
+void target_display_shutdown(void)
{
dprintf(SPEW, "display_shutdown()\n");
if (display_enabled)
diff --git a/target/msm8226/init.c b/target/msm8226/init.c
index 3da5c15..74baa49 100644
--- a/target/msm8226/init.c
+++ b/target/msm8226/init.c
@@ -48,6 +48,8 @@
#include <scm.h>
#include <stdlib.h>
#include <partition_parser.h>
+#include <shutdown_detect.h>
+#include <vibrator.h>
extern bool target_use_signed_kernel(void);
static void set_sdc_power_ctrl(void);
@@ -65,6 +67,7 @@
#define CRYPTO_ENGINE_CMD_ARRAY_SIZE 20
#define TLMM_VOL_UP_BTN_GPIO 106
+#define VIBRATE_TIME 250
#define SSD_CE_INSTANCE 1
@@ -247,12 +250,10 @@
target_sdc_init();
- /* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
- dprintf(SPEW, "Display Init: Start\n");
- display_init();
- dprintf(SPEW, "Display Init: Done\n");
-#endif
+ shutdown_detect();
+
+ /* turn on vibrator to indicate that phone is booting up to end user */
+ vib_timed_turn_on(VIBRATE_TIME);
if (target_use_signed_kernel())
target_crypto_init_params();
@@ -375,6 +376,24 @@
dprintf(CRITICAL, "Rebooting failed\n");
}
+/* Configure PMIC and Drop PS_HOLD for shutdown */
+void shutdown_device()
+{
+ dprintf(CRITICAL, "Going down for shutdown.\n");
+
+ /* Configure PMIC for shutdown */
+ pm8x41_reset_configure(PON_PSHOLD_SHUTDOWN);
+
+ /* Drop PS_HOLD for MSM */
+ writel(0x00, MPM2_MPM_PS_HOLD);
+
+ mdelay(5000);
+
+ dprintf(CRITICAL, "shutdown failed\n");
+
+ ASSERT(0);
+}
+
crypto_engine_type board_ce_type(void)
{
return CRYPTO_ENGINE_TYPE_HW;
@@ -393,6 +412,9 @@
void target_uninit(void)
{
+ /* wait for the vibrator timer is expried */
+ wait_vib_timeout();
+
mmc_put_card_to_sleep(dev);
if (target_is_ssd_enabled())
@@ -503,6 +525,8 @@
dload_util_write_cookie(mode == NORMAL_DLOAD ?
DLOAD_MODE_ADDR : EMERGENCY_DLOAD_MODE_ADDR, mode);
+ pm8x41_clear_pmic_watchdog();
+
return 0;
}
diff --git a/target/msm8226/oem_panel.c b/target/msm8226/oem_panel.c
index f23aded..8326442 100755
--- a/target/msm8226/oem_panel.c
+++ b/target/msm8226/oem_panel.c
@@ -52,6 +52,7 @@
#define DISPLAY_MAX_PANEL_DETECTION 2
#define SSD2080M_720P_VIDEO_PANEL_ON_DELAY 200
+#define MAX_PANEL_ID_LEN 64
/*---------------------------------------------------------------------------*/
/* static panel selection variable */
@@ -78,6 +79,21 @@
HW_PLATFORM_SUBTYPE_SKUG = 5,
};
+/*
+ * The list of panels that are supported on this target.
+ * Any panel in this list can be selected using fastboot oem command.
+ */
+static struct panel_list supp_panels[] = {
+ {"toshiba_720p_video", TOSHIBA_720P_VIDEO_PANEL},
+ {"nt35590_720p_cmd", NT35590_720P_CMD_PANEL},
+ {"nt35590_720p_video", NT35590_720P_VIDEO_PANEL},
+ {"nt35596_1080p_video", NT35596_1080P_VIDEO_PANEL},
+ {"hx8394a_720p_video", HX8394A_720P_VIDEO_PANEL},
+ {"nt35521_720p_video", NT35521_720P_VIDEO_PANEL},
+ {"ssd2080m_720p_video", SSD2080M_720P_VIDEO_PANEL},
+ {"jdi_1080p_video", JDI_1080P_VIDEO_PANEL},
+};
+
static uint32_t panel_id;
int oem_panel_rotation()
@@ -119,6 +135,12 @@
return NO_ERROR;
}
+static void mdss_source_pipe_select(struct msm_panel_info *pinfo)
+{
+ /* Use DMA pipe for splash logo on 8x26 */
+ pinfo->use_dma_pipe = 1;
+}
+
static void init_panel_data(struct panel_struct *panelstruct,
struct msm_panel_info *pinfo,
struct mdss_dsi_phy_ctrl *phy_db)
@@ -306,7 +328,7 @@
static uint32_t auto_pan_loop = 0;
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
struct msm_panel_info *pinfo,
struct mdss_dsi_phy_ctrl *phy_db)
{
@@ -315,10 +337,24 @@
uint32_t nt35590_panel_id = NT35590_720P_VIDEO_PANEL;
uint32_t hw_subtype = board_hardware_subtype();
bool ret = true;
+ int32_t panel_override_id;
-#if DISPLAY_TYPE_CMD_MODE
- nt35590_panel_id = NT35590_720P_CMD_PANEL;
-#endif
+ if (panel_name) {
+ panel_override_id = panel_name_to_id(supp_panels,
+ ARRAY_SIZE(supp_panels), panel_name);
+
+ if (panel_override_id < 0) {
+ dprintf(CRITICAL, "Not able to search the panel:%s\n",
+ panel_name + strspn(panel_name, " "));
+ } else if (panel_override_id < UNKNOWN_PANEL) {
+ /* panel override using fastboot oem command */
+ panel_id = panel_override_id;
+
+ dprintf(INFO, "OEM panel override:%s\n",
+ panel_name + strspn(panel_name, " "));
+ goto panel_init;
+ }
+ }
switch (hw_id) {
case HW_PLATFORM_QRD:
@@ -367,7 +403,9 @@
return false;
}
+panel_init:
init_panel_data(panelstruct, pinfo, phy_db);
+ mdss_source_pipe_select(pinfo);
return ret;
}
diff --git a/target/msm8226/rules.mk b/target/msm8226/rules.mk
index f5c9596..d31f2bc 100755
--- a/target/msm8226/rules.mk
+++ b/target/msm8226/rules.mk
@@ -18,7 +18,6 @@
DEFINES += DISPLAY_SPLASH_SCREEN=1
DEFINES += DISPLAY_TYPE_MIPI=1
DEFINES += DISPLAY_TYPE_DSI6G=1
-DEFINES += DISPLAY_TYPE_CMD_MODE=0
MODULES += \
dev/keys \
@@ -26,6 +25,7 @@
dev/pmic/pm8x41 \
dev/panel/msm \
dev/gcdb/display \
+ dev/vib \
lib/libfdt
DEFINES += \
diff --git a/target/msm8226/target_display.c b/target/msm8226/target_display.c
index c89c1ac..2e608c8 100755
--- a/target/msm8226/target_display.c
+++ b/target/msm8226/target_display.c
@@ -341,13 +341,13 @@
return ret;
}
-void display_init(void)
+void target_display_init(const char *panel_name)
{
uint32_t panel_loop = 0;
uint32_t ret = 0;
do {
- ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+ ret = gcdb_display_init(panel_name, MDP_REV_50, MIPI_FB_ADDR);
if (!ret || ret == ERR_NOT_SUPPORTED) {
break;
} else {
@@ -359,7 +359,7 @@
}
-void display_shutdown(void)
+void target_display_shutdown(void)
{
gcdb_display_shutdown();
}
diff --git a/target/msm8610/init.c b/target/msm8610/init.c
index 1fd5e23..d085765 100644
--- a/target/msm8610/init.c
+++ b/target/msm8610/init.c
@@ -49,11 +49,14 @@
#include <partition_parser.h>
#include <platform/clock.h>
#include <platform/timer.h>
+#include <shutdown_detect.h>
+#include <vibrator.h>
#define PMIC_ARB_CHANNEL_NUM 0
#define PMIC_ARB_OWNER_ID 0
#define TLMM_VOL_UP_BTN_GPIO 72
+#define VIBRATE_TIME 250
enum target_subtype {
HW_PLATFORM_SUBTYPE_SKUAA = 1,
@@ -164,15 +167,18 @@
target_sdc_init();
- /* Display splash screen if enabled */
- dprintf(SPEW, "Display Init: Start\n");
- display_init();
- dprintf(SPEW, "Display Init: Done\n");
+ shutdown_detect();
+
+ /* turn on vibrator to indicate that phone is booting up to end user */
+ vib_timed_turn_on(VIBRATE_TIME);
}
void target_uninit(void)
{
mmc_put_card_to_sleep(dev);
+
+ /* wait for the vibrator timer is expried */
+ wait_vib_timeout();
}
#define SSD_CE_INSTANCE 1
@@ -316,11 +322,17 @@
void reboot_device(unsigned reboot_reason)
{
+ int ret = 0;
+
writel(reboot_reason, RESTART_REASON_ADDR);
/* Configure PMIC for warm reset */
pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
+ ret = scm_halt_pmic_arbiter();
+ if (ret)
+ dprintf(CRITICAL , "Failed to halt pmic arbiter: %d\n", ret);
+
/* Drop PS_HOLD for MSM */
writel(0x00, MPM2_MPM_PS_HOLD);
@@ -424,3 +436,21 @@
{
return dev;
}
+
+/* Configure PMIC and Drop PS_HOLD for shutdown */
+void shutdown_device()
+{
+ dprintf(CRITICAL, "Going down for shutdown.\n");
+
+ /* Configure PMIC for shutdown */
+ pm8x41_reset_configure(PON_PSHOLD_SHUTDOWN);
+
+ /* Drop PS_HOLD for MSM */
+ writel(0x00, MPM2_MPM_PS_HOLD);
+
+ mdelay(5000);
+
+ dprintf(CRITICAL, "shutdown failed\n");
+
+ ASSERT(0);
+}
diff --git a/target/msm8610/oem_panel.c b/target/msm8610/oem_panel.c
index 8ea0a5e..e1fad7c 100644
--- a/target/msm8610/oem_panel.c
+++ b/target/msm8610/oem_panel.c
@@ -221,7 +221,7 @@
return true;
}
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
struct msm_panel_info *pinfo,
struct mdss_dsi_phy_ctrl *phy_db)
{
diff --git a/target/msm8610/rules.mk b/target/msm8610/rules.mk
index 909e673..7ffcfe1 100644
--- a/target/msm8610/rules.mk
+++ b/target/msm8610/rules.mk
@@ -25,6 +25,7 @@
dev/pmic/pm8x41 \
dev/panel/msm \
dev/gcdb/display \
+ dev/vib \
lib/libfdt
DEFINES += \
diff --git a/target/msm8610/target_display.c b/target/msm8610/target_display.c
old mode 100644
new mode 100755
index fde805a..4b963b8
--- a/target/msm8610/target_display.c
+++ b/target/msm8610/target_display.c
@@ -162,12 +162,12 @@
return 0;
}
-void display_init(void)
+void target_display_init(const char *panel_name)
{
- gcdb_display_init(MDP_REV_304, MIPI_FB_ADDR);
+ gcdb_display_init(panel_name, MDP_REV_304, MIPI_FB_ADDR);
}
-void display_shutdown(void)
+void target_display_shutdown(void)
{
gcdb_display_shutdown();
}
diff --git a/target/msm8960/init.c b/target/msm8960/init.c
index 72d9463..dcee3b4 100755
--- a/target/msm8960/init.c
+++ b/target/msm8960/init.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2009, Google Inc.
* All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -142,12 +142,6 @@
dprintf(CRITICAL,"Keyboard is not supported for platform: %d\n",platform_id);
};
- /* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
- display_init();
- dprintf(SPEW, "Diplay initialized\n");
-#endif
-
if ((platform_id == MSM8960) || (platform_id == MSM8960AB) ||
(platform_id == APQ8060AB) || (platform_id == MSM8260AB) ||
(platform_id == MSM8660AB) || (platform_id == MSM8660A) ||
diff --git a/target/msm8960/target_display.c b/target/msm8960/target_display.c
old mode 100644
new mode 100755
index 39a3aeb..2eec1ea
--- a/target/msm8960/target_display.c
+++ b/target/msm8960/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -255,7 +255,7 @@
return 0;
}
-void display_init(void)
+void target_display_init(const char *panel_name)
{
int target_id = board_target_id();
@@ -345,7 +345,7 @@
display_enable = 1;
}
-void display_shutdown(void)
+void target_display_shutdown(void)
{
if (display_enable) {
msm_display_off();
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index 2e6c151..20d3b02 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -351,15 +351,6 @@
if (target_use_signed_kernel())
target_crypto_init_params();
- /* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
- dprintf(INFO, "Display Init: Start\n");
- if (board_hardware_subtype() != HW_PLATFORM_SUBTYPE_CDP_INTERPOSER)
- {
- display_init();
- }
- dprintf(INFO, "Display Init: Done\n");
-#endif
/*
* Set drive strength & pull ctrl for
diff --git a/target/msm8974/oem_panel.c b/target/msm8974/oem_panel.c
index 0bda609..1634cd4 100755
--- a/target/msm8974/oem_panel.c
+++ b/target/msm8974/oem_panel.c
@@ -232,7 +232,7 @@
static uint32_t auto_pan_loop = 0;
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
struct msm_panel_info *pinfo,
struct mdss_dsi_phy_ctrl *phy_db)
{
diff --git a/target/msm8974/target_display.c b/target/msm8974/target_display.c
old mode 100644
new mode 100755
index c32cef0..b8dc850
--- a/target/msm8974/target_display.c
+++ b/target/msm8974/target_display.c
@@ -58,40 +58,76 @@
.full_current_scale = 0x19
};
-static uint32_t dsi_pll_enable_seq(uint32_t ctl_base)
+static uint32_t dsi_pll_lock_status(uint32_t ctl_base)
{
- uint32_t rc = 0;
+ uint32_t counter, status;
+ udelay(100);
+ mdss_dsi_uniphy_pll_lock_detect_setting(ctl_base);
+
+ status = readl(ctl_base + 0x02c0) & 0x01;
+ for (counter = 0; counter < 5 && !status; counter++) {
+ udelay(100);
+ status = readl(ctl_base + 0x02c0) & 0x01;
+ }
+
+ return status;
+}
+
+static uint32_t dsi_pll_enable_seq_b(uint32_t ctl_base)
+{
mdss_dsi_uniphy_pll_sw_reset(ctl_base);
writel(0x01, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
+ udelay(1);
writel(0x05, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
+ udelay(200);
writel(0x07, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
+ udelay(500);
writel(0x0f, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
+ udelay(500);
- mdss_dsi_uniphy_pll_lock_detect_setting(ctl_base);
+ return dsi_pll_lock_status(ctl_base);
+}
- while (!(readl(ctl_base + 0x02c0) & 0x01)) {
- mdss_dsi_uniphy_pll_sw_reset(ctl_base);
- writel(0x01, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
- writel(0x05, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
- writel(0x07, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
- writel(0x05, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
- writel(0x07, ctl_base + 0x0220); /* GLB CFG */
- mdelay(1);
- writel(0x0f, ctl_base + 0x0220); /* GLB CFG */
- mdelay(2);
- mdss_dsi_uniphy_pll_lock_detect_setting(ctl_base);
+static uint32_t dsi_pll_enable_seq_d(uint32_t ctl_base)
+{
+ mdss_dsi_uniphy_pll_sw_reset(ctl_base);
+
+ writel(0x01, ctl_base + 0x0220); /* GLB CFG */
+ udelay(1);
+ writel(0x05, ctl_base + 0x0220); /* GLB CFG */
+ udelay(200);
+ writel(0x07, ctl_base + 0x0220); /* GLB CFG */
+ udelay(250);
+ writel(0x05, ctl_base + 0x0220); /* GLB CFG */
+ udelay(200);
+ writel(0x07, ctl_base + 0x0220); /* GLB CFG */
+ udelay(500);
+ writel(0x0f, ctl_base + 0x0220); /* GLB CFG */
+ udelay(500);
+
+ return dsi_pll_lock_status(ctl_base);
+}
+
+static void dsi_pll_enable_seq(uint32_t ctl_base)
+{
+ uint32_t counter, status;
+
+ for (counter = 0; counter < 3; counter++) {
+ status = dsi_pll_enable_seq_b(ctl_base);
+ if (status)
+ break;
+ status = dsi_pll_enable_seq_d(ctl_base);
+ if (status)
+ break;
+ status = dsi_pll_enable_seq_d(ctl_base);
+ if(status)
+ break;
}
- return rc;
+
+ if (!status)
+ dprintf(CRITICAL, "Pll lock sequence failed\n");
}
static int msm8974_wled_backlight_ctrl(uint8_t enable)
@@ -330,7 +366,7 @@
return 0;
}
-void display_init(void)
+void target_display_init(const char *panel_name)
{
uint32_t hw_id = board_hardware_id();
uint32_t panel_loop = 0;
@@ -353,7 +389,8 @@
break;
default:
do {
- ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+ ret = gcdb_display_init(panel_name, MDP_REV_50,
+ MIPI_FB_ADDR);
if (!ret || ret == ERR_NOT_SUPPORTED) {
break;
} else {
@@ -366,7 +403,7 @@
}
}
-void display_shutdown(void)
+void target_display_shutdown(void)
{
uint32_t hw_id = board_hardware_id();
switch (hw_id) {