|
3399C 单LVDS 颜色不正常
发表于 2019-6-21 16:17:58
浏览:8676
|
回复:7
打印
只看该作者
[复制链接]
楼主
本帖最后由 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,[10:0]=1.5*PPI_LPTXTIMECNT=9,[26:16]=(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屏幕,感觉少了个通道,完全没有红色
|
|