Porting - Display
1. MIPI to eDP
Using the LT8911EXB bridge chip as an example.
1.1 Adding the Driver
Add the driver to the kernel directory:
src/kernel-5.15/kernel_platform/msm-kernel/drivers/misc/lt8911exbModify Kconfig and Makefile to include it in the kernel build:
# Kconfig
source "drivers/misc/lt8911exb/Kconfig"
# Makefile
+obj-y += lt8911exb/The final build artifact is located in rootfs:
build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/kalama-oe-linux/qti-ubuntu-robotics-image/1.0-r0/rootfs/lib/modules/5.15.189-qki-consolidate-android13-8-g6a323a18c8d8-dirty/lt8911exb.ko1.2 Modifying the Device Tree
Add the panel configuration to the display device tree directory:
src/display/vendor/qcom/proprietary/display-devicetree/display/dsi-panel-lt8911-1080p-edp-video.dtsiReference the panel device tree in kalama-sde-display-common.dtsi:
#include "dsi-panel-lt8911-1080p-edp-video.dtsi"Enable sde_dsi1 in kalama-sde-display-rb5-gen2.dtsi and configure power, panel, backlight, etc.:
&dsi_lt8911_edp_1080p_video {
qcom,mdss-dsi-sec-bl-pmic-control-type = "bl_ctrl_pwm";
pwms = <&pm8550_pwm_2 0 50000>;
qcom,bl-pmic-pwm-period-usecs = <200>;
qcom,mdss-dsi-bl-min-level = <128>;
qcom,mdss-dsi-bl-max-level = <255>;
qcom,mdss-brightness-max-level = <255>;
qcom,platform-bklight-en-gpio = <&tlmm 49 0>;
};
&mdss_mdp {
connectors = <&sde_dsi &sde_dsi1 &smmu_sde_unsec &sde_rscc &sde_wb1 &sde_dp>;
};
&sde_dsi1 {
/delete-property/ qcom,platform-te-gpio;
/delete-property/ qcom,panel-te-source;
status = "ok";
qcom,dsi-default-panel = <&dsi_lt8911_edp_1080p_video>;
pinctrl-names = "pwm_pin", "panel_active", "panel_suspend";
pinctrl-0 = <&pwm_gpio09_default>;
pinctrl-1 = <&edp_active &edp_bl_active>;
pinctrl-2 = <&edp_suspend &edp_bl_suspend>;
};Add the LT8911EXB device tree node:
&qupv3_hub_i2c2 {
lt8911exb: lt8911exb@29 {
compatible = "lontium,lt8911exb";
reg = <0x29>;
power-gpios = <&tlmm 85 0>;
};
};1.3 Testing with modetest
Check DSI-2 status:
sh-5.1# modetest -M msm_drm
73 0 disconnected DSI-2 0x0 1 71
modes:
index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
#0 1920x1080x60vid 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: ; type: preferredRun a display test on DSI-2 and observe whether color bars appear on the screen:
modetest -M msm_drm -s 73:1920x1080x60vid2. MIPI
Using the GM8775C panel as an example.
2.1 Modifying the Device Tree
Add the panel configuration to the display device tree directory:
src/display/vendor/qcom/proprietary/display-devicetree/display/dsi-panel-gm8775c-1080p-video.dtsiReference the panel device tree in kalama-sde-display-common.dtsi:
#include "dsi-panel-gm8775c-1080p-video.dtsi"Enable sde_dsi in kalama-sde-display-rb5-gen2.dtsi and configure power, panel, backlight, etc.:
&dsi_gm8775c_1080p_video {
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
qcom,5v-boost-gpio = <&tlmm 69 0>;
qcom,platform-reset-gpio = <&tlmm 68 0>;
qcom,platform-bklight-en-gpio = <&tlmm 60 0>;
qcom,mdss-dsi-mode-sel-gpio-state = "high";
qcom,panel-mode-gpio = <&tlmm 61 0>;
};
&mdss_mdp {
connectors = <&sde_dsi &sde_dsi1 &smmu_sde_unsec &sde_rscc &sde_wb1 &sde_dp>;
};
&sde_dsi {
/delete-property/ qcom,platform-te-gpio;
/delete-property/ qcom,panel-te-source;