Our product needs to send LVDS signals to an FPGA, which requires HSYNC and VSYNC to be active high. However, on the i.MX8MP, I cannot control the polarity of VSYNC/HSYNC (active high/low).The VSYNC and HSYNC signals from the i.MX8MP are always active low by default, but the FPGA requires them to be active high.
I tried the following two methods:
1、Configure LCDIF2 and LDB registers directly using devmem2 at runtime.
1.1、Configure LCDIF2,bit0~bit1,the FPGA signal capture shows no changes in VSYNC/HSYNC.
# devmem2 0x32e90000 w
Read at address 0x32E90000 (0xffff8cba2000): 0x00000003
# devmem2 0x32e90008 w 0X3
# devmem2 0x32e90000 w
Read at address 0x32E90000 (0xffff8cba2000): 0x00000000
1.2、Configure LDB registers,bit9~bit10,the FPGA signal capture shows no changes in VSYNC/HSYNC.
# devmem2 0x32ec005c w
Read at address 0x32EC005C (0xffffb8a8005c): 0x000006B5
# devmem2 0x32ec005c w 0xb5
# devmem2 0x32ec005c w
Read at address 0x32EC005C (0xffffb8a8005c): 0x000000B5
2、Use the default dts ,Imx8mp-evk-jdi-wuxga-lvds-panel.dts
2.1、The compatible match uses auo,p320hvn03, with a resolution of 1920x1080, which is consistent with our current setup.
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk-jdi-wuxga-lvds-panel.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-jdi-wuxga-lvds-panel.dts @@ -3,11 +3,11 @@ / { lvds0_panel { - compatible = "jdi,tx26d202vm0bwa"; + compatible = "auo,p320hvn03"; backlight = <&lvds_backlight>; port {
2.2、Modified the default configuration of auo,p320hvn03 and tested two versions for changes in VSYNC/HSYNC.
version a:
static const struct display_timing auo_p320hvn03_timings = { .vfront_porch = { 8, 17, 150 }, .vback_porch = { 8, 17, 150 }, .vsync_len = { 4, 11, 100 }, + .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, };
Use devmem2 to print the values of the relevant registers.
version b:
static const struct display_timing auo_p320hvn03_timings = { .vfront_porch = { 8, 17, 150 }, .vback_porch = { 8, 17, 150 }, .vsync_len = { 4, 11, 100 }, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, };
Use devmem2 to print the values of the relevant registers.
but the FPGA signal capture shows no changes in VSYNC/HSYNC
Can you provide some suggestions or assistance?
解決済! 解決策の投稿を見る。
Hello,
Please use the DISPLAY_FLAGS_VSYNC_HIGH and DISPLAY_FLAGS_HSYNC_HIGH in timing flag.
In the lcdifv3 driver, the polarity invert function is closed.
static struct lcdifv3_soc_pdata imx8mp_lcdif1_pdata = {
.hsync_invert = false,
.vsync_invert = false,
.de_invert = false,
};
static struct lcdifv3_soc_pdata imx8mp_lcdif2_pdata = {
.hsync_invert = false,
.vsync_invert = false,
.de_invert = false,
};
Best Regards,
Zhiming