[U-Boot, v2, 1/1]net: phy: add paged PHY register accessors

Marek Vasut marek.vasut at mailbox.org
Sun Nov 2 18:01:17 CET 2025


On 11/2/25 4:34 PM, Lucien.Jheng wrote:

Hi,

>> On 10/6/25 2:49 PM, Lucien.Jheng wrote:
>>> Synchronize paged PHY helpers with Linux v6.17.
>>>
>>> Add support for PHY devices that use paged register access by
>>> implementing the following functions:
>>> - phy_save_page(): Save current page number
>>> - phy_select_page(): Switch to a specific page and return previous page
>>> - phy_restore_page(): Restore previously saved page
>>>
>>> Also adds read_page and write_page callbacks to the phy_driver
>>> structure to enable driver-specific page handling.
>>>
>>> These helpers allow safe access to paged PHY registers by ensuring
>>> proper page selection and restoration,
>>> even in error conditions, which will be used by the Airoha PHY driver.
>> Are there any users ? If not, this is dead code.
> 
> I have checked the latest Linux kernel, and these functions are 
> currently used by several vendors, including *MediaTek, Airoha, Marvell, 
> and Realtek PHY*.
> 
> Therefore, I believe these APIs are not dead code.
This is U-Boot, are there any users in U-Boot ?

If you plan to use this in a new driver, then please send this together 
with the new driver.


More information about the U-Boot mailing list