cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure parallel lcd in linux and u-boot?

robin_elecgator
Associate II

I have a generic parallel LCD screen. 24 bits RGB, vsync, hsync, pclk, data_enable, disp_on,..

The examples I see on the wiki only shows the HDMI connection and DSI. How do you configure this for DPI?

Is this a good start? (In the device tree)

panel_backlight: panel-backlight {
	compatible = "gpio-backlight";
	gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>, <&gpioc 4 GPIO_ACTIVE_HIGH>;
	default-on;
	status = "okay";
};
 
lcd0: display@0 {
        compatible ="panel-dpi";
        label = "lcd";
		enable-gpios = <&gpioh 15 GPIO_ACTIVE_HIGH>;
        backlight = <&panel_backlight>;
 
        port {
            lcd_in: endpoint {
                    remote-endpoint = <&ltdc_out_rgb>;
            };
        };
 
        panel-timing {
                clock-frequency = <33000000>;
                hactive = <800>;
                vactive = <480>;
                hfront-porch = <40>;
                hback-porch = <40>;
                hsync-len = <24>;
                vback-porch = <29>;
                vfront-porch = <13>;
                vsync-len = <3>;
 
                hsync-active = <0>;
                vsync-active = <0>;
                de-active = <1>;
                pixelclk-active = <1>;
        };
};

and

&ltdc{
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&ltdc_pins_mx>;
    pinctrl-1 = <&ltdc_sleep_pins_mx>;
    status = "okay";
 
    /* USER CODE BEGIN ltdc */
	port {
		#address-cells = <1>;
		#size-cells = <0>;
 
		ltdc_out_rgb: endpoint {
		};
	};
    /* USER CODE END ltdc */
};

10 REPLIES 10

Hi

CAN YOU SHARE simple panel ltdc dts configuration, and what drivers you enabled,

i am getting following error

[  27.659534] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB

[  27.659547] [drm:drm_mode_object_put.part.0] OBJ ID: 34 (2)

[  27.769469] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETRESOURCES

[  27.769513] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETRESOURCES

[  27.769550] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR

[  27.769575] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:29:DPI-1]

[  27.769640] [drm:drm_mode_debug_printmodeline] Modeline 35:"800x480" 0 24000 800 1056 1057 1058 480 525 528 529 0x48 0x200000

[  27.769655] [drm:drm_mode_prune_invalid] Not using 800x480 mode: BAD

[  27.769678] [drm:drm_mode_object_put.part.0] OBJ ID: 29 (2)

[  27.769700] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR

[  27.769724] [drm:drm_mode_object_put.part.0] OBJ ID: 29 (2)

[  27.770042] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES

[  27.770070] [drm:drm_mode_object_put.part.0] OBJ ID: 29 (2)

[  27.770094] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES

[  27.770114] [drm:drm_mode_object_put.part.0] OBJ ID: 29 (2)

[  27.770142] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770161] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770186] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770207] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770238] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770257] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770283] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770301] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770323] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770342] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY

[  27.770387] [drm:drm_ioctl] pid=799, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER

[  27.770402] [drm:drm_ioctl] pid=799, ret = -2

[  34.320078] random: crng init done