Other Parts Discussed in Thread: DP83869
We want to have our ICSSG1 talking to a PHY. We build 'firmware/icss_dualmac' in git.ti.com/.../k3-image-gen (Commit 3b4a2007a54db72d8814ecbb2555392863c24935). It works fine for a RGMII connection to a PHY. Now we have an MII connection. Therefore we build the firmware with the makefile patched¹ to talk MII. RX seems to work (ethtool reports valid rx packages²), but TX does not. In firmware/icss_dualmac/src/rxl2_txl2.asm:61 I found the comment "MII : set up for MII mode (RX ok, TX not tested)". So I guess TX is not expected to work with this firmware? I also found that this firmware moved (git.ti.com/.../pdk, packages/ti/drv/emac/firmware/icss_dualmac), but the issue remains.
Is there any PRU MAC firmware out there that talks MII?
Thanks!
¹patch:
---
firmware/icss_dualmac/src/makefile | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/firmware/icss_dualmac/src/makefile b/firmware/icss_dualmac/src/makefile
index ea78798..cb875d2 100644
--- a/firmware/icss_dualmac/src/makefile
+++ b/firmware/icss_dualmac/src/makefile
@@ -82,7 +82,7 @@ all:
$(MAKE) BLDT="../bin" all_bins
endif
-all_bins: $(BLDT)/rxl2_txl2_rgmii0_bin.h $(BLDT)/rxl2_txl2_rgmii1_bin.h \
+all_bins: $(BLDT)/rxl2_txl2_mii0_bin.h $(BLDT)/rxl2_txl2_mii1_bin.h \
$(BLDT)/rtu_test0_bin.h $(BLDT)/rtu_test1_bin.h
CL_FLAGS = --endian=little \
@@ -103,7 +103,7 @@ EF_PRU1 = -DMAC -DSLICE1
EF_RTU0 = -DMAC -DSLICE0 -DDO_PSI_ABORT
EF_RTU1 = -DMAC -DSLICE1 -DDO_PSI_ABORT
-APP_DEFS = --define=RGMII \
+APP_DEFS = --define=MII \
-z \
--stack_size=0 \
--heap_size=0 \
@@ -111,8 +111,8 @@ APP_DEFS = --define=RGMII \
--warn_sections
PRUS = rxl2_txl2
-PRU0 = $(PRUS)_rgmii0
-PRU1 = $(PRUS)_rgmii1
+PRU0 = $(PRUS)_mii0
+PRU1 = $(PRUS)_mii1
RTU = rtu
RTUS = rtu_v2
RTU0 = rtu_test0
@@ -130,7 +130,7 @@ mkversion:
$(BLDT)/$(PRU0)_bin.h: $(PRUS).asm pru.cmd
mkdir -p $(BLDT)/$(PRU0)
$(CLPRU) $(CL_FLAGS) $(FLAGS) \
- -DRGMII $(EF_PRU0) -fr=$(BLDT)/$(PRU0) \
+ -DMII $(EF_PRU0) -fr=$(BLDT)/$(PRU0) \
-fs=$(BLDT)/$(PRU0) --preproc_dependency="$(PRUS).d" $(PRUS).asm
$(CLPRU) $(CL_FLAGS) $(APP_DEFS) \
--entry_point=Start $(BLDT)/$(PRU0)/$(PRUS).opru pru.cmd \
@@ -143,7 +143,7 @@ $(BLDT)/$(PRU0)_bin.h: $(PRUS).asm pru.cmd
$(BLDT)/$(PRU1)_bin.h: $(PRUS).asm pru.cmd
mkdir -p $(BLDT)/$(PRU1)
$(CLPRU) $(CL_FLAGS) $(FLAGS) \
- -DRGMII $(EF_PRU1) -fr=$(BLDT)/$(PRU1) \
+ -DMII $(EF_PRU1) -fr=$(BLDT)/$(PRU1) \
-fs=$(BLDT)/$(PRU1) --preproc_dependency="$(PRUS).d" $(PRUS).asm
$(CLPRU) $(CL_FLAGS) $(APP_DEFS) \
--entry_point=Start $(BLDT)/$(PRU1)/$(PRUS).opru pru.cmd \
@@ -157,7 +157,7 @@ $(BLDT)/$(RTU0)_bin.h: $(RTUS).asm pru.cmd
mkdir -p $(BLDT)/$(RTU0)
$(CLPRU) $(CL_FLAGS) $(FLAGS) \
-ss \
- -DRGMII $(EF_RTU0) -fr=$(BLDT)/$(RTU0) \
+ -DMII $(EF_RTU0) -fr=$(BLDT)/$(RTU0) \
-fs=$(BLDT)/$(RTU0) --preproc_dependency="$(RTUS).d" $(RTUS).asm
$(CLPRU) $(CL_FLAGS) $(APP_DEFS) \
--entry_point=Start $(BLDT)/$(RTU0)/$(RTUS).opru pru.cmd \
@@ -171,7 +171,7 @@ $(BLDT)/$(RTU1)_bin.h: $(RTUS).asm pru.cmd
mkdir -p $(BLDT)/$(RTU1)
$(CLPRU) $(CL_FLAGS) $(FLAGS) \
-ss \
- -DRGMII $(EF_RTU1) -fr=$(BLDT)/$(RTU1) \
+ -DMII $(EF_RTU1) -fr=$(BLDT)/$(RTU1) \
-fs=$(BLDT)/$(RTU1) --preproc_dependency="$(RTUS).d" $(RTUS).asm
$(CLPRU) $(CL_FLAGS) $(APP_DEFS) \
--entry_point=Start $(BLDT)/$(RTU1)/$(RTUS).opru pru.cmd \
--
2.25.1
² output after trying to ping the device (the rx_good_frames counter increases during pings):
# ethtool -S eth1
NIC statistics:
rx_good_frames: 861
rx_broadcast_frames: 10
rx_multicast_frames: 55
rx_crc_error_frames: 0
rx_mii_error_frames: 0
rx_odd_nibble_frames: 0
rx_frame_max_size: 2000
rx_max_size_error_frames: 0
rx_frame_min_size: 64
rx_min_size_error_frames: 1
rx_overrun_frames: 3
rx_class0_hits: 859
rx_class1_hits: 859
rx_class2_hits: 859
rx_class3_hits: 859
rx_class4_hits: 859
rx_class5_hits: 0
rx_class6_hits: 0
rx_class7_hits: 0
rx_class8_hits: 0
rx_class9_hits: 0
rx_class10_hits: 0
rx_class11_hits: 0
rx_class12_hits: 0
rx_class13_hits: 0
rx_class14_hits: 0
rx_class15_hits: 0
rx_smd_frags: 0
rx_bucket1_size: 64
rx_bucket2_size: 128
rx_bucket3_size: 256
rx_bucket4_size: 512
rx_64B_frames: 775
rx_bucket1_frames: 776
rx_bucket2_frames: 79
rx_bucket3_frames: 7
rx_bucket4_frames: 0
rx_bucket5_frames: 0
rx_total_bytes: 58217
rx_tx_total_bytes: 58217
tx_good_frames: 0
tx_broadcast_frames: 0
tx_multicast_frames: 0
tx_odd_nibble_frames: 0
tx_underflow_errors: 0
tx_frame_max_size: 2000
tx_max_size_error_frames: 0
tx_frame_min_size: 64
tx_min_size_error_frames: 0
tx_bucket1_size: 64
tx_bucket2_size: 128
tx_bucket3_size: 256
tx_bucket4_size: 512
tx_64B_frames: 0
tx_bucket1_frames: 0
tx_bucket2_frames: 0
tx_bucket3_frames: 0
tx_bucket4_frames: 0
tx_bucket5_frames: 0
tx_total_bytes: 0