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: Unable to pinmux USB0_DRVVBUS and USB1_DRVVBUS

Part Number: AM62A7-Q1

Tool/software:

Hi,

I am trying to set the pinmux for USB0_DRVVBUS (0x000F4268) and USB1_DRVVBUS (0x000F4280), and am unable to do so because the maximum range of main_pmx0 is set the 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

The relevant part in the device tree looks like this:

        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 */
                >;
        };

Am I doing something, or am I hitting a bug here?

I've already tried modifying the reg entry with the following patch:

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

But that caused an oops during boot.

Any help would be appreciated, as I need those pins for my PHY.

Regards,

Bas Vermeulen

  • Bas,

    as per datasheet looks like you are trying to access the correct PADCONFIG register. But your memory range update/fix may not be 100% correct. The registers are 4-byte long, and this needs to be comprehended in the `reg` definitions. Can you please try the below and report back:

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

    Regards, Andreas

  • When I do that, I get the following oops:

    [    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..

    Any other ideas?

    Regards,

    Bas Vermeulen

  • Found the problem.

    The datasheet on page 39 has the following:

    The technical reference manual has the same PADCONFIGs on a different address (on page 6818):

    The datasheet seems to be wrong here, as it falls outside of the range for the pinmux (0xf425c max).
    The TRM has values that fall exactly on the edge, which seems to be correct.

    could you please have the datasheet corrected?

    Regards,

    Bas Vermeulen