NHD-2.4-240320CF-CSXN-F connect Texas AM335x
Hi,
I want to connect NHD-2.4-240320CF-CSXN-F to Texas AM355x using Linux Yocto Project. I create PCB with Texas processor and TFT. For Linux support the TFT, I enable the driver ST7789V to Kernel but after this, I don't know how to continue the configuration.
In Kernel, I show it's possible to enable the support for LCD NHD-4-3-480272EF-ATXL. In the drivers kernels files, I show the configuration in panel-simple.c there are this configuration:
static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
.clock = 9000,
.hdisplay = 480,
.hsync_start = 480 + 2,
.hsync_end = 480 + 2 + 41,
.htotal = 480 + 2 + 41 + 2,
.vdisplay = 272,
.vsync_start = 272 + 2,
.vsync_end = 272pane2 + 10,
.vtotal = 272 + 2 + 10 + 2,
.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
};
static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
.modes = &newhaven_nhd_43_480272ef_atxl_mode,
.num_modes = 1,
.bpc = 8,
.size = {
.width = 95,
.height = 54,
},
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
.connector_type = DRM_MODE_CONNECTOR_DPI,
};
How to adapt this code to support my TFT?
It's necessary another configuration to support TFT?
Thanks,
-
Hi Xavier,
To connect your NHD-2.4-240320CF-CSXN-F to the Texas AM335x using the Yocto Project, you'll need to adapt the kernel configuration similar to the example you provided. Here's a step-by-step guide to help you:
Adapting the Configuration
- Define the Display Mode: You'll need to create a new display mode structure for the NHD-2.4-240320CF-CSXN-F. Based on the typical timing parameters of this display, it might look something like this:
staticconststructdrm_display_modenewhaven_nhd_24_240320cf_csxn_f_mode = {
.clock = 6000, // Adjust based on your display's datasheet
.hdisplay = 240,
.hsync_start = 240 + 2,
.hsync_end = 240 + 2 + 20,
.htotal = 240 + 2 + 20 + 2,
.vdisplay = 320,
.vsync_start = 320 + 2,
.vsync_end = 320 + 2 + 10,
.vtotal = 320 + 2 + 10 + 2,
.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
};- Define the Panel Description: Next, create a panel description structure for the NHD-2.4-240320CF-CSXN-F.
staticconststructpanel_descnewhaven_nhd_24_240320cf_csxn_f = {
.modes = &newhaven_nhd_24_240320cf_csxn_f_mode,
.num_modes = 1,
.bpc = 8,
.size = {
.width = 36, // Adjust based on the physical dimensions of your display
.height = 48, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
.connector_type = DRM_MODE_CONNECTOR_DPI,
};-
Integrate the New Panel: Ensure this new configuration is integrated into the relevant parts of the kernel driver files, typically in
panel-simple.c
. -
Update the Device Tree Configuration: Update the device tree to match your new panel settings, setting the correct timings, and enabling the necessary GPIOs, clocks, and power supplies.
Additional Configuration
Make sure that your kernel has all the necessary drivers enabled and configured properly. Check the datasheet of your display for exact timing and configuration parameters.
Testing and Troubleshooting
You can refer here for a sample project made for Arduino, https://support.newhavendisplay.com/hc/en-us/articles/21375770693783-NHD-2-4-240320CF-CSXN-F-with-Arduino.
If you encounter issues or need further assistance, I can set up a test environment to troubleshoot and ensure everything is configured correctly. Let me know if you need more detailed guidance or any specific help.
0 -
Thank you very much for your reply. I will try the configuration on the PCB.
I want to take this opportunity to ask you how this configuration is connected with the ST7789V driver.
Thanks,
0 -
Hi Xavier,
You can use the following diagram to help with physical connections.
AM335X GPIO Pin -> NHD-2.4-240320CF Pin
-------------------------------------------
3.3V -> VDD (Pin 7)
1.8V -> IOVDD (Pin 8)
GND -> GND (Pins 1, 33, 39)
GPIO_CS -> /CS (Pin 10)
GPIO_DC -> D/C (Pin 11)
GPIO_WR -> /WR (Pin 12)
GPIO_RD -> /RD (Pin 13)
GPIO_RESET -> /RES (Pin 30)
DATA_BUS[0] -> DB0 (Pin 14)
DATA_BUS[1] -> DB1 (Pin 15)
...
DATA_BUS[15] -> DB15 (Pin 29)
3.1V -> LED-A (Pin 38)
GND -> LED-K1 to LED-K4 (Pins 34 to 37)0 -
Hi,
I tried the new kernel and devicetree but the system doesn't detect the device when executing the command modetest.
root@am335x-evm:~# modetest
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...failed
trying to open device 'rockchip'...failed
trying to open device 'atmel-hlcdc'...failed
trying to open device 'fsl-dcu-drm'...failed
trying to open device 'vc4'...failed
trying to open device 'virtio_gpu'...failed
trying to open device 'mediatek'...failed
trying to open device 'meson'...failed
trying to open device 'pl111'...failed
trying to open device 'stm'...failed
trying to open device 'sun4i-drm'...failed
trying to open device 'armada-drm'...failed
no device foundMy new devicetree includes these lines:
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&ecap0 0 50000 0>;
brightness-levels = <0 51 53 56 62 75 101 152 255>;
default-brightness-level = <8>;
};
panel {
compatible = "newhaven_nhd_24_240320cf_csxn_f";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins_s0>;
backlight = <&backlight>;
port {
panel_0: endpoint@0 {
remote-endpoint = <&lcdc_0>;
};
};
};
lcd_pins_s0: lcd_pins_s0 {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_AD8, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad8.lcd_data23 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD9, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad9.lcd_data22 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad10.lcd_data21 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad11.lcd_data20 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad12.lcd_data19 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad13.lcd_data18 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad14.lcd_data17 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad15.lcd_data16 */
AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT, MUX_MODE0)
>;
};What could be wrong?
Thanks,
0 -
Hi again,
I have made new changes in the configuration files but I still don't see anything on the screen. The main change I have made is to modify the format bus to RGB565 because the screen has 16 pins instead of the 24 that the RGB888 needs.
The panel-simple.C file is as follows:
static const struct drm_display_mode newhaven_nhd_24_240320cf_csxn_f_mode = {
.clock = 6000, // Adjust based on your display's datasheet
.hdisplay = 240,
.hsync_start = 240 + 2,
.hsync_end = 240 + 2 + 20,
.htotal = 240 + 2 + 20 + 2,
.vdisplay = 320,
.vsync_start = 320 + 2,
.vsync_end = 320 + 2 + 10,
.vtotal = 320 + 2 + 10 + 2,
.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
};
static const struct panel_desc newhaven_nhd_24_240320cf_csxn_f = {
.modes = &newhaven_nhd_24_240320cf_csxn_f_mode,
.num_modes = 1,
.bpc = 8,
.size = {
.width = 36, // Adjust based on the physical dimensions of your display
.height = 48,
},
.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
.connector_type = DRM_MODE_CONNECTOR_DPI,
};and the device tree:
panel {
compatible = "newhaven_nhd_24_240320cf_csxn_f";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&lcd_pins_default>;
pinctrl-1 = <&lcd_pins_sleep>;
backlight = <&lcd_bl>;
port {
panel_0: endpoint@0 {
remote-endpoint = <&lcdc_0>;
};
};
};
lcd_pins_default: lcd_pins_default {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad15.lcd_data16 */
>;
};
lcd_pins_sleep: lcd_pins_sleep {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad15.lcd_data16 */
>;
};What could be wrong?
Thanks,
0 -
Hi Xavier,
Please check and follow the steps below.
1. Panel Description and Display Mode
Create a new display mode structure for the NHD-2.4-240320CF-CSXN-F using the timing characteristics from the datasheet.From the NHD-2.4-240320CF-CSXN-F datasheet (page 7)(NHD-2.4-240320CF-CSXN-F):
// panel-simple.c
static const struct drm_display_mode newhaven_nhd_24_240320cf_csxn_f_mode = {
.clock = 6000, // Adjust based on your display's datasheet
.hdisplay = 240,
.hsync_start = 240 + 2,
.hsync_end = 240 + 2 + 20,
.htotal = 240 + 2 + 20 + 2,
.vdisplay = 320,
.vsync_start = 320 + 2,
.vsync_end = 320 + 2 + 10,
.vtotal = 320 + 2 + 10 + 2,
.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
};
static const struct panel_desc newhaven_nhd_24_240320cf_csxn_f = {
.modes = &newhaven_nhd_24_240320cf_csxn_f_mode,
.num_modes = 1,
.bpc = 8,
.size = {
.width = 36, // Adjust based on the physical dimensions of your display
.height = 48,
},
.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
.connector_type = DRM_MODE_CONNECTOR_DPI,
};2. Device Tree Configuration
Update your device tree to include the necessary entries for the display controller and panel.From the NHD-2.4-240320CF-CSXN-F datasheet (page 4)(NHD-2.4-240320CF-CSXN-F):
// device tree
panel {
compatible = "newhaven,nhd_24_240320cf_csxn_f";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&lcd_pins_default>;
pinctrl-1 = <&lcd_pins_sleep>;
backlight = <&lcd_bl>;
port {
panel_0: endpoint@0 {
remote-endpoint = <&lcdc_0>;
};
};
};
lcd_pins_default: lcd_pins_default {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT, MUX_MODE0)
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_OUTPUT, MUX_MODE1) /* gpmc_ad15.lcd_data16 */
>;
};
lcd_pins_sleep: lcd_pins_sleep {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PULL_DISABLE, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT_PULLDOWN, MUX_MODE7)
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad15.lcd_data16 */
>;
};3. Integrate Panel Description
Ensure the new panel description is integrated into the kernel driver files, typically in panel-simple.c.4. Device Tree Overlay
Include the device tree overlay in your Yocto build configuration to ensure it gets compiled and included in the final image.5. Check the Kernel Logs
After booting, check the kernel logs for any errors or warnings related to the display panel and controller:dmesg | grep drm
dmesg | grep panel6. Testing with Modetest
Ensure the display controller is correctly initialized and the display is detected:modetest -D /dev/dri/card0
Please let us know how this testing goes for you.
0 -
Hello,
Thank you very much for the answer.
I did the tests you asked for and the result is as follows:root@am335x-evm:~# dmesg | grep drm
[ 17.680780] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.gpu on minor 0
root@am335x-evm:~# dmesg | grep panel
root@am335x-evm:~# modetest -D /dev/dri/card0
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...failed
trying to open device 'rockchip'...failed
trying to open device 'atmel-hlcdc'...failed
trying to open device 'fsl-dcu-drm'...failed
trying to open device 'vc4'...failed
trying to open device 'virtio_gpu'...failed
trying to open device 'mediatek'...failed
trying to open device 'meson'...failed
trying to open device 'pl111'...failed
trying to open device 'stm'...failed
trying to open device 'sun4i-drm'...failed
trying to open device 'armada-drm'...failed
no device foundI attempted to debug the start LCD process and I have error in line,
ret = tilcdc_attach_external_device(ddev);
if (priv->is_componentized) { ret = component_bind_all(dev, ddev); if (ret < 0) goto init_failed; ret = tilcdc_add_component_encoder(ddev); if (ret < 0) goto init_failed; } else { ret = tilcdc_attach_external_device(ddev); if (ret) goto init_failed; }
From file tilcdc_drv.c.
Do you know why the code on this line might be failing?
Thanks,
Xavier
0 -
Hi Xavier,
You can try to add additional debug prints around the failing line in tilcdc_drv.c to gather more information. For example:
ret = tilcdc_attach_external_device(ddev);
if (ret) {
dev_err(dev, "Failed to attach external device: %d\n", ret);
goto init_failed;
}Please provide the detailed logs from
dmesg
after enabling the debug prints, which will help in identifying the exact issue.0 -
Hi,
Finally, I was able to solve the problem by running the tilcdc_drv.c using another LCD that was declared in the panel-simple.c file. However, the screen is still not working.
Going through all the settings and connections again, I think the problem I'm having now is the flags and bus flags of panel-simple.c because the flags I get are NHSYNC and NVSYNC when this display has no sync connector. What are the flags I need for this screen?
Thanks,0 -
Hi Xavier,
We are glad to hear you have resolved your issue, as this information is incredibly helpful to the community and we appreciate you keeping us posted.
0
Please sign in to leave a comment.
Comments
10 comments