第一次玩MIPI屏,还算比较顺利,有需要的可以参考:
分辨率:480x480
驱动IC:ST7701S
接--口:MIPI 2Lane
规格书:1960496392HX40007ACT 规格书.pdf
&lcd0 {
lcd_used = <1>;
lcd_driver_name = "st7701s";
lcd_backlight = <100>;
lcd_if = <4>;
lcd_pwm_used = <1>;
lcd_pwm_ch = <7>;
lcd_pwm_freq = <1000>;
lcd_pwm_pol = <0>;
lcd_pwm_max_limit = <255>;
// 480*480
lcd_x = <480>;
lcd_y = <480>;
lcd_width = <72>;
lcd_height = <72>;
lcd_dclk_freq = <16>; // lcd_ht * lcd_vt * 60
lcd_dsi_lane = <2>;
pinctrl-0 = <&dsi2lane_pins_a>;
pinctrl-1 = <&dsi2lane_pins_b>;
lcd_hbp = <30>; // hsync back porch(pixel) + hsync plus width(pixel);
lcd_ht = <525>; // hsync total cycle(pixel)
lcd_hspw = <25>; // hsync plus width(pixel)
lcd_vbp = <20>; // vsync back porch(line) + vysnc plus width(line)
lcd_vt = <525>; // vysnc total cycle(line)
lcd_vspw = <8>; // vysnc plus width(pixel)
lcd_dsi_if = <0>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <0>;
lcd_lvds_mode = <0>;
lcd_frm = <0>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_io_phase = <0x0000>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
lcd_fsync_en = <0>;
lcd_fsync_act_time = <1000>;
lcd_fsync_dis_time = <1000>;
lcd_fsync_pol = <0>;
deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;
lcd_gpio_0 = <&pio PB 2 GPIO_ACTIVE_HIGH>;
};
初始化代码:
static struct LCM_setting_table lcm_initialization_setting[] = {
// {0x11, 1, {0x00} },
{REGFLAG_DELAY, 60, {} },
{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x10} },
{0xc0, 2, {0x3b, 0x00} },
{0xc1, 2, {0x0d, 0x02} },
{0xc2, 2, {0x31, 0x05} },
{0xcd, 1, {0x08} },
{0xb0, 16, {0x00, 0x11, 0x18, 0x0e, 0x11, 0x06, 0x07, 0x08, 0x07, 0x22,
0x04, 0x12, 0x0f, 0xaa, 0x31, 0x18} },
{0xb1, 16, {0x00, 0x11, 0x19, 0x0e, 0x12, 0x07, 0x08, 0x08, 0x08, 0x22,
0x04, 0x11, 0x11, 0xa9, 0x32, 0x18} },
{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x11} },
{0xb0, 1, {0x60} },
{0xb1, 1, {0x32} },
{0xb2, 1, {0x07} },
{0xb3, 1, {0x80} },
{0xb5, 1, {0x49} },
{0xb7, 1, {0x85} },
{0xb8, 1, {0x21} },
// {0xb9, 1, {0x10} },
{0xc1, 1, {0x78} },
{0xc2, 1, {0x78} },
{REGFLAG_DELAY, 50, {} },
{0x21, 1, {0x00} },
// {0xd0, 1, {0x88} },
{0xe0, 3, {0x00, 0x1b, 0x02} },
{0xe1, 11, {0x08, 0xa0, 0x00, 0x00, 0x07, 0xa0, 0x00, 0x00, 0x00, 0x44,
0x44} },
{0xe2, 12, {0x11, 0x11, 0x44, 0x44, 0xed, 0xa0, 0x00, 0x00, 0xec, 0xa0,
0x00, 0x00} },
{0xe3, 4, {0x00, 0x00, 0x11, 0x11} },
{0xe4, 2, {0x44, 0x44} },
{0xe5, 16, {0x0a, 0xe9, 0xd8, 0xa0, 0x0c, 0xeb, 0xd8, 0xa0, 0x0e, 0xed,
0xd8, 0xa0, 0x10, 0xef, 0xd8, 0xa0} },
{0xe6, 4, {0x00, 0x00, 0x11, 0x11} },
{0xe7, 2, {0x44, 0x44} },
{0xe8, 16, {0x09, 0xe8, 0xd8, 0xa0, 0x0b, 0xea, 0xd8, 0xa0, 0x0d, 0xec,
0xd8, 0xa0, 0x0f, 0xee, 0xd8, 0xa0} },
{0xeb, 7, {0x02, 0x00, 0xe4, 0xe4, 0x88, 0x00, 0x40} },
{0xec, 2, {0x3c, 0x00} },
{0xed, 16, {0xab, 0x89, 0x76, 0x54, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x20, 0x45, 0x67, 0x98, 0xba} },
{0x36, 1, {0x00} },
{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x13} },
{0xe5, 1, {0xe4} },
{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x00} },
{0x3a, 2, {0x66, 0x21} },
{REGFLAG_DELAY, 50, {} },
{0x11, 1, {0x00} },
{REGFLAG_DELAY, 120, {} },
{0x29, 1, {0x00} },
{REGFLAG_END_OF_TABLE, 0x00, {} }
};
还有一款720 x 720的4Lane MIPI屏还没调通