一、背景
手上有款产品,副屏是mipi屏,需要兼容一块新的mipi屏。uboot阶段已经做好了兼容,dts也添加了panel@1节点,但是新屏依然无法点亮。Log有如下报错:
dw-mipi-dsi ff960000.dsi: [drm:dw_mipi_dsi_bind]ERRORFailed to find panel1 or bridge: -19
rockchip-drm display-subsystem: failed to bind ff960000.dsi (ops dw_mipi_dsi_ops): -19
rockchip-drm display-subsystem: master bind failed: -19
最后发现是dts中漏掉了ports节点的配置。
二、在DTS文件中添加新的panel节点
Kernel Version:4.19
添加新的panel@1节点,除了常规的display-timings、panel-init-sequence配置,特别注意的是还要在panel@1节点里添加ports节点,还有在对应的dsi节点下也要添加ports节点。
添加方法如下:
&dsi{
//此处省略
panel@0{
//此处省略
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel>;
};
};
};
}
//添加新的panel节点
panel@1 { //add panel@1 start
//省略backlight、timings、compatiable等等的配置
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel2_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel2>;
};
};
};
} //add panel@1 end
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
dsi_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi>;
};
};
port@2 {
reg = <2>;
dsi_out_panel2: endpoint {
remote-endpoint = <&panel2_in_dsi>;
};
};
};
}