* [PATCH v10 0/2] arm64: dts: rockchip: add RK3568 XPCS nodes and enable SGMII on Photonicat
@ 2026-10-05 22:40 Coia Prant
2026-10-05 22:40 ` [PATCH v10 1/2] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
2026-10-05 22:40 ` [PATCH v10 2/2] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
0 siblings, 2 replies; 5+ messages in thread
From: Coia Prant @ 2026-10-05 22:40 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Lin,
David Heidelberg, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Coia Prant
This series adds the RK3568 XPCS and fixed-clock nodes, and enables the
SGMII LAN port on the Ariaboard Photonicat.
Dependencies:
- Generic PM domain (genpd) changes:
https://lore.kernel.org/all/20260925041751.495818-1-coiaprant@gmail.com/
- PHY binding+driver (Naneng Combo PHY SGMII MAC selection):
https://lore.kernel.org/all/20261005221229.1095843-1-coiaprant@gmail.com/
- stmmac XPCS lifetime management fix:
https://lore.kernel.org/all/20261005221749.1104430-1-coiaprant@gmail.com/
- net-next series (XPCS glue, dwmac-rk SGMII support, pcs-handle binding):
https://lore.kernel.org/all/20261005223011.1124347-1-coiaprant@gmail.com/
There is no hard build dependency. DTS validation will pass once the
binding and driver are present in linux-next, which they will be after
the PHY and net-next trees merge.
---
Coia Prant (2):
arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes
arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port
.../boot/dts/rockchip/rk3568-photonicat.dts | 74 ++++++++++++++++++-
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 45 +++++++++++
2 files changed, 117 insertions(+), 2 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v10 1/2] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes
2026-10-05 22:40 [PATCH v10 0/2] arm64: dts: rockchip: add RK3568 XPCS nodes and enable SGMII on Photonicat Coia Prant
@ 2026-10-05 22:40 ` Coia Prant
2026-10-05 22:50 ` sashiko-bot
2026-10-05 22:40 ` [PATCH v10 2/2] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
1 sibling, 1 reply; 5+ messages in thread
From: Coia Prant @ 2026-10-05 22:40 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Lin,
David Heidelberg, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Coia Prant
The RK3568 SoC integrates a Synopsys DesignWare XPCS that provides
the Physical Coding Sublayer for 1000BASE-X, SGMII, and QSGMII
interfaces via its four MII ports. Add the XPCS device node and
its pcs-mii sub-nodes to the SoC device tree.
The XPCS device is accessed via the APB3 bus at 0xfda00000 and
requires the CSR clock (PCLK_XPCS) for register access and the EEE
clock (CLK_XPCS_EEE) for Energy Efficient Ethernet operation. The
PD_PIPE power domain must be enabled before any register access.
Also add two fixed-clock nodes (clock-xpcs-gmac0 and clock-xpcs-gmac1,
labelled clk_gmac0_xpcs_mii and clk_gmac1_xpcs_mii) providing the
125 MHz reference clock for the GMACs when operating with XPCS. Their
clock-output-names match the CRU mux parent names in clk-rk3568.c, so
boards can reparent SCLK_GMAC0_RX_TX / SCLK_GMAC1_RX_TX through
assigned-clock-parents.
The XPCS node and its mii sub-nodes are disabled by default and
must be enabled at the board level when 1000BASE-X/SGMII/QSGMII is
in use. The fixed-clock nodes are always present and do not have a
status property, as they are static clock sources.
The XPCS node requires a reference to the appropriate Naneng Combo PHY
via the phys property. dtbs_check only validates required properties
for enabled nodes, so the SoC dtsi does not provide phys/phy-names:
boards that enable the XPCS must supply them, since the SerDes link is
a board-level design choice (combphy1 on some boards, combphy2 on
others).
Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 45 ++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
index 3bc653f027f1f..2cea108b31a4e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
@@ -8,6 +8,20 @@
/ {
compatible = "rockchip,rk3568";
+ clk_gmac0_xpcs_mii: clock-xpcs-gmac0 {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "clk_gmac0_xpcs_mii";
+ #clock-cells = <0>;
+ };
+
+ clk_gmac1_xpcs_mii: clock-xpcs-gmac1 {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "clk_gmac1_xpcs_mii";
+ #clock-cells = <0>;
+ };
+
cpu0_opp_table: opp-table-0 {
compatible = "operating-points-v2";
opp-shared;
@@ -110,6 +124,37 @@ sata0: sata@fc000000 {
status = "disabled";
};
+ xpcs: ethernet-pcs@fda00000 {
+ compatible = "rockchip,rk3568-xpcs";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0xfda00000 0x0 0x200000>;
+ clocks = <&cru PCLK_XPCS>, <&cru CLK_XPCS_EEE>;
+ clock-names = "csr", "eee";
+ power-domains = <&power RK3568_PD_PIPE>;
+ status = "disabled";
+
+ xpcs_mii0: ethernet-pcs-mii@0 {
+ reg = <0>;
+ status = "disabled";
+ };
+
+ xpcs_mii1: ethernet-pcs-mii@1 {
+ reg = <1>;
+ status = "disabled";
+ };
+
+ xpcs_mii2: ethernet-pcs-mii@2 {
+ reg = <2>;
+ status = "disabled";
+ };
+
+ xpcs_mii3: ethernet-pcs-mii@3 {
+ reg = <3>;
+ status = "disabled";
+ };
+ };
+
pipe_phy_grf0: syscon@fdc70000 {
compatible = "rockchip,rk3568-pipe-phy-grf", "syscon";
reg = <0x0 0xfdc70000 0x0 0x1000>;
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v10 2/2] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port
2026-10-05 22:40 [PATCH v10 0/2] arm64: dts: rockchip: add RK3568 XPCS nodes and enable SGMII on Photonicat Coia Prant
2026-10-05 22:40 ` [PATCH v10 1/2] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
@ 2026-10-05 22:40 ` Coia Prant
2026-10-05 22:49 ` sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: Coia Prant @ 2026-10-05 22:40 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Lin,
David Heidelberg, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Coia Prant
The Ariaboard Photonicat has a Motorcomm YT8521SC Gigabit Ethernet PHY
connected to GMAC0 via XPCS SGMII. Enable the necessary nodes to make
this port functional.
Add rockchip,sgmii-mac-sel = <0> to the already enabled combphy2,
to route the SGMII interface to GMAC0. RK3568 has three Combo PHYs
that can carry SGMII; which one is wired to the XPCS is a board-level
choice, and Photonicat uses combphy2.
Enable the xpcs node and its port 0 sub-node, referencing combphy2
as the SerDes PHY.
Add the mdio0 node with the YT8521SC PHY at address 3, including its
reset GPIO and LED configuration. Also add LED configuration for the
existing RGMII PHY on mdio1 for consistency.
Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
.../boot/dts/rockchip/rk3568-photonicat.dts | 74 ++++++++++++++++++-
1 file changed, 72 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts b/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
index 58c1052ba8ef3..fdaa4a2a4328b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3568.dtsi"
@@ -241,6 +242,7 @@ &combphy1 {
};
&combphy2 {
+ rockchip,sgmii-mac-sel = <0>;
status = "okay";
};
@@ -260,9 +262,18 @@ &cpu3 {
cpu-supply = <&vdd_cpu>;
};
-/* Motorcomm YT8521SC LAN port (require SGMII) */
+/* Motorcomm YT8521SC LAN port */
&gmac0 {
- status = "disabled";
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>;
+ assigned-clock-parents = <&clk_gmac0_xpcs_mii>;
+ managed = "in-band-status";
+ pcs-handle = <&xpcs_mii0>;
+ phy-handle = <&sgmii_phy>;
+ phy-mode = "sgmii";
+ phy-supply = <&vcc_3v3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac0_miim>;
+ status = "okay";
};
/* Motorcomm YT8521SC WAN port */
@@ -341,6 +352,36 @@ &i2s0_8ch {
status = "okay";
};
+&mdio0 {
+ sgmii_phy: ethernet-phy@3 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x3>;
+ max-speed = <1000>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ default-state = "keep";
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ default-state = "keep";
+ };
+ };
+ };
+};
+
&mdio1 {
rgmii_phy: ethernet-phy@3 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -350,6 +391,25 @@ rgmii_phy: ethernet-phy@3 {
reset-gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>;
rx-internal-delay-ps = <1500>;
tx-internal-delay-ps = <1500>;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_WAN;
+ default-state = "keep";
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WAN;
+ default-state = "keep";
+ };
+ };
};
};
@@ -586,3 +646,13 @@ &xin32k {
pinctrl-names = "default";
pinctrl-0 = <&clk32k_out1>;
};
+
+&xpcs {
+ phys = <&combphy2 PHY_TYPE_SGMII>;
+ phy-names = "serdes";
+ status = "okay";
+};
+
+&xpcs_mii0 {
+ status = "okay";
+};
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v10 2/2] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port
2026-10-05 22:40 ` [PATCH v10 2/2] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
@ 2026-10-05 22:49 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-10-05 22:49 UTC (permalink / raw)
To: Coia Prant; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] net: stmmac: infinite probe deferral due to unsupported XPCS compatible
- [Low] dts: undocumented and unparsed property rockchip,sgmii-mac-sel
--
commit 3f0b676bf5c1cf7b3503051c6c41df786bf6f4a2
Author: Coia Prant <coiaprant@gmail.com>
arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port
This commit enables the Motorcomm YT8521SC Gigabit Ethernet PHY connected
to GMAC0 via XPCS SGMII on the Ariaboard Photonicat. It adds MDIO
configuration, enables the XPCS nodes, and configures combphy2.
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts b/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
> index 58c1052ba8ef3..fdaa4a2a4328b 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
[ ... ]
> @@ -241,6 +242,7 @@ &combphy1 {
> };
>
> &combphy2 {
> + rockchip,sgmii-mac-sel = <0>;
[Severity: Low]
Is this rockchip,sgmii-mac-sel property properly documented and supported?
When running make dtbs_check, this property appears to trigger a validation
failure because it is not defined in any mainline binding (such as
phy-rockchip-naneng-combphy.yaml).
Since there is currently no mainline driver that parses this property, could
this just act as dead code that breaks device tree validation?
> status = "okay";
> };
>
[ ... ]
> -/* Motorcomm YT8521SC LAN port (require SGMII) */
> +/* Motorcomm YT8521SC LAN port */
> &gmac0 {
> - status = "disabled";
> + assigned-clocks = <&cru SCLK_GMAC0_RX_TX>;
> + assigned-clock-parents = <&clk_gmac0_xpcs_mii>;
> + managed = "in-band-status";
> + pcs-handle = <&xpcs_mii0>;
[Severity: High]
Will this hard dependency cause an infinite probe deferral for the gmac0
interface at boot time?
Because the xpcs_mii0 fwnode is a child of the xpcs node, it relies on the
rockchip,rk3568-xpcs compatible string. However, since there is no platform
driver in the mainline kernel that matches this compatible string, the MDIO
bus and devices for the XPCS node might never be instantiated.
When stmmac_dvr_probe() attempts to configure the MDIO bus and calls
xpcs_create_fwnode(), fwnode_mdio_find_device() will fail to find the
MDIO device for xpcs_mii0 and return -EPROBE_DEFER indefinitely.
> + phy-handle = <&sgmii_phy>;
> + phy-mode = "sgmii";
> + phy-supply = <&vcc_3v3>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&gmac0_miim>;
> + status = "okay";
> };
[ ... ]
> +&xpcs_mii0 {
> + status = "okay";
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005224008.1140250-1-coiaprant@gmail.com?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v10 1/2] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes
2026-10-05 22:40 ` [PATCH v10 1/2] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
@ 2026-10-05 22:50 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-10-05 22:50 UTC (permalink / raw)
To: Coia Prant; +Cc: devicetree, conor+dt, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dt-bindings: rk3568-xpcs compatible and sub-nodes break driver probe
--
commit 14866edde455974144845fb966151f552d75c4c8
Author: Coia Prant <coiaprant@gmail.com>
arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes
The RK3568 SoC integrates a Synopsys DesignWare XPCS that provides
the Physical Coding Sublayer for 1000BASE-X, SGMII, and QSGMII
interfaces via its four MII ports. Add the XPCS device node and
its pcs-mii sub-nodes to the SoC device tree.
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> index 3bc653f027f1f..2cea108b31a4e 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
[ ... ]
> @@ -110,6 +124,37 @@ sata0: sata@fc000000 {
> status = "disabled";
> };
>
> + xpcs: ethernet-pcs@fda00000 {
> + compatible = "rockchip,rk3568-xpcs";
[Severity: High]
Will this compatible string prevent the platform driver from binding?
The rockchip,rk3568-xpcs compatible string lacks a generic fallback to
snps,dw-xpcs. Without it, the platform driver (pcs-xpcs-plat.c) will not bind,
causing the stmmac MAC driver to fail to probe (stuck in -EPROBE_DEFER)
since it cannot resolve the pcs-handle.
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x0 0xfda00000 0x0 0x200000>;
> + clocks = <&cru PCLK_XPCS>, <&cru CLK_XPCS_EEE>;
> + clock-names = "csr", "eee";
[Severity: High]
Is the eee clock undocumented in the binding schema?
Including the undocumented eee clock will cause dt_binding_check validation
failures against the snps,dw-xpcs.yaml schema constraints.
> + power-domains = <&power RK3568_PD_PIPE>;
> + status = "disabled";
> +
> + xpcs_mii0: ethernet-pcs-mii@0 {
> + reg = <0>;
> + status = "disabled";
> + };
[Severity: High]
Will this sub-node topology break xpcs_create_fwnode() resolution?
The upstream driver registers its single MDIO device using the parent node's
fwnode. If pcs-handle references this sub-node, fwnode_mdio_find_device()
will return NULL, preventing the MAC driver from resolving the pcs-handle.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005224008.1140250-1-coiaprant@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-05 22:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 22:40 [PATCH v10 0/2] arm64: dts: rockchip: add RK3568 XPCS nodes and enable SGMII on Photonicat Coia Prant
2026-10-05 22:40 ` [PATCH v10 1/2] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
2026-10-05 22:50 ` sashiko-bot
2026-10-05 22:40 ` [PATCH v10 2/2] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
2026-10-05 22:49 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox