dev: gcdb: Add reset sequence to panel configuration headers
Changing the reset sequence to be panel specific so different
panels on the same platform can have different reset sequences.
Change-Id: I3b886186135e1a29c8cfa500bd02a7e903908e71
diff --git a/dev/gcdb/display/gcdb_display.c b/dev/gcdb/display/gcdb_display.c
index 169fb1c..3796281 100755
--- a/dev/gcdb/display/gcdb_display.c
+++ b/dev/gcdb/display/gcdb_display.c
@@ -76,7 +76,7 @@
uint32_t ret = NO_ERROR;
ret = target_panel_reset(enable, &reset_gpio,
- &enable_gpio, &reset_sequence);
+ &enable_gpio, panelstruct.panelresetseq);
return ret;
}
diff --git a/dev/gcdb/display/include/display_resource.h b/dev/gcdb/display/include/display_resource.h
index 24a375d..c469ec8 100755
--- a/dev/gcdb/display/include/display_resource.h
+++ b/dev/gcdb/display/include/display_resource.h
@@ -37,8 +37,6 @@
#include <smem.h>
#include <board.h>
-#define TOTAL_RESET_GPIO_CTRL 5
-
#define TOTAL_LDO_CTRL 5
/*---------------------------------------------------------------------------*/
@@ -56,13 +54,6 @@
uint32_t pin_state;
};
-typedef struct panel_reset_sequence {
-
- uint8_t pin_state[TOTAL_RESET_GPIO_CTRL];
- uint32_t sleep[TOTAL_RESET_GPIO_CTRL];
- uint8_t pin_direction;
-};
-
/*LDO entry structure for different LDO entries. */
typedef struct ldo_entry{
char *ldo_name;
diff --git a/dev/gcdb/display/include/panel.h b/dev/gcdb/display/include/panel.h
index 3056fbf..54eba7e 100755
--- a/dev/gcdb/display/include/panel.h
+++ b/dev/gcdb/display/include/panel.h
@@ -36,6 +36,8 @@
#include <debug.h>
#include <smem.h>
+#define TOTAL_RESET_GPIO_CTRL 5
+
/*---------------------------------------------------------------------------*/
/* Structure definition */
/*---------------------------------------------------------------------------*/
@@ -150,6 +152,12 @@
BL_LPG,
};
+typedef struct panel_reset_sequence {
+ uint8_t pin_state[TOTAL_RESET_GPIO_CTRL];
+ uint32_t sleep[TOTAL_RESET_GPIO_CTRL];
+ uint8_t pin_direction;
+};
+
typedef struct backlight {
uint16_t bl_interface_type;
uint16_t bl_min_level;
diff --git a/dev/gcdb/display/include/panel_hx8394a_720p_video.h b/dev/gcdb/display/include/panel_hx8394a_720p_video.h
index d50b5be..36a88bc 100644
--- a/dev/gcdb/display/include/panel_hx8394a_720p_video.h
+++ b/dev/gcdb/display/include/panel_hx8394a_720p_video.h
@@ -265,6 +265,10 @@
0, 4, 0x1f, 0x2d
};
+static struct panel_reset_sequence hx8394a_720p_video_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 20, 20, }, 2
+};
+
/*---------------------------------------------------------------------------*/
/* Backlight Settings */
/*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/include/panel_nt35521_720p_video.h b/dev/gcdb/display/include/panel_nt35521_720p_video.h
index 6eb316e..c5f9069 100644
--- a/dev/gcdb/display/include/panel_nt35521_720p_video.h
+++ b/dev/gcdb/display/include/panel_nt35521_720p_video.h
@@ -1466,6 +1466,10 @@
0, 4, 0x20, 0x2D
};
+static struct panel_reset_sequence nt35521_720p_video_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 20, 20, }, 2
+};
+
/*---------------------------------------------------------------------------*/
/* Backlight Settings */
/*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/include/panel_nt35590_720p_cmd.h b/dev/gcdb/display/include/panel_nt35590_720p_cmd.h
index ca0b4e5..47ec49f 100755
--- a/dev/gcdb/display/include/panel_nt35590_720p_cmd.h
+++ b/dev/gcdb/display/include/panel_nt35590_720p_cmd.h
@@ -2923,6 +2923,10 @@
0, 4, 0x20, 0x2c
};
+static struct panel_reset_sequence nt35590_720p_cmd_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 20, 20, }, 2
+};
+
/*---------------------------------------------------------------------------*/
/* Backlight Settings */
/*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/include/panel_nt35590_720p_video.h b/dev/gcdb/display/include/panel_nt35590_720p_video.h
index 06c7dd5..ce740a7 100755
--- a/dev/gcdb/display/include/panel_nt35590_720p_video.h
+++ b/dev/gcdb/display/include/panel_nt35590_720p_video.h
@@ -2923,6 +2923,10 @@
0, 4, 0x20, 0x2c
};
+static struct panel_reset_sequence nt35590_720p_video_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 20, 20, }, 2
+};
+
/*---------------------------------------------------------------------------*/
/* Backlight Settings */
/*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/include/panel_nt35596_1080p_video.h b/dev/gcdb/display/include/panel_nt35596_1080p_video.h
index e5dad1a..3d35b61 100644
--- a/dev/gcdb/display/include/panel_nt35596_1080p_video.h
+++ b/dev/gcdb/display/include/panel_nt35596_1080p_video.h
@@ -3251,6 +3251,10 @@
0, 4, 0x1e, 0x38
};
+static struct panel_reset_sequence nt35596_1080p_video_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 20, 20, }, 2
+};
+
/*---------------------------------------------------------------------------*/
/* Backlight Settings */
/*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/include/panel_toshiba_720p_video.h b/dev/gcdb/display/include/panel_toshiba_720p_video.h
index 4c09f45..312aade 100755
--- a/dev/gcdb/display/include/panel_toshiba_720p_video.h
+++ b/dev/gcdb/display/include/panel_toshiba_720p_video.h
@@ -332,6 +332,10 @@
0x0, 0x04, 0x04, 0x1b
};
+static struct panel_reset_sequence toshiba_720p_video_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 200, 20, }, 2
+};
+
/*---------------------------------------------------------------------------*/
/* Backlight Settings */
/*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/oem_panel.c b/dev/gcdb/display/oem_panel.c
index ce90e75..228dc6b 100755
--- a/dev/gcdb/display/oem_panel.c
+++ b/dev/gcdb/display/oem_panel.c
@@ -112,6 +112,8 @@
panelstruct->laneconfig = &toshiba_720p_video_lane_config;
panelstruct->paneltiminginfo
= &toshiba_720p_video_timing_info;
+ panelstruct->panelresetseq
+ = &toshiba_720p_video_panel_reset_seq;
panelstruct->backlightinfo = &toshiba_720p_video_backlight;
pinfo->mipi.panel_cmds
= toshiba_720p_video_on_command;
@@ -130,6 +132,8 @@
panelstruct->laneconfig = &nt35590_720p_video_lane_config;
panelstruct->paneltiminginfo
= &nt35590_720p_video_timing_info;
+ panelstruct->panelresetseq
+ = &nt35590_720p_video_panel_reset_seq;
panelstruct->backlightinfo = &nt35590_720p_video_backlight;
pinfo->mipi.panel_cmds
= nt35590_720p_video_on_command;
@@ -148,6 +152,8 @@
panelstruct->laneconfig = &nt35521_720p_video_lane_config;
panelstruct->paneltiminginfo
= &nt35521_720p_video_timing_info;
+ panelstruct->panelresetseq
+ = &nt35521_720p_video_panel_reset_seq;
panelstruct->backlightinfo = &nt35521_720p_video_backlight;
pinfo->mipi.panel_cmds
= nt35521_720p_video_on_command;
@@ -166,6 +172,8 @@
panelstruct->laneconfig = &hx8394a_720p_video_lane_config;
panelstruct->paneltiminginfo
= &hx8394a_720p_video_timing_info;
+ panelstruct->panelresetseq
+ = &hx8394a_720p_video_panel_reset_seq;
panelstruct->backlightinfo = &hx8394a_720p_video_backlight;
pinfo->mipi.panel_cmds
= hx8394a_720p_video_on_command;
@@ -184,6 +192,8 @@
panelstruct->state = &nt35590_720p_cmd_state;
panelstruct->laneconfig = &nt35590_720p_cmd_lane_config;
panelstruct->paneltiminginfo = &nt35590_720p_cmd_timing_info;
+ panelstruct->panelresetseq
+ = &nt35590_720p_cmd_panel_reset_seq;
panelstruct->backlightinfo = &nt35590_720p_cmd_backlight;
pinfo->mipi.panel_cmds
= nt35590_720p_cmd_on_command;
@@ -202,6 +212,8 @@
panelstruct->laneconfig = &nt35596_1080p_video_lane_config;
panelstruct->paneltiminginfo
= &nt35596_1080p_video_timing_info;
+ panelstruct->panelresetseq
+ = &nt35596_1080p_video_panel_reset_seq;
panelstruct->backlightinfo
= &nt35596_1080p_video_backlight;
pinfo->mipi.panel_cmds
diff --git a/dev/gcdb/display/panel_display.h b/dev/gcdb/display/panel_display.h
index 195a82c..e141a0c 100755
--- a/dev/gcdb/display/panel_display.h
+++ b/dev/gcdb/display/panel_display.h
@@ -43,15 +43,16 @@
/* struct definition */
/*---------------------------------------------------------------------------*/
typedef struct panel_struct{
- struct panel_config *paneldata;
- struct panel_resolution *panelres;
- struct color_info *color;
- struct videopanel_info *videopanel;
- struct commandpanel_info *commandpanel;
- struct command_state *state;
- struct lane_configuration *laneconfig;
- struct panel_timing *paneltiminginfo;
- struct backlight *backlightinfo;
+ struct panel_config *paneldata;
+ struct panel_resolution *panelres;
+ struct color_info *color;
+ struct videopanel_info *videopanel;
+ struct commandpanel_info *commandpanel;
+ struct command_state *state;
+ struct lane_configuration *laneconfig;
+ struct panel_timing *paneltiminginfo;
+ struct panel_reset_sequence *panelresetseq;
+ struct backlight *backlightinfo;
};