Message ID | 20200309182436.22102-2-philippe.schenker@toradex.com |
---|---|
State | Superseded |
Headers | show |
Series | Adding support for KSZ9131 and add it to Toradex boards | expand |
On Mon, Mar 9, 2020 at 8:25 PM Philippe Schenker <philippe.schenker at toradex.com> wrote: > > Signed-off-by: Philippe Schenker <philippe.schenker at toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov at toradex.com> > --- > > drivers/net/phy/micrel_ksz90x1.c | 4 ++-- > include/micrel.h | 5 +++++ > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c > index 0105fc5af1e..f83650b8ef6 100644 > --- a/drivers/net/phy/micrel_ksz90x1.c > +++ b/drivers/net/phy/micrel_ksz90x1.c > @@ -383,8 +383,8 @@ static int ksz9031_config(struct phy_device *phydev) > > static struct phy_driver ksz9031_driver = { > .name = "Micrel ksz9031", > - .uid = 0x221620, > - .mask = 0xfffff0, > + .uid = PHY_ID_KSZ9031, > + .mask = MII_KSZ9x31_SILICON_REV_MASK, > .features = PHY_GBIT_FEATURES, > .config = &ksz9031_config, > .startup = &ksz90xx_startup, > diff --git a/include/micrel.h b/include/micrel.h > index 3e6b5312d85..1d121c2825b 100644 > --- a/include/micrel.h > +++ b/include/micrel.h > @@ -23,6 +23,11 @@ > #define MII_KSZ9031_FLP_BURST_TX_LO 0x3 > #define MII_KSZ9031_FLP_BURST_TX_HI 0x4 > > +#define MII_KSZ9x31_SILICON_REV_MASK 0xfffff0 > + > +#define PHY_ID_KSZ9031 0x00221620 > + > + > /* Registers */ > #define MMD_ACCESS_CONTROL 0xd > #define MMD_ACCESS_REG_DATA 0xe > -- > 2.25.1 > -- Best regards Oleksandr Suvorov cryosay at gmail.com
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c index 0105fc5af1e..f83650b8ef6 100644 --- a/drivers/net/phy/micrel_ksz90x1.c +++ b/drivers/net/phy/micrel_ksz90x1.c @@ -383,8 +383,8 @@ static int ksz9031_config(struct phy_device *phydev) static struct phy_driver ksz9031_driver = { .name = "Micrel ksz9031", - .uid = 0x221620, - .mask = 0xfffff0, + .uid = PHY_ID_KSZ9031, + .mask = MII_KSZ9x31_SILICON_REV_MASK, .features = PHY_GBIT_FEATURES, .config = &ksz9031_config, .startup = &ksz90xx_startup, diff --git a/include/micrel.h b/include/micrel.h index 3e6b5312d85..1d121c2825b 100644 --- a/include/micrel.h +++ b/include/micrel.h @@ -23,6 +23,11 @@ #define MII_KSZ9031_FLP_BURST_TX_LO 0x3 #define MII_KSZ9031_FLP_BURST_TX_HI 0x4 +#define MII_KSZ9x31_SILICON_REV_MASK 0xfffff0 + +#define PHY_ID_KSZ9031 0x00221620 + + /* Registers */ #define MMD_ACCESS_CONTROL 0xd #define MMD_ACCESS_REG_DATA 0xe
Signed-off-by: Philippe Schenker <philippe.schenker at toradex.com> --- drivers/net/phy/micrel_ksz90x1.c | 4 ++-- include/micrel.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-)