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.

[参考译文] AM623:6.12 内核上的 LVDS 面板配置

Guru**** 2422230 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1534759/am623-lvds-panel-configuration-on-6-12-kernel

器件型号:AM623


工具/软件:

我正在尝试确定要在 OLDI 接口上使用 LCD 面板的正确器件树设置。 示例和参考资料似乎非常稀缺、似乎需要改用 VOUT 接口、它在我们的电路板上与其他信号绑定在一起。  

我找到的最佳参考是:

在 AM62P 上集成 LVDS 面板

我正在查看 DTS 中的各种示例(这是 6.12 内核)、并将所有这些的 DTS 拼在一起、这显然不是 100%正确的。 似乎也有一些从 dss -> dss0 等重命名的内容、但我不清楚这是特定于处理器还是所有 DTS 中没有更新。  

当 I boot 时、我得到:

[ 20.932104] platform 30200000.dss:递延探头待定:tidss:OLDI0 无电池板/桥接器。 

我不是 100%确定它是什么 — 这里的驱动程序代码是相当粗糙.  


DTS 粘贴在此处。 原谅所有评论的部分 — 正如我所说的,它是从不同的部分组装(和剪切和粘贴丢失的缩排)。  请告诉我我可以提供哪些其他信息。  

/ {
 display {
 compatible = "panel-lvds";

 data-mapping = "vesa-24";
 width-mm = <154>;
 height-mm = <86>;
 //enable-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
 panel-timing {
 clock-frequency = <51200000>;
 hactive = <1024>;
 vactive = <600>;
 hback-porch = <160>;
 hfront-porch = <160>;
 vback-porch = <23>;
 vfront-porch = <12>;
 hsync-len = <70>;
 vsync-len = <10>;
 hsync-active = <0>;
 vsync-active = <0>;
 de-active = <1>;
 pixelclk-active = <0>;
 };

 /*
 * Note that the OLDI TX 0 transmits the odd set of pixels
 * while the OLDI TX 1 transmits the even set. This is a
 * fixed configuration in the IP integration and is not
 * changeable. The properties, "dual-lvds-odd-pixels" and
 * "dual-lvds-even-pixels" have been used to merely
 * identify if a Dual Link configuration is required.
 * Swapping them will cause an error in the dss oldi driver.
 */
 ports {
 #address-cells = <1>;
 #size-cells = <0>;

 port@0 {
 reg = <0>;
 dual-lvds-odd-pixels;

 lcd_in0: endpoint {
 //remote-endpoint = <&oldi0_dss0_out>;
 remote-endpoint = <&oldi_out0>;
 };
 };
 port@1 {
 reg = <1>;
 dual-lvds-even-pixels;

 lcd_in1: endpoint {
 //remote-endpoint = <&oldi1_dss0_out>;
 remote-endpoint = <&oldi_out1>;
 };
 };
 };
 };

 dss0_vp1_clk: clock-divider-oldi-dss0 {
 compatible = "fixed-factor-clock";
 clocks = <&k3_clks 186 0>;
 #clock-cells = <0>;
 clock-div = <7>;
 clock-mult = <1>;
 };

 dss1_vp1_clk: clock-divider-oldi-dss1 {
 compatible = "fixed-factor-clock";
 clocks = <&k3_clks 232 0>;
 #clock-cells = <0>;
 clock-div = <7>;
 clock-mult = <1>;
 };
};


&main_pmx0 {
 main_oldi0_pins_default: main-oldi0-pins-default {
 pinctrl-single,pins = <
 AM62X_IOPAD(0x0260, PIN_OUTPUT, 0) /* (AA5) OLDI0_A0N */
 AM62X_IOPAD(0x025c, PIN_OUTPUT, 0) /* (Y6) OLDI0_A0P */
 AM62X_IOPAD(0x0268, PIN_OUTPUT, 0) /* (AD3) OLDI0_A1N */
 AM62X_IOPAD(0x0264, PIN_OUTPUT, 0) /* (AB4) OLDI0_A1P */
 AM62X_IOPAD(0x0270, PIN_OUTPUT, 0) /* (Y8) OLDI0_A2N */
 AM62X_IOPAD(0x026c, PIN_OUTPUT, 0) /* (AA8) OLDI0_A2P */
 AM62X_IOPAD(0x0278, PIN_OUTPUT, 0) /* (AB6) OLDI0_A3N */
 AM62X_IOPAD(0x0274, PIN_OUTPUT, 0) /* (AA7) OLDI0_A3P */
 AM62X_IOPAD(0x0280, PIN_OUTPUT, 0) /* (AC6) OLDI0_A4N */
 AM62X_IOPAD(0x027c, PIN_OUTPUT, 0) /* (AC5) OLDI0_A4P */
 AM62X_IOPAD(0x0288, PIN_OUTPUT, 0) /* (AE5) OLDI0_A5N */
 AM62X_IOPAD(0x0284, PIN_OUTPUT, 0) /* (AD6) OLDI0_A5P */
 AM62X_IOPAD(0x0290, PIN_OUTPUT, 0) /* (AE6) OLDI0_A6N */
 AM62X_IOPAD(0x028c, PIN_OUTPUT, 0) /* (AD7) OLDI0_A6P */
 AM62X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AD8) OLDI0_A7N */
 AM62X_IOPAD(0x0294, PIN_OUTPUT, 0) /* (AE7) OLDI0_A7P */
 AM62X_IOPAD(0x02a0, PIN_OUTPUT, 0) /* (AD4) OLDI0_CLK0N */
 AM62X_IOPAD(0x029c, PIN_OUTPUT, 0) /* (AE3) OLDI0_CLK0P */
 AM62X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (AE4) OLDI0_CLK1N */
 AM62X_IOPAD(0x02a4, PIN_OUTPUT, 0) /* (AD5) OLDI0_CLK1P */
 >;
 };
};



&dss0 {
 pinctrl-names = "default";
 pinctrl-0 = <&main_oldi0_pins_default>;
 status = "okay";
};

&oldi0_dss0 {
 status = "okay";
};

&oldi1_dss0 {
 status = "okay";
};

/*

&oldi0_dss0_ports {
 #address-cells = <1>;
 #size-cells = <0>;

 port@0 {
 reg = <0>;

 oldi0_dss0_in: endpoint {
 remote-endpoint = <&dss0_dpi0_out0>;
 };
 };

 port@1 {
 reg = <1>;

 oldi0_dss0_out: endpoint {
 remote-endpoint = <&lcd_in0>;
 };
 };
};

&oldi1_dss0_ports {
 #address-cells = <1>;
 #size-cells = <0>;

 port@0 {
 reg = <0>;

 oldi1_dss0_in: endpoint {
 remote-endpoint = <&dss0_dpi0_out1>;
 };
 };

 port@1 {
 reg = <1>;

 oldi1_dss0_out: endpoint {
 remote-endpoint = <&lcd_in1>;
 };
 };
};*/

&dss0_ports {
 #address-cells = <1>;
 #size-cells = <0>;

 /* VP1: LVDS Output (OLDI TX 0) */
 port@0 {
 reg = <0>;
// #address-cells = <1>;
// #size-cells = <0>;

 oldi_out0: endpoint {
 remote-endpoint = <&lcd_in0>;
 };
 };

 /* VP1: LVDS Output (OLDI TX 1) */
 port@2 {
 reg = <2>;
 // #address-cells = <1>;
 // #size-cells = <0>;

 oldi_out1: endpoint {
 remote-endpoint = <&lcd_in1>;
 };
 };




/* dss0_dpi0_out0: endpoint@0 {
 reg = <0>;
 remote-endpoint = <&oldi0_dss0_in>;
 };

 dss0_dpi0_out1: endpoint@1 {
 reg = <1>;
 remote-endpoint = <&oldi1_dss0_in>;
 };
 };*/
};

最后、我认为正确的内核选项位于:

CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_DISPLAY_HELPER=y
CONFIG_DRM_BRIDGE_CONNECTOR=y
CONFIG_DRM_DISPLAY_HDMI_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_STATE_HELPER=y
CONFIG_DRM_GEM_DMA_HELPER=y
CONFIG_DRM_PANEL=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_TIDSS=y
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y

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

    您好、
    DTS 适用于 6.1 内核。
    请使用最新的 dtso: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am625-sk-microtips-mf101hie-panel.dtso?h=ti-linux-6.12.y 作为参考。 这也包含在 Processor SDK 中。

    请尝试使用面板简单命令来定义时序参数、如 https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/gpu/drm/panel/panel-simple.c?h=ti-linux-6.1.y#n2722 中所示  

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

    谢谢你。 我最终能够针对面板将此 DTS 修改为包含项。  

    我有它使用 兼容=“Innolux,zj070na-01p","panel-simple";“"panel-simple";</s>“ “ 

    不清楚这是否正是我们需要的、但它是 1024x600 — 面板是 AFY1024600A2 。 我不确定如何将我们以前在 DTS 中的时序转换为驱动程序值 — 映射不是 1:1。  

    在任何情况下,我也能够提取 KMS++工具:

    #./fbtest
    /dev/fb0:RES 1024x600、虚拟 1024x600、line_len 4096
    #./kmsblank
    连接器 0:空白
    按 ENTER 键退出

    #./kmsprint
    连接器 0 (41) DPI-1(已连接)
    编码器 0 (40) 无
    #./kmsxxtest
    连接器 0/@41:DPI-1
    CRTC 0/@39:1024x600@60.25 51.501 1024/128/64/128/? 600/16/4/16/? 60 (60.25) P|D
    平面 0/@32: 0-0-1024x600
    FB 50 1024x600-XR24
    原子测试失败:–524

    这里仍然有一些问题。 我们正在研究这里一些非常复杂的 I2C 扩展器问题、以便进行配置、因此这些问题可能会综合处理、但希望提供任何建议。 感谢您发送编修。  

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

    我在这里看到了几件事:
    1) 您的面板是单链路 LVDS 吗?  
    2) 您是否在面板中将连接器类型指定为 LVDS — 简单? 面板配置为 DPI、这是错误的、请根据提供的参考重新检查您的配置。
    3) 请使用以下公式来转换计时参数:

    hfp = mode->hsync_start - mode->hdisplay;
    hsw = mode->hsync_end - mode->hsync_start;
    hbp = mode->htotal - mode->hsync_end;
    
    vfp = mode->vsync_start - mode->vdisplay;
    vsw = mode->vsync_end - mode->vsync_start;
    vbp = mode->vtotal - mode->vsync_end;

    您是否已将面板节点添加到 panel-simple.c?
    4) 如有 I2C 相关查询、请创建一个单独的线程。

    请使用代码块发布代码/日志。

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

    “1) 您的面板是单链路 LVDS 吗?“

    我假设是这样,但老实说不知道 — 数据表非常简洁,主要关注电气设置。 我应该更改什么?

    “2) 您是否在面板中将连接器类型指定为 LVDS — 简单? 面板配置为 DPI、这是错误的、请根据提供的参考重新检查您的配置。“

    这是我现在通过数学和之前的模式时序得到的结果。 我不知道这些参数的来源 — 再说一次,数据表对我的帮助不大。  

    diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
    index cc05e43670f3..0c4064178e92 100644
    --- a/drivers/gpu/drm/panel/panel-simple.c
    +++ b/drivers/gpu/drm/panel/panel-simple.c
    @@ -1326,6 +1326,36 @@ static const struct panel_desc auo_t215hvn01 = {
     	.connector_type = DRM_MODE_CONNECTOR_LVDS,
     };
     
    +static const struct drm_display_mode orient_display_afy1024600a2_mode = {
    +        .clock = 51200,
    +        .hdisplay = 1024,
    +        .hsync_start = 1024 + 160,
    +        .hsync_end = 1024 + 160 + 70,
    +        .htotal = 1024 + 160 + 70 + 160,
    +        .vdisplay = 600,
    +        .vsync_start = 600 + 12,
    +        .vsync_end = 600 + 12 + 10,
    +        .vtotal = 600 + 12 + 10 + 23,
    +};
    +
    +static const struct panel_desc orient_display_afy1024600a2 = {
    +        .modes = &orient_display_afy1024600a2_mode,
    +        .num_modes = 1,
    +        .bpc = 8,
    +        .size = {
    +                .width = 154,
    +                .height = 90,
    +        },
    +        .delay = {
    +                .prepare = 20,
    +                .enable = 200,
    +                .disable = 200,
    +        },
    +        .bus_flags = DRM_BUS_FLAG_DE_HIGH,
    +        .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
    +        .connector_type = DRM_MODE_CONNECTOR_LVDS,
    +};
    +
     static const struct drm_display_mode avic_tm070ddh03_mode = {
     	.clock = 51200,
     	.hdisplay = 1024,
    @@ -4714,6 +4744,9 @@ static const struct of_device_id platform_of_match[] = {
     	}, {
     		.compatible = "avic,tm070ddh03",
     		.data = &avic_tm070ddh03,
    +        }, {
    +                .compatible = "orient-display,afy1024600a2",
    +                .data = &orient_display_afy1024600a2,
     	}, {
     		.compatible = "bananapi,s070wv20-ct16",
     		.data = &bananapi_s070wv20_ct16,
    

    所以代码现在是“正在运行“、但显示时钟显然是关闭的。 我不知道我拥有的其他值是否正确、例如其他时序或像素格式。 我让我们的硬件团队仔细检查东西。 这是数据表:

    AFY1024600A2-7.0INTH-C

    这是现在工具的输出:

    ~# kmsprint
    Connector 0 (41) LVDS-1 (connected)
      Encoder 0 (40) NONE
        Crtc 0 (39) 1024x600@56.14 51.200 1024/160/70/160/? 600/12/10/23/? 56 (56.14) P|D
          Plane 0 (32) fb-id: 49 (crtcs: 0) 0,0 1024x600 -> 0,0 1024x600 (AR12 AB12 RA12 RG16 BG16 AR15 AB15 AR24 AB24 RA24 BA24 RG24 BG24 AR30 AB30 XR12 XB12 RX12 XR15 XB15 XR24 XB24 RX24 BX24 XR30 XB30 YUYV UYVY NV12)
            FB 49 1024x600 XR24
            
    # kmsxxtest
    Connector 0/@41: LVDS-1
      Crtc 0/@39: 1024x600@56.14 51.200 1024/160/70/160/? 600/12/10/23/? 56 (56.14) P|D
      Plane 0/@32: 0,0-1024x600
        Fb 51 1024x600-XR24
    press enter to exit
    
    

    “对于与 I2C 相关的问题、请创建单独的线程“

    我们是这样做的,在发布之前,但没有人回答:

    (+) AM623:器件树 GPIO/i2c 依赖项 — 处理器论坛-处理器 — TI E2E 支持论坛

    我们以前有另一篇关于 eMMC 的文章,我们已经解决了,但没有人也回答了这一点。  

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

    您是否在屏幕上看到与 kmsxxtest 有关的内容? 您需要什么 fps? 设置为 56、但我想应该是 60 吗? 如果是、请更改.clock = h_total*v_total*fps

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

    此外、要配置单链路、请删除  

    dual-lvds-odd-pixels;
    dual-lvds-even-pixels;
    ti,companion-oldi = <&oldi1>;
    ti,secondary-oldi;
    

    读取数据。

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

    谢谢、显示屏现在正常工作。 我不确定应该是什么更新、同样、数据表也不是很清晰。 您给出的计算(和/ 1000)会产生比我复制的值更差的闪烁。 我最终将其设置为 50000(显示为 54.722)、可提供稳定的显示。 我正在让硬件工程师检查所有最终时序、但这看起来已经足够好了。