lcd: adjust the mipi_host reg address

PD#156734: lcd: adjust the mipi_host reg address

Change-Id: Ia25bd99d5eb32b129b4170558fdf42f820b7c977
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
This commit is contained in:
Weiming Liu
2018-02-27 17:14:37 +08:00
committed by Jianxin Pan
parent 8dea55e832
commit 66a389ab29
5 changed files with 7 additions and 15 deletions

View File

@@ -32,7 +32,7 @@
"dsi_meas",
"mipi_enable_gate",
"mipi_bandgap_gate";
reg = <0x0 0xffd00000 0x0 0x6400
reg = <0x0 0xffd06000 0x0 0x400
0x0 0xff640000 0x0 0x100>;
pinctrl_version = <1>; /* for uboot */

View File

@@ -32,7 +32,7 @@
"dsi_meas",
"encl_top_gate",
"encl_int_gate";
reg = <0x0 0xffd00000 0x0 0x7400
reg = <0x0 0xffd07000 0x0 0x400
0x0 0xff644000 0x0 0x2000>;
pinctrl_version = <2>; /* for uboot */

View File

@@ -95,9 +95,9 @@ static const char *lcd_common_usage_str = {
"\n"
" echo <num> > test ; show lcd bist pattern(1~7), 0=disable bist\n"
"\n"
" echo w<v|h|c|p> <reg> <data> > reg ; write data to vcbus|hiu|cbus|periphs reg\n"
" echo r<v|h|c|p> <reg> > reg ; read vcbus|hiu|cbus|periphs reg\n"
" echo d<v|h|c|p> <reg> <num> > reg ; dump vcbus|hiu|cbus|periphs regs\n"
" echo w<v|h|c|p|mh|mp> <reg> <data> > reg ; write data to vcbus|hiu|cbus|periphs|mipi host|mipi phy reg\n"
" echo r<v|h|c|p|mh|mp> <reg> > reg ; read vcbus|hiu|cbus|periphs|mipi host|mipi phy reg\n"
" echo d<v|h|c|p|mh|mp> <reg> <num> > reg ; dump vcbus|hiu|cbus|periphs|mipi host|mipi phy regs\n"
"\n"
" echo <0|1> > print ; 0=disable debug print; 1=enable debug print\n"
" cat print ; read current debug print flag\n"

View File

@@ -134,21 +134,12 @@ static inline void __iomem *check_lcd_dsi_host_reg(unsigned int _reg)
void __iomem *p;
int reg_bus;
unsigned int reg_offset;
struct aml_lcd_drv_s *lcd_drv = aml_lcd_get_driver();
reg_bus = LCD_MAP_DSI_HOST;
if (check_lcd_ioremap(reg_bus))
return NULL;
switch (lcd_drv->data->chip_type) {
case LCD_CHIP_G12A:
reg_offset = _reg + 0x400;
reg_offset = LCD_REG_OFFSET(reg_offset);
break;
default:/*axg*/
reg_offset = LCD_REG_OFFSET(_reg);
break;
}
reg_offset = LCD_REG_OFFSET_MIPI_HOST(_reg);
if (reg_offset >= lcd_reg_map[reg_bus].size) {
LCDERR("invalid dsi_host reg offset: 0x%04x\n", _reg);
return NULL;

View File

@@ -23,6 +23,7 @@
/* base & offset */
#define LCD_REG_OFFSET(reg) ((reg << 2))
#define LCD_REG_OFFSET_MIPI_HOST(reg) (((reg & 0xff) << 2))
/* PERIPHS: 0xc8834400 */