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: TDA4VM: Tda4al-Linux main domain phy cannot acquire IP and the static IP is not pinged

Part Number: TDA4AL-Q1
Other Parts Discussed in Thread: SN65DSI86

Hi team,

SDK version: 8.5/8.6

Platform: Tda4al

Phy: Marvell 88E1510

Because the platform has two identical PHYs attached (different phy addr), the one in the MCU domain is ready to acquire IP, connect the network cable and power on (CLK:25M->125M).

When debugging phy in the Linux main domain and getting IP with udhcpc, the IP is not available and the static IP is not pinged.

When debugging the chip, the RGMII output from phy to clk of Mac, the measured value is 125M,but 50M from Mac to clk, the cable removed is 10M.

Output from MAC to clk of phy as follows:

10M speed:10MHz
100M speed:10MHz
1000M speed:50MHz

I think the problem should be with the output clock "TX_CLK is 10MHz/10MHz/50MHz".

The following figure shows the pin diagram main domain:

ifconfig -a show:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@j721s2-evm:~# ifconfig -a
can0: flags=128<NOARP> mtu 16 metric 1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 29
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 metric 1
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:9a:20:b5:66 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet6 fe80::10a9:ecff:feea:375b prefixlen 64 scopeid 0x20<link>
ether 12:a9:ec:ea:37:5b txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This is what the DTS modifications:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/board-support/linux-5.10.162+gitAUTOINC+76b3e88d56-g76b3e88d56/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/board-support/linux-5.10.162+gitAUTOINC+76b3e88d56-g76b3e88d56/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
index 1b2591552..a5bf3adc9 100755
--- a/board-support/linux-5.10.162+gitAUTOINC+76b3e88d56-g76b3e88d56/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
+++ b/board-support/linux-5.10.162+gitAUTOINC+76b3e88d56-g76b3e88d56/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
@@ -242,6 +242,30 @@
>;
};
+ main_cpsw_mdio_pins_default: main-cpsw-mdio-pins-default {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x0c0, PIN_OUTPUT, 6) /* (T28) MCASP1_AXR0.MDIO0_MDC */
+ J721S2_IOPAD(0x0bc, PIN_INPUT, 6) /* (V28) MCASP1_AFSX.MDIO0_MDIO */
+ >;
+ };
+
+ rgmii1_pins_default: rgmii1_pins_default {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x0b8, PIN_INPUT, 6) /* (AA24) MCASP1_ACLKX.RGMII1_RD0 */
+ J721S2_IOPAD(0x0a0, PIN_INPUT, 6) /* (AB25) MCASP0_AXR12.RGMII1_RD1 */
+ J721S2_IOPAD(0x0a4, PIN_INPUT, 6) /* (T23) MCASP0_AXR13.RGMII1_RD2 */
+ J721S2_IOPAD(0x0a8, PIN_INPUT, 6) /* (U24) MCASP0_AXR14.RGMII1_RD3 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Kernel log is as follows:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@j721s2-evm:~# dmesg -c
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
[ 0.000000] Linux version 5.10.162-g76b3e88d56 (linhaisheng@robin) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #10 SMP PREEMPT Tue May 16 16:13:12 CST 2023
[ 0.000000] Machine model: Texas Instruments J721S2 EVM
[ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002880000 (options '')
[ 0.000000] printk: bootconsole [ns16550a0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a0100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a1000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a1100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a2000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a2100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a3000000, compatible id shared-dma-pool
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Regs of the phy is as follows:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[ 2.442275] get_phy_c22_id:phy_reg == [3537],phy_id==[0x1410DD1]
[ 2.448578] get_phy_c22_id:ireg0 ==[0x1140]
[ 2.452883] get_phy_c22_id:ireg1 ==[0x7969]
[ 2.457189] get_phy_c22_id:ireg2 ==[0x0141]
[ 2.461494] get_phy_c22_id:ireg3 ==[0x0DD1]
[ 2.465798] get_phy_c22_id:ireg4 ==[0x01E1]
[ 2.470102] get_phy_c22_id:ireg5 ==[0x45E1]
[ 2.474407] get_phy_c22_id:ireg6 ==[0x0007]
[ 2.478711] get_phy_c22_id:ireg7 ==[0x2801]
[ 2.483016] get_phy_c22_id:ireg8 ==[0x0000]
[ 2.487320] get_phy_c22_id:ireg9 ==[0x0300]
[ 2.491625] get_phy_c22_id:ireg10 ==[0x4000]
[ 2.496017] get_phy_c22_id:ireg11 ==[0x0000]
[ 2.500408] get_phy_c22_id:ireg12 ==[0x0000]
[ 2.504799] get_phy_c22_id:ireg13 ==[0x0003]
[ 2.509191] get_phy_c22_id:ireg14 ==[0x0000]
[ 2.513582] get_phy_c22_id:ireg15 ==[0x3000]
[ 2.517974] get_phy_c22_id:ireg16 ==[0x3060]
[ 2.522365] get_phy_c22_id:ireg17 ==[0x7C08]
[ 2.526756] get_phy_c22_id:ireg18 ==[0x0000]
[ 2.531146] get_phy_c22_id:ireg19 ==[0x1C00]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ethtools -S is as follows:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@j721s2-evm:~# ethtool -S eth0
NIC statistics:
p0_rx_good_frames: 69
p0_rx_broadcast_frames: 43
p0_rx_multicast_frames: 26
p0_rx_crc_errors: 0
p0_rx_oversized_frames: 0
p0_rx_undersized_frames: 0
p0_ale_drop: 0
p0_ale_overrun_drop: 0
p0_rx_octets: 17574
p0_tx_good_frames: 0
p0_tx_broadcast_frames: 0
p0_tx_multicast_frames: 0
p0_tx_octets: 0
p0_tx_64B_frames: 0
p0_tx_65_to_127B_frames: 19
p0_tx_128_to_255B_frames: 7
p0_tx_256_to_511B_frames: 43
p0_tx_512_to_1023B_frames: 0
p0_tx_1024B_frames: 0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Configure phy from 1000M to 100M speed,enter the following command:

devmem2 0x00683030 w 0x00000068
devmem2 0x00683034 w 0x002AAAAB
devmem2 0x00683080 w 0x00008007

TX output becomes 25M,and the ping is ok!

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@j721s2-evm:~#
root@j721s2-evm:~#
root@j721s2-evm:~# devmem2 0x00683030 w 0x00000068
/dev/mem opened.
Memory mapped at address 0xffff8aa73000.
Read at address 0x00683030 (0xffff8aa73030): 0x00000029
Write at address 0x00683030 (0xffff8aa73030): 0x00000068, readback 0x00000068
root@j721s2-evm:~# devmem2 0x00683034 w 0x002AAAAB
/dev/mem opened.
Memory mapped at address 0xffff8d59f000.
Read at address 0x00683034 (0xffff8d59f034): 0x00AAAAAB
Write at address 0x00683034 (0xffff8d59f034): 0x002AAAAB, readback 0x002AAAAB
root@j721s2-evm:~# devmem2 0x00683080 w 0x00008007
/dev/mem opened.
Memory mapped at address 0xffff8e78e000.
Read at address 0x00683080 (0xffff8e78e080): 0x00008007
Write at address 0x00683080 (0xffff8e78e080): 0x00008007, readback 0x00008007
root@j721s2-evm:~#
root@j721s2-evm:~#
root@j721s2-evm:~# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But speed 10M and 1000M and automatic negotiation mode still can't pinged,now output clk is as follows:

10M speed:25MHz,

100M speed:25MHz,

1000M speed:125MHz.


How to adjust the clk so that the RGMII output the correct clock like in the MCU domain to get the IP?

Could you help check this case? Thanks.