Skip to content

Display Porting

This document describes the MIPI panel porting process, including device tree configuration and panel driver adaptation based on the DRM framework (using the Yousee YX80040ACT as an example).

Device Tree Configuration

Configuration file:

text
layers/meta-qcom-hwe/recipes-kernel/linux/linux-qcom-custom/kernel-source/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
dts
&mdss_dsi {                               // Qualcomm DSI node
    vdda-supply = <&vreg_l6b_1p2>;        // DSI power
    status = "okay";

    panel@0 {                             // LCD panel node
        compatible = "yousee,yx80040act"; // LCD driver
        reg = <0>;

        /* 3.3V panel power */
        power-gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>;   // LCD power gpio
        /* Reset pin */
        reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;    // LCD reset gpio

        backlight = <&pm8350c_pwm_backlight>;       // Backlight PWM

        port {                             // DSI port
            panel0_in: endpoint {
                remote-endpoint = <&mdss_dsi0_out>;
            };
        };
    };
};

Adding the Panel Driver

Kernel Configuration

Add the driver config in the following configuration file:

text
layers/meta-qcom-hwe/recipes-kernel/linux/linux-qcom-custom/kernel-source/arch/arm64/configs/qcom_addons.config
kconfig
CONFIG_DRM_PANEL_YOUSEE_YX80040ACT=m

Kconfig

text
layers/meta-qcom-hwe/recipes-kernel/linux/linux-qcom-custom/kernel-source/drivers/gpu/drm/panel/Kconfig
kconfig
config DRM_PANEL_YOUSEE_YX80040ACT
	tristate "Yousee YX80040ACT panel driver"
	depends on OF
	depends on DRM_MIPI_DSI
	depends on BACKLIGHT_CLASS_DEVICE
	help
	  Say Y here if you want to enable support for the Yousee
	  YX80040ACT controller for 1200x1920 MIPI LCD panels

Makefile

text
layers/meta-qcom-hwe/recipes-kernel/linux/linux-qcom-custom/kernel-source/drivers/gpu/drm/panel/Makefile
makefile
obj-$(CONFIG_DRM_PANEL_YOUSEE_YX80040ACT) += panel-yousee-yx80040act.o

Panel Driver Implementation

Panel driver based on the DRM framework:

text
layers/meta-qcom-hwe/recipes-kernel/linux/linux-qcom-custom/kernel-source/drivers/gpu/drm/panel/panel-yousee-yx80040act.c