3399C 单LVDS 颜色不正常
本帖最后由 baweimao 于 2019-6-21 16:24 编辑环境:AIO-3399C
屏幕:单LVDS,3lane,6bit
问题:点亮后画面颜色异常
dts代码:
&dsi {
status = "okay";
dsi_panel: panel {
compatible ="simple-panel-dsi";
reg = <0>;
//ddc-i2c-bu
//power-supply = <&vcc_lcd>;
//pinctrl-0 = <&lcd_panel_reset &lcd_panel_enable>;
backlight = <&backlight>;
/*
enable-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>;
*/
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_RGB666>;
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
dsi,lvds-force-clk = <560>; // 800/2/3 ~= 65Mhz
dsi,lanes = <3>;
dsi,channel = <0>;
enable-delay-ms = <35>;
prepare-delay-ms = <6>;
unprepare-delay-ms = <0>;
disable-delay-ms = <20>;
size,width = <222>;
size,height = <125>;
status = "okay";
panel-init-sequence = [
29 02 06 3C 01 09 00 07 00 //PPI_TX_RX_TA,=1.5*PPI_LPTXTIMECNT=9,=(5*PPI_LPTXTIMECNT-3)*4=7
29 02 06 14 01 06 00 00 00 //PPI_LPTXTIMECNT=6
29 02 06 64 01 0B 00 00 00 //PPI_D0S_CLRSIPOCOUNT
29 02 06 68 01 0B 00 00 00 //PPI_D1S_CLRSIPOCOUNT
29 02 06 6C 01 0B 00 00 00 //PPI_D2S_CLRSIPOCOUNT
29 02 06 70 01 0B 00 00 00 //PPI_D3S_CLRSIPOCOUNT
29 02 06 34 01 0F 00 00 00 //OK //PPI_LANEENABLE
29 02 06 10 02 0F 00 00 00 //OK //DSI_LANEENABLE
29 02 06 04 01 01 00 00 00 //OK //PPI_STARTPPI
29 02 06 04 02 01 00 00 00 //DSI_START,has removed
29 02 06 50 04 20 00 F0 03 //OK //VPCTRL, 00000011 11110000 00000001 00100000 = bit0(0:msf disable),bit8(0:RGB666),bit17,18,19(0:hs,de,vs active Low),bit29:20(3F:vs delay 63)
//1024*600
29 02 06 54 04 20 00 50 00 //OK //HTIM1, 00000000 10110100 00000000 00110010 = bit8:0(0x14:hs pulse width 20pixel),bit24:16(0xf0: h back porch 240pixel)
29 02 06 58 04 00 04 30 00 //OK //HTIM2, 00000000 01001000 00000111 10000000 = bit10:0(0x400:h active 1024pixel),bit24:16(0x3c: h front porch 60pixel)
29 02 06 5C 04 06 00 0e 00 //OK //VTIM1, 00000000 00011001 00000000 00001010 = bit7:0(0x0c:vs pulse width 12pixel),bit23:16(0x14: v back porch 20pixel)
29 02 06 60 04 58 02 03 00 //OK //VTIM2, 00000000 00001010 00000100 00111000 = bit10:0(0x258:v active 600pixel),bit23:16(0x0c: v front porch 12pixel)
29 02 06 64 04 01 00 00 00 //OK //VFUEN, 1 update timing parameters(HTIM1,HTIM2...)
29 02 06 A0 04 06 80 44 00 //OK //LVPHY0, 00000000 01000100 10000000 00000110 = bit4:0(00110:vf 60~85MHZ),bit6:5(00:60~85Mhz),bit10(1:reduced range)
29 02 06 A0 04 06 80 04 00 //OK //LVPHY0, bit22(0:normal ,1:reset)
29 02 06 04 05 04 00 00 00 //OK //SYSRST,
//RGB888
//29 02 06 80 04 00 01 02 03 //R0,R1,R2,R3
//29 02 06 84 04 04 07 05 08 //R4,R7,R5,G0
//29 02 06 88 04 09 0A 0E 0F //G1,G2,G6,G7
//29 02 06 8C 04 0B 0C 0D 10 //G3,G4,G5,B0
//29 02 06 90 04 16 17 11 12 //B6,B7,B1,B2
//29 02 06 94 04 13 14 15 1B //B3,B4,B5,0
//29 02 06 98 04 18 19 1A 06 //HS,VS,DE,R6
//RGB666
29 02 06 80 04 00 01 02 03 //R0,R1,R2,R3
29 02 06 84 04 04 1B 05 08 //R4,GND,R5,G0
29 02 06 88 04 09 0A 1B 1B //G1,G2,GND,GND
29 02 06 8C 04 0B 0C 0D 10 //G3,G4,G5,B0
29 02 06 90 04 1B 1B 11 12 //GND,GND,B1,B2
29 02 06 94 04 13 14 15 1B //B3,B4,B5,RSVD
29 02 06 98 04 18 19 1A 1B //HS,VS,DE,GND
29 02 06 9C 04 41 00 00 00 //LVCFG, 00000000 00000000 00000100 00110001 = bit0(1:lvds enbale),bit1(0:singlelvds,1:duallvds),bit7:4(3:pclk divide option divide by 3),bit11:10(01:DCLK=DSI_CLK/2)
];
panel-exit-sequence = [
05 05 01 28
05 78 01 10
];
power_ctr: power_ctr {
rockchip,debug = <0>;
power_enable = <1>;
lcd_en:lcd_en {
gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_panel_lcd_en>;
rockchip,delay = <10>;
};
lcd_pwr_en: lcd-pwr-en {
gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_panel_pwr_en>;
rockchip,delay = <10>;
};
lcd_rst: lcd-rst {
gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_panel_reset>;
rockchip,delay = <6>;
};
};
disp_timings: display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <65000000>; //166000000 @50
hactive = <1024>;
vactive = <600>;
hsync-len = <30>; //20, 50
hback-porch = <130>; //50, 56
hfront-porch = <140>;//50, 30 //1580
vsync-len = <15>;
vback-porch = <10>;
vfront-porch = <10>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
};
};
如图所示,上面是HDMI的输出是正常的,下面是8寸6bit单LVDS屏幕,感觉少了个通道,完全没有红色
又买了一块AIO3399C,一样的问题 baweimao 发表于 2019-7-20 09:40
又买了一块AIO3399C,一样的问题
可以尝试修改如下,或是屏蔽掉bus-format,同时确认一下mipi 参数对应的格式是否是666
dsi,format = <MIPI_DSI_FMT_RGB666>;
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>; jpchen 发表于 2019-7-20 14:43
可以尝试修改如下,或是屏蔽掉bus-format,同时确认一下mipi 参数对应的格式是否是666
d ...
已贴出来的配置文件里,确认是
dsi,format = <MIPI_DSI_FMT_RGB666>;
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
panel-init-sequence等也全部标注出了修改的地方。
屏蔽掉bus-format就是把这个注释了试试吗?
另外21寸的双LVDS是没问题的,当然dst文件不是贴出来的这个 实测注释掉bus-format
没有变化 你可以试一下,使用dsi,format = <MIPI_DSI_FMT_RGB888>;dsi,lanes = <4>;
就是mipi 4lanes 输入, lcd 3lanes 输出,使用默认的映射方案,屏蔽下面部分
//29 02 06 80 04 00 01 02 03 //R0,R1,R2,R3
//29 02 06 84 04 04 07 05 08 //R4,R7,R5,G0
//29 02 06 88 04 09 0A 0E 0F //G1,G2,G6,G7
//29 02 06 8C 04 0B 0C 0D 10 //G3,G4,G5,B0
//29 02 06 90 04 16 17 11 12 //B6,B7,B1,B2
//29 02 06 94 04 13 14 15 1B //B3,B4,B5,0
//29 02 06 98 04 18 19 1A 06 //HS,VS,DE,R6
然后发现,图像有些水波纹,再按手册配置,24 to 16 转换算法就可以了
bailin 发表于 2019-8-22 18:02
你可以试一下,使用dsi,format = ;dsi,lanes = ;
就是mipi 4lanes 输入, lcd 3lanes 输出,使用默认的映 ...
也解决了我遇到的问题
页:
[1]