Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
tc35876x-dsi-lvds.c File Reference
#include "mdfld_dsi_dpi.h"
#include "mdfld_output.h"
#include "mdfld_dsi_pkg_sender.h"
#include "tc35876x-dsi-lvds.h"
#include <linux/i2c/tc35876x.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/intel_scu_ipc.h>

Go to the source code of this file.

Macros

#define FLD_MASK(start, end)   (((1 << ((start) - (end) + 1)) - 1) << (end))
 
#define FLD_VAL(val, start, end)   (((val) << (end)) & FLD_MASK(start, end))
 
#define D0W_DPHYCONTTX   0x0004
 
#define CLW_DPHYCONTRX   0x0020
 
#define D0W_DPHYCONTRX   0x0024
 
#define D1W_DPHYCONTRX   0x0028
 
#define D2W_DPHYCONTRX   0x002C
 
#define D3W_DPHYCONTRX   0x0030
 
#define COM_DPHYCONTRX   0x0038
 
#define CLW_CNTRL   0x0040
 
#define D0W_CNTRL   0x0044
 
#define D1W_CNTRL   0x0048
 
#define D2W_CNTRL   0x004C
 
#define D3W_CNTRL   0x0050
 
#define DFTMODE_CNTRL   0x0054
 
#define PPI_STARTPPI   0x0104
 
#define PPI_BUSYPPI   0x0108
 
#define PPI_LINEINITCNT   0x0110
 
#define PPI_LPTXTIMECNT   0x0114
 
#define PPI_LANEENABLE   0x0134
 
#define PPI_TX_RX_TA   0x013C
 
#define PPI_CLS_ATMR   0x0140
 
#define PPI_D0S_ATMR   0x0144
 
#define PPI_D1S_ATMR   0x0148
 
#define PPI_D2S_ATMR   0x014C
 
#define PPI_D3S_ATMR   0x0150
 
#define PPI_D0S_CLRSIPOCOUNT   0x0164
 
#define PPI_D1S_CLRSIPOCOUNT   0x0168
 
#define PPI_D2S_CLRSIPOCOUNT   0x016C
 
#define PPI_D3S_CLRSIPOCOUNT   0x0170
 
#define CLS_PRE   0x0180
 
#define D0S_PRE   0x0184
 
#define D1S_PRE   0x0188
 
#define D2S_PRE   0x018C
 
#define D3S_PRE   0x0190
 
#define CLS_PREP   0x01A0
 
#define D0S_PREP   0x01A4
 
#define D1S_PREP   0x01A8
 
#define D2S_PREP   0x01AC
 
#define D3S_PREP   0x01B0
 
#define CLS_ZERO   0x01C0
 
#define D0S_ZERO   0x01C4
 
#define D1S_ZERO   0x01C8
 
#define D2S_ZERO   0x01CC
 
#define D3S_ZERO   0x01D0
 
#define PPI_CLRFLG   0x01E0
 
#define PPI_CLRSIPO   0x01E4
 
#define HSTIMEOUT   0x01F0
 
#define HSTIMEOUTENABLE   0x01F4
 
#define DSI_STARTDSI   0x0204
 
#define DSI_BUSYDSI   0x0208
 
#define DSI_LANEENABLE   0x0210
 
#define DSI_LANESTATUS0   0x0214
 
#define DSI_LANESTATUS1   0x0218
 
#define DSI_INTSTATUS   0x0220
 
#define DSI_INTMASK   0x0224
 
#define DSI_INTCLR   0x0228
 
#define DSI_LPTXTO   0x0230
 
#define DSIERRCNT   0x0300
 
#define APLCTRL   0x0400
 
#define RDPKTLN   0x0404
 
#define VPCTRL   0x0450
 
#define HTIM1   0x0454
 
#define HTIM2   0x0458
 
#define VTIM1   0x045C
 
#define VTIM2   0x0460
 
#define VFUEN   0x0464
 
#define LVMX0003   0x0480
 
#define LVMX0407   0x0484
 
#define LVMX0811   0x0488
 
#define LVMX1215   0x048C
 
#define LVMX1619   0x0490
 
#define LVMX2023   0x0494
 
#define LVMX2427   0x0498
 
#define LVCFG   0x049C
 
#define LVPHY0   0x04A0
 
#define LVPHY1   0x04A4
 
#define SYSSTAT   0x0500
 
#define SYSRST   0x0504
 
#define GPIOO   0x0524
 
#define GPIOI   0x0528
 
#define I2CTIMCTRL   0x0540
 
#define I2CMADDR   0x0544
 
#define WDATAQ   0x0548
 
#define RDATAQ   0x054C
 
#define IDREG   0x0580
 
#define DEBUG00   0x05A0
 
#define DEBUG01   0x05A4
 
#define PANEL_PWM_CONTROL   0x90
 
#define PANEL_FREQ_DIVIDER_HI   0x91
 
#define PANEL_FREQ_DIVIDER_LO   0x92
 
#define PANEL_DUTY_CONTROL   0x93
 
#define PANEL_MODIFY_RGB   0x94
 
#define PANEL_FRAMERATE_CONTROL   0x96
 
#define PANEL_PWM_MIN   0x97
 
#define PANEL_PWM_REF   0x98
 
#define PANEL_PWM_MAX   0x99
 
#define PANEL_ALLOW_DISTORT   0x9A
 
#define PANEL_BYPASS_PWMI   0x9B
 
#define PANEL_CM_ENABLE   0x700
 
#define PANEL_CM_HUE   0x701
 
#define PANEL_CM_SATURATION   0x702
 
#define PANEL_CM_INTENSITY   0x703
 
#define PANEL_CM_BRIGHTNESS   0x704
 
#define PANEL_CM_CE_ENABLE   0x705
 
#define PANEL_CM_PEAK_EN   0x710
 
#define PANEL_CM_GAIN   0x711
 
#define PANEL_CM_HUETABLE_START   0x730
 
#define PANEL_CM_HUETABLE_END   0x747 /* inclusive */
 
#define INPUT_MUX(lvmx03, lvmx02, lvmx01, lvmx00)
 
#define GPIOPWMCTRL   0x38F
 
#define PWM0CLKDIV0   0x62 /* low byte */
 
#define PWM0CLKDIV1   0x61 /* high byte */
 
#define SYSTEMCLK   19200000UL /* 19.2 MHz */
 
#define PWM_FREQUENCY   9600 /* Hz */
 
#define PWM0DUTYCYCLE   0x67
 
#define DV1_PANEL_WIDTH   217
 
#define DV1_PANEL_HEIGHT   136
 
#define CMI_LCD_I2C_ADAPTER   2
 
#define CMI_LCD_I2C_ADDR   0x60
 

Enumerations

enum  {
  INPUT_R0, INPUT_R1, INPUT_R2, INPUT_R3,
  INPUT_R4, INPUT_R5, INPUT_R6, INPUT_R7,
  INPUT_G0, INPUT_G1, INPUT_G2, INPUT_G3,
  INPUT_G4, INPUT_G5, INPUT_G6, INPUT_G7,
  INPUT_B0, INPUT_B1, INPUT_B2, INPUT_B3,
  INPUT_B4, INPUT_B5, INPUT_B6, INPUT_B7,
  INPUT_HSYNC, INPUT_VSYNC, INPUT_DE, LOGIC_0
}
 

Functions

void tc35876x_set_bridge_reset_state (struct drm_device *dev, int state)
 
void tc35876x_configure_lvds_bridge (struct drm_device *dev)
 
void tc35876x_brightness_control (struct drm_device *dev, int level)
 
void tc35876x_toshiba_bridge_panel_off (struct drm_device *dev)
 
void tc35876x_toshiba_bridge_panel_on (struct drm_device *dev)
 
 MODULE_DEVICE_TABLE (i2c, tc35876x_bridge_id)
 
 MODULE_DEVICE_TABLE (i2c, cmi_lcd_i2c_id)
 
void tc35876x_init (struct drm_device *dev)
 
void tc35876x_exit (void)
 

Variables

struct panel_funcs mdfld_tc35876x_funcs
 

Macro Definition Documentation

#define APLCTRL   0x0400

Definition at line 106 of file tc35876x-dsi-lvds.c.

#define CLS_PRE   0x0180

Definition at line 71 of file tc35876x-dsi-lvds.c.

#define CLS_PREP   0x01A0

Definition at line 76 of file tc35876x-dsi-lvds.c.

#define CLS_ZERO   0x01C0

Definition at line 81 of file tc35876x-dsi-lvds.c.

#define CLW_CNTRL   0x0040

Definition at line 48 of file tc35876x-dsi-lvds.c.

#define CLW_DPHYCONTRX   0x0020

Definition at line 42 of file tc35876x-dsi-lvds.c.

#define CMI_LCD_I2C_ADAPTER   2

Definition at line 748 of file tc35876x-dsi-lvds.c.

#define CMI_LCD_I2C_ADDR   0x60

Definition at line 749 of file tc35876x-dsi-lvds.c.

#define COM_DPHYCONTRX   0x0038

Definition at line 47 of file tc35876x-dsi-lvds.c.

#define D0S_PRE   0x0184

Definition at line 72 of file tc35876x-dsi-lvds.c.

#define D0S_PREP   0x01A4

Definition at line 77 of file tc35876x-dsi-lvds.c.

#define D0S_ZERO   0x01C4

Definition at line 82 of file tc35876x-dsi-lvds.c.

#define D0W_CNTRL   0x0044

Definition at line 49 of file tc35876x-dsi-lvds.c.

#define D0W_DPHYCONTRX   0x0024

Definition at line 43 of file tc35876x-dsi-lvds.c.

#define D0W_DPHYCONTTX   0x0004

Definition at line 41 of file tc35876x-dsi-lvds.c.

#define D1S_PRE   0x0188

Definition at line 73 of file tc35876x-dsi-lvds.c.

#define D1S_PREP   0x01A8

Definition at line 78 of file tc35876x-dsi-lvds.c.

#define D1S_ZERO   0x01C8

Definition at line 83 of file tc35876x-dsi-lvds.c.

#define D1W_CNTRL   0x0048

Definition at line 50 of file tc35876x-dsi-lvds.c.

#define D1W_DPHYCONTRX   0x0028

Definition at line 44 of file tc35876x-dsi-lvds.c.

#define D2S_PRE   0x018C

Definition at line 74 of file tc35876x-dsi-lvds.c.

#define D2S_PREP   0x01AC

Definition at line 79 of file tc35876x-dsi-lvds.c.

#define D2S_ZERO   0x01CC

Definition at line 84 of file tc35876x-dsi-lvds.c.

#define D2W_CNTRL   0x004C

Definition at line 51 of file tc35876x-dsi-lvds.c.

#define D2W_DPHYCONTRX   0x002C

Definition at line 45 of file tc35876x-dsi-lvds.c.

#define D3S_PRE   0x0190

Definition at line 75 of file tc35876x-dsi-lvds.c.

#define D3S_PREP   0x01B0

Definition at line 80 of file tc35876x-dsi-lvds.c.

#define D3S_ZERO   0x01D0

Definition at line 85 of file tc35876x-dsi-lvds.c.

#define D3W_CNTRL   0x0050

Definition at line 52 of file tc35876x-dsi-lvds.c.

#define D3W_DPHYCONTRX   0x0030

Definition at line 46 of file tc35876x-dsi-lvds.c.

#define DEBUG00   0x05A0

Definition at line 148 of file tc35876x-dsi-lvds.c.

#define DEBUG01   0x05A4

Definition at line 149 of file tc35876x-dsi-lvds.c.

#define DFTMODE_CNTRL   0x0054

Definition at line 53 of file tc35876x-dsi-lvds.c.

#define DSI_BUSYDSI   0x0208

Definition at line 93 of file tc35876x-dsi-lvds.c.

#define DSI_INTCLR   0x0228

Definition at line 99 of file tc35876x-dsi-lvds.c.

#define DSI_INTMASK   0x0224

Definition at line 98 of file tc35876x-dsi-lvds.c.

#define DSI_INTSTATUS   0x0220

Definition at line 97 of file tc35876x-dsi-lvds.c.

#define DSI_LANEENABLE   0x0210

Definition at line 94 of file tc35876x-dsi-lvds.c.

#define DSI_LANESTATUS0   0x0214

Definition at line 95 of file tc35876x-dsi-lvds.c.

#define DSI_LANESTATUS1   0x0218

Definition at line 96 of file tc35876x-dsi-lvds.c.

#define DSI_LPTXTO   0x0230

Definition at line 100 of file tc35876x-dsi-lvds.c.

#define DSI_STARTDSI   0x0204

Definition at line 92 of file tc35876x-dsi-lvds.c.

#define DSIERRCNT   0x0300

Definition at line 103 of file tc35876x-dsi-lvds.c.

#define DV1_PANEL_HEIGHT   136

Definition at line 618 of file tc35876x-dsi-lvds.c.

#define DV1_PANEL_WIDTH   217

Definition at line 617 of file tc35876x-dsi-lvds.c.

#define FLD_MASK (   start,
  end 
)    (((1 << ((start) - (end) + 1)) - 1) << (end))

Definition at line 37 of file tc35876x-dsi-lvds.c.

#define FLD_VAL (   val,
  start,
  end 
)    (((val) << (end)) & FLD_MASK(start, end))

Definition at line 38 of file tc35876x-dsi-lvds.c.

#define GPIOI   0x0528

Definition at line 136 of file tc35876x-dsi-lvds.c.

#define GPIOO   0x0524

Definition at line 135 of file tc35876x-dsi-lvds.c.

#define GPIOPWMCTRL   0x38F

Definition at line 428 of file tc35876x-dsi-lvds.c.

#define HSTIMEOUT   0x01F0

Definition at line 88 of file tc35876x-dsi-lvds.c.

#define HSTIMEOUTENABLE   0x01F4

Definition at line 89 of file tc35876x-dsi-lvds.c.

#define HTIM1   0x0454

Definition at line 111 of file tc35876x-dsi-lvds.c.

#define HTIM2   0x0458

Definition at line 112 of file tc35876x-dsi-lvds.c.

#define I2CMADDR   0x0544

Definition at line 140 of file tc35876x-dsi-lvds.c.

#define I2CTIMCTRL   0x0540

Definition at line 139 of file tc35876x-dsi-lvds.c.

#define IDREG   0x0580

Definition at line 145 of file tc35876x-dsi-lvds.c.

#define INPUT_MUX (   lvmx03,
  lvmx02,
  lvmx01,
  lvmx00 
)
Value:
(FLD_VAL(lvmx03, 29, 24) | FLD_VAL(lvmx02, 20, 16) | \
FLD_VAL(lvmx01, 12, 8) | FLD_VAL(lvmx00, 4, 0))

Definition at line 209 of file tc35876x-dsi-lvds.c.

#define LVCFG   0x049C

Definition at line 125 of file tc35876x-dsi-lvds.c.

#define LVMX0003   0x0480

Definition at line 118 of file tc35876x-dsi-lvds.c.

#define LVMX0407   0x0484

Definition at line 119 of file tc35876x-dsi-lvds.c.

#define LVMX0811   0x0488

Definition at line 120 of file tc35876x-dsi-lvds.c.

#define LVMX1215   0x048C

Definition at line 121 of file tc35876x-dsi-lvds.c.

#define LVMX1619   0x0490

Definition at line 122 of file tc35876x-dsi-lvds.c.

#define LVMX2023   0x0494

Definition at line 123 of file tc35876x-dsi-lvds.c.

#define LVMX2427   0x0498

Definition at line 124 of file tc35876x-dsi-lvds.c.

#define LVPHY0   0x04A0

Definition at line 126 of file tc35876x-dsi-lvds.c.

#define LVPHY1   0x04A4

Definition at line 127 of file tc35876x-dsi-lvds.c.

#define PANEL_ALLOW_DISTORT   0x9A

Definition at line 161 of file tc35876x-dsi-lvds.c.

#define PANEL_BYPASS_PWMI   0x9B

Definition at line 162 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_BRIGHTNESS   0x704

Definition at line 169 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_CE_ENABLE   0x705

Definition at line 170 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_ENABLE   0x700

Definition at line 165 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_GAIN   0x711

Definition at line 172 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_HUE   0x701

Definition at line 166 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_HUETABLE_END   0x747 /* inclusive */

Definition at line 174 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_HUETABLE_START   0x730

Definition at line 173 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_INTENSITY   0x703

Definition at line 168 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_PEAK_EN   0x710

Definition at line 171 of file tc35876x-dsi-lvds.c.

#define PANEL_CM_SATURATION   0x702

Definition at line 167 of file tc35876x-dsi-lvds.c.

#define PANEL_DUTY_CONTROL   0x93

Definition at line 155 of file tc35876x-dsi-lvds.c.

#define PANEL_FRAMERATE_CONTROL   0x96

Definition at line 157 of file tc35876x-dsi-lvds.c.

#define PANEL_FREQ_DIVIDER_HI   0x91

Definition at line 153 of file tc35876x-dsi-lvds.c.

#define PANEL_FREQ_DIVIDER_LO   0x92

Definition at line 154 of file tc35876x-dsi-lvds.c.

#define PANEL_MODIFY_RGB   0x94

Definition at line 156 of file tc35876x-dsi-lvds.c.

#define PANEL_PWM_CONTROL   0x90

Definition at line 152 of file tc35876x-dsi-lvds.c.

#define PANEL_PWM_MAX   0x99

Definition at line 160 of file tc35876x-dsi-lvds.c.

#define PANEL_PWM_MIN   0x97

Definition at line 158 of file tc35876x-dsi-lvds.c.

#define PANEL_PWM_REF   0x98

Definition at line 159 of file tc35876x-dsi-lvds.c.

#define PPI_BUSYPPI   0x0108

Definition at line 57 of file tc35876x-dsi-lvds.c.

#define PPI_CLRFLG   0x01E0

Definition at line 86 of file tc35876x-dsi-lvds.c.

#define PPI_CLRSIPO   0x01E4

Definition at line 87 of file tc35876x-dsi-lvds.c.

#define PPI_CLS_ATMR   0x0140

Definition at line 62 of file tc35876x-dsi-lvds.c.

#define PPI_D0S_ATMR   0x0144

Definition at line 63 of file tc35876x-dsi-lvds.c.

#define PPI_D0S_CLRSIPOCOUNT   0x0164

Definition at line 67 of file tc35876x-dsi-lvds.c.

#define PPI_D1S_ATMR   0x0148

Definition at line 64 of file tc35876x-dsi-lvds.c.

#define PPI_D1S_CLRSIPOCOUNT   0x0168

Definition at line 68 of file tc35876x-dsi-lvds.c.

#define PPI_D2S_ATMR   0x014C

Definition at line 65 of file tc35876x-dsi-lvds.c.

#define PPI_D2S_CLRSIPOCOUNT   0x016C

Definition at line 69 of file tc35876x-dsi-lvds.c.

#define PPI_D3S_ATMR   0x0150

Definition at line 66 of file tc35876x-dsi-lvds.c.

#define PPI_D3S_CLRSIPOCOUNT   0x0170

Definition at line 70 of file tc35876x-dsi-lvds.c.

#define PPI_LANEENABLE   0x0134

Definition at line 60 of file tc35876x-dsi-lvds.c.

#define PPI_LINEINITCNT   0x0110

Definition at line 58 of file tc35876x-dsi-lvds.c.

#define PPI_LPTXTIMECNT   0x0114

Definition at line 59 of file tc35876x-dsi-lvds.c.

#define PPI_STARTPPI   0x0104

Definition at line 56 of file tc35876x-dsi-lvds.c.

#define PPI_TX_RX_TA   0x013C

Definition at line 61 of file tc35876x-dsi-lvds.c.

#define PWM0CLKDIV0   0x62 /* low byte */

Definition at line 429 of file tc35876x-dsi-lvds.c.

#define PWM0CLKDIV1   0x61 /* high byte */

Definition at line 430 of file tc35876x-dsi-lvds.c.

#define PWM0DUTYCYCLE   0x67

Definition at line 475 of file tc35876x-dsi-lvds.c.

#define PWM_FREQUENCY   9600 /* Hz */

Definition at line 433 of file tc35876x-dsi-lvds.c.

#define RDATAQ   0x054C

Definition at line 142 of file tc35876x-dsi-lvds.c.

#define RDPKTLN   0x0404

Definition at line 107 of file tc35876x-dsi-lvds.c.

#define SYSRST   0x0504

Definition at line 131 of file tc35876x-dsi-lvds.c.

#define SYSSTAT   0x0500

Definition at line 130 of file tc35876x-dsi-lvds.c.

#define SYSTEMCLK   19200000UL /* 19.2 MHz */

Definition at line 432 of file tc35876x-dsi-lvds.c.

#define VFUEN   0x0464

Definition at line 115 of file tc35876x-dsi-lvds.c.

#define VPCTRL   0x0450

Definition at line 110 of file tc35876x-dsi-lvds.c.

#define VTIM1   0x045C

Definition at line 113 of file tc35876x-dsi-lvds.c.

#define VTIM2   0x0460

Definition at line 114 of file tc35876x-dsi-lvds.c.

#define WDATAQ   0x0548

Definition at line 141 of file tc35876x-dsi-lvds.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
INPUT_R0 
INPUT_R1 
INPUT_R2 
INPUT_R3 
INPUT_R4 
INPUT_R5 
INPUT_R6 
INPUT_R7 
INPUT_G0 
INPUT_G1 
INPUT_G2 
INPUT_G3 
INPUT_G4 
INPUT_G5 
INPUT_G6 
INPUT_G7 
INPUT_B0 
INPUT_B1 
INPUT_B2 
INPUT_B3 
INPUT_B4 
INPUT_B5 
INPUT_B6 
INPUT_B7 
INPUT_HSYNC 
INPUT_VSYNC 
INPUT_DE 
LOGIC_0 

Definition at line 177 of file tc35876x-dsi-lvds.c.

Function Documentation

MODULE_DEVICE_TABLE ( i2c  ,
tc35876x_bridge_id   
)
MODULE_DEVICE_TABLE ( i2c  ,
cmi_lcd_i2c_id   
)
void tc35876x_brightness_control ( struct drm_device dev,
int  level 
)

Definition at line 477 of file tc35876x-dsi-lvds.c.

void tc35876x_configure_lvds_bridge ( struct drm_device dev)

Definition at line 341 of file tc35876x-dsi-lvds.c.

void tc35876x_exit ( void  )

Definition at line 821 of file tc35876x-dsi-lvds.c.

void tc35876x_init ( struct drm_device dev)

Definition at line 798 of file tc35876x-dsi-lvds.c.

void tc35876x_set_bridge_reset_state ( struct drm_device dev,
int  state 
)

Definition at line 314 of file tc35876x-dsi-lvds.c.

void tc35876x_toshiba_bridge_panel_off ( struct drm_device dev)

Definition at line 508 of file tc35876x-dsi-lvds.c.

void tc35876x_toshiba_bridge_panel_on ( struct drm_device dev)

Definition at line 526 of file tc35876x-dsi-lvds.c.

Variable Documentation

struct panel_funcs mdfld_tc35876x_funcs
Initial value:
= {
.encoder_funcs = &tc35876x_encoder_funcs,
.encoder_helper_funcs = &tc35876x_encoder_helper_funcs,
.get_config_mode = tc35876x_get_config_mode,
.get_panel_info = tc35876x_get_panel_info,
}

Definition at line 791 of file tc35876x-dsi-lvds.c.