How to read EMAC link status register on T4240RDB

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read EMAC link status register on T4240RDB

How to read EMAC link status register on T4240RDB

pastedImage_0.png

On T4240RDB Cortina PHY chip doesn’t provide any LED indication function.

We should control LED activity by CPLD.

So you need figure out what Ethernet link status is.

To read link status register is necessary.

Cortina PHY is connected to T4240 through XFI interface and this lane uses mEMAC9.

First, we looked up T4240 Reference manual and found there is a register which is related to Linking status.

XFI PCS MDIO Memory MAP->

      0x01 MDIO_XFI_PCS_SR1->

                BIT2 PCS_RX_LNK_STAT

We need use internal MDIO bus to read this register.

T4240 DPAA document has register information about internal MDIO bus.

mEMAC9 base address is 4F_0000h

MDIO9 for mEMAC9 base address is 4F_1000h

Offset 0x034 ->MDIO Control register

Offset 0x038 ->MDIO DATA register

Offset 0x3C ->MDIO register address register

U-boot Environment:

mw 0xfe4f1034 0x3

(Set write command)

mw 0xfe4f103c 0x1

(set register address)

mw 0xfe4f1034 0x8003

(set read command)

md 0xfe4f1038 0x4

(Get read data)

mw 0xfe4f1034 0x8003

md 0xfe4f1038 0x4

Linux Environment:

(Need install devmem tool first)

devmem 0xfe4f1034 32 0x3

(Set write command)

devmem 0xfe4f103c 32 0x1

(set register address)

devmem 0xfe4f1034 32 0x8003

(set read command)

devmem 0xfe4f1038 32

(Get read data)

Labels (1)
Comments

Hi, we have two Marvell 88E1545 connected to SERDES Bank1 and Bank2 and we need to read the temperature of the chip. Can I dp something similar and use devmem to read it? Where can I find detailed documentation on the MDIO registers?

Thanks

Pedro 

Version history
Revision #:
1 of 1
Last update:
‎07-26-2016 02:16 AM
Updated by: