From: Weiming Liu Date: Tue, 27 Feb 2018 09:14:37 +0000 (+0800) Subject: lcd: adjust the mipi_host reg address X-Git-Tag: khadas-vims-v0.9.6-release~2369 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66a389ab293573a8ff44edcfbd8edb6570e0a221;p=platform%2Fkernel%2Flinux-amlogic.git lcd: adjust the mipi_host reg address PD#156734: lcd: adjust the mipi_host reg address Change-Id: Ia25bd99d5eb32b129b4170558fdf42f820b7c977 Signed-off-by: Weiming Liu --- diff --git a/arch/arm64/boot/dts/amlogic/mesonaxg_s400-panel.dtsi b/arch/arm64/boot/dts/amlogic/mesonaxg_s400-panel.dtsi index 30dff0c..d4fd0f6 100644 --- a/arch/arm64/boot/dts/amlogic/mesonaxg_s400-panel.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesonaxg_s400-panel.dtsi @@ -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 */ diff --git a/arch/arm64/boot/dts/amlogic/mesong12a_skt-panel.dtsi b/arch/arm64/boot/dts/amlogic/mesong12a_skt-panel.dtsi index 7fb02e4..43b8be7 100644 --- a/arch/arm64/boot/dts/amlogic/mesong12a_skt-panel.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesong12a_skt-panel.dtsi @@ -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 */ diff --git a/drivers/amlogic/media/vout/lcd/lcd_debug.c b/drivers/amlogic/media/vout/lcd/lcd_debug.c index e2212ac..8ee2781 100644 --- a/drivers/amlogic/media/vout/lcd/lcd_debug.c +++ b/drivers/amlogic/media/vout/lcd/lcd_debug.c @@ -95,9 +95,9 @@ static const char *lcd_common_usage_str = { "\n" " echo > test ; show lcd bist pattern(1~7), 0=disable bist\n" "\n" -" echo w > reg ; write data to vcbus|hiu|cbus|periphs reg\n" -" echo r > reg ; read vcbus|hiu|cbus|periphs reg\n" -" echo d > reg ; dump vcbus|hiu|cbus|periphs regs\n" +" echo w > reg ; write data to vcbus|hiu|cbus|periphs|mipi host|mipi phy reg\n" +" echo r > reg ; read vcbus|hiu|cbus|periphs|mipi host|mipi phy reg\n" +" echo d > 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" diff --git a/drivers/amlogic/media/vout/lcd/lcd_reg.c b/drivers/amlogic/media/vout/lcd/lcd_reg.c index da28cb9..93c5690 100644 --- a/drivers/amlogic/media/vout/lcd/lcd_reg.c +++ b/drivers/amlogic/media/vout/lcd/lcd_reg.c @@ -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; diff --git a/drivers/amlogic/media/vout/lcd/lcd_reg.h b/drivers/amlogic/media/vout/lcd/lcd_reg.h index cf1612e..7a5c8d5 100644 --- a/drivers/amlogic/media/vout/lcd/lcd_reg.h +++ b/drivers/amlogic/media/vout/lcd/lcd_reg.h @@ -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 */