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.

TDA4AL-Q1: J721S2 and QNX 7.1, RTL9010ARG PHY MDIO Issue in MAIN_CPSW Domain

Part Number: TDA4AL-Q1

Tool/software:

Hi TI supporters,


I have a custom board based on J721S2 (TDA4AL) with two PHYs connected:

  • MCU_CPSW: TI DP83867 (good working and no problem)
  • MAIN_CPSW: RTL9010ARG

In u-boot (2023.04), the RTL9010ARG is properly recognized through MDIO and PHY initialization is performed successfully (see logs below).

However, in QNX 7.1, the RTL9010ARG PHY is not communicating properly through MDIO.

I would appreciate it if you could help identify the reason why communication is not working.

hw_init.c BSP source file

#define EVM_CPSW_MCU_RGMII_INT_PIN_NUM     (3U)
#define EVM_CPSW_MCU_RGMII_RST_PIN_NUM     (56U)
//#define EVM_CPSW_RGMII_INT_PIN_NUM         (23U)
#define EVM_CPSW_RGMII_INT_PIN_NUM         (20U)
static int init_cpsw2g(void)
{
    kprintf("MAIN_CPSW, RTL9010ARG Phy init..\n");
    /**** MAIN_CPSW ****/
    /* MDIO 0 */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP1_AXR0, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP1_AXR0.MDIO0_MDC (T28) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP1_AFSX, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP1_AFSX.MDIO0_MDIO (V28) */
    /* RGMII1 */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP1_ACLKX, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP1_ACLKX.RGMII1_RD0 (AA24) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR12, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR12.RGMII1_RD1 (AB25) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR13, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR13.RGMII1_RD2 (T23) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR14, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR14.RGMII1_RD3 (U24) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP1_AXR3, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP1_AXR3.RGMII1_RXC (AD26) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR15, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR15.RGMII1_RX_CTL (AC25) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR7, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR7.RGMII1_TD0 (T25) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR8, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR8.RGMII1_TD1 (W24) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR9, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR9.RGMII1_TD2 (AA25) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR10, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR10.RGMII1_TD3 (V25) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP1_AXR4, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP1_AXR4.RGMII1_TXC (U25) */
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP0_AXR11, PIN_PULL_DISABLE | PIN_MODE(6)); /* MCASP0_AXR11.RGMII1_TX_CTL (T24) */

    // GPIO0_23 as Interrupt
    //out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP2_AXR0, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(7));
    // GPIO0_20 (W27)
    out32(J721S2_CTRLMMR_PADCONFIG + PIN_MCASP1_AXR2, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(7));
    //GPIO0_20 as input
    out32(J721S2_GPIO0_BASE + J721S2_GPIO_DIR(EVM_CPSW_RGMII_INT_PIN_NUM),
        in32(J721S2_GPIO0_BASE + J721S2_GPIO_DIR(EVM_CPSW_RGMII_INT_PIN_NUM)) | (J721S2_GPIO_BIT(EVM_CPSW_RGMII_INT_PIN_NUM)));
    
    // Default signal voltage 3.3v, output low
    out32(J721S2_GPIO0_BASE + J721S2_GPIO_CLR_DATA(EVM_CPSW_RGMII_INT_PIN_NUM), (unsigned int)(J721S2_GPIO_BIT(EVM_CPSW_RGMII_INT_PIN_NUM)));


    /**** MCU_CPSW ****/
    /* MDIO 0 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_MDIO0_MDC, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU MDIO0_MDC */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_MDIO0_MDIO, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  MDIO0_MDIO */

    /* MCU_RGMII1 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_RD0, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_RD0 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_RD1, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_RD1 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_RD2, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_RD2 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_RD3, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_RD3 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_RXC, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_RXC */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_RX_CTL, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_RX_CTL */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_TD0, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_TD0 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_TD1, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_TD1 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_TD2, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_TD2 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_TD3, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_TD3 */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_TXC, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_TXC */
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_MCU_RGMII1_TX_CTL, PIN_PULL_DISABLE | PIN_MODE(0)); /* MCU  RGMII1_TX_CTL */

    // WKUP_GPIO0_3 as Interrupt
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_WKUP_GPIO0_3, PIN_INPUT_ENABLE | PIN_PULL_DISABLE | PIN_MODE(7));
    // WKUP_GPIO0_3 as input
    out32(J721S2_WKUP_GPIO0 + J721S2_GPIO_DIR(EVM_CPSW_MCU_RGMII_INT_PIN_NUM),
        in32(J721S2_WKUP_GPIO0 + J721S2_GPIO_DIR(EVM_CPSW_MCU_RGMII_INT_PIN_NUM)) | (J721S2_GPIO_BIT(EVM_CPSW_MCU_RGMII_INT_PIN_NUM)));
    // Default signal voltage 3.3v, output low
    out32(J721S2_WKUP_GPIO0 + J721S2_GPIO_CLR_DATA(EVM_CPSW_MCU_RGMII_INT_PIN_NUM), (unsigned int)(J721S2_GPIO_BIT(EVM_CPSW_MCU_RGMII_INT_PIN_NUM)));

    // WKUP_GPIO0_56 as Reset
    out32(J721S2_WKUP_CTRLMMR_PADCONFIG + PIN_WKUP_GPIO0_56, PIN_OUTPUT_DISABLE | PIN_PULL_DISABLE | PIN_MODE(7));
    // WKUP_GPIO0_56 as Output
    out32(J721S2_WKUP_GPIO0 + J721S2_GPIO_DIR(EVM_CPSW_MCU_RGMII_RST_PIN_NUM),
        in32(J721S2_WKUP_GPIO0 + J721S2_GPIO_DIR(EVM_CPSW_MCU_RGMII_RST_PIN_NUM)) & ~(J721S2_GPIO_BIT(EVM_CPSW_MCU_RGMII_RST_PIN_NUM)));
    // Default signal voltage 3.3v, output high
    out32(J721S2_WKUP_GPIO0 + J721S2_GPIO_SET_DATA(EVM_CPSW_MCU_RGMII_INT_PIN_NUM), (unsigned int)(J721S2_GPIO_BIT(EVM_CPSW_MCU_RGMII_INT_PIN_NUM)));

    /* Power on CPSW1 module. */
    if (ti_sci_set_device_state(TISCI_DEV_CPSW1, 0, MSG_DEVICE_SW_STATE_ON) == -1) {
     kprintf("%s: Set CPSW1 device state failed!\n", __func__);
     return -1;
    }

    return 0;

}

Boot and Debug Logs
The boot and debug logs are as follows:

U-Boot 2023.04 (May 20 2025 - 20:45:32 +0900)

SoC:   J721S2 SR1.0 GP
Model: SL ICMU based on TI J721S2
Board: J721S2X-PM1-SOM rev E1
DRAM:  2 GiB (effective 8 GiB)
Core:  91 devices, 33 uclasses, devicetree: separate
Flash: spi_nand nand@0: unknown raw ID fde85320
0 Bytes
MMC:   mmc@4f80000: 0, mmc@4fb0000: 1
Loading Environment from FAT... ** No partition table - mmc 0 **
In:    serial@2880000
Out:   serial@2880000
Err:   serial@2880000
=>board_late_init:388
am65_cpsw_nuss ethernet@c200000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
MAIN_CPSW initialized during boot
Net:   %DEBUG: F=phy_ti_init,L=92 
%DP83867: F=phy_dp83867_init,L=432 
%DEBUG: F=phy_rtl9010a_init,L=176 
Warning: ethernet@c200000port@1 (eth0) using random MAC address - 7a:7b:46:8a:ab:1e
eth0: ethernet@c200000port@1
Hit any key to stop autoboot:  0 
=> 
=> mdio read ethernet@c200000port@1 0.2
Reading from bus ethernet@c200000port@1
PHY at address 1:
[MDIO-DBG] cpsw_mdio_disable:99: MDIO controller disabled, CONTROL=0x8104013f
[MDIO-DBG] cpsw_mdio_enable_manual_mode:110: MDIO manual mode enabled, POLL=0x80000000
[MDIO-DBG] cpsw_mdio_sw_read:246: SW Read PHY 1 Reg 0x02 = 0x001c
0.2 - 0x1c
=> mdio read ethernet@c200000port@1 0.3
Reading from bus ethernet@c200000port@1
PHY at address 1:
[MDIO-DBG] cpsw_mdio_disable:99: MDIO controller disabled, CONTROL=0x8104013f
[MDIO-DBG] cpsw_mdio_enable_manual_mode:110: MDIO manual mode enabled, POLL=0x80000000
[MDIO-DBG] cpsw_mdio_sw_read:246: SW Read PHY 1 Reg 0x03 = 0xcb30
0.3 - 0xcb30
=> mdio read ethernet@c200000port@1 0.1
Reading from bus ethernet@c200000port@1
PHY at address 1:
[MDIO-DBG] cpsw_mdio_disable:99: MDIO controller disabled, CONTROL=0x8104013f
[MDIO-DBG] cpsw_mdio_enable_manual_mode:110: MDIO manual mode enabled, POLL=0x80000000
[MDIO-DBG] cpsw_mdio_sw_read:246: SW Read PHY 1 Reg 0x01 = 0x0009
0.1 - 0x9
=> run bootcmd
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'boot.scr'
877 bytes read in 17 ms (49.8 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
Running uenvcmd ...
k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work
Failed to load '/lib/firmware/j721s2-mcu-r5f0_1-fw'
884108 bytes read in 53 ms (15.9 MiB/s)
Load Remote Processor 2 with data@addr=0x82000000 884108 bytes: Success!
322708 bytes read in 31 ms (9.9 MiB/s)
Load Remote Processor 3 with data@addr=0x82000000 322708 bytes: Success!
Failed to load '/lib/firmware/j721s2-main-r5f1_0-fw'
Failed to load '/lib/firmware/j721s2-main-r5f1_1-fw'
14987296 bytes read in 313 ms (45.7 MiB/s)
Load Remote Processor 6 with data@addr=0x82000000 14987296 bytes: Success!
9486184 bytes read in 76 ms (119 MiB/s)
Load Remote Processor 7 with data@addr=0x82000000 9486184 bytes: Success!
Configuring I2C...
Setting bus to 0
Valid chip addresses: 12 48 49 4A 4B
0409: bf    .
0409: bf    .
10225192 bytes read in 451 ms (21.6 MiB/s)
## Starting application at 0x80080000 ...
MMU: 16-bit ASID 44-bit PA TCR_EL1=b5183519
ARM GIC-500 r1p1, arch v3.0 detected
gic_v3_lpi_add_entry for vectors 8192 -> 8447, Ok
gic_v3_lpi_add_entry for vectors 8448 -> 65535, Ok
No SPI intrinfo. Add default entry for 32 -> 991 vectors, Ok
LPI config table #1 @ 000000008000f000, callout vaddr: ffffff8040251000
aarch64_cpuspeed: core speed 2000
cpu0: MPIDR=80000000
cpu0: MIDR=411fd080 Cortex-A72 r1p0
cpu0: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
cpu0: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
cpu0: L1 Icache 48K linesz=64 set/way=256/3
cpu0: L1 Dcache 32K linesz=64 set/way=256/2
cpu0: L2 Unified 1024K linesz=64 set/way=1024/16
Enabling ITS 0
ITS queue at 0000000080020000, num slots: 256
Issue MAPC/SYNC/INVALL commands for ICID 0
update CWRITER to 0x00000060
Waiting for all commands to be processed ... Done in 1 tries
Enable LPIs in GICR_CTLR @ 0000000001900000 for CPU0
[VTM] ti_sci_set_device_state() return: 0
[VTM] ti_sci_set_clock_state() return: 0
[VTM] VTM sensor powered and clock enabled
[VTM] Basic VTM initialization complete
Display set to A72
MAIN_CPSW, RTL9010ARG Phy init..
hw_init finished..
Total Available L3 cache (MSMC SRAM): 4194304 bytes
Loading IFS...decompressing...done
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
aarch64_cpuspeed: core speed 2000
cpu1: MPIDR=80000001
cpu1: MIDR=411fd080 Cortex-A72 r1p0
cpu1: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
cpu1: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
cpu1: L1 Icache 48K linesz=64 set/way=256/3
cpu1: L1 Dcache 32K linesz=64 set/way=256/2
cpu1: L2 Unified 1024K linesz=64 set/way=1024/16
ITS 0 already Enabled
ITS queue at 0000000080020000, num slots: 256
Issue MAPC/SYNC/INVALL commands for ICID 1
update CWRITER to 0x000000c0
Waiting for all commands to be processed ... Done in 1 tries
Enable LPIs in GICR_CTLR @ 0000000001920000 for CPU1

System page at phys:0000000080023000 user:ffffff8040275000 kern:ffffff8040272000
Starting next program at vffffff8060087ca0
All ClockCycles offsets within tolerance
Welcome to QNX Neutrino 7.1.0 on the TI J7 TDA4VMeco EVM Board!!
Starting random service ...
start serial driver
start serial driver(UART1)
start serial driver(UART3)
start mcu i2c0 driver.....
Setting OS clock from RTC
RTC: mcp7941x_i2c_read() failed
Starting MMC/SD memory card driver... eMMC
Starting MMC/SD memory card driver... SD
Starting Network driver...
Interface am0 up
Path=0 - am65x
 target=0 lun=0     Direct-Access(0) - SDMMC: G1M15L Rev: 1.0
Starting SPI driver...
Starting Core_Temp_Sensing Driver.........ICMU
Setting environment variables...
done..
Mounting the sd ..
Looking for user script to run: /ti_fs/scripts/user.sh
Running user script...
user.sh called...
Setting additional environment variables...
Starting tisci-mgr..
Initializing sciclient in interupt mode
Starting shmemallocator..
Starting tiipc-mgr..
Starting tiudma-mgr..
Starting ti-vpu-codec-mgr
Starting VPU Codec resource manager...
Resource Manager loop starting
Start screen..
screen started with dss_on_r5 configuration..
Starting network interface...
No IP configuration file found, using DHCP...
Starting sshd
Current network configuration:
am0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	address: 64:1c:10:1c:82:da
	media: Ethernet none (1000baseT full-duplex)
	status: active
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
	inet6 fe80::661c:10ff:fe1c:82da%am0 prefixlen 64 tentative scopeid 0x11
DLT Daemon.
Network setup completed.
done...
[   20.711414]~DLT~139290~NOTICE   ~Starting DLT Daemon; DLT Package Version: 2.18.10 STABLE, Package Revision: DIN_2025_01_21_rc_89_gbd343b62, build on Mar  4 2025 19:46:26
-SYSTEMD -SYSTEMD_WATCHDOG -TEST -SHM

[   20.712414]~DLT~139290~NOTICE   ~Daemon mode
J721S2-ICMU@QNX:/# 
J721S2-ICMU@QNX:/# 

J721S2-ICMU@QNX:/# date 052211542025
Thu May 22 11:54:34 GMT 2025
J721S2-ICMU@QNX:/# slay io-pkt-v6-hc
J721S2-ICMU@QNX:/# slog2info -c
J721S2-ICMU@QNX:/# slog2info -w &
[1] 401420
J721S2-ICMU@QNX:/# Jan 01 00:00:00.011                      console.2                           0  -----ONLINE-----
                                         console.2                  out     0  -----UNSYNC-----
Jan 01 00:00:00.018                       random.5                           0  -----ONLINE-----
                                          random.5              qcrypto     0  -----UNSYNC-----
Jan 01 00:00:00.019                    random.5..0                           0  -----ONLINE-----
                                       random.5..0                 slog     0  -----UNSYNC-----
Jan 01 00:00:00.039          devb_sdmmc_am65x.4106                           0  -----ONLINE-----
                             devb_sdmmc_am65x.4106                 slog     0  -----UNSYNC-----
Jan 01 00:00:00.041          devb_sdmmc_am65x.4107                           0  -----ONLINE-----
                             devb_sdmmc_am65x.4107                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.542                tisci_mgr.53262                           0  -----ONLINE-----
                                   tisci_mgr.53262                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.571           shmemallocator.65554                           0  -----ONLINE-----
                              shmemallocator.65554                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.595                tiipc_mgr.69651                           0  -----ONLINE-----
                                   tiipc_mgr.69651                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.670               tiudma_mgr.73748                           0  -----ONLINE-----
                                  tiudma_mgr.73748                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.716         ti_vpu_codec_mgr.77845                           0  -----ONLINE-----
                            ti_vpu_codec_mgr.77845                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.868                   screen.81942                           0  -----ONLINE-----
                                      screen.81942                 slog     0  -----UNSYNC-----
Jan 01 00:00:01.883                screen.81942..0                           0  -----ONLINE-----
                                   screen.81942..0              default     0  -----UNSYNC-----
Jan 01 00:00:05.571                 devc_seromap.8                           0  -----ONLINE-----
                                    devc_seromap.8                 slog     0  -----UNSYNC-----
May 22 11:54:55.165                 devc_seromap.8                 slog*     0  io-char: S/W buffer Overrun error on /dev/ser3:0

J721S2-ICMU@QNX:/# kill 8
J721S2-ICMU@QNX:/# io-pkt-v6-hc -d /ti_fs/tilib/devnp-cpsw2g-main.so verbose=0xff
J721S2-ICMU@QNX:/# May 22 11:55:10.779                   iopkt.421896                           0  -----ONLINE-----
May 22 11:55:10.779                   iopkt.421896          main_buffer*     0  tcpip starting
May 22 11:55:10.780                   iopkt.421896          main_buffer      0  smmu support is disabled
May 22 11:55:10.781                   iopkt.421896          main_buffer      0  initializing IPsec...
May 22 11:55:10.781                   iopkt.421896          main_buffer      0   done

May 22 11:55:10.781                   iopkt.421896          main_buffer      0  IPsec: Initialized Security Association Processing.

May 22 11:55:10.827                   iopkt.421896          main_buffer      0  /ti_fs/tilib/devnp-cpsw2g-main.so verbose=0xff
May 22 11:55:10.828            io_pkt_v6_hc.421896                           0  -----ONLINE-----
May 22 11:55:10.828                   iopkt.421896          main_buffer      0  ao0

May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog*     0  cpsw_entry:577 Entry -->
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  cpsw_attach:751 Entry -->
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  cpsw_parse_options:217 Verbose -->255
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  bsd_mii_initmedia:267 Came here -->
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  Success - write to MAIN_ENET_CTRL - 0x12
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  Success - write to MAIN CPSW2_CLKSEL - 0x0
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80c0=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80bc=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80b8=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80a0=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80a4=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80a8=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80b0=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80ac=0x50006 (org=0x50006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f808c=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f8090=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f8094=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f8098=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f80b4=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  PINMUX for 0x941f809c=0x50006 (org=0x10006)
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  cpsw2g-main
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  Vendor .............. 0x0
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  Device .............. 0x0
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  Revision ............ 0x0
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  I/O port base ....... 0xc200000
May 22 11:55:10.828            io_pkt_v6_hc.421896                 slog      0  MAC address ......... 70ff76 1d92c1

J721S2-ICMU@QNX:/# ifconfig ao0 192.168.3.20 netmask 255.255.255.0 up
May 22 11:55:45.625            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:386 Came here -->cmd-0x8090690c
May 22 11:55:45.625            io_pkt_v6_hc.421896                 slog      0  cpsw_init:1049 Entry --> 
May 22 11:55:45.625            io_pkt_v6_hc.421896                 slog      0  Enabling clocks!

May 22 11:55:45.626            io_pkt_v6_hc.421896                 slog      0  EnetIf_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:3 From 1 To 0 
May 22 11:55:45.626            io_pkt_v6_hc.421896                 slog      0  ENET_CPSW_2G on MAIN NAVSS
May 22 11:55:45.630            io_pkt_v6_hc.421896                 slog     56  [UDMA] Calling Udma_resmgr_open
May 22 11:55:45.630            io_pkt_v6_hc.421896                 slog     56  [UDMA] Opening resmgr!!!
May 22 11:55:45.630            io_pkt_v6_hc.421896                 slog     56  [UDMA] Opened resmgr fd=6!!!
May 22 11:55:45.630            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->vintrNum = 35!!!

May 22 11:55:45.630            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->irIntrNum = 11!!!

May 22 11:55:45.630            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->coreIntrNum = 75!!!

May 22 11:55:45.637            io_pkt_v6_hc.421896                 slog      0  EnetIf_registerIntr2: tx isr 75 thread priority set to 21

May 22 11:55:45.637            io_pkt_v6_hc.421896                 slog      0  EnetIf_CreateISRThread: InterruptAttachEvent succeed irq/75 coid/1073741848 event/3

May 22 11:55:45.637            io_pkt_v6_hc.421896                 slog      0  Enet_open: main.cpsw2g: features: 0x00000002

May 22 11:55:45.637            io_pkt_v6_hc.421896                 slog      0  Enet_open: main.cpsw2g: errata  : 0x00000000

May 22 11:55:45.637            io_pkt_v6_hc.421896                 slog      0  Mdio_open: MDIO manual mode enabled

May 22 11:55:45.638            io_pkt_v6_hc.421896                 slog      0  cpsw_alloc:299: Alloc successfull; Virt: 0x199d19f000, Phys: 0x9ff290000
May 22 11:55:45.638            io_pkt_v6_hc.421896                 slog      0  EnetUdma_memMgrInit: addr=0x199d19f000 is  aligned
May 22 11:55:45.640            io_pkt_v6_hc.421896                 slog      0  EnetIf_registerIntr: some unknown cpsw isr thread priority set to 21

May 22 11:55:45.640            io_pkt_v6_hc.421896                 slog      0  EnetIf_CreateISRThread: InterruptAttachEvent succeed irq/51 coid/1073741852 event/10

May 22 11:55:45.640            io_pkt_v6_hc.421896                 slog      0  EnetIf_registerIntr: some unknown cpsw isr thread priority set to 21

May 22 11:55:45.640            io_pkt_v6_hc.421896                 slog      0  EnetIf_CreateISRThread: InterruptAttachEvent succeed irq/53 coid/1073741854 event/11

May 22 11:55:45.640            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_open,L=281 PHY 0: open
May 22 11:55:45.640            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=513 PHY 0: isAlive {
May 22 11:55:45.772            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=519 hMdio->isAlive, status 0
May 22 11:55:45.772            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=537 } isAlive false
May 22 11:55:45.772            io_pkt_v6_hc.421896                 slog      0  EnetPhy_setNextState: PHY 0: INIT -> INIT (0 ticks)

May 22 11:55:45.772            io_pkt_v6_hc.421896                 slog      0  EnetPhy_open: PHY 0: open

May 22 11:55:45.773            io_pkt_v6_hc.421896                 slog      0  cpsw_alloc:299: Alloc successfull; Virt: 0x199d21b000, Phys: 0x9ff2a4000
May 22 11:55:45.773            io_pkt_v6_hc.421896                 slog      0  EnetIfMem_init: addr=0x199d21b000 is  aligned
May 22 11:55:45.773            io_pkt_v6_hc.421896                 slog      0  EnetIfMem_init: addr=0x199d21b000, size=0x221000, gMem=0x199d21b000, gMemBufPhys=0x9ff2a4000 
May 22 11:55:45.773            io_pkt_v6_hc.421896                 slog      0  EnetIfMem_init: gDmaDescMemArray=0x199d21b000, size=0x200000 
May 22 11:55:45.773            io_pkt_v6_hc.421896                 slog      0  EnetIfMem_init: gRingMemArray=0x199d41b000, size=0x21000 
May 22 11:55:45.773            io_pkt_v6_hc.421896                 slog      0  EnetIfMem_init: gDmaDescMemArrayBasePhys=0x9ff2a4000, gDmaDescMemArrayBase=0x199d21b000
May 22 11:55:45.776            io_pkt_v6_hc.421896                 slog      0  initQs() freePktInfoQ initialized with 256 pkts
May 22 11:55:45.778            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->globalEvent = 34!!!

May 22 11:55:45.778            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->vintrNum = 36!!!

May 22 11:55:45.779            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->vintrBitNum = 0!!!

May 22 11:55:45.779            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->irIntrNum = 12!!!

May 22 11:55:45.779            io_pkt_v6_hc.421896                 slog     56  [UDMA] eventHandle->coreIntrNum = 76!!!

May 22 11:55:45.792            io_pkt_v6_hc.421896                 slog      0  EnetIf_registerIntr2: rx isr 76 thread priority set to 21

May 22 11:55:45.792            io_pkt_v6_hc.421896                 slog      0  EnetIf_registerIntr2: RX InterruptAttachEvent succeed irq/76 coid/1073741855 event/12

May 22 11:55:45.793            io_pkt_v6_hc.421896                 slog      0  Host MAC address: 
May 22 11:55:45.793            io_pkt_v6_hc.421896                 slog      0  70:ff:76:1d:92:c1
May 22 11:55:49.986            io_pkt_v6_hc.421896                 slog      0  EnetPhy_setNextState: PHY 0: INIT -> FINDING (20 ticks)

May 22 11:55:54.180            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=537 } isAlive false
May 22 11:55:54.281            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=513 PHY 0: isAlive {

J721S2-ICMU@QNX:/# May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=519 hMdio->isAlive, status 0
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=537 } isAlive false
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_init:1127 Phy is not linked
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_init:1154 <--Exit 
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:472 <--
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:386 Came here -->cmd-0x80906931
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_filter: Clear IFF_ALLMULTI
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_filter: Adding Multicast MAC Addr -> 33:33:ff:1d:92:c1
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:472 <--
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:386 Came here -->cmd-0x80906931
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_filter: Clear IFF_ALLMULTI
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_filter: Adding Multicast MAC Addr -> 33:33:00:00:00:01
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_filter: Adding Multicast MAC Addr -> 33:33:ff:1d:92:c1
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:472 <--
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:386 Came here -->cmd-0x80906931
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:472 <--
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:386 Came here -->cmd-0x80906910
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_init:1049 Entry --> 
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_init:1154 <--Exit 
May 22 11:55:54.413            io_pkt_v6_hc.421896                 slog      0  cpsw_ioctl:472 <--
May 22 11:55:54.680            io_pkt_v6_hc.421896                 slog      0  cpsw_start:1290 Entry -->

J721S2-ICMU@QNX:/# May 22 11:55:55.180            io_pkt_v6_hc.421896                 slog      0  cpsw_start:1290 Entry -->
May 22 11:55:55.430            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=513 PHY 0: isAlive {
May 22 11:55:55.562            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=519 hMdio->isAlive, status 0
May 22 11:55:55.562            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=537 } isAlive false
May 22 11:55:57.580            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=513 PHY 0: isAlive {
May 22 11:55:57.712            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=519 hMdio->isAlive, status 0
May 22 11:55:57.712            io_pkt_v6_hc.421896                 slog      0  %DEBUG: F=EnetPhy_isAlive,L=537 } isAlive false
May 22 11:55:57.712            io_pkt_v6_hc.421896                 slog      0  EnetPhy_findingState: PHY 0: timed out


  • However, in QNX 7.1, the RTL9010ARG PHY is not communicating properly through MDIO.

    Hi,

    Can you give more details on this project and who the OEM is? Also, what is the use case involving the cpsw Ethernet driver?  Also, which PSDK QNX release is being used? Note that the CPSW io-pkt driver is getting deprecated starting 11.0, and the recommendation is to switch to an io-sock-based driver implemented and supported by Blackberry QNX. (Contact Blackberry QNX directly for support.)

    Regarding the "Phy" issue you have reported above, please note that the CPSW driver does not support all custom PHYs. You need to add this support to the driver.

    Let us know.

    Thanks.

  • I thank you for your kindly comments.
    PSDK version is 09.02.00.05 and QNX's version is 7.1.

    and I have checked MDIO pattern 

    In uboot 2023.04, the waveform is like as follow:

    this works well.

    but in QNX it doesn't response from RTL9010 phy

    I think it's because of the MDC clock of TDA4AL.

    Would you help or comment on this issue more..

    this is MDIO control register's value.


    J721S2-ICMU@QNX:/# k3conf read 0x0c200f04
    |----------------------------------------------------------------------------------------------|
    | VERSION INFO                                                                                 |
    |----------------------------------------------------------------------------------------------|
    | K3CONF | QNX (version DIN_2025-01-21_rc-146-g6b587236 built Fri May 23 08:58:52 PM KST 2025) |
    | SoC    | J721S2 SR1.0                                                                        |
    | SYSFW  | ABI: 3.1 (firmware version 0x0009 '9.2.4--v09.02.04 (Kool Koala))')                 |
    |----------------------------------------------------------------------------------------------|
    
    Value at addr 0xc200f04 = 0x8104013f
    
    J721S2-ICMU@QNX:/# 
    


  • Hi,

    We still need info on other queries I have asked. Please let us know about them.

    We understand the PHY works on UBoot, but not on the QNX CPSW2G driver. As previously mentioned, the RTL9010 phy is not supported. Please add that support,  which must take care of all the dependencies including clock.

    Thanks.