2019-06-16 03:45 PM
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 = <<dc_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
<dc{
pinctrl-names = "default", "sleep";
pinctrl-0 = <<dc_pins_mx>;
pinctrl-1 = <<dc_sleep_pins_mx>;
status = "okay";
/* USER CODE BEGIN ltdc */
port {
#address-cells = <1>;
#size-cells = <0>;
ltdc_out_rgb: endpoint {
};
};
/* USER CODE END ltdc */
};
Solved! Go to Solution.
2019-06-20 03:10 AM
Hello Robin,
Thanks for all the details.
Yes EV1 and DK2 are using a DSI but LTDC is also used with DSI and DK2 is using for the HDMI bridge interface a parallel port.
So for reference of LTDC declaration, you can check in Kernel:
Looking at your device tree, there are few issues and the main one being the first one listed below (so better start with it):
2019-06-17 06:09 AM
Hello,
have a look on standard linux framework: https://wiki.st.com/stm32mpu/wiki/DRM_KMS_overview.
On HW side, you will see 2 'layers':
It seems your HW is compatible with ltdc interface. So you will find linked to this article some reference about device tree configuration and also the examples of running solution on ST boards (Disco and Eval board).
2019-06-17 11:22 AM
I don't really see what I'm doing wrong.
1) you configure the pinmux (CubeMX tool has done that for me)
2) you configure the LTDC, add the "port"
3) you define a panel, which I have done with panel-dpi
I don't see my mistake. The display examples use the DSI (serial port) instead of the parallel port.
I have included the device tree.
2019-06-17 03:06 PM
2019-06-17 03:07 PM
2019-06-18 05:03 AM
Would you have more information about your LCD panel ?
2019-06-18 05:09 AM
2019-06-20 03:10 AM
Hello Robin,
Thanks for all the details.
Yes EV1 and DK2 are using a DSI but LTDC is also used with DSI and DK2 is using for the HDMI bridge interface a parallel port.
So for reference of LTDC declaration, you can check in Kernel:
Looking at your device tree, there are few issues and the main one being the first one listed below (so better start with it):
2019-06-20 11:25 PM
It works under linux now! Great!
u-boot is still a problem, I don't see the same configuration in u-boot.
2019-06-21 05:32 AM
Very good !
For u-boot it is a bit different:
Success !!