既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上物联网嵌入式知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、电子书籍、讲解视频,并且后续会持续更新
需要这些体系化资料的朋友,可以加我V获取:vip1024c (备注嵌入式)
// Height - 1280
params->dsi.vertical_sync_active=4
params->dsi.vertical_backporch=28
params->dsi.vertical_frontporch=30
params->dsi.horizontal_sync_active=20
params->dsi.horizontal_backporch=20
params->dsi.horizontal_frontporch=40
params->dsi.PLL_CLOCK=220Mbps
params->PCLK=71Mhz
LCD_nReset=1;
Delayms(20);
LCD_nReset=0;
Delayms(50);
LCD_nReset=1;
Delayms(120);
{REGFLAG_DELAY,10,{}},
//JD9365DA-H3+BOE8.0IPS(TV080WXQ-N88)_4line_20211012
//0xE0寄存器地址, 0x01数据个数, 0x00寄存器写入数据
{0xE0,1,{0x00}},
{0xE1,1,{0x93}},
{0xE2,1,{0x65}},
{0xE3,1,{0xF8}},
{0x80,1,{0x03}},
{0xE0,1,{0x01}},
{0x00,1,{0x00}},
{0x01,1,{0x72}},
{0x03,1,{0x00}},
{0x04,1,{0x80}},
{0x17,1,{0x00}},
{0x18,1,{0xAF}},
{0x19,1,{0x00}},
{0x1A,1,{0x00}},
{0x1B,1,{0xAF}},
{0x1C,1,{0x00}},
{0x24,1,{0xFE}},
{0x37,1,{0x19}},
{0x38,1,{0x05}},
{0x39,1,{0x00}},
{0x3A,1,{0x01}},
{0x3B,1,{0x01}},
{0x3C,1,{0x70}},
{0x3D,1,{0xFF}},
{0x3E,1,{0xFF}},
{0x3F,1,{0xFF}},
{0x40,1,{0x06}},
{0x41,1,{0xA0}},
{0x43,1,{0x1E}},
{0x44,1,{0x10}},
{0x45,1,{0x28}},
{0x4B,1,{0x04}},
{0x55,1,{0x02}},
{0x56,1,{0x01}},
{0x57,1,{0xA9}},
{0x58,1,{0x0A}},
{0x59,1,{0x0A}},
{0x5A,1,{0x37}},
{0x5B,1,{0x1A}},
{0x5D,1,{0x7F}},
{0x5E,1,{0x6A}},
{0x5F,1,{0x5B}},
{0x60,1,{0x50}},
{0x61,1,{0x4D}},
{0x62,1,{0x3F}},
{0x63,1,{0x44}},
{0x64,1,{0x2E}},
{0x65,1,{0x49}},
{0x66,1,{0x48}},
{0x67,1,{0x48}},
{0x68,1,{0x66}},
{0x69,1,{0x54}},
{0x6A,1,{0x5A}},
{0x6B,1,{0x4C}},
{0x6C,1,{0x44}},
{0x6D,1,{0x37}},
{0x6E,1,{0x23}},
{0x6F,1,{0x10}},
{0x70,1,{0x7F}},
{0x71,1,{0x6A}},
{0x72,1,{0x5B}},
{0x73,1,{0x50}},
{0x74,1,{0x4D}},
{0x75,1,{0x3F}},
{0x76,1,{0x44}},
{0x77,1,{0x2E}},
{0x78,1,{0x49}},
{0x79,1,{0x48}},
{0x7A,1,{0x48}},
{0x7B,1,{0x66}},
{0x7C,1,{0x54}},
{0x7D,1,{0x5A}},
{0x7E,1,{0x4C}},
{0x7F,1,{0x44}},
{0x80,1,{0x37}},
{0x81,1,{0x23}},
{0x82,1,{0x10}},
{0xE0,1,{0x02}},
{0x00,1,{0x4B}},
{0x01,1,{0x4B}},
{0x02,1,{0x49}},
{0x03,1,{0x49}},
{0x04,1,{0x47}},
{0x05,1,{0x47}},
{0x06,1,{0x45}},
{0x07,1,{0x45}},
{0x08,1,{0x41}},
{0x09,1,{0x1F}},
{0x0A,1,{0x1F}},
{0x0B,1,{0x1F}},
{0x0C,1,{0x1F}},
{0x0D,1,{0x1F}},
{0x0E,1,{0x1F}},
{0x0F,1,{0x5F}},
{0x10,1,{0x5F}},
{0x11,1,{0x57}},
{0x12,1,{0x77}},
{0x13,1,{0x35}},
{0x14,1,{0x1F}},
{0x15,1,{0x1F}},
{0x16,1,{0x4A}},
{0x17,1,{0x4A}},
{0x18,1,{0x48}},
{0x19,1,{0x48}},
{0x1A,1,{0x46}},
{0x1B,1,{0x46}},
{0x1C,1,{0x44}},
{0x1D,1,{0x44}},
{0x1E,1,{0x40}},
{0x1F,1,{0x1F}},
{0x20,1,{0x1F}},
{0x21,1,{0x1F}},
{0x22,1,{0x1F}},
{0x23,1,{0x1F}},
{0x24,1,{0x1F}},
{0x25,1,{0x5F}},
{0x26,1,{0x5F}},
{0x27,1,{0x57}},
{0x28,1,{0x77}},
{0x29,1,{0x35}},
{0x2A,1,{0x1F}},
{0x2B,1,{0x1F}},
{0x58,1,{0x40}},
{0x59,1,{0x00}},
{0x5A,1,{0x00}},
{0x5B,1,{0x10}},
{0x5C,1,{0x02}},
{0x5D,1,{0x40}},
{0x5E,1,{0x01}},
{0x5F,1,{0x02}},
{0x60,1,{0x30}},
{0x61,1,{0x01}},
{0x62,1,{0x02}},
{0x63,1,{0x03}},
{0x64,1,{0x6B}},
{0x65,1,{0x05}},
{0x66,1,{0x0C}},
{0x67,1,{0x73}},
{0x68,1,{0x06}},
{0x69,1,{0x03}},
{0x6A,1,{0x56}},
{0x6B,1,{0x08}},
{0x6C,1,{0x00}},
{0x6D,1,{0x04}},
{0x6E,1,{0x04}},
{0x6F,1,{0x88}},
{0x70,1,{0x00}},
{0x71,1,{0x00}},
{0x72,1,{0x06}},
{0x73,1,{0x7B}},
{0x74,1,{0x00}},
{0x75,1,{0xF8}},
{0x76,1,{0x00}},
{0x77,1,{0xD5}},
{0x78,1,{0x2E}},
{0x79,1,{0x12}},
{0x7A,1,{0x03}},
{0x7B,1,{0x00}},
{0x7C,1,{0x00}},
{0x7D,1,{0x03}},
{0x7E,1,{0x7B}},
{0xE0,1,{0x04}},
{0x00,1,{0x0E}},
{0x02,1,{0xB3}},
{0x09,1,{0x60}},
{0x0E,1,{0x2A}},
{0x36,1,{0x59}},
{0xE0,1,{0x00}},
{0x51,1,{0x80}},
{0x53,1,{0x2C}},
{0x55,1,{0x00}},
{0x11,1,{0x00}},
{REGFLAG_DELAY,120,{}},
{0x29,1,{0x00}},
{REGFLAG_DELAY,5,{}},
{0x35,1,{0x00}},
{REGFLAG_END_OF_TABLE,0x00,{}}
把上面的屏幕寄存器初始化操作转化成MIPI命令序列可以借助于python脚本程序来实现,具体的实现代码如下:
2、使用脚本转换为设备树格式,参考其他设备格式
‘’’
panel-init-sequence = [
15 00 02 80 77
15 00 02 81 77
15 00 02 82 77
15 00 02 83 77
15 00 02 84 77
15 00 02 85 77
15 00 02 86 77
39 00 0D C3 01 66 13 23 00 66 85 33 20 38 38 00
05 64 01 11
05 14 01 29
];
15 00 02 80 77
| | | | |
| | | | 数据
| | | | 寄存器地址
| | 数据长度
| 延时
命令类型(0x05: 单字节数据 0x15: 双字节数据 0x39: 多字节数据)
‘’’
def gen(path):
f=open(path,‘r’)
lines=f.readlines()
f.close()
# {REGFLAG_DELAY, 10, {}},
# {0xE0, 1, {0x00}},
delay=0
for line in lines:
if line.find('{REGFLAG_DELAY')==0:
ds=line.split(',')
# print('=========%s'%ds[1])
# print(ds)
# print(ds[1])
delay=int(ds[1])
# print(delay)
elif line.find("{0x")==0:
ds=line.split(',')
reg=ds[0].split('0x')[1]
dat=ds[2].split('{0x')[1].split('}')[0]
# print("reg:%s delay:%2.2x data:%s"%(reg,dly,dat))
print("15 %2.2X 02 %s %s"%(delay,reg,dat))
delay=0
gen(r’C_JD9365DA-H3_BOE8.0_IPS(TV080WXQ-N88)_800x1280_2power_ZigZag_G2.2_210630_johnson.txt’)
根据上面厂家提供的驱动程序示例和JD9365的数据手册中一些上电时序就可以写出RK3568的设备树,此屏幕设备树配置如下:其中enable-delay-ms,reset-delay-ms等可以查看JD9365的数据手册,有些时间参数找不到,可以使用原来设备树中的默认参数。屏幕使用的enable-gpios和reset-gpios,还有PWM背光可以根据自己的实际电路设计进行修改。屏幕的退出序列panel-exit-sequence,厂家没有提供,所以就是原来设备树的序列,没有删除保留。
&dsi0 {
status = “okay”;
//rockchip,lane-rate = <1000>;
dsi0_panel: panel@0 {
status = “okay”;
compatible = “simple-panel-dsi”;
reg = <0>;
backlight = <&backlight_0>;
enable-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_LOW>;
enable-delay-ms = <35>;
prepare-delay-ms = <6>;
reset-delay-ms = <25>;
init-delay-ms = <130>;
unprepare-delay-ms = <0>;
disable-delay-ms = <20>;
mipi-data-delay-ms = <200>;
size,width = <107>;
size,height = <172>;
dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
dsi,format = <MIPI_DSI_FMT_RGB888>;
dsi,lanes = <4>;
/*JD9365A寄存器初始操作, 0x15命令类型,单字节数据, 第2个字节为延时, 第3个字节为数据长度,第4,5个字节为数据表示寄存器地址和写入的数据 */
panel-init-sequence = [
15 0A 02 E0 00
15 00 02 E1 93
15 00 02 E2 65
15 00 02 E3 F8
15 00 02 80 03
15 00 02 E0 01
15 00 02 00 00
15 00 02 01 72
15 00 02 03 00
15 00 02 04 80
15 00 02 17 00
15 00 02 18 AF
15 00 02 19 00
15 00 02 1A 00
15 00 02 1B AF
15 00 02 1C 00
15 00 02 24 FE
15 00 02 37 19
15 00 02 38 05
15 00 02 39 00
15 00 02 3A 01
15 00 02 3B 01
15 00 02 3C 70
15 00 02 3D FF
15 00 02 3E FF
15 00 02 3F FF
15 00 02 40 06
15 00 02 41 A0
15 00 02 43 1E
15 00 02 44 10
15 00 02 45 28
15 00 02 4B 04
15 00 02 55 02
15 00 02 56 01
15 00 02 57 A9
15 00 02 58 0A
15 00 02 59 0A
15 00 02 5A 37
15 00 02 5B 1A
15 00 02 5D 7F
15 00 02 5E 6A
15 00 02 5F 5B
15 00 02 60 50
15 00 02 61 4D
15 00 02 62 3F
15 00 02 63 44
15 00 02 64 2E
15 00 02 65 49
15 00 02 66 48
15 00 02 67 48
15 00 02 68 66
15 00 02 69 54
15 00 02 6A 5A
15 00 02 6B 4C
15 00 02 6C 44
15 00 02 6D 37
15 00 02 6E 23
15 00 02 6F 10
15 00 02 70 7F
15 00 02 71 6A
15 00 02 72 5B
15 00 02 73 50
15 00 02 74 4D
15 00 02 75 3F
15 00 02 76 44
15 00 02 77 2E
15 00 02 78 49
15 00 02 79 48
15 00 02 7A 48
15 00 02 7B 66
15 00 02 7C 54
15 00 02 7D 5A
15 00 02 7E 4C
15 00 02 7F 44
15 00 02 80 37
15 00 02 81 23
15 00 02 82 10
15 00 02 E0 02
15 00 02 00 4B
15 00 02 01 4B
15 00 02 02 49
15 00 02 03 49
15 00 02 04 47
15 00 02 05 47
15 00 02 06 45
15 00 02 07 45
15 00 02 08 41
15 00 02 09 1F
15 00 02 0A 1F
15 00 02 0B 1F
15 00 02 0C 1F
15 00 02 0D 1F
15 00 02 0E 1F
15 00 02 0F 5F
15 00 02 10 5F
15 00 02 11 57
15 00 02 12 77
15 00 02 13 35
15 00 02 14 1F
15 00 02 15 1F
15 00 02 16 4A
15 00 02 17 4A
15 00 02 18 48
15 00 02 19 48
15 00 02 1A 46
15 00 02 1B 46
15 00 02 1C 44
15 00 02 1D 44
15 00 02 1E 40
15 00 02 1F 1F
15 00 02 20 1F
15 00 02 21 1F
15 00 02 22 1F
15 00 02 23 1F
15 00 02 24 1F
15 00 02 25 5F
15 00 02 26 5F
15 00 02 27 57
15 00 02 28 77
15 00 02 29 35
15 00 02 2A 1F
15 00 02 2B 1F
15 00 02 58 40
15 00 02 59 00
15 00 02 5A 00
15 00 02 5B 10
15 00 02 5C 02
15 00 02 5D 40
15 00 02 5E 01
15 00 02 5F 02
15 00 02 60 30
15 00 02 61 01
15 00 02 62 02
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上物联网嵌入式知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、电子书籍、讲解视频,并且后续会持续更新
需要这些体系化资料的朋友,可以加我V获取:vip1024c (备注嵌入式)
15 00 02 5E 01
15 00 02 5F 02
15 00 02 60 30
15 00 02 61 01
15 00 02 62 02
[外链图片转存中…(img-sQFrhmdT-1715790685659)]
[外链图片转存中…(img-Avv7jFNk-1715790685659)]
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上物联网嵌入式知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、电子书籍、讲解视频,并且后续会持续更新
需要这些体系化资料的朋友,可以加我V获取:vip1024c (备注嵌入式)