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.

[参考译文] PROCESSOR-SDK-AM57X:SDK 9.03:ft_fixup_clock 用于 DSP 电压域失败

Guru**** 2483345 points
Other Parts Discussed in Thread: BEAGLEBOARD-X15

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1546186/processor-sdk-am57x-sdk-9-03-ft_fixup_clock-failed-for-dsp-voltage-domain

器件型号:PROCESSOR-SDK-AM57X
主题中讨论的其他器件:BeagleBoard-X15

工具/软件:

您好:

我目前正在使用 am57x BeagleBoard-x15、SDK 9.03 默认图像。 我注意到 u-boot 中存在以下错误。

U-Boot 2023.04-ti-g2bedcd265ca6 (Dec 07 2024 - 07:04:35 +0000)

CPU  : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15 rev C
Board: BeagleBoard X15 REV C.00
DRAM:  2 GiB
ti_emmc_boardid_get failed -5
Core:  70 devices, 24 uclasses, devicetree: separate
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

Loading Environment from MMC... *** Warning - bad CRC, using default environment

Net:   eth2: ethernet@48484000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
This will not be a case any time
This will not be a case any time
7930368 bytes read in 371 ms (20.4 MiB/s)
This will not be a case any time
This will not be a case any time
216847 bytes read in 39 ms (5.3 MiB/s)
Working FDT set to 88000000
This will not be a case any time
This will not be a case any time
Kernel image @ 0x82000000 [ 0x000000 - 0x790200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
   Loading Device Tree to 8fec8000, end 8fffffff ... OK
Working FDT set to 8fec8000
ft_fixup_clocks failed for DSP voltage domain: <valid offset/length>

当我完全引导至 Linux 并检查 DSP 时钟频率时、它设置为默认 600MHz

root@am57xx-evm:~# cat /sys/kernel/debug/clk/dpll_dsp_ck/clk_rate
600000000

我在定制的 am57x 电路板上也看到了这一点。

我想看看前一个 SDK 的默认映像中是否存在问题。 我刷写了 https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-L1u0FxxpZf/06.03.00.106/am57xx-evm-linux-06.03.00.106.img.zip 进行检查。

SDK 6.03 中不存在此错误、DSP 时钟频率设置为 750MHz。  

我一直在尝试在定制电路板上调试问题、并能够发现失败的 DPLL_DSP_CK 偏移。  

fdt_next_node: offset: 25848, depth: 5 nextoffset: 25868, tag 1
fdt_next_node: offset: 25848, depth: 6 nextoffset: 25868
fdt_subnode_offset_namelen: offset: 25848, depth: -1, name dpll_dsp_ck
Could not find clock sub-node dpll_dsp_ck: FDT_ERR_NOTFOUND. offset: 8888
ft_fixup_clocks failed for DSP voltage domain: <valid offset/length>

我将继续深入研究、看看是否可以找出错误。 同时、我很好奇您或您的团队是否发现了此问题、或者您是否能够重新创建此问题。 感谢您的帮助!

此致、

-工作

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

    尊敬的 Job:

    是的、这显示在我们这边的默认映像中。 我会仔细研究一下、然后回到您的身边。

    接下来、您是否观察到了由此产生的任何功能缺陷?

    -Josue

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

    您好 Josue、

    我找到了此问题的解决方案。

    在 arch/arm/mach-OMAP2/omap5/FDt.c 中、有以下 clk 名称数组:

    const char *dra7_opp_dsp_clk_names[OPP_DSP_CLK_NUM] = {
    	"dpll_dsp_ck",
    	"dpll_dsp_m2_ck",
    	"dpll_dsp_m3x2_ck",
    };
    
    const char *dra7_opp_iva_clk_names[OPP_IVA_CLK_NUM] = {
    	"dpll_iva_ck",
    	"dpll_iva_m2_ck",
    };
    
    const char *dra7_opp_gpu_clk_names[OPP_GPU_CLK_NUM] = {
    	"dpll_gpu_ck",
    	"dpll_gpu_m2_ck",
    };

    此处描述的名称是符号名称。 fdt_subnode_offset_namelen 函数会检查这些名称是否等于设备树节点名称、但它们不等于设备树节点名称。  

    下面是两个 DSP 时钟的器件树配置以供参考。 格式为 : {...

    dpll_dsp_ck: clock@234 {
    		#clock-cells = <0>;
    		compatible = "ti,omap4-dpll-clock";
    		clock-output-names = "dpll_dsp_ck";
    		clocks = <&sys_clkin1>, <&dpll_dsp_byp_mux>;
    		reg = <0x0234>, <0x0238>, <0x0240>, <0x023c>;
    		assigned-clocks = <&dpll_dsp_ck>;
    		assigned-clock-rates = <600000000>;
    	};
    
    	dpll_dsp_m2_ck: clock-dpll-dsp-m2-8@244 {
    		#clock-cells = <0>;
    		compatible = "ti,divider-clock";
    		clock-output-names = "dpll_dsp_m2_ck";
    		clocks = <&dpll_dsp_ck>;
    		ti,max-div = <31>;
    		ti,autoidle-shift = <8>;
    		reg = <0x0244>;
    		ti,index-starts-at-one;
    		ti,invert-autoidle-bit;
    		assigned-clocks = <&dpll_dsp_m2_ck>;
    		assigned-clock-rates = <600000000>;
    	};

    对这些名称数组进行了以下更改、因此检查将返回 true。  

    const char *dra7_opp_dsp_clk_names[OPP_DSP_CLK_NUM] = {
    	"clock@234", // dpll_dsp_ck
    	"clock-dpll-dsp-m2-8@244",
    	"clock-dpll-dsp-m3x2-8@248",
    };
    
    const char *dra7_opp_iva_clk_names[OPP_IVA_CLK_NUM] = {
    	"clock@1a0", // dpll_iva_ck
    	"clock-dpll-iva-m2-8@1b0",
    };
    
    const char *dra7_opp_gpu_clk_names[OPP_GPU_CLK_NUM] = {
    	"clock@2d8", // dpll_gpu_ck
    	"clock-dpll-gpu-m2-8@2e8",
    };

    此致、

    -工作

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

    你好 Job Sava  

    谢谢修复,你能把这个修复上游也  

    谢谢  

    Udit

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

    您希望我们将其提交到 u-boot 主线吗?

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

    您好、 Jonathan Cormier  

    如果可能、是、请提交至 u-boot 主线。  

    如果您希望我们做,我们 可以提交(但请让我们知道此作品的贡献者的姓名和电子邮件 ID )   

    此致

    Udit

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

    尊敬的 Udit:

    请注意、 此处的任何更改都应作为向后兼容的更改(也支持较旧的内核,其中 DT 节点名称与原始补丁中的名称相同)。

    我没有意识到这些节点名称再次更改、我在过去已经在此修补程序上完成了一组向后兼容的更改。

    此致

    Suman

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

     您好、 Suman Anna  

    我们在这里讨论的是代码、而不是 DT、仅限于 u-boot  

    我看到、人们正在移动 u-boot 版本、而不是混合使用一个版本的 DT 和另一个版本的代码  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [报价 userid=“35368" url="“ url="~“~/support/processors-group/processors/f/processors-forum/1546186/processor-sdk-am57x-sdk-9-03-ft_fixup_clock-failed-for-dsp-voltage-domain/5977955

    请注意、 此处的任何更改都应作为向后兼容的更改(也支持较旧的内核,其中 DT 节点名称与原始补丁中的名称相同)。

    我没有意识到这些节点名称再次更改、我在过去已经在此修补程序上完成了一组向后兼容的更改。

    [/报价]

    这是一个好问题。  考虑到 TI 对该平台的支持多么糟糕、我认为这其中任何一项都不会得到维护。

    因此、2022 年、节点名称发生了更改、因为“TI 时钟支持使用 clock-output-names devicetree 属性“。  这当然打破了苏曼·安娜 9 年前在 u-boot 中创建的 u-boot 代码。

    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e4920169e7a2a839836d3a0d8cda1bae8caa3056

    https://github.com/u-boot/u-boot/commit/1b42ab3eda8aa7b6eed029632c8b1858dcbe8b26

    看起来像在 2024 u-boot(比 SDK 9 版本更新)中提交的这个任务一样、通过检查时钟输出名称而不是使用节点名称来处理这个问题。  此文件应已反向移植以用于 2023 年 u-boot 版本...  这可能是一个更好的解决方案比我们上面的帖子。

    https://github.com/u-boot/u-boot/commit/b6cd6a637db22901a7973f78d318f9038f8b6aac