This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM62L:AM62L3 + Waveshare 4 英寸 DSI LCD — 背光工作,未创建 DRM 流水线

Guru**** 2927270 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1653252/am62l-am62l3-waveshare-4-inch-dsi-lcd---backlight-works-drm-pipeline-not-created

器件型号: AM62L

您好、

我尝试将 Waveshare 4 英寸电容式触摸 DSI LCD (480x800、双通道 MIPI DSI、ICN6211 桥接器、位于 I2C 地址 0x45) 与运行 Linux 6.18 的 AM62L3 EVM 连接。

当前状态

在 I2C 上正确检测到 Waveshare 桥接器:

root@tmds62levm:~# i2cdetect -y -r 0

40: -- -- -- -- -- 45 -- --

Waveshare 驱动程序已加载并绑定:

root@tmds62levm:~# lsmod | grep waveshare
waveshare_dsi 12288 0

root@tmds62levm:~# readlink /sys/bus/i2c/devices/0-0045/driver
../../../../../../bus/i2c/drivers/ws_dsi2dpi

创建背光设备:

/sys/class/backlight/0-0045

亮度控制的工作原理:

echo 10 > /sys/class/backlight/0-0045/brightness
echo 255 > /sys/class/backlight/0-0045/brightness

显示屏背光灯打开。

器件树图验证

DT 图显示已正确连接:

DSS port0 <-> DSI port1
DSI port0 <-> Waveshare bridge port0
Bridge port1 <-> panel0

Phandle 检查确认所有远程端点链接均有效。

器件树

面板节点:

panel0 {
    compatible = "panel-dpi";
    status = "okay";

    width-mm = <86>;
    height-mm = <54>;
    bpc = <8>;

    panel-timing {
        clock-frequency = <30000000>;

        hactive = <480>;
        vactive = <800>;

        hback-porch = <40>;
        hfront-porch = <10>;
        hsync-len = <10>;

        vback-porch = <12>;
        vfront-porch = <5>;
        vsync-len = <3>;

        hsync-active = <0>;
        vsync-active = <0>;
        de-active = <1>;
        pixelclk-active = <0>;
    };

    port {
        panel_in: endpoint {
            remote-endpoint = <&bridge_out>;
        };
    };
};

桥接器节点:

bridge@45 {
    compatible = "waveshare,dsi2dpi";
    reg = <0x45>;

    ports {
        port@0 {
            reg = <0>;
            bridge_in: endpoint {
                data-lanes = <1 2>;
                remote-endpoint = <&dsi0_out>;
            };
        };

        port@1 {
            reg = <1>;
            bridge_out: endpoint {
                remote-endpoint = <&panel_in>;
            };
        };
    };
};

发现问题

DRM 从不创建卡:

root@tmds62levm:~# ls /sys/class/drm
version

预期:

card0
card0-DSI-1
renderD128
version

延迟探头显示:

root@tmds62levm:~# cat /sys/kernel/debug/devices_deferred

30200000.dss    tidss: port 0 probe failed

内核消息:

panel-simple panel0: Specify missing bus_format
panel-simple panel0: Expected bpc in {6,8} but got: 0
panel-simple panel0: supply power not found, using dummy regulator

但是、实时 DT 包含:

root@tmds62levm:~# hexdump -C /proc/device-tree/panel0/bpc

00000000 00 00 00 08

root@tmds62levm:~# hexdump -C /proc/device-tree/panel0/power-supply

00000000 00 00 00 1f

指示加载的 DT 中存在这两个属性。

问题

  1. 缺少的 bus-format 属性是否足以导致 tidss: port 0 probe failed 和阻止创建 DRM 卡?

  2. bus-format 对于 Waveshare DSI 至 DPI 桥接器后面的 480x800 RGB888 面板、什么是正确的?

  3. panel-dpi 节点是否是此面板的正确方法、或者是否应使用不同的面板驱动器?

  4. TI 的 TIDSS 驱动程序是否需要其他属性来成功创建 DRM 流水线?

如有任何进一步调试的建议、将不胜感激。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Anandhu:
    您是否参考了以下示例?
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62l3-evm-dsi-rpi-7inch-panel.dtso?h=ti-linux-6.18.y 
    以上内容使用 Toshiba 桥将面板侧的 DSI 转换为 DPI、就像您的情况一样。

    您能否检查 DTS DSI 配置是否已正确完成? 建议使用上述示例。 它使用面板简单来定义面板时序。
    缺少总线格式不应直接导致探测器延迟、但表明您的设置中存在一些问题。 如果以上内容有所帮助、请告诉我。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
    /dts-v1/;
    /plugin/;
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include "k3-pinctrl.h"
    
    &{/} {
        panel0 {
            compatible = "waveshare,dsi2dpi", "panel-dpi";
            status = "okay";
            bpc = <8>;
            power-supply = <&vcc_3v3_sys>;
            bus-format = <0x100a>;
            width-mm = <52>;
            height-mm = <86>;
            port {
                panel_in: endpoint {
                    remote-endpoint = <&waveshare_out>;
                };
            };
            panel-timing {
                clock-frequency = <30000000>;
                hactive = <480>;
                vactive = <800>;
                hback-porch = <40>;
                hfront-porch = <10>;
                hsync-len = <10>;
                vback-porch = <12>;
                vfront-porch = <5>;
                vsync-len = <3>;
                hsync-active = <0>;
                vsync-active = <0>;
                de-active = <1>;
                pixelclk-active = <0>;
            };
        };
    };
    
    &i2c0 {
        #address-cells = <1>;
        #size-cells = <0>;
        bridge@45 {
            compatible = "waveshare,dsi2dpi";
            reg = <0x45>;
            status = "okay";
            ports {
                #address-cells = <1>;
                #size-cells = <0>;
                port@0 {
                    reg = <0>;
                    waveshare_in: endpoint {
                        remote-endpoint = <&dsi0_out>;
                        data-lanes = <1 2>;
                    };
                };
                port@1 {
                    reg = <1>;
                    waveshare_out: endpoint {
                        remote-endpoint = <&panel_in>;
                    };
                };
            };
        };
    };
    
    &i2c2 {
        #address-cells = <1>;
        #size-cells = <0>;
        touch@38 {
            compatible = "edt,edt-ft5406";
            reg = <0x38>;
            touchscreen-size-x = <480>;
            touchscreen-size-y = <800>;
            status = "okay";
        };
    };
    
    &dss_ports {
        #address-cells = <1>;
        #size-cells = <0>;
        port@0 {
            reg = <0>;
            dpi_out: endpoint {
                remote-endpoint = <&dsi0_in>;
            };
        };
    };
    
    &dsi0 {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;
        ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
                reg = <0>;
                dsi0_out: endpoint {
                    remote-endpoint = <&waveshare_in>;
                    data-lanes = <1 2>;
                };
            };
            port@1 {
                reg = <1>;
                dsi0_in: endpoint {
                    remote-endpoint = <&dpi_out>;
                };
            };
        };
    };
    
    &dphy_tx0 { status = "okay"; };
    &sii9022 { status = "disabled"; };

    此叠加基于上述 DTS。 但“platform 30200000.dss:递延探测器挂起: tidss: port 0 probe failed“仍然存在

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Anandhu:
    您可以尝试使用面板简单方法、如共享示例中所示。
    推迟探头可能是由很多原因造成的、包括 DSI 链下方出现的故障。 建议添加打印件来检查问题。