From: Kyle Switch <kyle.switch@motor-comm.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, mmyangfl@gmail.com,
horms@kernel.org, linux@armlinux.org.uk, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ming.xu@motor-comm.com,
xiaolin.xu@motor-comm.com, jianmin.wang@motor-comm.com
Subject: Re: [RFC net-next v2] net:dsa:yt922x: Add support for Motorcomm YT922x
Date: Fri, 4 Sep 2026 17:37:21 +0800 [thread overview]
Message-ID: <65c09830-acc1-4501-aaf0-9dbe0b5427ef@motor-comm.com> (raw)
In-Reply-To: <d3c8d8b7-7998-42ef-a518-9acb9a4c6038@lunn.ch>
On 8/28/26 21:19, Andrew Lunn wrote:
>>>> +static int yt922x_port_sds_init(struct yt921x_priv *priv, int port,
>>>> + phy_interface_t interface)
>>>> +{
>>>> + int addr;
>>>> + u16 data;
>>>> + int res;
>>>> +
>>>> + addr = yt922x_sds_phyaddr_get(port,
>>>> + YT922X_PHY_REG_TYPE_SDS_COMMON_EXT,
>>>> + YT922X_PHY_REG_SPACE_SGMII);
>>>> + if (addr < 0)
>>>> + return -EINVAL;
>>>> + /* write protect */
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x4be, 0xd);
>>>> + if (res)
>>>> + return res;
>>>> + /* CDR */
>>>> + if (interface == PHY_INTERFACE_MODE_100BASEX) {
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x406, 0x0);
>>>> + if (res)
>>>> + return res;
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x416, 0x3458);
>>>> + if (res)
>>>> + return res;
>>>> + } else {
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x406, 0x800);
>>>> + if (res)
>>>> + return res;
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x416, 0x4558);
>>>> + if (res)
>>>> + return res;
>>>> + }
>>>> + /* PLL */
>>>> + if (interface == PHY_INTERFACE_MODE_USXGMII) {
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x43a, 0x1006);
>>>> + if (res)
>>>> + return res;
>>>> + res = yt921x_intif_ext_write(priv, addr, 0x43f, 0x3029);
>>>> + if (res)
>>> What is this function doing?
>> Ans: Complete some init configuration according to serdes interface mode.
> Sorry, missed this email until today.
>
> Which SERDES? The switches SERDES, or the PHY SERDES.
>
> We normally refer to the switch SERDES as a PCS, and have a PCS driver
> for it. Sometimes you also need a generic PHY. Please look around at
> other devices and understand the architecture.
>
> The PHYs SERDES interface is configured by the PHY driver. The MAC
> driver should never touch PHY registers. Same as the PHY driver should
> never touch MAC registers.
Ans: Okay, this is the switch SerDes. We will refer to the existing
implementation and modify the code logic accordingly
>
> Andrew
prev parent reply other threads:[~2026-09-04 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 11:06 [RFC net-next v2] net:dsa:yt922x: Add support for Motorcomm YT922x Kyle Switch
2026-08-20 14:47 ` Andrew Lunn
2026-08-25 6:14 ` Kyle Switch
2026-08-28 13:19 ` Andrew Lunn
2026-09-04 9:37 ` Kyle Switch [this message]
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=65c09830-acc1-4501-aaf0-9dbe0b5427ef@motor-comm.com \
--to=kyle.switch@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jianmin.wang@motor-comm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ming.xu@motor-comm.com \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=xiaolin.xu@motor-comm.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