mirror of
				https://github.com/immortalwrt/immortalwrt.git
				synced 2025-10-30 07:49:55 +08:00 
			
		
		
		
	 927fe598db
			
		
	
	927fe598db
	
	
	
		
			
			Add pending patch to make address some workaround needed to make the Aeonsemi AS21xxx PHY working on the Airoha AN7581/AN7583 board. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 6003da596beb6b8974e61b7ff494476a323fbef5 Mon Sep 17 00:00:00 2001
 | |
| From: Christian Marangi <ansuelsmth@gmail.com>
 | |
| Date: Tue, 8 Jul 2025 11:29:49 +0200
 | |
| Subject: [PATCH 3/4] net: phy: as21xxx: force C45 OPs for AUTONEG
 | |
| 
 | |
| With further testing with 2.5G NIC, it was discovered that the PHY
 | |
| require the C45 OPs to configure and restart ANEG or speed higher than
 | |
| 1G doesn't function correctly.
 | |
| 
 | |
| To force C45 OPs with generic PHY function, clear the C22 bit from
 | |
| devices_in_package bitmask.
 | |
| 
 | |
| Fixes: 830877d89edc ("net: phy: Add support for Aeonsemi AS21xxx PHYs")
 | |
| Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 | |
| ---
 | |
|  drivers/net/phy/as21xxx.c | 7 +++++++
 | |
|  1 file changed, 7 insertions(+)
 | |
| 
 | |
| --- a/drivers/net/phy/as21xxx.c
 | |
| +++ b/drivers/net/phy/as21xxx.c
 | |
| @@ -616,6 +616,13 @@ static int as21xxx_probe(struct phy_devi
 | |
|  	if (ret)
 | |
|  		return ret;
 | |
|  
 | |
| +	/* Even if PHY declare support for Clause 22 register,
 | |
| +	 * Clause 45 register should be used for ANEG configuration
 | |
| +	 * and restart. Clear the C22 bit for devices_in_package to
 | |
| +	 * force C45 generic OPs in generic PHY ANGE OPs.
 | |
| +	 */
 | |
| +	phydev->c45_ids.devices_in_package &= ~BIT(0);
 | |
| +
 | |
|  	ret = aeon_ipc_sync_parity(phydev, priv);
 | |
|  	if (ret)
 | |
|  		return ret;
 |