rk3568 15.6寸 edp屏调试过程

15.6寸屏参规格书,找到hsync和vsync

Main clock= clock frequency= 152600000hz

Hor blanking= hbp+hfp+hsync=310

H sync Pluse width = hsync=32

H Sync Offset =hfp=48

hfp =310-32-48 =230

Ver blanking =vbp+vfp+vsync=60

V Sync Pulse Width=vsync=6

V Sync Offset=vbp=3

vfp=60-6-3=51

对应dts配置文件:

edp_panel: edp-panel {
        compatible = "simple-panel";
        status = "okay";
        power-supply = <&vcc3v3_lcd0_n>;
        enable-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;

        prepare-delay-ms = <200>;
        enable-delay-ms = <200>;
        
        unprepare-delay-ms = <200>;
        disable-delay-ms = <200>;
        bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>;
        bpc = <8>;
        
        backlight = <&backlight>;
        
        display-timings {
        native-mode = <&timing0>;

        timing0: timing0 {
                
                clock-frequency = <152600000>;
                hactive = <1920>;
                vactive = <1080>;
                
                hfront-porch = <230>;
                hsync-len = <32>;
                hback-porch = <48>;

                vfront-porch = <51>;
                vsync-len = <6>;
                vback-porch = <3>;

                hsync-active = <0>;
                vsync-active = <0>;
                de-active = <0>;
                pixelclk-active = <0>;
            };
        };
        ports {
            panel_in_edp: endpoint {
                remote-endpoint = <&edp_out_panel>;
                };
            };
        };

    backlight: backlight {
        status = "okay";
        compatible = "pwm-backlight";
        enable-gpios = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
        pwms = <&pwm6 0 2000 0>;
        brightness-levels = <
              0   1   2   3   4   5   6   7
              8   9  10  11  12  13  14  15
             16  17  18  19  20  21  22  23
             24  25  26  27  28  29  30  31
             32  33  34  35  36  37  38  39
             40  41  42  43  44  45  46  47
             48  49  50  51  52  53  54  55
             56  57  58  59  60  61  62  63
             64  65  66  67  68  69  70  71
             72  73  74  75  76  77  78  79
             80  81  82  83  84  85  86  87
             88  89  90  91  92  93  94  95
             96  97  98  99 100 101 102 103
            104 105 106 107 108 109 110 111
            112 113 114 115 116 117 118 119
            120 121 122 123 124 125 126 127
            128 129 130 131 132 133 134 135
            136 137 138 139 140 141 142 143
            144 145 146 147 148 149 150 151
            152 153 154 155 156 157 158 159
            160 161 162 163 164 165 166 167
            168 169 170 171 172 173 174 175
            176 177 178 179 180 181 182 183
            184 185 186 187 188 189 190 191
            192 193 194 195 196 197 198 199
            200 201 202 203 204 205 206 207
            208 209 210 211 212 213 214 215
            216 217 218 219 220 221 222 223
            224 225 226 227 228 229 230 231
            232 233 234 235 236 237 238 239
            240 241 242 243 244 245 246 247
            248 249 250 251 252 253 254 255>;
            default-brightness-level = <255>; 
    };

};
 

gpio口配置文件:

gpio0_D4:    

vcc3v3_lcd0_n: vcc3v3-lcd0-n {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3_lcd0_n";
        regulator-boot-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
        gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
        vin-supply = <&vcc3v3_sys>;

        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

背光设置 gpio2_D5:

        compatible = "pwm-backlight";
        enable-gpios = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
        pwms = <&pwm6 0 2000 0>;

lcd-vcc :gpio0_D4

    vcc3v3_lcd0_n: vcc3v3-lcd0-n {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3_lcd0_n";
        regulator-boot-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
        gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
        vin-supply = <&vcc3v3_sys>;

        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

BL_power脚:gpio0_C3

    edp_panel: edp-panel {
        compatible = "simple-panel";
        status = "okay";
        power-supply = <&vcc3v3_lcd0_n>;
        enable-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;

        prepare-delay-ms = <200>;
        enable-delay-ms = <200>;
        
        unprepare-delay-ms = <200>;
        disable-delay-ms = <200>;
        bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>;
        bpc = <8>;

edp屏相关配置:

&edp {
    force-hpd;
    status = "okay";

    ports {
        port@1 {
            reg = <1>;

            edp_out_panel: endpoint {
                remote-endpoint = <&panel_in_edp>;
            };
        };
    };
};

&route_edp {
    status = "okay";
    connect = <&vp1_out_edp>;
};
&edp_phy {
    status = "okay";
};
&edp_in_vp0 {
    status = "disabled";
};

&edp_in_vp1 {
    status = "okay";
};
 

  • 19
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值