I recently study Linux phy driver, and i have some questions that need help.
For example: my ethernet phy is Marvell Alaska 88E1548
- How do I know if the kernel has support for this phy?
- I found that marvell.c in the driver/net/phy (https://github.com/torvalds/linux/blob/v4.18/drivers/net/phy/marvell.c), but did not define 88E1548 , which means that marvell.c does not support 88E1548? or is a universal drive?
- If the current kernel does not support 88E1548, how can i find this phy driver and porting to the kernel?
Thank you~
-
Try copying the MARVELL_PHY_ID_88E1545 block to MARVELL_PHY_ID_88E1548 and add it to everywhere it is referenced. Make sure the Marvell compatibility check works for 88E1548. Then, rebuild and see if this driver recognizes your Phy device when the module comes up. That is the easiest first try, as often similar models of a device are compatible. If this does work, then perhaps you can submit a patch to the community to add support for this new model.Peter L.– Peter L.2019年03月13日 22:29:07 +00:00Commented Mar 13, 2019 at 22:29
1 Answer 1
The general procedure for porting PHYS is looking for completely or partly compatible existing PHYS like in http://git.emacinc.com/Linux-Kernel/linux-emac/commit/819ec8e1f349f73bdf65bf33a364538e59007a9a
According to datasheet and product brief ( https://www.marvell.com/transceivers/assets/Marvell-Alaska-88E1548-48P-Product-Brief.pdf, https://www.marvell.com/documents/ymlgvtjaejhhxflojtro/ ) the 88E1548 has a wider functionality than 88E1545. It combines functionality of 88E1543 and 88E1545 however register names, communication protocols,... are widely identical ...
In https://github.com/torvalds/linux/blob/v4.18/drivers/net/phy/marvell.c the 88E1545 is supported while the 88E1543 is not existent ( possibly compatible , no time to compare both in datasheet ) . i do not know if there is compatibility of the 88E1548 with earlier Marvell chips ( i do not have the time to compare the datasheets ... ) , the 88E1548 has additional functionality for sure. However in the Product Brief of the Alaska 88E1548 is mentioned complete software compatibility ( https://www.marvell.com/transceivers/assets/Marvell-Alaska-88E1548-48P-Product-Brief.pdf ) ...
in general to check if linux loads a driver for the Alaska 88E1548 run dmesg | grep 'Ethernet driver'
if there is a positive output the 88E1548 is compatible with one of the devices listed in this driver, if not the device is not fully supported yet...
Comments
Explore related questions
See similar questions with these tags.