RK3568 EK79007 mipi屏调试

屏厂给的初始化代码:

EK79007+BOE 7.0 IPS(97W_G8.5) MIPI 3-lane參數:

VDD= 1.8~2.0V
RESET=VDD;
STBYB=VDD;
AVDD= 9.6V
VCOM= 3.2V(TPY.)
VGH= 18V
VGL= -7V


MIPI CLK Speed:340Mbps(170MHZ)
H back porch:160
H front porch:160 
H pulse width:10
V back porch:23
V front porch:12
V pulse width:1

MIPI command如下:
regw(0xB2,0x20);
regw(0x80,0xAC);
regw(0x81,0xB8);
regw(0x82,0x09);
regw(0x83,0x78);
regw(0x84,0x7F);
regw(0x85,0xBB);
regw(0x86,0x70);

按照屏厂给的代码,放到rk平台后,屏花屏。

        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>;
        panel-init-sequence = [

            15 00 02 B2  20
            15 00 02 80 AC
            15 00 02 81 B8
            15 00 02 82 09
            15 00 02 83 78
            15 00 02 84 7F
            15 00 02 85 BB
            15 00 02 86 70
            05 78 01 11
            05 1E 01 29
        ];
        panel-exit-sequence = [
            05 00 01 28
            05 00 01 10
        ];

 

屏厂给的答复是,调下上电时序,修改了很多,都没有作用。参考网上的mtk6739点亮的资料。

        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>;
        panel-init-sequence = [

            15 00 02 B2  20//去掉这一行
            15 00 02 80 AC
            15 00 02 81 B8
            15 00 02 82 09
            15 00 02 83 78
            15 00 02 84 7F
            15 00 02 85 BB
            15 00 02 86 70
            05 78 01 11
            05 1E 01 29
        ];
        panel-exit-sequence = [
            05 00 01 28
            05 00 01 10
        ];

      15 00 02 B2  20//去掉这一行后,屏不花了,会闪屏。

调整hsync-active  vsync-active后,屏幕正常显示了。

        disp_timings0: display-timings {
            native-mode = <&dsi0_timing0>;
            dsi0_timing0: timing0 {
                clock-frequency = <34000000>;
                hactive = <1024>;
                vactive = <600>;
                
                hfront-porch = <60>;
                hsync-len = <10>;
                hback-porch = <60>;
                
                vfront-porch = <6>;
                vsync-len = <10>;
                vback-porch = <8>;
                
                hsync-active = <10>;
                vsync-active = <10>;
                de-active = <0>;
                pixelclk-active = <1>;
            };
        };

完整代码:

&dsi0 {
    status = "disabled";
    //rockchip,lane-rate = <1000>;
    dsi0_panel: panel@0 {
        status = "okay";
        compatible = "simple-panel-dsi";
        reg = <0>;
        backlight = <&backlight>;
        
        enable-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;  //电源
        
        reset-gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_LOW>;//reset脚

        pinctrl-names = "default";
        pinctrl-0 = <&lcd_enable_gpio>, <&lcd_rst_gpio>;
        
        prepare-delay-ms = <120>;
        reset-delay-ms = <120>;
        init-delay-ms = <120>;
        stbyb-delay-ms = <120>;
        enable-delay-ms = <120>;
        disable-delay-ms = <120>;
        unprepare-delay-ms = <120>;
 
        width-mm = <229>;
        height-mm = <143>;    
        
        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>;
        panel-init-sequence = [
            15 00 02 80 AC
            15 00 02 81 B8
            15 00 02 82 09
            15 00 02 83 78
            15 00 02 84 7F
            15 00 02 85 BB
            15 00 02 86 70
            05 78 01 11
            05 1E 01 29
        ];
        panel-exit-sequence = [
            05 00 01 28
            05 00 01 10
        ];

        disp_timings0: display-timings {
            native-mode = <&dsi0_timing0>;
            dsi0_timing0: timing0 {
                clock-frequency = <34000000>;
                hactive = <1024>;
                vactive = <600>;
                
                hfront-porch = <60>;
                hsync-len = <10>;
                hback-porch = <60>;
                
                vfront-porch = <6>;
                vsync-len = <10>;
                vback-porch = <8>;
                
                hsync-active = <10>;
                vsync-active = <10>;
                de-active = <0>;
                pixelclk-active = <1>;
            };
        };
        

        ports {
            #address-cells = <1>;
            #size-cells = <0>;

            port@0 {
                reg = <0>;
                panel_in_dsi: endpoint {
                    remote-endpoint = <&dsi_out_panel>;
                };
            };
        };
    };

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@1 {
            reg = <1>;
            dsi_out_panel: endpoint {
                remote-endpoint = <&panel_in_dsi>;
            };
        };
    };

};

如果还有其它长上电的,可以在dtsi里面添加配置文件:

    lcd_3v3: lcd-3v3 {
        compatible = "regulator-fixed";
        regulator-name = "lcd_3v3";
        regulator-always-on;
        regulator-boot-on;
        gpio = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
        enable-active-high;
        vin-supply = <&vcc3v3_sys>;
    };

参考文档:

MTK6739_安卓12屏幕调试笔记_ek79007+boe7.0驱动-CSDN博客

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值