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:为 DPI 上的显示提供 DT 覆盖示例

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1497544/am623-sourcing-an-example-of-dt-overlay-for-a-display-over-dpi

器件型号:AM623

工具/软件:

我使用 AM335x 上的以下显示方式。 它使用 VOUT0-15、VOUT0_DE、VOUT0_HSYNC、VOUT0_VSYNC、VOUT0_PCLK。 我已经通过 PWM 使背光正常工作了... 暂时跳过触摸屏。

https://4dsystems.com.au/products/gen4-4dcape-43ct-clb/

这些引脚也位于 AM62x 上、我想实现它。 但我无法找到任何直接使用 DPI 的器件树叠加层示例。  

我在 AM335x 上使用以下设备

&{/} {
    panel {
        status = "okay";
        compatible = "ti,tilcdc,panel";
        pinctrl-names = "default";
        pinctrl-0 = <&bb_lcd_lcd_pins>;
        panel-info {
            ac-bias           = <255>;
            ac-bias-intrpt    = <0>;
            dma-burst-sz      = <16>;
            bpp               = <16>;
            fdd               = <0x80>;
            sync-edge         = <0>;
            sync-ctrl         = <1>;
            raster-order      = <0>;
            fifo-th           = <0>;
        };

        display-timings {
            native-mode = <&timing0>;
            /* www.newhavendisplay.com/app_notes/OTA5180A.pdf */
            timing0: 480x272 {
                clock-frequency = <9200000>;
                hactive = <480>;
                vactive = <272>;
                hfront-porch = <8>;
                hback-porch = <47>;
                hsync-len = <41>;
                vback-porch = <2>;
                vfront-porch = <3>;
                vsync-len = <10>;
                hsync-active = <0>;
                vsync-active = <0>;
                de-active = <1>;
                pixelclk-active = <0>;
            };
        };
    };
};
                        
&lcdc {
    status = "okay";
};

据我所知、AM62x 上不存在"ti、tildc"、因此我需要使用 ti、tidss?

TI、tildcdc 在此处进行了解释: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/display/tilcdc/panel.txt?h=v6.14


我找不到 ti、tidss 的文档。 这是最接近我可以找到: web.git.kernel.org/.../ti,am65x-dss.yaml

以下是我现在的情况。

&dss
{
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_parallel_rgb>;
   status = "okay";

};

&dss_ports{
    /* VP2 */
    port@1 {
        reg = <1>;
        dpi_out: endpoint {
            remote-endpoint = <&panel_in>;
        };
    };
};

有人知道一些很好的例子/参考来看看吗?

谢谢、
Robert

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

    我看到一些将 DPI 用于 HDMI、桥接器等的 DT 叠加示例 但是、如果有必要、我需要使用"raw (原始)"DPI。

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

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1270408/am623-dss-dpi-display-on-am62x/4811783?tisearch=e2e-sitesearch&keymatch=DPI%252520dts#4811783

    最终找到了这个没有直接回答我的问题,但有一些可用的信息.. 这可能对我有帮助.. 覆层"正在生效"、因此没有什么大错特错或缺失。 不确定"Newhaven、NHD-4.3-480272ef-atxl"是否与我的显示器兼容。 显示屏背光已打开、但到目前为止看不到图像。 我的显示器有引脚冲突、因此我现在需要处理。

    debian@BeagleBone:~$ sudo dmesg | grep dss
    [    0.095780] /bus@f0000/dss@30200000: Fixed dependency cycle(s) with /panel
    [    0.107959] /panel: Fixed dependency cycle(s) with /bus@f0000/dss@30200000
    [    0.108059] /bus@f0000/dss@30200000: Fixed dependency cycle(s) with /panel
    [    1.823105] pinctrl-single f4000.pinctrl: pin PIN64 already requested by 600000.gpio; cannot claim for 30200000.dss
    [    1.823132] pinctrl-single f4000.pinctrl: error -EINVAL: pin-64 (30200000.dss)
    [    1.823155] tidss 30200000.dss: Error applying setting, reverse things back

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

    您好、

    HDMI 桥接器(sii902x)放置在 EVM 的 AM62x SoC 外部。 该桥接器从 SoC 引脚接收 DPI 信号并将其转换为 HDMI。
    您共享的 E2E 链接指向正确的方向、方法是禁用外部 sii902桥接器并将 DPI 信号直接路由到面板。
    由于 sii902桥被禁用、您应该能够从相同的 SoC 引脚获取 DPI 信号。

    不确定'Newhaven, NHD-4.3-480272ef-atxl'是否与我的显示器兼容

    显示器的兼容驱动程序需要由面板供应商提供。

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

    我现在的显示屏上有一张图片。  我可以说它显示的是桌面/登录、但它看起来很糟糕。 面板供应商没有提供任何驱动程序、我认为我不需要面板供应商提供任何驱动程序。  我只是在我的 AM335x 系统上添加了 compatible ="ti,tildc,panel"、它运行良好。 AM62x 系统的等效功能是什么?

    我试过  

    compatible = "ti,tidss", "panel-dpi";
    因此显示屏根本无法工作。

    这是我到目前为止做过的最远的事情

    /dts-v1/;
    /plugin/;
    
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include "ti/k3-pinctrl.h"
    
    
    
    /* Pin multiplexing configuration */
    &main_pmx0
    {
    
        pinctrl_parallel_rgb:
        main-vout-default-pins
        {
            pinctrl-single,pins = <
                AM62X_IOPAD(0x0100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC            */
                AM62X_IOPAD(0x00f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC            */
                AM62X_IOPAD(0x0104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK             */
                AM62X_IOPAD(0x00fc, PIN_OUTPUT, 0) /*  (Y20) VOUT0_DE               */
                AM62X_IOPAD(0x00b8, PIN_OUTPUT, 0) /*  (U22) VOUT0_DATA0            */
                AM62X_IOPAD(0x00bc, PIN_OUTPUT, 0) /*  (V24) VOUT0_DATA1            */
                AM62X_IOPAD(0x00c0, PIN_OUTPUT, 0) /*  (W25) VOUT0_DATA2            */
                AM62X_IOPAD(0x00c4, PIN_OUTPUT, 0) /*  (W24) VOUT0_DATA3            */
                AM62X_IOPAD(0x00c8, PIN_OUTPUT, 0) /*  (Y25) VOUT0_DATA4            */
                AM62X_IOPAD(0x00cc, PIN_OUTPUT, 0) /*  (Y24) VOUT0_DATA5            */
                AM62X_IOPAD(0x00d0, PIN_OUTPUT, 0) /*  (Y23) VOUT0_DATA6            */
                AM62X_IOPAD(0x00d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7            */
                AM62X_IOPAD(0x00d8, PIN_OUTPUT, 0) /*  (V21) VOUT0_DATA8            */
                AM62X_IOPAD(0x00dc, PIN_OUTPUT, 0) /*  (W21) VOUT0_DATA9            */
                AM62X_IOPAD(0x00e0, PIN_OUTPUT, 0) /*  (V20) VOUT0_DATA10           */
                AM62X_IOPAD(0x00e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11           */
                AM62X_IOPAD(0x00e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12           */
                AM62X_IOPAD(0x00ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13           */
                AM62X_IOPAD(0x00f0, PIN_OUTPUT, 0) /*  (Y22) VOUT0_DATA14           */
                AM62X_IOPAD(0x00f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15           */
            >;
       };
    };
    
    &{/}
    {
        panel {
            compatible = "newhaven,nhd-4.3-480272ef-atxl";/*AM335x system uses ti,tilcdc,panel. What is the AM62x system equivalent? newhaven,nhd-4.3-480272ef-atxl works enough just for me to notice a desktop, but it's got some visual problems.*/
            port {
            panel_in: endpoint {
                remote-endpoint = <&dpi_out>;
            };
        };
    
        /* START OF PANEL PARAMS. My panel needs these values, but they don't seem to take effect with newhaven,nhd-4.3-480272ef-atxl
        panel-info {
            ac-bias           = <255>;
            ac-bias-intrpt    = <0>;
            dma-burst-sz      = <16>;
            bpp               = <16>;
            fdd               = <0x80>;
            sync-edge         = <0>;
            sync-ctrl         = <1>;
            raster-order      = <0>;
            fifo-th           = <0>;
        };
    
        display-timings {
            native-mode = <&timing0>;
            /* www.newhavendisplay.com/app_notes/OTA5180A.pdf */
            timing0: 480x272 {
            clock-frequency = <9200000>;
            hactive = <480>;
            vactive = <272>;
            hfront-porch = <8>;
            hback-porch = <47>;
            hsync-len = <41>;
            vback-porch = <2>;
            vfront-porch = <3>;
            vsync-len = <10>;
            hsync-active = <0>;
            vsync-active = <0>;
            de-active = <1>;
            pixelclk-active = <0>;
            };
        };
        /* END OF PANEL PARAMS. */
    };
    
    &dss
    {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_parallel_rgb>;
        status = "okay";
    };
    
    &dss_ports{
        port@1 {
            reg = <1>;
            dpi_out: endpoint {
                remote-endpoint = <&panel_in>;
            };
        };
    };

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

    请说明您使用的面板。
    此外、请尝试根据下一部分中的面板修改以下时序、而不是在此 DTS 中定义时序参数 /board-support/ /drivers/gpu/drm/panel/panel-simple.c

    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 = 272 + 2 + 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,
    };

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

    此外、出于好奇、为什么您重新定义/重命名了 pinmux 节点?
    您能否先应用 https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1270408/am623-dss-dpi-display-on-am62x/4811783?tisearch=e2e-sitesearch&keymatch=DPI%252520dts#4811783中提到的补丁 并在上述注释中提到的位置更改时序参数?

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

    我正在使用 https://4dsystems.com.au/products/gen4-4dcape-43ct-clb/

    USB 设计  

    ti,tilcdc,panel
     据我所知、这只是一个基本的面板驱动程序、而不是特定于面板/供应商的驱动程序。 我正在尝试弄清楚 AM62x 上的通用面板驱动器是什么。  

    我没有修改内核的知识、也没有在该链接中看到任何"补丁"。 我不确定您的意思是"重新定义/重命名了 pinmux 节点"。  

      

     

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

    您好、
    下面是补丁。 使用此项来代替您所做的 DTS 修改。

    diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    index 07763091a..ae2b3a102 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    @@ -105,6 +105,16 @@ framebuffer: framebuffer@ff700000 {
     		};
     	};
     
    +	panel {
    +			compatible = "newhaven,nhd-4.3-480272ef-atxl";
    +
    +			port {
    +					panel_in: endpoint {
    +							remote-endpoint = <&dpi1_out>;
    +					};
    +			};
    +	};
    +	
     	leds {
     		compatible = "gpio-leds";
     		pinctrl-names = "default";
    @@ -153,17 +163,6 @@ sound_master: simple-audio-card,codec {
     			clocks = <&tlv320_mclk>;
     		};
     	};
    -
    -	hdmi: connector {
    -		compatible = "hdmi-connector";
    -		label = "hdmi";
    -		type = "a";
    -		port {
    -			hdmi_connector_in: endpoint {
    -				remote-endpoint = <&sii9022_out>;
    -			};
    -		};
    -	};
     };
     
     &main_pmx0 {
    @@ -386,37 +385,6 @@ tlv320aic3106: audio-codec@1b {
     		DRVDD-supply = <&vcc_3v3_sys>;
     	};
     
    -	sii9022: sii9022@3b {
    -		#sound-dai-cells = <0>;
    -		compatible = "sil,sii9022";
    -		reg = <0x3b>;
    -
    -		interrupt-parent = <&exp1>;
    -		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
    -
    -		sil,i2s-data-lanes = < 0 >;
    -
    -		ports {
    -			#address-cells = <1>;
    -			#size-cells = <0>;
    -
    -			port@0 {
    -				reg = <0>;
    -
    -				sii9022_in: endpoint {
    -					remote-endpoint = <&dpi1_out>;
    -				};
    -			};
    -
    -			port@1 {
    -				reg = <1>;
    -
    -				sii9022_out: endpoint {
    -					remote-endpoint = <&hdmi_connector_in>;
    -				};
    -			};
    -		};
    -	};
     };
     
     &main_i2c2 {
    @@ -564,7 +532,7 @@ port@1 {
     		reg = <1>;
     
     		dpi1_out: endpoint {
    -			remote-endpoint = <&sii9022_in>;
    +			remote-endpoint = <&panel_in>;
     		};
     	};
     };

    与此补丁一起、在以下回复中先前共享的位置修改计时参数:

    请尝试根据的以下部分中的面板修改以下时间 /board-support/ /drivers/gpu/drm/panel/panel-simple.c

    完成这些更改后 、请使用此页面: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/latest/exports/docs/linux/Overview/dtb.html 生成内核映像、Top_Level_Makefile、模块并将其安装在 SD 卡中。

    此外、请使用 Linux 中的 kmstest 命令分享您在屏幕上看到的内容。

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

    我没有使用 TI 评估板、我认为"k3-am62x-sk-common.dtsi"适用于该电路板。  

    我只需要在 AM335x 器件上执行任何操作。 我只需创建/修改包含所有计时等的 DT 覆盖文件、然后重新启动我的系统以使其生效。 这正是我对 AM62x 器件的期望。 不是想争吵,只是从我的 POV 看来 ,你想让我用一种非常复杂和过分的方式去做。 这对于"最终"系统来说可能没问题、但必须反复重建内核以修改单个时间参数是浪费时间的。 我希望你能理解这一切从我的观点是如何出现的。

    1.不要创建一个需要重新引导才能生效的简单 DT 覆盖文件(包括所有显示内容),而是要我修改内核中的基本设备树,这需要完整的内核重建才能生效。

    2.修改 内核中需要完整内核重建才能生效的 c 文件,而不是将面板计时参数放入需要重新启动才能生效的简单 DT 覆盖文件中。

    除非 AM62x 系统无法调整 DT 覆盖中的时序等。 在这种情况下,我明白你为什么以这种方式指导我。 只是想澄清一下。 感谢您的帮助。

    Robert

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    除非 AM62x 系统无法调整 DT 覆盖层中的计时等

    这是我想要您进行测试的内容。
    由于 tildcdc 有自己的驱动器、因此它会在器件树中查找时序、而不是在驱动器本身中查找时序。

    我向您提出的问题:当您使用  具有 DTS 定义的计时的 compatible ="ti,tilcdc,panel"时、您遇到了什么问题?
    AM62x SDK 中包含 tildcdc 驱动器、那么、您是否说在使用兼容的 tildcc 时会遇到一些错误? 如果是、请共享您的日志。

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

    LCDC = LCD 控制器、这是 AM335x 数据表和 TRM 中提到的内容。 AM62x 数据表或 TRM 中的任何位置都没有提到这些引脚。 DSS 似乎是 LCDC 的替代品。 我看到 SDK 中包含该驱动程序、但它实际上是否曾经使用过?  https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/configs/defconfig?h=ti-linux-6.12.y 0提到 LCDC 可加载或内置。 到目前为止、我从未尝试过"ti、tilsdc、panel"、因为我不知道 AM62x 具有 LCDC。 我刚尝试过、显示屏上没有显示任何内容。 错误位于何处?

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

    您好、
    您可以查看: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62-main.dtsi?h=ti-linux-6.1.y#n763、但不确定此兼容性有多有用。
    社区标准建议您将面板计时添加到面板中、并使用该驱动程序、我们尚未在设置中测试基于 DTS 的计时。