diff --git a/configs/stm3210e-eval/src/up_lcd.c b/configs/stm3210e-eval/src/up_lcd.c index a183a04cb1c..fccf680a5f9 100755 --- a/configs/stm3210e-eval/src/up_lcd.c +++ b/configs/stm3210e-eval/src/up_lcd.c @@ -33,7 +33,15 @@ * POSSIBILITY OF SUCH DAMAGE. * **************************************************************************************/ - +/* This driver supports the following LCDs: + * + * 1. Ampire AM-240320LTNQW00H + * 2. Orise Tech SPFD5408B + * 3. RenesasSP R61580 + * + * The driver dynamically selects the LCD based on the reported LCD ID value. + */ + /************************************************************************************** * Included Files **************************************************************************************/ @@ -259,6 +267,11 @@ #define LCD_BL_TIMER_PERIOD 8999 +/* LCD IDs */ + +#define SPFD5408B_ID 0x5408 +#define R61580_ID 0x1580 + /* Debug ******************************************************************************/ #ifdef CONFIG_DEBUG_LCD @@ -848,9 +861,16 @@ static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) static inline void stm3210e_lcdinitialize(void) { - /* Check if the LCD is SPFD5408B Controller */ + uint16_t id; - if (stm3210e_readreg(LCD_REG_0) == 0x5408) + /* Check if the LCD is Orise Tech SPFD5408B Controller (or the compatible RenesasSP + * R61580). + */ + + id = stm3210e_readreg(LCD_REG_0); + lcddbg("ID: %04x\n", id); + + if (id == SPFD5408B_ID || id == R61580_ID) { g_lcddev.spfd5408b = true;