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.

Linux/AM6548: How to set SerDes lane mux value in Kernel

Part Number: AM6548

Tool/software: Linux

Hi TI experts,

We have an AM6548 custom board, but have a problem regarding the usb2.0.

Now we are using the USBSS0 as the usb2.0-only mode. However, we notice that the usb2.0 does not work with the default CTRLMMR_SERDES0_CTRL[1:0].

The default value for this register field is 0x0h, meaning the SerDes0 lane function is USB3. If we change this field to other value, such as 3h, then the USB2.0 works well.

But in the kernel of the current SDK, I don't find a way to set this register nicely, so I have to hard code the driver to perform the register writing before probing, which is nasty.

So my question is, is there any way to set this register nicely, such as from the device tree? Or can TI change the default value in the sysfw?

BRs

  • Hi Baocheng,

    You can try to access this CTRLMMR_SERDES0_CTRL at u-boot stage. The value should survive at user space level. See for example how other CTRLMMR registers are accessed and re-use the same approach:

    u-boot-2018.01/board/ti/am65x/evm.c
    u-boot-2018.01/arch/arm/mach-k3/init.c
    u-boot-2018.01/arch/arm/mach-k3/include/mach/hardware.h

    For Linux kernel update, you can refer to below files and link for reference (you can update the USB driver):

    linux-4.14.79/drivers/gpu/drm/tidss/tidss_dispc7.c
    linux-4.14.79/drivers/net/ethernet/ti/icssg_prueth.c

    e2e.ti.com/.../2765207

    Regarding sysfw update, check if below pointer will be in help:

    ti-processor-sdk-linux-am65xx-evm-05.02.00.10/board-support/system-firmware-image-gen-2018.10/README.md

    Regards,
    Pavel
  • Hi Pavel,

    Many thanks for your reply, we will try the method you mentioned.