This Patch adds support to the asix.ko driver for the AX88772C in Reverse-RMII mode.

 

The ‘asix.ko’ driver is designed to support 88772A, B and C.

The AX88772C supports running in Reverse-RMII mode to enable MAC to MAC communication.

The base ‘asix.ko’ driver does NOT currently support the AX88772C in Reverse-RMII mode.

 

This is due to several reasons:

  1. The AX88772C PHY register “LINK STATUS” Link value never is set to 1.
    1. This prevents the drivers from setting the interface ‘UP’
  2. The AX88772C PHY-ID is hard coded to 0x10, this configures the chip to use the internal PHY not an external PHY.
    1. To use the AX88772C in Reverse-RMII mode, the chip must be configured to use the external ‘PHY’.

 

Asix provides a dedicated AX88772C driver which supports Reverse-RMII. This ‘C’ driver was references to add Reverse-RMII support to the base asix.ko driver.

To resolve the issue, the following changes were made:

  1. MDIO_READ prior to configuring chip to determine what operational mode it is in (Internal, RMII, or Reverse-RMII)
  2. If in Reverse-RMII mode, force chip to be configured as if it had an external PHY.
  3. If in Reverse-RMII mode, set the interface status to UP regardless of the value of the ‘LINK STATUS’ bit.