原先的13.3的LG屏替换成,BOE的13.3的屏,
只需要在DTS中原先的屏参数改为,要调换的屏参数。
&edp_panel {
compatible ="lg,lp079qx1-sp0v", "simple-panel";
backlight = <&backlight>;
enable-gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
enable-delay-ms = <60>;//120 150 200 80
pinctrl-0 = <&lcd_cs>;
power-supply = <&vcc_lcd>;
status = "okay";
disp_timings: display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <148500000>; //180000000
hactive = <1920>;
hfront-porch = <48>;
hsync-len = <32>;
hback-porch = <200>; //80
hsync-active = <0>;
vactive = <1080>;
vfront-porch = <3>;
vsync-len = <6>; //5
vback-porch = <31>; //23
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
};
这样只是改了最终的传递参数,其实好多中间并没有利用上,之前做过一些尝试,比如说在kernel/drivers/gpu/drm/panel/panel-simple.c中加上了相应的BOE屏的函数、结构体,并在DTS的compatible中把LG的驱动改成了BOEde
以下是LG的屏原先的参数。
&edp_panel {
compatible ="lg,lp079qx1-sp0v", "simple-panel";
backlight = <&backlight>;
enable-gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
enable-delay-ms = <120>;//120 150 200 80
pinctrl-0 = <&lcd_cs>;
power-supply = <&vcc_lcd>;
status = "okay";
disp_timings: display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <180000000>; //180000000 148500000
hactive = <1920>;
hfront-porch = <48>;
hsync-len = <32>;
hback-porch = <80>; //80 200
hsync-active = <0>;
vactive = <1080>;
vfront-porch = <3>;
vsync-len = <5>; //5 6
vback-porch = <23>; //23 31
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
};