bcm27xx: import latest patches from the RPi foundation
[openwrt/staging/ynezz.git] / target / linux / bcm27xx / patches-5.4 / 950-1011-phy-broadcom-Add-bcm54213pe-configuration.patch
1 From 9c08f4ff9f8f9e56011395dc064100ff6f139bdc Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Thu, 29 Oct 2020 14:10:56 +0000
4 Subject: [PATCH] phy: broadcom: Add bcm54213pe configuration
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
7 ---
8 drivers/net/phy/broadcom.c | 9 +++++++++
9 1 file changed, 9 insertions(+)
10
11 --- a/drivers/net/phy/broadcom.c
12 +++ b/drivers/net/phy/broadcom.c
13 @@ -43,6 +43,11 @@ static int bcm54210e_config_init(struct
14 return 0;
15 }
16
17 +static int bcm54213pe_config_init(struct phy_device *phydev)
18 +{
19 + return bcm54210e_config_init(phydev);
20 +}
21 +
22 static int bcm54612e_config_init(struct phy_device *phydev)
23 {
24 int reg;
25 @@ -304,6 +309,10 @@ static int bcm54xx_config_init(struct ph
26 err = bcm54210e_config_init(phydev);
27 if (err)
28 return err;
29 + } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54213PE) {
30 + err = bcm54213pe_config_init(phydev);
31 + if (err)
32 + return err;
33 } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54612E) {
34 err = bcm54612e_config_init(phydev);
35 if (err)