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.

[参考译文] AM62A7-Q1:无法对 USB0_DRVVBUS 和 USB1_DRVVBUS 进行引脚多路复用

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1523188/am62a7-q1-unable-to-pinmux-usb0_drvvbus-and-usb1_drvvbus

器件型号:AM62A7-Q1

工具/软件:

您好、

我正在尝试设置 USB0_DRVVBUS (0x000F4268) 和 USB1_DRVVBUS (0x000F4280) 的引脚多路复用、但无法设置、因为 MAIN_pmx0 的最大范围设置为 0x25c。

[    0.321675] pinctrl-single f4000.pinctrl: mux offset out of range: 0x268 (0x25c)
[    0.329174] pinctrl-single f4000.pinctrl: could not add functions for main-gpio1-phy-pins-default 616x

器件树中的相关部分如下所示:

        main_gpio1_phy_pins_default: main-gpio1-phy-pins-default {
                pinctrl-single,pins = <
                        AM62AX_IOPAD(0x268, PIN_OUTPUT, 7)              /* (C20) USB0_DRVVBUS.GPIO1_50          ETH_INT_PWDNn */
                        AM62AX_IOPAD(0x280, PIN_OUTPUT, 7)              /* (D19) USB1_DRVVBUS.GPIO1_51          ETH_RSTn */
                >;
        };

我是在做些什么、还是在这里遇到了一个错误?

我已经尝试使用以下补丁修改 reg 项:

From 16760a05dc5e86acb8dbbeba3f1c8611e9c34b0e Mon Sep 17 00:00:00 2001
From: Bas Vermeulen <sebastiaan.vermeulen@bench.com>
Date: Tue, 3 Jun 2025 12:09:35 +0200
Subject: [PATCH] 4kcam-protoa: modify register range for main_pmx0

This allows us to set the pinmux for all pins.

Signed-off-by: Bas Vermeulen <sebastiaan.vermeulen@bench.com>
---
 arch/arm64/boot/dts/ti/k3-am62a7-4kcam-protoa.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-4kcam-protoa.dts b/arch/arm64/boot/dts/ti/k3-am62a7-4kcam-protoa.dts
index 3bb38643bb5b..7820ca8cfb11 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-4kcam-protoa.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-4kcam-protoa.dts
@@ -184,6 +184,7 @@ edgeai_core_heaps: edgeai-core-heap-memory@ae000000 {
 };

 &main_pmx0 {
+       reg = <0x00 0xf4000 0x00 0x280>;
        main_i2c2_pins_default: main-i2c2-pins-default {
                pinctrl-single,pins = <
                        AM62AX_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1)        /* (B17) GPMC0_CSn2.I2C2_SCL            I2C2_SCL */
--
2.34.1

但这会导致启动期间出现 oops。

如果我需要这些引脚来连接 PHY、希望获得任何帮助。

此致、

Bas Vermeulen

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

    BAS、

    根据数据表的外观、您尝试访问的是正确的 PADCONFIG 寄存器。 但您的内存范围更新/修复可能不是 100%正确。 这些寄存器的长度为 4 字节、需要将其包含在`reg`定义中。 您可以尝试下面的方法并返回报告吗:

     &main_pmx0 {
    +       reg = <0x00 0xf4000 0x00 0x284>;
            main_i2c2_pins_default: main-i2c2-pins-default {

    此致、Andreas

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

    当我这样做时、我会得到以下糟糕:

    [    0.107484] Internal error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP
    [    0.115850] Modules linked in:
    [    0.118972] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.58-gcfcc8922-01641-gaf92dc1fec40 #1
    [    0.127688] Hardware name: Benchmark Electronics 4K Camera Proto A (DT)
    [    0.134446] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [    0.141562] pc : pcs_readl+0x0/0x18
    [    0.145134] lr : pcs_probe+0x308/0x898
    [    0.148966] sp : ffff80008164baf0
    [    0.152347] x29: ffff80008164bb70 x28: 0000000008204007 x27: 000000000000025c
    [    0.159646] x26: 0000000000000097 x25: ffff00000066d410 x24: ffff000001303938
    [    0.166945] x23: ffff0000013038e8 x22: ffff0000013038c8 x21: ffff00007fc9da38
    [    0.174244] x20: 0000000000000097 x19: ffff000001303880 x18: 0000000000000000
    [    0.181542] x17: ffff8000814f6468 x16: 00000000136e8e50 x15: 0000000000000002
    [    0.188840] x14: 0000000000000000 x13: 0000000000000000 x12: ffff80008162efff
    [    0.196139] x11: ffff800081641000 x10: ffff00007ffff010 x9 : 0000000000000000
    [    0.203437] x8 : ffff000000496000 x7 : 0000000000000000 x6 : 000000000000003f
    [    0.210735] x5 : ffff000000495000 x4 : ffff00000066d610 x3 : ffff0000012bab40
    [    0.218033] x2 : 00000000000000a1 x1 : ffff8000805c3c3c x0 : ffff80008162e25c
    [    0.225332] Call trace:
    [    0.227825]  pcs_readl+0x0/0x18
    [    0.231034]  platform_probe+0x68/0xc8
    [    0.234780]  really_probe+0x188/0x3c4
    [    0.238522]  __driver_probe_device+0x7c/0x16c
    [    0.242975]  driver_probe_device+0x3c/0x110
    [    0.247249]  __driver_attach+0xf0/0x1f8
    [    0.251168]  bus_for_each_dev+0x7c/0xdc
    [    0.255087]  driver_attach+0x24/0x30
    [    0.258739]  bus_add_driver+0x110/0x234
    [    0.262658]  driver_register+0x5c/0x124
    [    0.266577]  __platform_driver_register+0x28/0x34
    [    0.271386]  pcs_driver_init+0x1c/0x28
    [    0.275217]  do_one_initcall+0x80/0x1c8
    [    0.279136]  kernel_init_freeable+0x1c0/0x288
    [    0.283591]  kernel_init+0x24/0x1d8
    [    0.287155]  ret_from_fork+0x10/0x20
    [    0.290811] Code: 17ffffde d50332bf b9000020 d65f03c0 (b9400000)
    [    0.297039] ---[ end trace 0000000000000000 ]---
    [    0.301789] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    [    0.309614] SMP: stopping secondary CPUs
    [    0.313623] Kernel Offset: disabled
    [    0.317181] CPU features: 0x0,00000008,00020000,1000420b
    [    0.322607] Memory Limit: none
    [    0.325722] Rebooting in 10 seconds..

    还有其他想法吗?

    此致、

    Bas Vermeulen

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

    找到问题所在。

    第 39 页的数据表具有以下内容:

    技术参考手册具有相同的 PADCONFIGs、其地址不同(第 6818 页):

    数据表在这里似乎是错误的、因为它超出了引脚多路复用的范围(最大值 0xf425c)。
    TRM 中的值完全落在边缘、看起来正确。

    Andreas Dannenberg、 您能否更正数据表?

    此致、

    Bas Vermeulen