From: Andrew Lunn <andrew@lunn.ch>
To: Divya.Koppera@microchip.com
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next] net: phy: micrel: Adding SQI support for lan8814 phy
Date: Fri, 26 Aug 2022 21:42:38 +0200 [thread overview]
Message-ID: <YwkiLoZkkl2cVcOT@lunn.ch> (raw)
In-Reply-To: <CO1PR11MB4771E1680E841F91411AE6DFE2759@CO1PR11MB4771.namprd11.prod.outlook.com>
> > I just took a quick look at the datasheet. It says:
> >
>
> I'm not sure the datasheet you looked into is the right one. Could you please crosscheck if its lan8814 or lan8841.
> Lan8814 is quad port phy where register access are of extended page. Lan8841 is 1 port phy where register access are mmd access.
>
> > All registers references in this section are in MMD Device Address 1
> >
> > So you should be using phy_read_mmd(phydev, MDIO_MMD_PMAPMD,
> > xxx) to read/write these registers. The datasheet i have however is missing
> > the register map, so i've no idea if it is still 0xe6.
https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/DS-LAN8814-00003592C.pdf
5.13.4 OPEN ALLIANCE TC1/TC12 DCQ SIGNAL QUALITY INDEX
Note: All registers references in this section are in MMD Device Address 1.
This section defines the implementation of section 6.1.2 of the TC1
and TC12 specifications. This mode builds upon the OPEN Alliance
TC1/TC12 DCQ Mean Square Error method by mapping the MSE value onto a
simple quality index. This mode is enabled by setting the sqi_enable
bit, in the DCQ Configuration register.
The MSE value is compared to the thresholds set in the DCQ SQI Table
Registers to provide an SQI value between 0 (worst value) and 7 (best
value) as follows:
In order to capture the SQI value, the DCQ Read Capture bit in the DCQ
Configuration register needs to be written as a high with the desired
cable pair specified in the DCQ Channel Number field of the same
register. The DCQ Read Capture bit will immediately self-clear and the
result will be available in the DCQ SQI register. In addition to the
current SQI, the worst case (lowest) SQI since the last read is
available in the SQI Worst Case field. The correlation between the
SQI values stored in the DCQ SQI register and an according Signal to
Noise Ratio (SNR) based on Additive White Gaussian (AWG) noise
(bandwidth of 80 MHz @ 100 Mbps / 550 MHz @ 1000 Mbps) is shown in
Table 5-5. The bit error rates to be expected in the case of white
noise as interference signal is shown in the table as well for
information purposes.
I had a quick look at OPEN ALLIANCE specification. It seems to specify
how each of these registers should look. It just failed to specify
where in the address map they are. So if you look at drivers
implementing SQI, you see most poke around in MDIO_MMD_VEND1. I
wounder if we can actually share the implementation between drivers,
those that follow the standard, with some paramatirisation where the
registers are.
Andrew
next prev parent reply other threads:[~2022-08-26 19:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 8:05 [PATCH net-next] net: phy: micrel: Adding SQI support for lan8814 phy Divya Koppera
2022-08-25 13:19 ` Andrew Lunn
2022-08-26 3:46 ` Divya.Koppera
2022-08-25 21:53 ` Andrew Lunn
2022-08-26 3:50 ` Divya.Koppera
2022-08-26 19:42 ` Andrew Lunn [this message]
2022-08-29 5:23 ` Divya.Koppera
2022-08-26 8:42 ` Michael Walle
2022-08-26 9:11 ` Divya.Koppera
2022-08-26 9:26 ` Michael Walle
2022-08-26 9:54 ` Oleksij Rempel
2022-08-26 10:43 ` Oleksij Rempel
2022-08-26 19:51 ` Andrew Lunn
2022-08-29 5:50 ` Divya.Koppera
2022-08-29 12:30 ` Andrew Lunn
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=YwkiLoZkkl2cVcOT@lunn.ch \
--to=andrew@lunn.ch \
--cc=Divya.Koppera@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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