From: Kyle Switch <kyle.switch@motor-comm.com>
To: Frank.Sae@motor-comm.com, andrew@lunn.ch, 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, conor+dt@kernel.org,
devicetree@vger.kernel.org
Cc: ming.xu@motor-comm.com, xiaolin.xu@motor-comm.com,
jianmin.wang@motor-comm.com, jie.han@motor-comm.com,
wei.zhang@gl-inet.com, sijia.huang@gl-inet.com
Subject: [PATCH v16 0/2] net: phy: Add driver for Motorcomm Quad 2.5GbE phy
Date: Thu, 10 Sep 2026 15:46:22 +0800 [thread overview]
Message-ID: <20260910074624.2426899-1-kyle.switch@motor-comm.com> (raw)
Add support for Motorcomm YT8824 quad-port 2.5G PHY to the existing
motorcomm driver, using the phy_package helpers for the shared top
extended register space.
changes in v16:
1. Add DTS documentation.
2. Fix redundant initialization.
changes in v14:
1. Refactor the error return path to preserve and return the initial error,
rather than letting later errors mask it.
changes in v13:
1. Fix the lock release issue on the error path to prevent potential deadlock or resource leak.
2. Add a func yt8824_restore_defaults() to restore configuration on the error path,
ensuring the hardware/device is left in a known good state upon failure.
changes in v12:
1. Refactor the yt8824_read_status() function to ensure proper state
synchronization between hardware registers and the phy_device structure.
changes in v11:
1. Clean build_clang warning.
changes in v10:
1. Within the interface that swaps to the USXGMII reg space,the lock include
shared_lock and mdio mutex must remain held throughout the entire operation
and should only be released after all steps have completed.
2. Improve the template interface in phy-c45.c
3. Fix the handling of some failure paths.
changes in v9:
1. Add shared_lock mutex prevents UTPs from interfering with each other
due to swapping reg space.
change in v8:
1. Clean up format warning.
2. Fix exception handling code logic based on Sashiko/Gemini.
3. Remove interrupt/handle function
changes in v7:
1. Refactor the using of mdio lock
In all cases of swapping to the USXGMII side interface, lock the MDIO bus at the
beginning, switch to the UTP address space after the operation is completed, and
then release the lock.The purpose of doing this is to ensure that it will not affect
other UTPs operating in the UTP address space.
2. Rename YT8824_RSSR_FIBER_SPACE to YT8824_RSSR_USXGMII_SPACE.
changes in v6:
1. Add test mode helper in phy-c45.c
2. Refactor the using of swapping paged for utp and fiber
changes in v5:
1. Fix diffs issue which caused by unexpected whitespace.
2. Fix "exceeding 80 columns" warning.
changes in v4:
1. Remove motorcomm,yt8xxx.yaml, will update in other patch thread
2. Fix locking issue. Since every interface requires switching of space,
the bus is already locked during the space switching process in
phy_select_page(), other operations within the interface cannot
be locked again before unlock in phy_restore_page().
3. Fix warning log identified during the inspection process using
checkpatch.pl.
4. Fix the way of using common api in phy_package.c
changes in v3:
1. Using common apis defined in phy_package.c to handle shared top
extend register space.
2. Add dts demo in motorcomm,yt8xxx.yaml.
3. Fix unnecessary redundant judgments.
4. Fix BMCR registers operation using magic number.
5. Rename funtion based on its approximate functionality.
changes in v2:
1. Remove duplicate code and replace it with existing api.
Kyle Switch (2):
net: phy: Add driver for Motorcomm Quad 2.5GbE phy
dt-bindings: net: Document Motorcomm YT8824 PHY package
.../bindings/net/motorcomm,yt8824.yaml | 63 +
drivers/net/phy/Kconfig | 3 +-
drivers/net/phy/motorcomm.c | 1585 ++++++++++++++++-
drivers/net/phy/phy-c45.c | 55 +
include/linux/phy.h | 1 +
include/uapi/linux/mdio.h | 12 +
6 files changed, 1716 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml
--
2.25.1
next reply other threads:[~2026-09-10 7:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 7:46 Kyle Switch [this message]
2026-09-10 7:46 ` [PATCH v16 1/2] " Kyle Switch
2026-09-10 7:46 ` [PATCH v16 2/2] dt-bindings: net: Document Motorcomm YT8824 PHY package Kyle Switch
2026-09-11 8:44 ` Krzysztof Kozlowski
2026-09-12 5:20 ` Kyle Switch
2026-09-11 11:52 ` Andrew Lunn
2026-09-12 5:16 ` Kyle Switch
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=20260910074624.2426899-1-kyle.switch@motor-comm.com \
--to=kyle.switch@motor-comm.com \
--cc=Frank.Sae@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jianmin.wang@motor-comm.com \
--cc=jie.han@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=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sijia.huang@gl-inet.com \
--cc=wei.zhang@gl-inet.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
all inboxes | Powered by JetHome®