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-J7200: cpsw0 ethernet driver support in uboot

Part Number: PROCESSOR-SDK-J7200
Other Parts Discussed in Thread: DRA821

Tool/software:

Hi Team,

We are working on DRA821 CPU with Linux 09.02 SDK, We are using cpsw0 controller for ethernet.

Kindly provide the uboot driver for cpsw0 controller, compatible property for this controller is "compatible = "ti,j7200-cpswxg-nuss".

Regards,

Nikhil K

  • Hi,

    We have supported few customers to enable CPSW9G at u-boot.

    Please refer to the patches below and integrate the similar changes for J7200.
    7851.j784s4-08_02_02_06-cpsw9g-uboot.zip

    Best Regards,
    Sudheer

  • Hi Sudheer,

    i have enabled all the changes suggested in the patch still observing same error

    Net:   Could not get PHY for ethernet@c000000port@2: addr 4
    am65_cpsw_nuss_port ethernet@c000000port@2: phy_connect() failed
    No ethernet found.

    Note: ethernet phy driver is enabled

    Also i can't find the driver for "ti,am654-phy-gmii-sel"

    Regards,

    Nikhil K

  • Hi,

    Also i can't find the driver for "ti,am654-phy-gmii-sel"

    Use the compatible name as in Linux Device tree files.
    "ti,j7200-cpsw5g-phy-gmii-sel" 

    Use device tree nodes of CPSW0 in Linux device tree, also refer to overlay file(k3-j7200-evm-quad-port-eth-exp.dtso)  for QSGMII mode configuration.
    Modify the phy-mode as required.

    Best Regards,
    Sudheer

  • Hi,

    For cpsw0_phy_gmii_sel node with "ti,j7200-cpsw5g-phy-gmii-sel" compatible property kernel has the driver file

    drivers/phy/ti/phy-gmii-sel.c

    But uboot doesn't has this.

    Also everything else kept as kernel and patch that you have provided earlier.

    Regards,

    Nikhil

  • Hi,

    Can you share the log file of A72, to check what error your are observing.

    Best Regards,
    Sudheer

  • Dear Sudheer,

    find the attached uboot log file

    Regards,

    Nikhil K

    U-Boot SPL 2023.04-dirty (Aug 13 2024 - 20:33:35 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    i2c_write: error waiting for data ACK (status=0x116)
    read error from device: 41c864f4 register: x!
    
    -----------spl_board_init----------
    Trying to boot from MMC2
    Loading Environment from nowhere... OK
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    I/TC: 
    I/TC: OP-TEE version: 4.1.0-51-g012cdca49 (gcc version 11.4.0 (GCC)) #1 Tue Jan 30 10:48:03 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-dirty (Aug 13 2024 - 20:33:30 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    
    -----------spl_board_init----------
    Trying to boot from MMC2
    single-pinctrl pinctrl@11c000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
    
    
    U-Boot 2023.04-dirty (Aug 13 2024 - 20:33:30 +0530)
    
    SoC:   J7200 SR2.0 GP
    Model: Texas Instruments K3 J7200 SoC
    DRAM:  2 GiB
    PMIC:  TPS659414
    
    -board-init-----------
    Core:  90 devices, 33 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC:   mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    am65_cpsw_nuss ethernet@c000000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00294104 Ports:4 mdio_freq:1000000
    
    ------board late init---------------
    Net:   Could not get PHY for ethernet@c000000port@2: addr 4
    am65_cpsw_nuss_port ethernet@c000000port@2: phy_connect() failed
    No ethernet found.
    
    Hit any key to stop autoboot:  2  0 
    => 

  • Hi,

    It seems like PHY is not detected at address 4.

    Can you please share your device tree modifications.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    There is some pinmux conflict was there, im able to solve that issue and ethernet is working in uboot.

    Thanks for the suppport

    Regards,

    Nikhil K

  • Hi,

    Great!
    It is good to here that, and thanks for the update.

    Best Regards,
    Sudheer