You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何使Argon i.MX6UL开发板支持触摸屏?含默认无显示机型适配

Hey there! Let's tackle your two questions about getting touchscreen support working on your Argon i.MX6UL dev board—they're closely related, so I'll break this down into actionable, step-by-step guidance that's easy to follow.

Getting Touchscreen & Display Support for Argon i.MX6UL

First, let's clarify: the "default no display" issue and touchscreen support share the same core workflow—configuring the display framework and touch driver in your Linux setup. Here's how to fix both:

1. Confirm Hardware Details & Connections

Before diving into software, get these critical details sorted:

  • Screen specs: Note your touchscreen's controller model (e.g., Goodix GT911, FocalTech FT5406 for capacitive; ADS7843 for resistive), resolution (e.g., 800x480), and interface type (I2C/SPI for touch, LCDIF for display). If it's a kit screen, check Argon's official hardware docs; if it's custom, grab the screen datasheet.
  • Wiring check: Verify that:
    • LCD data/clock/control lines are connected to the i.MX6UL's LCDIF pins.
    • Touchscreen I2C/SPI lines, interrupt pin, and reset pin are wired to the correct GPIOs (double-check against your board's pinout).

2. Configure the Linux Kernel

i.MX6UL relies on kernel drivers for display and touch input. Use these steps to enable the right components:

Step A: Enable Kernel Options

Run make menuconfig in your kernel source directory to open the configuration UI:

  • Display support: Navigate to Device Drivers > Graphics support > Frame buffer Devices
    • Enable Freescale i.MX LCD Controller (this is the core display driver for i.MX6UL)
    • Set default screen size or leave it blank (we'll configure exact specs in the device tree later)
  • Touchscreen support: Go to Device Drivers > Input device support > Touchscreens
    • Enable the driver matching your touch controller (e.g., Goodix GT911 touchscreen for capacitive, TI ADS7843 touchscreen for resistive)
    • Ensure the corresponding I2C/SPI controller driver is enabled (for I2C, check Device Drivers > I2C support > I2C bus drivers and enable the i.MX6UL I2C controller you're using)

Step B: Modify the Device Tree (Critical!)

The device tree is how i.MX series boards map hardware to software. Edit your board's DTS file (usually imx6ul-argon.dts) to add display and touch nodes:

Example: Add LCD Display Node (800x480 screen)

&lcdif {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_lcdif_dat &pinctrl_lcdif_ctrl>;
    display = <&display0>;
    status = "okay";

    display0: display {
        bits-per-pixel = <16>;
        bus-width = <18>; /* Adjust to your screen's data bus width (18/24 bits) */
        display-timings {
            native-mode = <&timing0>;
            timing0: timing0 {
                clock-frequency = <33000000>; /* Match your screen's pixel clock (from datasheet) */
                hactive = <800>;
                vactive = <480>;
                hfront-porch = <40>;
                hback-porch = <88>;
                hsync-len = <48>;
                vback-porch = <32>;
                vfront-porch = <11>;
                vsync-len = <1>;
                hsync-active = <0>;
                vsync-active = <0>;
                de-active = <1>;
                pixelclk-active = <0>;
            };
        };
    };
};

/* Add LCD pin control */
&iomuxc {
    pinctrl_lcdif_dat: lcdifdatgrp {
        fsl,pins = <
            MX6UL_PAD_LCD_DATA00__LCDIF_DATA00  0x79
            MX6UL_PAD_LCD_DATA01__LCDIF_DATA01  0x79
            /* Add all data pins up to your bus width (e.g., up to DATA17 for 18-bit) */
            MX6UL_PAD_LCD_DATA17__LCDIF_DATA17  0x79
        >;
    };

    pinctrl_lcdif_ctrl: lcdifctrlgrp {
        fsl,pins = <
            MX6UL_PAD_LCD_CLK__LCDIF_CLK    0x79
            MX6UL_PAD_LCD_ENABLE__LCDIF_ENABLE  0x79
            MX6UL_PAD_LCD_HSYNC__LCDIF_HSYNC    0x79
            MX6UL_PAD_LCD_VSYNC__LCDIF_VSYNC    0x79
        >;
    };
};

Example: Add Touchscreen Node (I2C-connected GT911)

Assuming your touchscreen uses I2C1, with interrupt on GPIO1_IO04 and reset on GPIO1_IO05:

&i2c1 {
    clock-frequency = <400000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c1>;
    status = "okay";

    gt911@5d { /* GT911 I2C address is usually 0x5d or 0x14 */
        compatible = "goodix,gt911";
        reg = <0x5d>;
        interrupt-parent = <&gpio1>;
        interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
        touchscreen-size-x = <800>;
        touchscreen-size-y = <480>;
        status = "okay";
    };
};

/* Add I2C1 pin control */
&iomuxc {
    pinctrl_i2c1: i2c1grp {
        fsl,pins = <
            MX6UL_PAD_UART2_TX_DATA__I2C1_SCL  0x4001b8b0
            MX6UL_PAD_UART2_RX_DATA__I2C1_SDA  0x4001b8b0
        >;
    };
};

3. Compile & Flash the Kernel/Device Tree

Once configured, build the kernel and device tree:

# Compile kernel image (use -j with your CPU core count for speed)
make zImage -j$(nproc)

# Compile your board's device tree
make imx6ul-argon.dtb

Flash the generated zImage and imx6ul-argon.dtb to your board's boot partition (or replace the files on your boot TF card if using SD card boot).

4. Test Display & Touch Functionality

After rebooting your board:

  • Test display: Run fbset to check framebuffer specs (should match your screen resolution). If you have a GUI (Qt/X11), you should see the desktop; for command line, try echo "test" > /dev/fb0 to verify basic output.
  • Test touch: Use evtest to list input devices, then run evtest /dev/input/eventX (replace X with your touch device number). Touch the screen—you should see coordinate and press/release events. If using a GUI, the cursor should move with your touch.

Quick Note for Your "Default No Display" Kit

If your new kit doesn't show anything out of the box, it's almost certainly because the default device tree/kernel doesn't have display/touch nodes enabled. Start by grabbing Argon's official BSP (Board Support Package)—it should have pre-configured drivers and device trees for kit components. If your screen isn't covered in the official BSP, use the steps above to customize the setup.


内容的提问来源于stack exchange,提问作者Witco.Fu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:36:43