mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
lcd_extern: add tl050fhv02ct driver
PD#162533: lcd_extern: add tl050fhv02ct driver Change-Id: Ie046eb45542327b77ad3897785ecd99378b689fd Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
This commit is contained in:
@@ -14398,7 +14398,11 @@ AMLOGIC TAS5756 DRIVER FIX
|
||||
M: Renjun Xu <renjun.xu@amlogic.com>
|
||||
F: sound/soc/codecs/amlogic/tas575x.c
|
||||
|
||||
|
||||
AMLOGIC G12A buildroot dts
|
||||
M: wenbiao zhang <wenbiao.zhang@amlogic.com>
|
||||
F: arch/arm64/boot/dts/amlogic/g12a_s905d2_u200_buildroot.dts
|
||||
|
||||
AMLOGIC ADD LCD_EXTERN TL050FHV02CT DRIVER
|
||||
M: Weiming Liu <weiming.liu@amlogic.com>
|
||||
F: drivers/amlogic/media/vout/lcd/lcd_extern/mipi_TL050FHV02CT.c
|
||||
|
||||
|
||||
@@ -121,10 +121,15 @@
|
||||
1 /*clk_lp_continuous(0=stop,1=continue)*/
|
||||
0>; /*phy_stop_wait(0=auto,1=standard,2=slow)*/
|
||||
/* dsi_init: data_type, num, data... */
|
||||
dsi_init_on = <0xff 0xff>; /* ending flag */
|
||||
dsi_init_on = <
|
||||
0xf0 3 0 1 30 /* reset high, delay 30ms */
|
||||
0xf0 3 0 0 10 /* reset low, delay 10ms */
|
||||
0xf0 3 0 1 30 /* reset high, delay 30ms */
|
||||
0xff 100 /* delay */
|
||||
0xff 0xff>; /* ending flag */
|
||||
dsi_init_off = <0xff 0xff>; /* ending flag */
|
||||
/* extern_init: 0xff for invalid */
|
||||
extern_init = <2>;
|
||||
extern_init = <1>;
|
||||
/* power step: type,index,value,delay(ms) */
|
||||
power_on_step = <0 0 0 20
|
||||
2 0 0 0
|
||||
@@ -164,7 +169,7 @@
|
||||
dsi_init_on = <0xff 0xff>; /* ending flag */
|
||||
dsi_init_off = <0xff 0xff>; /* ending flag */
|
||||
/* extern_init: 0xff for invalid */
|
||||
extern_init = <3>;
|
||||
extern_init = <2>;
|
||||
/* power step: type,index,value,delay(ms) */
|
||||
power_on_step = <0 0 1 20
|
||||
0 0 0 10
|
||||
@@ -206,7 +211,7 @@
|
||||
dsi_init_on = <0xff 0xff>; /* ending flag */
|
||||
dsi_init_off = <0xff 0xff>; /* ending flag */
|
||||
/* extern_init: 0xff for invalid */
|
||||
extern_init = <4>;
|
||||
extern_init = <3>;
|
||||
/* power step: type,index,value,delay(ms) */
|
||||
power_on_step = <0 0 1 20
|
||||
0 0 0 10
|
||||
@@ -299,27 +304,20 @@
|
||||
|
||||
extern_1{
|
||||
index = <1>;
|
||||
extern_name = "mipi_KD080D13";
|
||||
status = "disabled";
|
||||
extern_name = "mipi_TV070WSM";
|
||||
status = "okay";
|
||||
type = <2>; /* 0=i2c, 1=spi, 2=mipi */
|
||||
};
|
||||
|
||||
extern_2{
|
||||
index = <2>;
|
||||
extern_name = "mipi_TV070WSM";
|
||||
extern_name = "mipi_ST7701";
|
||||
status = "okay";
|
||||
type = <2>; /* 0=i2c, 1=spi, 2=mipi */
|
||||
};
|
||||
|
||||
extern_3{
|
||||
index = <3>;
|
||||
extern_name = "mipi_ST7701";
|
||||
status = "okay";
|
||||
type = <2>; /* 0=i2c, 1=spi, 2=mipi */
|
||||
};
|
||||
|
||||
extern_4{
|
||||
index = <4>;
|
||||
extern_name = "mipi_P070ACB";
|
||||
status = "okay";
|
||||
type = <2>; /* 0=i2c, 1=spi, 2=mipi */
|
||||
|
||||
@@ -127,7 +127,12 @@
|
||||
1 /*clk_lp_continuous(0=stop,1=continue)*/
|
||||
0>; /*phy_stop_wait(0=auto,1=standard,2=slow)*/
|
||||
/* dsi_init: data_type, num, data... */
|
||||
dsi_init_on = <0xff 0xff>; /* ending flag */
|
||||
dsi_init_on = <
|
||||
0xf0 3 0 1 30 /* reset high, delay 30ms */
|
||||
0xf0 3 0 0 10 /* reset low, delay 10ms */
|
||||
0xf0 3 0 1 30 /* reset high, delay 30ms */
|
||||
0xff 100 /* delay */
|
||||
0xff 0xff>; /* ending flag */
|
||||
dsi_init_off = <0xff 0xff>; /* ending flag */
|
||||
/* extern_init: 0xff for invalid */
|
||||
extern_init = <1>;
|
||||
@@ -190,6 +195,104 @@
|
||||
0xff 0 0 0>;
|
||||
backlight_index = <0>;
|
||||
};
|
||||
|
||||
lcd_3{
|
||||
model_name = "TL050FHV02CT";
|
||||
interface = "mipi";
|
||||
basic_setting = <1080 1920 /*h_active, v_active*/
|
||||
1125 2200 /*h_period, v_period*/
|
||||
8 /*lcd_bits*/
|
||||
65 119>; /*screen_widht, screen_height*/
|
||||
lcd_timing = <5 30 0 /*hs_width,hs_bp,hs_pol*/
|
||||
88 148 0>; /*vs_width,vs_bp,vs_pol*/
|
||||
clk_attr = <0 /*fr_adj_type(0=clock,1=htotal,2=vtotal)*/
|
||||
0 /*clk_ss_level*/
|
||||
1 /*clk_auto_generate*/
|
||||
148500000>; /*pixel_clk(unit in Hz)*/
|
||||
mipi_attr = <4 /*lane_num*/
|
||||
900 /*bit_rate_max(MHz)*/
|
||||
0 /*factor(*100, default 0 for auto)*/
|
||||
1 /*operation_mode_init(0=video, 1=command)*/
|
||||
0 /*operation_mode_display(0=video, 1=command)*/
|
||||
2 /*
|
||||
*video_mode_type
|
||||
*(0=sync_pulse,1=sync_event,2=burst)
|
||||
*/
|
||||
1 /*clk_lp_continuous(0=stop,1=continue)*/
|
||||
0>; /*phy_stop_wait(0=auto,1=standard,2=slow)*/
|
||||
/* dsi_init: data_type, num, data... */
|
||||
dsi_init_on = <0xff 0xff>; /* ending flag */
|
||||
dsi_init_off = <0xff 0xff>; /* ending flag */
|
||||
/* extern_init: 0xff for invalid */
|
||||
extern_init = <3>;
|
||||
/* power step: type,index,value,delay(ms) */
|
||||
power_on_step = <
|
||||
0 1 0 200
|
||||
0 0 1 20
|
||||
0 0 0 10
|
||||
0 0 1 20
|
||||
2 0 0 0
|
||||
0xff 0 0 0>;
|
||||
power_off_step = <
|
||||
2 0 0 0
|
||||
0 0 0 20
|
||||
0 1 1 100
|
||||
0xff 0 0 0>;
|
||||
backlight_index = <0>;
|
||||
};
|
||||
|
||||
lcd_4{
|
||||
model_name = "TL070WSH27";
|
||||
interface = "mipi";
|
||||
basic_setting = <1024 600 /*h_active, v_active*/
|
||||
1250 630 /*h_period, v_period*/
|
||||
8 /*lcd_bits*/
|
||||
154 86>; /*screen_widht, screen_height*/
|
||||
lcd_timing = <80 100 0 /*hs_width, hs_bp, hs_pol*/
|
||||
5 20 0>; /*vs_width, vs_bp, vs_pol*/
|
||||
clk_attr = <0 /*fr_adj_type(0=clk, 1=htotal, 2=vtotal)*/
|
||||
0 /*clk_ss_level */
|
||||
1 /*clk_auto_generate*/
|
||||
47250000>; /*pixel_clk(unit in Hz)*/
|
||||
mipi_attr = <4 /*lane_num*/
|
||||
300 /*bit_rate_max(MHz)*/
|
||||
0 /*factor(*100, default 0 for auto)*/
|
||||
1 /*operation_mode_init(0=video, 1=command)*/
|
||||
0 /*operation_mode_display(0=video, 1=command)*/
|
||||
2 /*
|
||||
*video_mode_type
|
||||
*(0=sync_pulse,1=sync_event,2=burst)
|
||||
*/
|
||||
1 /*clk_lp_continuous(0=stop,1=continue)*/
|
||||
0>; /*phy_stop_wait(0=auto,1=standard,2=slow)*/
|
||||
|
||||
/* dsi_init: data_type, num, data... */
|
||||
dsi_init_on = <0x05 1 0x11
|
||||
0xff 20 /*delay(ms)*/
|
||||
0x05 1 0x29
|
||||
0xff 20 /*delay(ms)*/
|
||||
0xff 0xff>; /*ending*/
|
||||
dsi_init_off = <0x05 1 0x28
|
||||
0xff 10 /*delay(ms)*/
|
||||
0x05 1 0x10
|
||||
0xff 10 /*delay(ms)*/
|
||||
0xff 0xff>; /*ending*/
|
||||
extern_init = <0xff>; /*0xff for invalid*/
|
||||
|
||||
/* power step: type, index, value, delay(ms) */
|
||||
power_on_step = <
|
||||
0 1 0 100
|
||||
0 0 0 10
|
||||
0 0 1 20
|
||||
2 0 0 0
|
||||
0xff 0 0 0>; /*ending*/
|
||||
power_off_step = <
|
||||
2 0 0 50
|
||||
0 0 0 10
|
||||
0 1 1 100
|
||||
0xff 0 0 0>; /*ending*/
|
||||
backlight_index = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
lcd_extern{
|
||||
@@ -282,6 +385,13 @@
|
||||
status = "okay";
|
||||
type = <2>; /* 0=i2c, 1=spi, 2=mipi */
|
||||
};
|
||||
|
||||
extern_3{
|
||||
index = <3>;
|
||||
extern_name = "mipi_TL050FHV02CT";
|
||||
status = "okay";
|
||||
type = <2>; /* 0=i2c, 1=spi, 2=mipi */
|
||||
};
|
||||
};
|
||||
|
||||
backlight{
|
||||
|
||||
@@ -271,10 +271,9 @@ CONFIG_AMLOGIC_LCD=y
|
||||
CONFIG_AMLOGIC_LCD_TV=y
|
||||
CONFIG_AMLOGIC_LCD_TABLET=y
|
||||
CONFIG_AMLOGIC_LCD_EXTERN=y
|
||||
CONFIG_AMLOGIC_LCD_EXTERN_MIPI_KD080D13=y
|
||||
CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TV070WSM=y
|
||||
CONFIG_AMLOGIC_LCD_EXTERN_MIPI_ST7701=y
|
||||
CONFIG_AMLOGIC_LCD_EXTERN_MIPI_P070ACB=y
|
||||
CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT=y
|
||||
CONFIG_AMLOGIC_BACKLIGHT=y
|
||||
CONFIG_AMLOGIC_BL_EXTERN=y
|
||||
CONFIG_AMLOGIC_BL_EXTERN_I2C_LP8556=y
|
||||
|
||||
@@ -103,4 +103,14 @@ config AMLOGIC_LCD_EXTERN_MIPI_P070ACB
|
||||
Amlogic LCD external mipi_P070ACB init driver support
|
||||
Once the power on, according to the timing requirements,
|
||||
through the mipi interface to write data to the LCD,
|
||||
make its initialization
|
||||
|
||||
config AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT
|
||||
bool "lcd external mipi TL050FHV02CT init driver"
|
||||
default n
|
||||
depends on AMLOGIC_LCD_EXTERN
|
||||
help
|
||||
Amlogic LCD external mipi_TL050FHV02CT init driver support
|
||||
Once the power on, according to the timing requirements,
|
||||
through the mipi interface to write data to the LCD,
|
||||
make its initialization
|
||||
@@ -6,3 +6,4 @@ obj-$(CONFIG_AMLOGIC_LCD_EXTERN_MIPI_KD080D13) += mipi_KD080D13.o
|
||||
obj-$(CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TV070WSM) += mipi_TV070WSM.o
|
||||
obj-$(CONFIG_AMLOGIC_LCD_EXTERN_MIPI_ST7701) += mipi_ST7701.o
|
||||
obj-$(CONFIG_AMLOGIC_LCD_EXTERN_MIPI_P070ACB) += mipi_P070ACB.o
|
||||
obj-$(CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT) += mipi_TL050FHV02CT.o
|
||||
|
||||
@@ -1131,6 +1131,10 @@ static int lcd_extern_add_mipi(struct aml_lcd_extern_driver_s *ext_drv)
|
||||
} else if (strcmp(ext_drv->config.name, "mipi_P070ACB") == 0) {
|
||||
#ifdef CONFIG_AMLOGIC_LCD_EXTERN_MIPI_P070ACB
|
||||
ret = aml_lcd_extern_mipi_p070acb_probe(ext_drv);
|
||||
#endif
|
||||
} else if (strcmp(ext_drv->config.name, "mipi_TL050FHV02CT") == 0) {
|
||||
#ifdef CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT
|
||||
ret = aml_lcd_extern_mipi_tl050fhv02ct_probe(ext_drv);
|
||||
#endif
|
||||
} else {
|
||||
EXTERR("invalid driver name: %s\n", ext_drv->config.name);
|
||||
|
||||
@@ -81,6 +81,10 @@ extern int aml_lcd_extern_mipi_st7701_probe(
|
||||
extern int aml_lcd_extern_mipi_p070acb_probe(
|
||||
struct aml_lcd_extern_driver_s *ext_drv);
|
||||
#endif
|
||||
#ifdef CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT
|
||||
extern int aml_lcd_extern_mipi_tl050fhv02ct_probe(
|
||||
struct aml_lcd_extern_driver_s *ext_drv);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
177
drivers/amlogic/media/vout/lcd/lcd_extern/mipi_TL050FHV02CT.c
Normal file
177
drivers/amlogic/media/vout/lcd/lcd_extern/mipi_TL050FHV02CT.c
Normal file
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* drivers/amlogic/media/vout/lcd/lcd_extern/mipi_TL050FHV02CT.c
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/amlogic/i2c-amlogic.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/amlogic/media/vout/lcd/lcd_extern.h>
|
||||
#include "lcd_extern.h"
|
||||
|
||||
#define LCD_EXTERN_NAME "mipi_TL050FHV02CT"
|
||||
|
||||
/* ******************** mipi command ********************
|
||||
* format: data_type, num, data....
|
||||
* special: data_type=0xff, num<0xff means delay ms, num=0xff means ending.
|
||||
*/
|
||||
static unsigned char mipi_init_on_table[] = {
|
||||
0x29, 6, 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x03,
|
||||
0x29, 10, 0x90, 0x03, 0x14, 0x09, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
|
||||
0x29, 10, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x29, 12, 0x92, 0x40, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x38, 0x00, 0x10,
|
||||
0x03, 0x04,
|
||||
0x29, 9, 0x94, 0x00, 0x08, 0x0B, 0x03, 0xD2, 0x03, 0xD3, 0x0C,
|
||||
0x29, 17, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x29, 3, 0x99, 0x00, 0x00,
|
||||
0x29, 12, 0x9A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x29, 7, 0x9B, 0x01, 0x38, 0x00, 0x00, 0x00, 0x00,
|
||||
0x29, 3, 0x9C, 0x00, 0x00,
|
||||
0x29, 9, 0x9D, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,
|
||||
0x29, 3, 0x9E, 0x00, 0x00,
|
||||
0x29, 11, 0xA0, 0x9F, 0x1F, 0x08, 0x1F, 0x0A, 0x1F, 0x00, 0x1F, 0x14,
|
||||
0x1F,
|
||||
0x29, 11, 0xA1, 0x15, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xA2, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xA4, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xA5, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x15,
|
||||
0x29, 11, 0xA6, 0x1F, 0x14, 0x1F, 0x01, 0x1F, 0x0B, 0x1F, 0x09, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xA7, 0x1F, 0x1F, 0x0B, 0x1F, 0x09, 0x1F, 0x01, 0x1F, 0x15,
|
||||
0x1F,
|
||||
0x29, 11, 0xA8, 0x14, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xA9, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xAB, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F,
|
||||
0x29, 11, 0xAC, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x14,
|
||||
0x29, 11, 0xAD, 0x1F, 0x15, 0x1F, 0x00, 0x1F, 0x08, 0x1F, 0x0A, 0x1F,
|
||||
0x1F,
|
||||
0x29, 6, 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00,
|
||||
0x29, 4, 0xBC, 0x00, 0x00, 0x00,
|
||||
0x29, 5, 0xB8, 0x01, 0xAF, 0x8F, 0x8F,
|
||||
0x29, 6, 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x01,
|
||||
0x29, 17, 0xD1, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1F, 0x00, 0x30, 0x00,
|
||||
0x3F, 0x00, 0x5D, 0x00, 0x79, 0x00, 0xA7,
|
||||
0x29, 17, 0xD2, 0x00, 0xCF, 0x01, 0x12, 0x01, 0x49, 0x01, 0xA1, 0x01,
|
||||
0xEB, 0x01, 0xED, 0x02, 0x2F, 0x02, 0x74,
|
||||
0x29, 17, 0xD3, 0x02, 0x9F, 0x02, 0xD5, 0x02, 0xFB, 0x03, 0x2C, 0x03,
|
||||
0x4B, 0x03, 0x73, 0x03, 0x8C, 0x03, 0xA5,
|
||||
0x29, 5, 0xD4, 0x03, 0xC5, 0x03, 0xFF,
|
||||
0x29, 17, 0xD5, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1F, 0x00, 0x30, 0x00,
|
||||
0x3F, 0x00, 0x5D, 0x00, 0x79, 0x00, 0xA7,
|
||||
0x29, 17, 0xD6, 0x00, 0xCF, 0x01, 0x12, 0x01, 0x49, 0x01, 0xA1, 0x01,
|
||||
0xEB, 0x01, 0xED, 0x02, 0x2F, 0x02, 0x74,
|
||||
0x29, 17, 0xD7, 0x02, 0x9F, 0x02, 0xD5, 0x02, 0xFB, 0x03, 0x2C, 0x03,
|
||||
0x4B, 0x03, 0x73, 0x03, 0x8C, 0x03, 0xA5,
|
||||
0x29, 5, 0xD8, 0x03, 0xC5, 0x03, 0xFF,
|
||||
0x29, 17, 0xD9, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1F, 0x00, 0x30, 0x00,
|
||||
0x3F, 0x00, 0x5D, 0x00, 0x79, 0x00, 0xA7,
|
||||
0x29, 17, 0xDD, 0x00, 0xCF, 0x01, 0x12, 0x01, 0x49, 0x01, 0xA1, 0x01,
|
||||
0xEB, 0x01, 0xED, 0x02, 0x2F, 0x02, 0x74,
|
||||
0x29, 17, 0xDE, 0x02, 0x9F, 0x02, 0xD5, 0x02, 0xFB, 0x03, 0x2C, 0x03,
|
||||
0x4B, 0x03, 0x73, 0x03, 0x8C, 0x03, 0xA5,
|
||||
0x29, 5, 0xDF, 0x03, 0xC5, 0x03, 0xFF,
|
||||
0x29, 17, 0xE0, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1F, 0x00, 0x30, 0x00,
|
||||
0x3F, 0x00, 0x5D, 0x00, 0x79, 0x00, 0xA7,
|
||||
0x29, 17, 0xE1, 0x00, 0xCF, 0x01, 0x12, 0x01, 0x49, 0x01, 0xA1, 0x01,
|
||||
0xEB, 0x01, 0xED, 0x02, 0x2F, 0x02, 0x74,
|
||||
0x29, 17, 0xE2, 0x02, 0x9F, 0x02, 0xD5, 0x02, 0xFB, 0x03, 0x2C, 0x03,
|
||||
0x4B, 0x03, 0x73, 0x03, 0x8C, 0x03, 0xA5,
|
||||
0x29, 5, 0xE3, 0x03, 0xC5, 0x03, 0xFF,
|
||||
0x29, 17, 0xE4, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1F, 0x00, 0x30, 0x00,
|
||||
0x3F, 0x00, 0x5D, 0x00, 0x79, 0x00, 0xA7,
|
||||
0x29, 17, 0xE5, 0x00, 0xCF, 0x01, 0x12, 0x01, 0x49, 0x01, 0xA1, 0x01,
|
||||
0xEB, 0x01, 0xED, 0x02, 0x2F, 0x02, 0x74,
|
||||
0x29, 17, 0xE6, 0x02, 0x9F, 0x02, 0xD5, 0x02, 0xFB, 0x03, 0x2C, 0x03,
|
||||
0x4B, 0x03, 0x73, 0x03, 0x8C, 0x03, 0xA5,
|
||||
0x29, 5, 0xE7, 0x03, 0xC5, 0x03, 0xFF,
|
||||
0x29, 17, 0xE8, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1F, 0x00, 0x30, 0x00,
|
||||
0x3F, 0x00, 0x5D, 0x00, 0x79, 0x00, 0xA7,
|
||||
0x29, 17, 0xE9, 0x00, 0xCF, 0x01, 0x12, 0x01, 0x49, 0x01, 0xA1, 0x01,
|
||||
0xEB, 0x01, 0xED, 0x02, 0x2F, 0x02, 0x74,
|
||||
0x29, 17, 0xEA, 0x02, 0x9F, 0x02, 0xD5, 0x02, 0xFB, 0x03, 0x2C, 0x03,
|
||||
0x4B, 0x03, 0x73, 0x03, 0x8C, 0x03, 0xA5,
|
||||
0x29, 5, 0xEB, 0x03, 0xC5, 0x03, 0xFF,
|
||||
0x29, 4, 0xB0, 0x05, 0x05, 0x05,
|
||||
0x29, 4, 0xB1, 0x05, 0x05, 0x05,
|
||||
0x29, 4, 0xB3, 0x10, 0x10, 0x10,
|
||||
0x29, 4, 0xB4, 0x06, 0x06, 0x06,
|
||||
0x29, 4, 0xB6, 0x44, 0x44, 0x44,
|
||||
0x29, 4, 0xB7, 0x34, 0x34, 0x34,
|
||||
0x29, 4, 0xB8, 0x34, 0x34, 0x34,
|
||||
0x29, 4, 0xB9, 0x24, 0x24, 0x24,
|
||||
0x29, 4, 0xBA, 0x24, 0x24, 0x24,
|
||||
0x29, 4, 0xBC, 0x00, 0x70, 0x00,
|
||||
0x29, 4, 0xBD, 0x00, 0x70, 0x00,
|
||||
0x23, 2, 0xBE, 0x50,
|
||||
0x23, 2, 0x35, 0x00,
|
||||
0x13, 1, 0x11,
|
||||
0xff, 200,
|
||||
0x13, 1, 0x29,
|
||||
0xff, 200,
|
||||
0xFF, 0xFF, /* ending flag */
|
||||
};
|
||||
|
||||
static unsigned char mipi_init_off_table[] = {
|
||||
0x05, 1, 0x28, /* display off */
|
||||
0xff, 10, /* delay 10ms */
|
||||
0x05, 1, 0x10, /* sleep in */
|
||||
0xff, 150, /* delay 150ms */
|
||||
0xff, 0xff, /* ending flag */
|
||||
};
|
||||
|
||||
static int lcd_extern_driver_update(struct aml_lcd_extern_driver_s *ext_drv)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (ext_drv) {
|
||||
ext_drv->config.table_init_on = &mipi_init_on_table[0];
|
||||
ext_drv->config.table_init_off = &mipi_init_off_table[0];
|
||||
} else {
|
||||
EXTERR("%s driver is null\n", LCD_EXTERN_NAME);
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int aml_lcd_extern_mipi_tl050fhv02ct_probe(
|
||||
struct aml_lcd_extern_driver_s *ext_drv)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ret = lcd_extern_driver_update(ext_drv);
|
||||
|
||||
if (lcd_debug_print_flag)
|
||||
EXTPR("%s: %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
* data0=gpio_index, data1=gpio_value, data2=delay.
|
||||
*/
|
||||
static unsigned char mipi_init_on_table[] = {
|
||||
0xf0, 3, 0, 1, 30, /* reset high, delay 30ms */
|
||||
0xf0, 3, 0, 0, 10, /* reset low, delay 10ms */
|
||||
0xf0, 3, 0, 1, 30, /* reset high, delay 30ms */
|
||||
0xff, 100, /* delay */
|
||||
0x15, 2, 0x62, 0x01,
|
||||
0x39, 5, 0xff, 0xaa, 0x55, 0x25, 0x01,
|
||||
0x15, 2, 0xfc, 0x08,
|
||||
|
||||
@@ -660,7 +660,6 @@ static int lcd_config_load_from_dts(struct lcd_config_s *pconf,
|
||||
}
|
||||
ret = of_property_read_u32_array(child, "range_setting", ¶[0], 6);
|
||||
if (ret) {
|
||||
LCDPR("failed to get range_setting\n");
|
||||
pconf->lcd_basic.h_period_min = pconf->lcd_basic.h_period;
|
||||
pconf->lcd_basic.h_period_max = pconf->lcd_basic.h_period;
|
||||
pconf->lcd_basic.v_period_min = pconf->lcd_basic.v_period;
|
||||
|
||||
@@ -123,6 +123,17 @@ static void mipi_dsi_init_table_print(struct dsi_config_s *dconf, int on_off)
|
||||
pr_info(" 0x%02x,%d,\n",
|
||||
dsi_table[i], dsi_table[i+1]);
|
||||
}
|
||||
} else if (dsi_table[i] == 0xf0) {
|
||||
n = (DSI_CMD_SIZE_INDEX + 1) +
|
||||
dsi_table[i+DSI_CMD_SIZE_INDEX];
|
||||
pr_info(" ");
|
||||
for (j = 0; j < n; j++) {
|
||||
if (j == 0)
|
||||
pr_info("0x%02x,", dsi_table[i+j]);
|
||||
else
|
||||
pr_info("%d,", dsi_table[i+j]);
|
||||
}
|
||||
pr_info("\n");
|
||||
} else if ((dsi_table[i] & 0xf) == 0x0) {
|
||||
pr_info("dsi_init_%s wrong data_type: 0x%02x\n",
|
||||
on_off ? "on" : "off", dsi_table[i]);
|
||||
@@ -1704,6 +1715,11 @@ static void mipi_dsi_link_on(struct lcd_config_s *pconf)
|
||||
if (dconf->check_en)
|
||||
mipi_dsi_check_state(dconf, dconf->check_reg, dconf->check_cnt);
|
||||
|
||||
if (dconf->dsi_init_on) {
|
||||
dsi_write_cmd(dconf->dsi_init_on);
|
||||
LCDPR("dsi init on\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_LCD_EXTERN
|
||||
if (dconf->extern_init < LCD_EXTERN_INDEX_INVALID) {
|
||||
lcd_ext = aml_lcd_extern_get_driver(dconf->extern_init);
|
||||
@@ -1711,22 +1727,14 @@ static void mipi_dsi_link_on(struct lcd_config_s *pconf)
|
||||
LCDPR("no lcd_extern driver\n");
|
||||
} else {
|
||||
if (lcd_ext->config.table_init_on) {
|
||||
dsi_write_cmd(
|
||||
lcd_ext->config.table_init_on);
|
||||
dsi_write_cmd(lcd_ext->config.table_init_on);
|
||||
LCDPR("[extern]%s dsi init on\n",
|
||||
lcd_ext->config.name);
|
||||
goto mipi_dsi_link_disp;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dconf->dsi_init_on) {
|
||||
dsi_write_cmd(dconf->dsi_init_on);
|
||||
LCDPR("dsi init on\n");
|
||||
}
|
||||
|
||||
mipi_dsi_link_disp:
|
||||
if (op_mode_disp != op_mode_init) {
|
||||
set_mipi_dsi_host(MIPI_DSI_VIRTUAL_CHAN_ID,
|
||||
0, /* Chroma sub sample, only for
|
||||
|
||||
@@ -792,7 +792,7 @@ static int lcd_config_load_from_dts(struct lcd_config_s *pconf,
|
||||
}
|
||||
ret = of_property_read_u32_array(child, "range_setting", ¶[0], 6);
|
||||
if (ret) {
|
||||
LCDERR("failed to get range_setting\n");
|
||||
LCDERR("no range_setting\n");
|
||||
pconf->lcd_basic.h_period_min = pconf->lcd_basic.h_period;
|
||||
pconf->lcd_basic.h_period_max = pconf->lcd_basic.h_period;
|
||||
pconf->lcd_basic.v_period_min = pconf->lcd_basic.v_period;
|
||||
|
||||
Reference in New Issue
Block a user