coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fb.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /* LCD driver for Exynos */
4 
5 #include <device/mmio.h>
6 #include <console/console.h>
7 #include <delay.h>
8 #include <soc/dp.h>
9 #include <soc/dp-core.h>
10 #include <soc/fimd.h>
11 #include <soc/i2c.h>
12 #include <soc/power.h>
13 #include <soc/sysreg.h>
14 #include <timer.h>
15 
16 /*
17  * Here is the rough outline of how we bring up the display:
18  * 1. Upon power-on Sink generates a hot plug detection pulse thru HPD
19  * 2. Source determines video mode by reading DPCD receiver capability field
20  * (DPCD 00000h to 0000Dh) including eDP CP capability register (DPCD
21  * 0000Dh).
22  * 3. Sink replies DPCD receiver capability field.
23  * 4. Source starts EDID read thru I2C-over-AUX.
24  * 5. Sink replies EDID thru I2C-over-AUX.
25  * 6. Source determines link configuration, such as MAX_LINK_RATE and
26  * MAX_LANE_COUNT. Source also determines which type of eDP Authentication
27  * method to use and writes DPCD link configuration field (DPCD 00100h to
28  * 0010Ah) including eDP configuration set (DPCD 0010Ah).
29  * 7. Source starts link training. Sink does clock recovery and equalization.
30  * 8. Source reads DPCD link status field (DPCD 00200h to 0020Bh).
31  * 9. Sink replies DPCD link status field. If main link is not stable, Source
32  * repeats Step 7.
33  * 10. Source sends MSA (Main Stream Attribute) data. Sink extracts video
34  * parameters and recovers stream clock.
35  * 11. Source sends video data.
36  */
37 
38 /* To help debug any init errors here, define a list of possible errors */
39 enum {
44 
50 
56 
58 };
59 /* ok, this is stupid, but we're going to leave the variables in here until we
60  * know it works. One cleanup task at a time.
61  */
62 enum stage_t {
74 };
75 
79 
80 void *lcd_console_address; /* Start of console buffer */
81 
84 
85 /* Bypass FIMD of DISP1_BLK */
86 static void fimd_bypass(void)
87 {
90 }
91 
92 /*
93  * Initialize display controller.
94  *
95  * @param lcdbase pointer to the base address of framebuffer.
96  * @param pd pointer to the main panel_data structure
97  */
98 void fb_init(unsigned long int fb_size, void *lcdbase,
99  struct exynos5_fimd_panel *pd)
100 {
101  unsigned int val;
102 
103  fb_size = ALIGN(fb_size, 4096);
104 
108 
109  val = (pd->vsync << VSYNC_PULSE_WIDTH_OFFSET) |
113 
114  val = (pd->hsync << HSYNC_PULSE_WIDTH_OFFSET) |
118 
119  val = ((pd->xres - 1) << HOZVAL_OFFSET) |
120  ((pd->yres - 1) << LINEVAL_OFFSET);
122 
123  write32(&exynos_fimd->vidw00add0b0, (unsigned int)lcdbase);
124  write32(&exynos_fimd->vidw00add1b0, (unsigned int)lcdbase + fb_size);
125 
126  write32(&exynos_fimd->vidw00add2, pd->xres * 2);
127 
128  val = ((pd->xres - 1) << OSD_RIGHTBOTX_F_OFFSET);
129  val |= ((pd->yres - 1) << OSD_RIGHTBOTY_F_OFFSET);
131  write32(&exynos_fimd->vidosd0c, pd->xres * pd->yres);
132 
134 
138 
139  /* DPCLKCON_ENABLE */
140  write32(&exynos_fimd->dpclkcon, 1 << 1);
141 }
142 
143 /*
144  * Configure DP in slave mode and wait for video stream.
145  *
146  * param dp pointer to main s5p-dp structure
147  * param video_info pointer to main video_info structure.
148  * return status
149  */
150 static int s5p_dp_config_video(struct s5p_dp_device *dp,
151  struct video_info *video_info)
152 {
153  int timeout = 0;
154  struct exynos5_dp *base = dp->base;
155  struct stopwatch sw;
157 
162 
164  printk(BIOS_DEBUG, "PLL is not locked yet.\n");
165  return -ERR_PLL_NOT_UNLOCKED;
166  }
167 
169  do {
171  timeout++;
172  break;
173  }
174  } while (!stopwatch_expired(&sw));
175 
176  if (!timeout) {
177  printk(BIOS_ERR, "Video Clock Not ok after %ldus.\n",
179  return -ERR_VIDEO_CLOCK_BAD;
180  }
181 
182  /* Set to use the register calculated M/N video */
184 
185  clrbits32(&base->video_ctl_10, FORMAT_SEL);
186 
187  /* Disable video mute */
188  clrbits32(&base->video_ctl_1, HDCP_VIDEO_MUTE);
189 
190  /* Configure video slave mode */
192 
193  /* Enable video */
194  setbits32(&base->video_ctl_1, VIDEO_EN);
195  timeout = s5p_dp_is_video_stream_on(dp);
196 
197  if (timeout) {
198  printk(BIOS_DEBUG, "Video Stream Not on\n");
199  return -ERR_VIDEO_STREAM_BAD;
200  }
201 
202  return 0;
203 }
204 
205 /*
206  * Set DP to enhanced mode. We use this for EVT1
207  * param dp pointer to main s5p-dp structure
208  * return status
209  */
211 {
212  u8 data;
213 
215  printk(BIOS_DEBUG, "DPCD read error\n");
216  return -ERR_DPCD_READ_ERROR1;
217  }
220  (data & DPCD_LANE_COUNT_SET_MASK))) {
221  printk(BIOS_DEBUG, "DPCD write error\n");
222  return -ERR_DPCD_WRITE_ERROR1;
223  }
224 
225  return 0;
226 }
227 
228 /*
229  * Enable scrambles mode. We use this for EVT1
230  * param dp pointer to main s5p-dp structure
231  * return status
232  */
233 static int s5p_dp_enable_scramble(struct s5p_dp_device *dp)
234 {
235  u8 data;
236  struct exynos5_dp *base = dp->base;
237 
238  clrbits32(&base->dp_training_ptn_set, SCRAMBLING_DISABLE);
239 
241  &data)) {
242  printk(BIOS_DEBUG, "DPCD read error\n");
243  return -ERR_DPCD_READ_ERROR2;
244  }
245 
247  (u8)(data & ~DPCD_SCRAMBLING_DISABLED))) {
248  printk(BIOS_DEBUG, "DPCD write error\n");
249  return -ERR_DPCD_WRITE_ERROR2;
250  }
251 
252  return 0;
253 }
254 
255 /*
256  * Reset DP and prepare DP for init training
257  * param dp pointer to main s5p-dp structure
258  */
259 static int s5p_dp_init_dp(struct s5p_dp_device *dp)
260 {
261  int ret, i;
262  struct exynos5_dp *base = dp->base;
263 
264  for (i = 0; i < DP_INIT_TRIES; i++) {
265  s5p_dp_reset(dp);
266 
267  /* SW defined function Normal operation */
268  clrbits32(&base->func_en_1, SW_FUNC_EN_N);
269 
270  ret = s5p_dp_init_analog_func(dp);
271  if (!ret)
272  break;
273 
274  udelay(5000);
275  printk(BIOS_DEBUG, "LCD retry init, attempt=%d ret=%d\n", i, ret);
276  }
277  if (i == DP_INIT_TRIES) {
278  printk(BIOS_DEBUG, "LCD initialization failed, ret=%d\n", ret);
279  return ret;
280  }
281 
282  s5p_dp_init_aux(dp);
283 
284  return ret;
285 }
286 
287 /*
288  * Set pre-emphasis level
289  * param dp pointer to main s5p-dp structure
290  * param pre_emphasis pre-emphasis level
291  * param lane lane number(0 - 3)
292  * return status
293  */
295  int pre_emphasis, int lane)
296 {
297  u32 reg;
298  struct exynos5_dp *base = dp->base;
299 
300  reg = pre_emphasis << PRE_EMPHASIS_SET_SHIFT;
301  switch (lane) {
302  case 0:
303  write32(&base->ln0_link_trn_ctl, reg);
304  break;
305  case 1:
306  write32(&base->ln1_link_trn_ctl, reg);
307  break;
308 
309  case 2:
310  write32(&base->ln2_link_trn_ctl, reg);
311  break;
312 
313  case 3:
314  write32(&base->ln3_link_trn_ctl, reg);
315  break;
316  default:
317  printk(BIOS_DEBUG, "%s: Invalid lane %d\n", __func__, lane);
318  return -ERR_INVALID_LANE;
319  }
320  return 0;
321 }
322 
323 /*
324  * Read supported bandwidth type
325  * param dp pointer to main s5p-dp structure
326  * param bandwidth pointer to variable holding bandwidth type
327  */
329  u8 *bandwidth)
330 {
331  u8 data;
332 
333  /*
334  * For DP rev.1.1, Maximum link rate of Main Link lanes
335  * 0x06 = 1.62 Gbps, 0x0a = 2.7 Gbps
336  */
338  *bandwidth = data;
339 }
340 
341 /*
342  * Reset DP and prepare DP for init training
343  * param dp pointer to main s5p-dp structure
344  * param lane_count pointer to variable holding no of lanes
345  */
347  u8 *lane_count)
348 {
349  u8 data;
350 
351  /*
352  * For DP rev.1.1, Maximum number of Main Link lanes
353  * 0x01 = 1 lane, 0x02 = 2 lanes, 0x04 = 4 lanes
354  */
356  *lane_count = data & DPCD_MAX_LANE_COUNT_MASK;
357 }
358 
359 /*
360  * DP H/w Link Training. Set DPCD link rate and bandwidth.
361  * param dp pointer to main s5p-dp structure
362  * param max_lane No of lanes
363  * param max_rate bandwidth
364  * return status
365  */
367  unsigned int max_lane,
368  unsigned int max_rate)
369 {
370  int pll_is_locked = 0;
371  u32 data;
372  int lane;
373  struct stopwatch sw;
374  struct exynos5_dp *base = dp->base;
375 
376  /* Stop Video */
377  clrbits32(&base->video_ctl_1, VIDEO_EN);
378 
380 
381  while ((pll_is_locked = s5p_dp_get_pll_lock_status(dp)) == PLL_UNLOCKED) {
382  if (stopwatch_expired(&sw)) {
383  /* Ignore this error, and try to continue */
384  printk(BIOS_ERR, "PLL is not locked yet.\n");
385  break;
386  }
387  }
388  printk(BIOS_SPEW, "PLL is %slocked\n",
389  pll_is_locked == PLL_LOCKED ? "": "not ");
390  /* Reset Macro */
391  setbits32(&base->dp_phy_test, MACRO_RST);
392 
393  /* 10 us is the minimum reset time. */
394  udelay(10);
395 
396  clrbits32(&base->dp_phy_test, MACRO_RST);
397 
398  /* Set TX pre-emphasis to minimum */
399  for (lane = 0; lane < max_lane; lane++)
401  PRE_EMPHASIS_LEVEL_0, lane)) {
402  printk(BIOS_DEBUG, "Unable to set pre emphasis level\n");
403  return -ERR_PRE_EMPHASIS_LEVELS;
404  }
405 
406  /* All DP analog module power up */
407  write32(&base->dp_phy_pd, 0x00);
408 
409  /* Initialize by reading RX's DPCD */
412 
413  printk(BIOS_SPEW, "%s: rate 0x%x, lane_count %d\n", __func__,
415 
416  if ((dp->link_train.link_rate != LINK_RATE_1_62GBPS) &&
418  printk(BIOS_DEBUG, "Rx Max Link Rate is abnormal :%x !\n",
419  dp->link_train.link_rate);
420  /* Not Retrying */
421  return -ERR_LINK_RATE_ABNORMAL;
422  }
423 
424  if (dp->link_train.lane_count == 0) {
425  printk(BIOS_DEBUG, "Rx Max Lane count is abnormal :%x !\n",
426  dp->link_train.lane_count);
427  /* Not retrying */
429  }
430 
431  /* Setup TX lane count & rate */
432  if (dp->link_train.lane_count > max_lane)
433  dp->link_train.lane_count = max_lane;
434  if (dp->link_train.link_rate > max_rate)
435  dp->link_train.link_rate = max_rate;
436 
437  /* Set link rate and count as you want to establish*/
438  write32(&base->lane_count_set, dp->link_train.lane_count);
439  write32(&base->link_bw_set, dp->link_train.link_rate);
440 
441  /* Set sink to D0 (Sink Not Ready) mode. */
444 
445  /* Start HW link training */
446  write32(&base->dp_hw_link_training, HW_TRAINING_EN);
447 
448  /* Wait until HW link training done */
450 
451  /* Get hardware link training status */
452  data = read32(&base->dp_hw_link_training);
453  printk(BIOS_SPEW, "hardware link training status: 0x%08x\n", data);
454  if (data != 0) {
455  printk(BIOS_ERR, " H/W link training failure: 0x%x\n", data);
457  }
458 
459  /* Get Link Bandwidth */
460  data = read32(&base->link_bw_set);
461 
462  dp->link_train.link_rate = data;
463 
464  data = read32(&base->lane_count_set);
465  dp->link_train.lane_count = data;
466  printk(BIOS_SPEW, "Done training: Link bandwidth: 0x%x, lane_count: %d\n",
467  dp->link_train.link_rate, data);
468 
469  return 0;
470 }
471 
472 /*
473  * Initialize DP display
474  */
475 int dp_controller_init(struct s5p_dp_device *dp_device)
476 {
477  int ret;
478  struct s5p_dp_device *dp = dp_device;
479  struct exynos5_dp *base;
480 
482 
484  ret = s5p_dp_init_dp(dp);
485  if (ret) {
486  printk(BIOS_ERR, "%s: Could not initialize dp\n", __func__);
487  return ret;
488  }
489 
491  dp->video_info->link_rate);
492  if (ret) {
493  printk(BIOS_ERR, "unable to do link train\n");
494  return ret;
495  }
496  /* Minimum delay after H/w Link training */
497  udelay(1000);
498 
499  ret = s5p_dp_enable_scramble(dp);
500  if (ret) {
501  printk(BIOS_ERR, "unable to set scramble mode\n");
502  return ret;
503  }
504 
506  if (ret) {
507  printk(BIOS_ERR, "unable to set enhanced mode\n");
508  return ret;
509  }
510 
511  base = dp->base;
512  /* Enable enhanced mode */
513  setbits32(&base->sys_ctl_4, ENHANCED);
514 
515  write32(&base->lane_count_set, dp->link_train.lane_count);
516  write32(&base->link_bw_set, dp->link_train.link_rate);
517 
518  s5p_dp_init_video(dp);
519  ret = s5p_dp_config_video(dp, dp->video_info);
520  if (ret) {
521  printk(BIOS_ERR, "unable to config video\n");
522  return ret;
523  }
524 
525  return 0;
526 }
527 
528 /**
529  * Init the LCD controller
530  *
531  * @param panel_data
532  * @param lcdbase Base address of LCD frame buffer
533  * @return 0 if ok, -ve error code on error
534  */
535 int lcd_ctrl_init(unsigned long int fb_size,
536  struct exynos5_fimd_panel *panel_data, void *lcdbase)
537 {
538  int ret = 0;
539 
540  fimd_bypass();
541  fb_init(fb_size, lcdbase, panel_data);
542  return ret;
543 }
static void write32(void *addr, uint32_t val)
Definition: mmio.h:40
static uint32_t read32(const void *addr)
Definition: mmio.h:22
#define printk(level,...)
Definition: stdlib.h:16
@ PLL_UNLOCKED
Definition: dp-core.h:64
void s5p_dp_reset(struct s5p_dp_device *dp)
Definition: dp-reg.c:16
int s5p_dp_write_byte_to_dpcd(struct s5p_dp_device *dp, unsigned int reg_addr, unsigned char data)
Definition: dp-reg.c:201
void s5p_dp_init_aux(struct s5p_dp_device *dp)
Definition: dp-reg.c:138
int s5p_dp_read_byte_from_dpcd(struct s5p_dp_device *dp, unsigned int reg_addr, unsigned char *data)
Definition: dp-reg.c:248
void s5p_dp_enable_video_master(struct s5p_dp_device *dp)
Definition: dp-reg.c:404
void s5p_dp_set_video_cr_mn(struct s5p_dp_device *dp, enum clock_recovery_m_value_type type, unsigned int m_value, unsigned int n_value)
Definition: dp-reg.c:367
int s5p_dp_is_slave_video_stream_clock_on(struct s5p_dp_device *dp)
Definition: dp-reg.c:341
void s5p_dp_wait_hw_link_training_done(struct s5p_dp_device *dp)
Definition: dp-reg.c:472
void s5p_dp_init_video(struct s5p_dp_device *dp)
Definition: dp-reg.c:297
int s5p_dp_init_analog_func(struct s5p_dp_device *dp)
Definition: dp-reg.c:103
void s5p_dp_set_video_color_format(struct s5p_dp_device *dp, unsigned int color_depth, unsigned int color_space, unsigned int dynamic_range, unsigned int coeff)
Definition: dp-reg.c:316
int s5p_dp_is_video_stream_on(struct s5p_dp_device *dp)
Definition: dp-reg.c:415
unsigned int s5p_dp_get_pll_lock_status(struct s5p_dp_device *dp)
Definition: dp-reg.c:92
void s5p_dp_config_video_slave_mode(struct s5p_dp_device *dp, struct video_info *video_info)
Definition: dp-reg.c:442
#define PLL_LOCK_TIMEOUT
Definition: edp.h:518
#define DP_INIT_TRIES
Definition: edp.h:519
#define SW_FUNC_EN_N
Definition: edp.h:162
#define STREAM_ON_TIMEOUT
Definition: edp.h:517
#define VIDEO_EN
Definition: edp.h:171
@ CALCULATED_M
Definition: edp.h:554
@ LINK_RATE_2_70GBPS
Definition: edp.h:586
@ LINK_RATE_1_62GBPS
Definition: edp.h:585
#define ENHANCED
Definition: edp.h:317
#define SCRAMBLING_DISABLE
Definition: edp.h:369
@ PRE_EMPHASIS_LEVEL_0
Definition: edp.h:611
void clock_init_dp_clock(void)
Definition: clock_init.c:417
#define FORMAT_SEL
Definition: dp.h:205
#define PRE_EMPHASIS_SET_SHIFT
Definition: dp.h:323
#define DPCD_LANE_COUNT_SET_MASK
Definition: dp.h:451
#define DPCD_ADDR_TRAINING_PATTERN_SET
Definition: dp.h:435
#define DPCD_MAX_LANE_COUNT_MASK
Definition: dp.h:447
#define DPCD_SCRAMBLING_DISABLED
Definition: dp.h:454
#define HW_TRAINING_EN
Definition: dp.h:418
#define MACRO_RST
Definition: dp.h:357
#define DPCD_ADDR_SINK_POWER_STATE
Definition: dp.h:444
#define DPCD_ENHANCED_FRAME_EN
Definition: dp.h:450
#define DPCD_ADDR_MAX_LINK_RATE
Definition: dp.h:431
#define DPCD_ADDR_LANE_COUNT_SET
Definition: dp.h:434
#define DPCD_SET_POWER_STATE_D0
Definition: dp.h:480
#define HDCP_VIDEO_MUTE
Definition: dp.h:175
#define DPCD_ADDR_MAX_LANE_COUNT
Definition: dp.h:432
#define ENVID_F_ON
Definition: fimd.h:53
#define ENVID_ON
Definition: fimd.h:54
#define VSYNC_PULSE_WIDTH_OFFSET
Definition: fimd.h:107
#define BPPMODE_F_RGB_16BIT_565
Definition: fimd.h:123
#define H_BACK_PORCH_OFFSET
Definition: fimd.h:118
#define LINEVAL_OFFSET
Definition: fimd.h:121
#define HSYNC_PULSE_WIDTH_OFFSET
Definition: fimd.h:114
static struct exynos5_disp_ctrl *const exynos_disp_ctrl
Definition: fimd.h:98
#define V_FRONT_PORCH_OFFSET
Definition: fimd.h:109
#define HOZVAL_OFFSET
Definition: fimd.h:120
#define H_FRONT_PORCH_OFFSET
Definition: fimd.h:116
static struct exynos5_fimd *const exynos_fimd
Definition: fimd.h:49
#define V_BACK_PORCH_OFFSET
Definition: fimd.h:111
#define OSD_RIGHTBOTX_F_OFFSET
Definition: fimd.h:128
#define CHANNEL0_EN
Definition: fimd.h:104
#define BPPMODE_F_OFFSET
Definition: fimd.h:124
#define HALF_WORD_SWAP_EN
Definition: fimd.h:126
#define ENWIN_F_ENABLE
Definition: fimd.h:125
#define OSD_RIGHTBOTY_F_OFFSET
Definition: fimd.h:129
#define CLKVAL_F_OFFSET
Definition: fimd.h:56
#define PLL_LOCKED
Definition: setup.h:255
static int s5p_dp_hw_link_training(struct s5p_dp_device *dp, unsigned int max_lane, unsigned int max_rate)
Definition: fb.c:366
void fb_init(unsigned long int fb_size, void *lcdbase, struct exynos5_fimd_panel *pd)
Definition: fb.c:98
stage_t
Definition: fb.c:62
@ STAGE_BACKLIGHT_VDD
Definition: fb.c:70
@ STAGE_BACKLIGHT_PWM
Definition: fb.c:71
@ STAGE_HOTPLUG
Definition: fb.c:68
@ STAGE_BRIDGE_INIT
Definition: fb.c:66
@ STAGE_BRIDGE_RESET
Definition: fb.c:67
@ STAGE_DONE
Definition: fb.c:73
@ STAGE_START
Definition: fb.c:63
@ STAGE_LCD_VDD
Definition: fb.c:64
@ STAGE_DP_CONTROLLER
Definition: fb.c:69
@ STAGE_BACKLIGHT_EN
Definition: fb.c:72
@ STAGE_BRIDGE_SETUP
Definition: fb.c:65
void * lcd_console_address
Definition: fb.c:80
static void s5p_dp_get_max_rx_lane_count(struct s5p_dp_device *dp, u8 *lane_count)
Definition: fb.c:346
static int s5p_dp_enable_scramble(struct s5p_dp_device *dp)
Definition: fb.c:233
static void fimd_bypass(void)
Definition: fb.c:86
@ ERR_PLL_NOT_UNLOCKED
Definition: fb.c:40
@ ERR_LINK_TRAINING_FAILURE
Definition: fb.c:54
@ ERR_MAX_LANE_COUNT_ABNORMAL
Definition: fb.c:53
@ ERR_DPCD_WRITE_ERROR1
Definition: fb.c:45
@ ERR_DPCD_WRITE_ERROR2
Definition: fb.c:47
@ ERR_MISSING_DP_BASE
Definition: fb.c:55
@ ERR_VIDEO_STREAM_BAD
Definition: fb.c:42
@ ERR_PLL_NOT_LOCKED
Definition: fb.c:49
@ ERR_NO_FDT_NODE
Definition: fb.c:57
@ ERR_PRE_EMPHASIS_LEVELS
Definition: fb.c:51
@ ERR_DPCD_READ_ERROR2
Definition: fb.c:46
@ ERR_INVALID_LANE
Definition: fb.c:48
@ ERR_DPCD_READ_ERROR1
Definition: fb.c:43
@ ERR_VIDEO_CLOCK_BAD
Definition: fb.c:41
@ ERR_LINK_RATE_ABNORMAL
Definition: fb.c:52
static int s5p_dp_enable_rx_to_enhanced_mode(struct s5p_dp_device *dp)
Definition: fb.c:210
int lcd_ctrl_init(unsigned long int fb_size, struct exynos5_fimd_panel *panel_data, void *lcdbase)
Init the LCD controller.
Definition: fb.c:535
short console_col
Definition: fb.c:82
static int s5p_dp_init_dp(struct s5p_dp_device *dp)
Definition: fb.c:259
static void s5p_dp_get_max_rx_bandwidth(struct s5p_dp_device *dp, u8 *bandwidth)
Definition: fb.c:328
static int s5p_dp_set_lane_lane_pre_emphasis(struct s5p_dp_device *dp, int pre_emphasis, int lane)
Definition: fb.c:294
int lcd_color_fg
Definition: fb.c:77
int dp_controller_init(struct s5p_dp_device *dp_device)
Definition: fb.c:475
static int s5p_dp_config_video(struct s5p_dp_device *dp, struct video_info *video_info)
Definition: fb.c:150
int lcd_line_length
Definition: fb.c:76
short console_row
Definition: fb.c:83
int lcd_color_bg
Definition: fb.c:78
#define ALIGN
Definition: asm.h:22
#define setbits32(addr, set)
Definition: mmio.h:21
#define clrbits32(addr, clear)
Definition: mmio.h:26
static int stopwatch_expired(struct stopwatch *sw)
Definition: timer.h:152
static void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms)
Definition: timer.h:133
static long stopwatch_duration_usecs(struct stopwatch *sw)
Definition: timer.h:170
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
Definition: loglevel.h:142
static struct exynos5_sysreg *const exynos_sysreg
Definition: sysreg.h:20
#define FIMDBYPASS_DISP1
Definition: sysreg.h:23
void power_enable_dp_phy(void)
Definition: power.c:42
uintptr_t base
Definition: uart.c:17
uint32_t u32
Definition: stdint.h:51
uint8_t u8
Definition: stdint.h:45
unsigned int vidtcon2
Definition: fimd.h:91
unsigned int vidtcon0
Definition: fimd.h:89
unsigned int vidcon1
Definition: fimd.h:87
unsigned int vidtcon1
Definition: fimd.h:90
Definition: dp.h:11
unsigned int right_margin
Definition: fimd.h:78
unsigned int left_margin
Definition: fimd.h:77
unsigned int upper_margin
Definition: fimd.h:74
unsigned int clkval_f
Definition: fimd.h:72
unsigned int lower_margin
Definition: fimd.h:75
unsigned int yres
Definition: fimd.h:81
unsigned int hsync
Definition: fimd.h:79
unsigned int ivclk
Definition: fimd.h:71
unsigned int vsync
Definition: fimd.h:76
unsigned int xres
Definition: fimd.h:80
unsigned int fixvclk
Definition: fimd.h:64
unsigned int vidosd0c
Definition: fimd.h:24
unsigned int vidw00add2
Definition: fimd.h:30
unsigned int vidw00add0b0
Definition: fimd.h:26
unsigned int vidw00add1b0
Definition: fimd.h:28
unsigned int vidcon0
Definition: fimd.h:13
unsigned int wincon0
Definition: fimd.h:15
unsigned int vidosd0b
Definition: fimd.h:23
unsigned int shadowcon
Definition: fimd.h:20
unsigned int dpclkcon
Definition: fimd.h:45
unsigned int disp1blk_cfg
Definition: sysreg.h:14
struct exynos5_dp * base
Definition: dp-core.h:97
struct link_train link_train
Definition: dp-core.h:99
struct video_info * video_info
Definition: dp-core.h:98
enum color_coefficient ycbcr_coeff
Definition: dp-core.h:77
enum color_depth color_depth
Definition: dp-core.h:78
enum dynamic_range dynamic_range
Definition: dp-core.h:76
enum link_rate link_rate
Definition: dp-core.h:80
enum link_lane_count lane_count
Definition: dp-core.h:81
enum color_space color_space
Definition: dp-core.h:75
u8 val
Definition: sys.c:300
void udelay(uint32_t us)
Definition: udelay.c:15