summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/ipod6g
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g')
-rw-r--r--firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c66
1 files changed, 64 insertions, 2 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c
index 45768f9bd4..14647a5697 100644
--- a/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c
+++ b/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c
@@ -95,9 +95,9 @@ static const unsigned short lcd_enter_deepstby_seq_23[] =
95 END 95 END
96}; 96};
97 97
98#ifdef HAVE_LCD_SLEEP
99/* init sequences */ 98/* init sequences */
100 99
100#ifdef HAVE_LCD_SLEEP
101static const unsigned char lcd_awake_seq_01[] = 101static const unsigned char lcd_awake_seq_01[] =
102{ 102{
103 CMD, 0x11, 0, /* Sleep Out Mode */ 103 CMD, 0x11, 0, /* Sleep Out Mode */
@@ -105,7 +105,9 @@ static const unsigned char lcd_awake_seq_01[] =
105 CMD, 0x29, 0, /* Display On */ 105 CMD, 0x29, 0, /* Display On */
106 END 106 END
107}; 107};
108#endif
108 109
110#if defined(HAVE_LCD_SLEEP) || defined(BOOTLOADER)
109static const unsigned short lcd_init_seq_23[] = 111static const unsigned short lcd_init_seq_23[] =
110{ 112{
111 /* Display settings */ 113 /* Display settings */
@@ -147,7 +149,59 @@ static const unsigned short lcd_init_seq_23[] =
147 MREG16(1), 0x007, 0x0173, 149 MREG16(1), 0x007, 0x0173,
148 END 150 END
149}; 151};
150#endif /* HAVE_LCD_SLEEP */ 152#endif /* HAVE_LCD_SLEEP || BOOTLOADER */
153
154#ifdef BOOTLOADER
155static const unsigned char lcd_init_seq_0[] =
156{
157 CMD, 0x11, 0, /* Sleep Out Mode */
158 SLEEP, 0x03, /* 30 ms */
159 CMD, 0x35, 1, 0x00, /* TEON (TBC) */
160 CMD, 0x3a, 1, 0x06, /* COLMOD (TBC) */
161 CMD, 0x36, 1, 0x00, /* MADCTR (TBC) */
162 CMD, 0x13, 0, /* NORON: Normal Mode On (Partial
163 Mode Off, Scroll Mode Off) */
164 CMD, 0x29, 0, /* Display On */
165 END
166};
167
168static const unsigned char lcd_init_seq_1[] =
169{
170 CMD, 0xb0, 21, 0x3a, 0x3a, 0x80, 0x80, 0x0a, 0x0a, 0x0a, 0x0a,
171 0x0a, 0x0a, 0x0a, 0x0a, 0x3c, 0x30, 0x0f, 0x00,
172 0x01, 0x54, 0x06, 0x66, 0x66,
173 CMD, 0xb8, 1, 0xd8,
174 CMD, 0xb1, 30, 0x14, 0x59, 0x00, 0x15, 0x57, 0x27, 0x04, 0x85,
175 0x14, 0x59, 0x00, 0x15, 0x57, 0x27, 0x04, 0x85,
176 0x14, 0x09, 0x15, 0x57, 0x27, 0x04, 0x05,
177 0x14, 0x09, 0x15, 0x57, 0x27, 0x04, 0x05,
178 CMD, 0xd2, 1, 0x01,
179
180 /* Gamma settings (TBC) */
181 CMD, 0xe0, 13, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x12, 0x16, 0x1f,
182 0x25, 0x22, 0x24, 0x29, 0x1c,
183 CMD, 0xe1, 13, 0x08, 0x01, 0x01, 0x06, 0x0b, 0x11, 0x15, 0x1f,
184 0x27, 0x26, 0x29, 0x2f, 0x1e,
185 CMD, 0xe2, 13, 0x07, 0x01, 0x01, 0x05, 0x09, 0x0f, 0x13, 0x1e,
186 0x26, 0x25, 0x28, 0x2e, 0x1e,
187 CMD, 0xe3, 13, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x12, 0x16, 0x1f,
188 0x25, 0x22, 0x24, 0x29, 0x1c,
189 CMD, 0xe4, 13, 0x08, 0x01, 0x01, 0x06, 0x0b, 0x11, 0x15, 0x1f,
190 0x27, 0x26, 0x29, 0x2f, 0x1e,
191 CMD, 0xe5, 13, 0x07, 0x01, 0x01, 0x05, 0x09, 0x0f, 0x13, 0x1e,
192 0x26, 0x25, 0x28, 0x2e, 0x1e,
193
194 CMD, 0x3a, 1, 0x06, /* COLMOD (TBC) */
195 CMD, 0xc2, 1, 0x00, /* Power Control 3 (TBC) */
196 CMD, 0x35, 1, 0x00, /* TEON (TBC) */
197 CMD, 0x11, 0, /* Sleep Out Mode */
198 SLEEP, 0x06, /* 60 ms */
199 CMD, 0x13, 0, /* NORON: Normal Mode On (Partial
200 Mode Off, Scroll Mode Off) */
201 CMD, 0x29, 0, /* Display On */
202 END
203};
204#endif
151 205
152/* DMA configuration */ 206/* DMA configuration */
153 207
@@ -367,6 +421,14 @@ void lcd_init_device(void)
367 /* Configure DMA channel */ 421 /* Configure DMA channel */
368 dmac_ch_init(&lcd_dma_ch, &lcd_dma_ch_cfg); 422 dmac_ch_init(&lcd_dma_ch, &lcd_dma_ch_cfg);
369 423
424#ifdef BOOTLOADER
425 switch (lcd_type) {
426 case 0: lcd_run_seq8(lcd_init_seq_0); break;
427 case 1: lcd_run_seq8(lcd_init_seq_1); break;
428 default: lcd_run_seq16(lcd_init_seq_23); break;
429 }
430#endif
431
370 lcd_ispowered = true; 432 lcd_ispowered = true;
371} 433}
372 434