mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	linux-kernel@vger.kernel.org, bryan.whitehead@microchip.com,
	lxu@maxlinear.com, richardcochran@gmail.com,
	UNGLinuxDriver@microchip.com, Ian.Saturley@microchip.com
Subject: Re: [PATCH net-next 4/5] net: lan743x: Add support to SGMII 1G and 2.5G
Date: Tue, 14 Jun 2022 23:13:19 +0200	[thread overview]
Message-ID: <Yqj575Z/tYXsRHHK@lunn.ch> (raw)
In-Reply-To: <20220614103424.58971-5-Raju.Lakkaraju@microchip.com>

> +/* MMD Device IDs */
> +#define STD_DEVID			(0x0)
> +#define MMD_PMAPMD			(0x1)
> +#define MMD_PCS				(0x3)
> +#define MMD_ANEG			(0x7)
> +#define MMD_VSPEC1			(0x1E)
> +#define MMD_VSPEC2			(0x1F)

Please use the values from include/uapi/mdio.h

> +
> +/* Vendor Specific SGMII MMD details */
> +#define SR_MII_DEV_ID1			0x0002
> +#define SR_MII_DEV_ID2			0x0003

MDIO_DEVID1 & MDIO_DEVID2

> +#define SR_VSMMD_PCS_ID1		0x0004
> +#define SR_VSMMD_PCS_ID2		0x0005
> +#define SR_VSMMD_STS			0x0008
> +#define SR_VSMMD_CTRL			0x0009
> +
> +#define SR_MII_CTRL			0x0000
> +#define SR_MII_CTRL_RST_		BIT(15)
> +#define SR_MII_CTRL_LBE_		BIT(14)
> +#define SR_MII_CTRL_SS13_		BIT(13)
> +#define SR_MII_CTRL_AN_ENABLE_		BIT(12)
> +#define SR_MII_CTRL_LPM_		BIT(11)
> +#define SR_MII_CTRL_RESTART_AN_		BIT(9)
> +#define SR_MII_CTRL_DUPLEX_MODE_	BIT(8)
> +#define SR_MII_CTRL_SS6_		BIT(6)

These look like standard BMCR registers. Please use the values from
mii.h

> +#define SR_MII_STS			0x0001
> +#define SR_MII_STS_ABL100T4_		BIT(15)
> +#define SR_MII_STS_FD100ABL_		BIT(14)
> +#define SR_MII_STS_HD100ABL_		BIT(13)
> +#define SR_MII_STS_FD10ABL_		BIT(12)
> +#define SR_MII_STS_HD10ABL_		BIT(11)
> +#define SR_MII_STS_FD100T_		BIT(10)
> +#define SR_MII_STS_HD100T_		BIT(9)
> +#define SR_MII_STS_EXT_STS_ABL_		BIT(8)
> +#define SR_MII_STS_UN_DIR_ABL_		BIT(7)
> +#define SR_MII_STS_MF_PRE_SUP_		BIT(6)
> +#define SR_MII_STS_AN_CMPL_		BIT(5)
> +#define SR_MII_STS_RF_			BIT(4)
> +#define SR_MII_STS_AN_ABL_		BIT(3)
> +#define SR_MII_STS_LINK_STS_		BIT(2)
> +#define SR_MII_STS_EXT_REG_CAP_		BIT(0)

These look like BMSR.

It could even be, you can just use generic code for these.

   Andrew

  reply	other threads:[~2022-06-14 21:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 10:34 [PATCH net-next 0/5] net: lan743x: PCI11010 / PCI11414 devices Enhancements Raju Lakkaraju
2022-06-14 10:34 ` [PATCH net-next 1/5] net: lan743x: Add support to LAN743x register dump Raju Lakkaraju
2022-06-14 10:34 ` [PATCH net-next 2/5] net: lan743x: Add support to Secure-ON WOL Raju Lakkaraju
2022-06-14 20:59   ` Andrew Lunn
2022-06-15  9:44     ` Raju Lakkaraju
2022-06-14 10:34 ` [PATCH net-next 3/5] net: lan743x: Add support to SGMII block access functions Raju Lakkaraju
2022-06-14 21:03   ` Andrew Lunn
2022-06-15  9:36     ` Raju Lakkaraju
2022-06-14 10:34 ` [PATCH net-next 4/5] net: lan743x: Add support to SGMII 1G and 2.5G Raju Lakkaraju
2022-06-14 21:13   ` Andrew Lunn [this message]
2022-06-15  9:39     ` Raju Lakkaraju
2022-06-14 10:34 ` [PATCH net-next 5/5] net: phy: add support to get Master-Slave configuration Raju Lakkaraju
2022-06-14 21:21   ` Andrew Lunn
2022-06-15  9:43     ` Raju Lakkaraju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yqj575Z/tYXsRHHK@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Ian.Saturley@microchip.com \
    --cc=Raju.Lakkaraju@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®