高通8x12平台 mipi屏 调试

1.  一些描述

8x12平台和8x25平台的代码结构上还是有一些不同的,8x12平台的屏和TP都是通过 .dtsi文件管理的,QRD8X12_1935/bootable/bootloader/lk/dev/gcdb/display/include/

panel_hx8379a_wvga_video.h

[objc]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. /*--------------------------------------------------------------------------- 
  2.  * This file is autogenerated file using gcdb parser. Please do not edit it. 
  3.  * Update input XML file to add a new entry or update variable in this file 
  4.  * VERSION = "1.0" 
  5.  *---------------------------------------------------------------------------*/  
  6.   
  7. #ifndef _PANEL_HX8379A_WVGA_VIDEO_H_  
  8. #define _PANEL_HX8379A_WVGA_VIDEO_H_  
  9. /*---------------------------------------------------------------------------*/  
  10. /* HEADER files                                                              */  
  11. /*---------------------------------------------------------------------------*/  
  12. #include "panel.h"  
  13.   
  14. /*---------------------------------------------------------------------------*/  
  15. /* Panel configuration                                                       */  
  16. /*---------------------------------------------------------------------------*/  
  17. static struct panel_config hx8379a_wvga_video_panel_data = {  
  18.     "qcom,mdss_dsi_hx8379a_wvga_video""dsi:0:""qcom,mdss-dsi-panel",  
  19.     100"DISPLAY_1"00600000000000  
  20. };  
  21.   
  22. /*---------------------------------------------------------------------------*/  
  23. /* Panel resolution                                                          */  
  24. /*---------------------------------------------------------------------------*/  
  25. static struct panel_resolution hx8379a_wvga_video_panel_res = {  
  26.     48080010094400646000000000  
  27. };  
  28.   
  29. /*---------------------------------------------------------------------------*/  
  30. /* Panel color information                                                   */  
  31. /*---------------------------------------------------------------------------*/  
  32. static struct color_info hx8379a_wvga_video_color = {  
  33.     2400xff, 000  
  34. };  
  35.   
  36. /*---------------------------------------------------------------------------*/  
  37. /* Panel on/off command information                                          */  
  38. /*---------------------------------------------------------------------------*/  
  39. static char hx8379a_wvga_video_on_cmd0[] = {  
  40.     0x040x000x390xC0,  
  41.     0xB90xFF, 0x830x79,  
  42. };  
  43.   
  44. static char hx8379a_wvga_video_on_cmd1[] = {  
  45.     0x030x000x390xC0,  
  46.     0xBA, 0x510x930xFF,  
  47. };  
  48.   
  49. static char hx8379a_wvga_video_on_cmd2[] = {  
  50.     0x140x000x390xC0,  
  51.     0xB10x000x500x44,  
  52.     0xEA, 0x8D, 0x080x11,  
  53.     0x110x110x270x2F,  
  54.     0x9A, 0x1A, 0x420x0B,  
  55.     0x6E, 0xF10x000xE6,  
  56. };  
  57.   
  58. static char hx8379a_wvga_video_on_cmd3[] = {  
  59.     0x0E, 0x000x390xC0,  
  60.     0xB20x000x000x3C,  
  61.     0x080x040x190x22,  
  62.     0x000xFF, 0x080x04,  
  63.     0x190x200xFF, 0xFF,  
  64. };  
  65.   
  66. static char hx8379a_wvga_video_on_cmd4[] = {  
  67.     0x200x000x390xC0,  
  68.     0xB40x800x080x00,  
  69.     0x320x100x030x32,  
  70.     0x130x700x320x10,  
  71.     0x080x370x010x28,  
  72.     0x070x370x080x35,  
  73.     0x080x3D, 0x440x08,  
  74.     0x000x400x080x28,  
  75.     0x080x300x300x04,  
  76. };  
  77.   
  78. static char hx8379a_wvga_video_on_cmd5[] = {  
  79.     0x300x000x390xC0,  
  80.     0xD50x000x000x0A,  
  81.     0x000x010x050x00,  
  82.     0x030x000x880x88,  
  83.     0x880x880x230x01,  
  84.     0x670x450x020x13,  
  85.     0x880x880x880x88,  
  86.     0x880x880x880x88,  
  87.     0x880x880x540x76,  
  88.     0x100x320x310x20,  
  89.     0x880x880x880x88,  
  90.     0x880x880x000x00,  
  91.     0x000x000x000x00,  
  92. };  
  93.   
  94. static char hx8379a_wvga_video_on_cmd6[] = {  
  95.     0x240x000x390xC0,  
  96.     0xE00x790x050x0F,  
  97.     0x140x230x240x3F,  
  98.     0x300x460x060x10,  
  99.     0x130x160x170x16,  
  100.     0x160x130x180x05,  
  101.     0x0F, 0x140x230x24,  
  102.     0x3F, 0x300x460x06,  
  103.     0x100x130x160x17,  
  104.     0x160x160x130x18,  
  105. };  
  106.   
  107. static char hx8379a_wvga_video_on_cmd7[] = {  
  108.     0x800x000x390xC0,  
  109.     0xC10x010x000x07,  
  110.     0x100x170x1D, 0x2A,  
  111.     0x330x3A, 0x430x4A,  
  112.     0x520x5B, 0x640x6D,  
  113.     0x780x7F, 0x880x90,  
  114.     0x980xA00xA90xB2,  
  115.     0xB90xC10xC90xD1,  
  116.     0xD70xDF, 0xE60xED,  
  117.     0xF40xFA, 0xFD, 0x00,  
  118.     0x000x000x000x00,  
  119.     0x000x000x000x00,  
  120.     0x000x080x100x18,  
  121.     0x200x280x300x38,  
  122.     0x400x470x4F, 0x58,  
  123.     0x600x680x700x78,  
  124.     0x800x880x900x98,  
  125.     0xA00xA90xB10xB9,  
  126.     0xC10xC90xD10xD8,  
  127.     0xE00xE80xF00xF9,  
  128.     0xFE, 0x000x000x00,  
  129.     0x000x000x000x00,  
  130.     0x000x000x000x08,  
  131.     0x100x180x1E, 0x26,  
  132.     0x2E, 0x340x3A, 0x41,  
  133.     0x490x4F, 0x580x5E,  
  134.     0x670x6F, 0x770x80,  
  135.     0x880x8F, 0x970x9F,  
  136.     0xA70xAF, 0xB80xBF,  
  137.     0xC70xD10xD80xE3,  
  138.     0xEA, 0xF60xFF, 0x00,  
  139.     0x000x000x000x00,  
  140.     0x000x000x000x00,  
  141. };  
  142.   
  143. static char hx8379a_wvga_video_on_cmd8[] = {  
  144.     0xcc, 0x020x230x80  
  145. };  
  146.   
  147. static char hx8379a_wvga_video_on_cmd9[] = {  
  148.     0x050x000x390xC0,  
  149.     0xB60x000x9C, 0x00,  
  150.     0x9C, 0xFF, 0xFF, 0xFF,  
  151. };  
  152.   
  153. static char hx8379a_wvga_video_on_cmd10[] = {  
  154.     0x110x000x050x80  
  155. };  
  156.   
  157. static char hx8379a_wvga_video_on_cmd11[] = {  
  158.     0x290x000x050x80  
  159. };  
  160.   
  161. static struct mipi_dsi_cmd hx8379a_wvga_video_on_command[] = {  
  162.     {0x8, hx8379a_wvga_video_on_cmd00x00},  
  163.     {0x8, hx8379a_wvga_video_on_cmd10x00},  
  164.     {0x18, hx8379a_wvga_video_on_cmd20x00},  
  165.     {0x14, hx8379a_wvga_video_on_cmd30x00},  
  166.     {0x24, hx8379a_wvga_video_on_cmd40x00},  
  167.     {0x34, hx8379a_wvga_video_on_cmd50x00},  
  168.     {0x28, hx8379a_wvga_video_on_cmd60x00},  
  169.     {0x84, hx8379a_wvga_video_on_cmd70x00},  
  170.     {0x4, hx8379a_wvga_video_on_cmd80x00},  
  171.     {0xc, hx8379a_wvga_video_on_cmd90x00},  
  172.     {0x4, hx8379a_wvga_video_on_cmd100x96},  
  173.     {0x4, hx8379a_wvga_video_on_cmd110x78}  
  174. };  
  175.   
  176. #define HX8379A_WVGA_VIDEO_ON_COMMAND 12  
  177.   
  178.   
  179. static char hx8379a_wvga_videooff_cmd0[] = {  
  180.     0x280x000x050x80  
  181. };  
  182.   
  183. static char hx8379a_wvga_videooff_cmd1[] = {  
  184.     0x100x000x050x80  
  185. };  
  186.   
  187. static struct mipi_dsi_cmd hx8379a_wvga_video_off_command[] = {  
  188.     {0x4, hx8379a_wvga_videooff_cmd00x32},  
  189.     {0x4, hx8379a_wvga_videooff_cmd10x78}  
  190. };  
  191.   
  192. #define HX8379A_WVGA_VIDEO_OFF_COMMAND 2  
  193.   
  194.   
  195. static struct command_state hx8379a_wvga_video_state = {  
  196.     00  
  197. };  
  198.   
  199. /*---------------------------------------------------------------------------*/  
  200. /* Command mode panel information                                            */  
  201. /*---------------------------------------------------------------------------*/  
  202. static struct commandpanel_info hx8379a_wvga_video_command_panel = {  
  203.     000000000000  
  204. };  
  205.   
  206. /*---------------------------------------------------------------------------*/  
  207. /* Video mode panel information                                              */  
  208. /*---------------------------------------------------------------------------*/  
  209. static struct videopanel_info hx8379a_wvga_video_video_panel = {  
  210.     100011200x9  
  211. };  
  212.   
  213. /*---------------------------------------------------------------------------*/  
  214. /* Lane configuration                                                        */  
  215. /*---------------------------------------------------------------------------*/  
  216. static struct lane_configuration hx8379a_wvga_video_lane_config = {  
  217.     211100  
  218. };  
  219.   
  220. /*---------------------------------------------------------------------------*/  
  221. /* Panel timing                                                              */  
  222. /*---------------------------------------------------------------------------*/  
  223. static const uint32_t hx8379a_wvga_video_timings[] = {  
  224.     0x780x1B, 0x110x000x3E, 0x430x160x1E, 0x1D, 0x030x040x00  
  225. };  
  226.   
  227. static struct panel_timing hx8379a_wvga_video_timing_info = {  
  228.     040x040x1b  
  229. };  
  230.   
  231. /*---------------------------------------------------------------------------*/  
  232. /* Panel reset sequence                                                      */  
  233. /*---------------------------------------------------------------------------*/  
  234. static struct panel_reset_sequence hx8379a_wvga_video_reset_seq = {  
  235.     {202, }, {20220, }, 2  
  236. };  
  237.   
  238. /*---------------------------------------------------------------------------*/  
  239. /* Backlight setting                                                         */  
  240. /*---------------------------------------------------------------------------*/  
  241. static struct backlight hx8379a_wvga_video_backlight = {  
  242.     01255010  
  243. };  
  244.   
  245. #endif /*_PANEL_HX8379A_WVGA_VIDEO_H_*/  

参数的具体设置根据的屏而定,现在准备添加一块屏:

  1. 上面的 .h文件是第一个需要更改的地方,比较重要的几个参数:lane_config, video_timings, video_command的格式,这些地方如果出错可能导致屏不亮

2. 第二个需要修改的地方是QRD8X12_1935/bootable/bootloader/lk/target/msm8610/oem_panel.c,之前的8x25平台应该是没有这个文件的,这个文件会调用上面写好的 .h文件,按照里面的格式添加一块新屏,需要注意的地方是,看你的平台走的什么版本(QCT QRD)等,因为默认加载的屏也是不同的(可以通过打log看看是什么版本的)

3. 第三个需要更改的地方是 QRD8X12_1935/kernel/arch/arm/boot/dts/dsi-panel-hx8379a-wvga-video.dtsi  这个文件里面的参数跟上边的.h文件内参数是对应的

[objc]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. /*--------------------------------------------------------------------------- 
  2.  * This file is autogenerated file using gcdb parser. Please do not edit it. 
  3.  * Update input XML file to add a new entry or update variable in this file 
  4.  * VERSION = "1.0" 
  5.  *---------------------------------------------------------------------------*/  
  6. &mdss_mdp {  
  7.     dsi_hx8379a_wvga_vid: qcom,mdss_dsi_hx8379a_wvga_video {  
  8.         qcom,mdss-dsi-panel-name = "HX8379A wvga video mode dsi panel";  
  9.         qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;  
  10.         qcom,mdss-dsi-panel-type = "dsi_video_mode";  
  11.         qcom,mdss-dsi-panel-destination = "display_1";  
  12.         qcom,mdss-dsi-panel-framerate = <60>;  
  13.         qcom,mdss-dsi-virtual-channel-id = <0>;  
  14.         qcom,mdss-dsi-stream = <0>;  
  15.         qcom,mdss-dsi-panel-width = <480>;  
  16.         qcom,mdss-dsi-panel-height = <800>;  
  17.         qcom,mdss-dsi-h-front-porch = <100>;  
  18.         qcom,mdss-dsi-h-back-porch = <94>;  
  19.         qcom,mdss-dsi-h-pulse-width = <40>;  
  20.         qcom,mdss-dsi-h-sync-skew = <0>;  
  21.         qcom,mdss-dsi-v-back-porch = <4>;  
  22.         qcom,mdss-dsi-v-front-porch = <6>;  
  23.         qcom,mdss-dsi-v-pulse-width = <6>;  
  24.         qcom,mdss-dsi-h-left-border = <0>;  
  25.         qcom,mdss-dsi-h-right-border = <0>;  
  26.         qcom,mdss-dsi-v-top-border = <0>;  
  27.         qcom,mdss-dsi-v-bottom-border = <0>;  
  28.         qcom,mdss-dsi-bpp = <24>;  
  29.         qcom,mdss-dsi-underflow-color = <0xff>;  
  30.         qcom,mdss-dsi-border-color = <0>;  
  31.         qcom,mdss-dsi-on-command = [  
  32.             39 01 00 00 00 00 04  
  33.                 B9 FF 83 79  
  34.             39 01 00 00 00 00 03  
  35.                 BA 51 93  
  36.             39 01 00 00 00 00 14  
  37.                 B1 00 50 44  
  38.                 EA 808 11  
  39.                 11 11 27 2F  
  40.                 9142 0B  
  41.                 6E F1 00 E6  
  42.             39 01 00 00 00 00 0E  
  43.                 B2 00 00 3C  
  44.                 08 04 19 22  
  45.                 00 FF 08 04  
  46.                 19 20  
  47.             39 01 00 00 00 00 20  
  48.                 B4 80 08 00  
  49.                 32 10 03 32  
  50.                 13 70 32 10  
  51.                 08 37 01 28  
  52.                 07 37 08 35  
  53.                 08 344 08  
  54.                 00 40 08 28  
  55.                 08 30 30 04  
  56.             39 01 00 00 00 00 30  
  57.                 D5 00 00 0A  
  58.                 00 01 05 00  
  59.                 03 00 88 88  
  60.                 88 88 23 01  
  61.                 67 45 02 13  
  62.                 88 88 88 88  
  63.                 88 88 88 88  
  64.                 88 88 54 76  
  65.                 10 32 31 20  
  66.                 88 88 88 88  
  67.                 88 88 00 00  
  68.                 00 00 00 00  
  69.             39 01 00 00 00 00 24  
  70.                 E0 79 05 0F  
  71.                 14 23 24 3F  
  72.                 30 46 06 10  
  73.                 13 16 17 16  
  74.                 16 13 18 05  
  75.                 014 23 24  
  76.                 330 46 06  
  77.                 10 13 16 17  
  78.                 16 16 13 18  
  79.             39 01 00 00 00 00 80  
  80.                 C1 01 00 07  
  81.                 10 17 12A  
  82.                 33 343 4A  
  83.                 52 564 6D  
  84.                 78 788 90  
  85.                 98 A0 A9 B2  
  86.                 B9 C1 C9 D1  
  87.                 D7 DF E6 ED  
  88.                 F4 FA FD 00  
  89.                 00 00 00 00  
  90.                 00 00 00 00  
  91.                 00 08 10 18  
  92.                 20 28 30 38  
  93.                 40 47 458  
  94.                 60 68 70 78  
  95.                 80 88 90 98  
  96.                 A0 A9 B1 B9  
  97.                 C1 C9 D1 D8  
  98.                 E0 E8 F0 F9  
  99.                 FE 00 00 00  
  100.                 00 00 00 00  
  101.                 00 00 00 08  
  102.                 10 18 126  
  103.                 234 341  
  104.                 49 458 5E  
  105.                 67 677 80  
  106.                 88 897 9F  
  107.                 A7 AF B8 BF  
  108.                 C7 D1 D8 E3  
  109.                 EA F6 FF 00  
  110.                 00 00 00 00  
  111.                 00 00 00 00  
  112.             23 01 00 00 00 00 02  
  113.                 cc 02  
  114.             39 01 00 00 00 00 05  
  115.                 B6 00 900  
  116.                 9C  
  117.             05 01 00 00 96 00 02  
  118.                 11 00  
  119.             05 01 00 00 78 00 02  
  120.                 29 00  
  121.             ];  
  122.         qcom,mdss-dsi-off-command = [05 01 00 00 32 00 02 28 00  
  123.                     05 01 00 00 78 00 02 10 00];  
  124.         qcom,mdss-dsi-on-command-state = "dsi_lp_mode";  
  125.         qcom,mdss-dsi-off-command-state = "dsi_lp_mode";  
  126.         qcom,mdss-dsi-h-sync-pulse = <1>;  
  127.         qcom,mdss-dsi-traffic-mode = "burst_mode";  
  128.         qcom,mdss-dsi-lane-map = "lane_map_3012";  
  129.         qcom,mdss-dsi-bllp-eof-power-mode;  
  130.         qcom,mdss-dsi-bllp-power-mode;  
  131.         qcom,mdss-dsi-lane-0-state;  
  132.         qcom,mdss-dsi-lane-1-state;  
  133.         qcom,mdss-dsi-panel-timings = [78 111 00 343 16 1103 04 00];  
  134.         qcom,mdss-dsi-t-clk-post = <0x04>;  
  135.         qcom,mdss-dsi-t-clk-pre = <0x1b>;  
  136.         qcom,mdss-dsi-bl-min-level = <1>;  
  137.         qcom,mdss-dsi-bl-max-level = <255>;  
  138.         qcom,mdss-dsi-dma-trigger = "trigger_sw";  
  139.         qcom,mdss-dsi-mdp-trigger = "none";  
  140.         qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";  
  141.         qcom,mdss-dsi-reset-sequence = <1 20>, <0 2>, <1 20>;  
  142.   
  143.     };  
  144. };  

4. 第四个需要修改的地方是将kernel中屏的.dtsi文件include进msm8610-mdss-panel.dtsi中,否则编译过程中会提示错误。

5. 在例如msm8610-mtp.dtsi文件中加入屏的dsi-hx8379a-wvga-vid

          否则编译过程中也会报错。

6.

实际开发中遇到的问题:

MIPI转LVDS的LCD,,lk方面:需要在AP/bootable/bootloader/lk/platform/msm_shared/mipi_dsi.c  文件中的数组sn65dis83_init_table[]={}修改初始化参数

kernie方面:AP/kernel/drivers/video/msm/mdss/mipi_sn65dsi83_dsi2lvds-i2c.c文件中的数组sn65dis83_init_table[]={}修改初始化参数

还有一些其他问题待续。。。。。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值