All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: Coia Prant <coiaprant@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	David Heidelberg <david@ixit.cz>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Coia Prant <coiaprant@gmail.com>
Subject: Re: [PATCH v12 1/3] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes
Date: Sun, 01 Nov 2026 15:05:43 +0100	[thread overview]
Message-ID: <2977688.AiC22s8V5E@phil> (raw)
In-Reply-To: <20261023053548.1595033-2-coiaprant@gmail.com>

Hi,

Am Freitag, 23. Oktober 2026, 07:35:46 Mitteleuropäische Normalzeit schrieb 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 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 is 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: boards that
> enable the XPCS must supply it, 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 | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> index 3bc653f027f1f..20a72785adbc2 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>;
> +	};
> +

these clocks don't belong here.

When you place these nodes in the main, they seem to come out of
thin air, while that might be true for some boards, that they
have dedicated oscillators for that, this will likely not be true
for all.

So these should be defined in the board dts, to match the actual
hardware.


Heiko





WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: Coia Prant <coiaprant@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	David Heidelberg <david@ixit.cz>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Coia Prant <coiaprant@gmail.com>
Subject: Re: [PATCH v12 1/3] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes
Date: Sun, 01 Nov 2026 15:05:43 +0100	[thread overview]
Message-ID: <2977688.AiC22s8V5E@phil> (raw)
In-Reply-To: <20261023053548.1595033-2-coiaprant@gmail.com>

Hi,

Am Freitag, 23. Oktober 2026, 07:35:46 Mitteleuropäische Normalzeit schrieb 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 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 is 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: boards that
> enable the XPCS must supply it, 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 | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
> index 3bc653f027f1f..20a72785adbc2 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>;
> +	};
> +

these clocks don't belong here.

When you place these nodes in the main, they seem to come out of
thin air, while that might be true for some boards, that they
have dedicated oscillators for that, this will likely not be true
for all.

So these should be defined in the board dts, to match the actual
hardware.


Heiko




_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2026-11-01 14:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23  5:35 [PATCH v12 0/3] arm64: dts: rockchip: add RK3568 XPCS nodes and enable SGMII on Photonicat Coia Prant
2026-10-23  5:35 ` Coia Prant
2026-10-23  5:35 ` [PATCH v12 1/3] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
2026-10-23  5:35   ` Coia Prant
2026-11-01 14:05   ` Heiko Stuebner [this message]
2026-11-01 14:05     ` Heiko Stuebner
2026-11-01 20:11     ` Coia Prant
2026-11-01 20:11       ` Coia Prant
2026-11-01 20:19       ` Heiko Stübner
2026-11-01 20:19         ` Heiko Stübner
2026-10-23  5:35 ` [PATCH v12 2/3] arm64: dts: rockchip: rk3568-photonicat: add RGMII PHY LEDs Coia Prant
2026-10-23  5:35   ` Coia Prant
2026-10-23  5:35 ` [PATCH v12 3/3] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
2026-10-23  5:35   ` Coia Prant

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=2977688.AiC22s8V5E@phil \
    --to=heiko@sntech.de \
    --cc=coiaprant@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=shawn.lin@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.