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.

Linux/DP83822I: Merge DP83822 Linux driver to custom ethernet driver

Part Number: DP83822I

Tool/software: Linux

Hi,


I am using DP83822 TI device to support MII to our custom Ethernet MAC. By searching in TI forum, I found that dp83848.c driver support TI phy device DP83822. But i have used different Ethernet MAC and i have find difficulty to merge this TI driver in my custom driver of Ethernet MAC. So, can anyone suggest the steps to merge this TI driver in to my custom driver.

NOTE: I am using mainline kernel 4.4

  • We're looking into this. Feedback will be posted here.

    Best Regards,
    Yordan
  • Any updated or feedback??
  • If I understand correclty you are asking for assistance in how to interface your custom MAC hardware to a PHY driver. PHY drivers that are written for mainline acceptance will have to follow a template so that they can be used interchangeably across Ethernet MACs.

    TI does not provide support in how to write Linux EMAC drivers to interface with PHY drivers. With that said there are several examples of emac drivers in the kernel drivers/net/ethernet directory that can used as a reference. In the kernel documentation directory you might consider looking at Documentation/networking/phy.txt.

    Another example to consider is looking at drivers/net/ethernet/ti/cpsw.c with is the TI driver used for the AM catalog processors series.
  • Hi,
    Thank for the nice reply. Can you please suggest any TI processor implementation in any mainline linux kernel which uses DP83822 PHY with any Ethernet MAC so, i can find out the proper sequence of configure and initializing the DP83822 PHY?

    Thank You.
  • Unfortunately the only TI PHY used at the moment on TI EVMs is the DP83867.

    The TI catalog processors use DTS files to bind information concerning the PHYs to the driver. In the function cpsw_probe_dt in drivers/net/ethernet/ti/cpsw.c are a few function calls that extract PHY binding information. The TI processors uses a separate piece of ip for MDIO traffic and which has a separate driver. The cpsw and mdio drivers communicate via call backs.

    Reference the arch/arm/boot/dts/dra71-evm.dts for how the DTS binding for a phy is done. To look at how the TI mdio driver talks with PHYs please refer to drivers/net/ethernet/ti/davinci_mdio.c . The method here for working with PHY is the mdio driver does the communicating with the PHYS and relays information such as state change to the cpsw driver via the call back mentioned earlier.

    Hopefully this info helps.