From: Conor Dooley <conor@kernel.org>
To: Coia Prant <coiaprant@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v13 1/2] dt-bindings: phy: rockchip: naneng-combphy: add rockchip,sgmii-mac-sel property
Date: Wed, 7 Oct 2026 15:33:10 +0100 [thread overview]
Message-ID: <20261007-9753b5de7344a15472337c6d@squawk> (raw)
In-Reply-To: <20261006162807.2843858-2-coiaprant@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3091 bytes --]
On Wed, Oct 07, 2026 at 12:28:05AM +0800, Coia Prant wrote:
> On RK3568, the SGMII interface can be routed to either GMAC0 or
> GMAC1 via the pipe_sgmii_mac_sel bit in the pipe GRF registers.
>
> Add the optional "rockchip,sgmii-mac-sel" property to allow the
> device tree to select which GMAC controller is used for SGMII.
>
> The property takes a value of 0 (GMAC0) or 1 (GMAC1). The hardware
> reset value is 1 (GMAC1), but this can be overridden by setting the
> property to 0 for boards where SGMII is connected to GMAC0.
>
> If this property is absent, the driver leaves the routing unchanged.
>
> This is necessary for boards such as the Ariaboard Photonicat, where
> the SGMII interface is connected to GMAC0 and needs to be explicitly
> configured.
I've written about 3 responses to this and deleted them all.
This feels like something that should be set by some existing mechanism,
like the phys property, or by the mac driver when it realises it is in
sgmii mode - but I think neither actually fits here? The latter doesn't
work since you need to differentiate between instances there anyway,
which requires some info, and the former doesn't work with phy-cells
being 1, since that 1 cell is needed for the phy mode itself.
The other thing is pinctrl, while there's no "pin" here, it's
determining routing within the soc which is the realm of pinctrl,
probably pinctrl-single. But I think that's just really way
over-complicating everything... Plus, Rob didn't yell about this aspect
of things when he yelled about the other things you were doing, so
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
Thanks,
Conor.
>
> Signed-off-by: Coia Prant <coiaprant@gmail.com>
> ---
> .../bindings/phy/phy-rockchip-naneng-combphy.yaml | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml
> index 379b08bd9e97a..442a1df193ad2 100644
> --- a/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml
> +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml
> @@ -80,6 +80,15 @@ properties:
> description:
> Some additional pipe settings are accessed through GRF regs.
>
> + rockchip,sgmii-mac-sel:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + description:
> + Select gmac0 or gmac1 to be used as SGMII controller.
> + Set this to 0 to route SGMII to GMAC0.
> + Set this to 1 to route SGMII to GMAC1.
> + If this property is absent, the driver leaves the routing unchanged.
> +
> "#phy-cells":
> const: 1
>
> @@ -105,6 +114,10 @@ allOf:
> maxItems: 1
> reset-names:
> maxItems: 1
> + rockchip,sgmii-mac-sel: true
> + else:
> + properties:
> + rockchip,sgmii-mac-sel: false
> - if:
> properties:
> compatible:
> --
> 2.47.3
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-10-07 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 16:28 [PATCH v13 0/2] phy: rockchip: naneng-combphy: add SGMII MAC selection for RK3568 Coia Prant
2026-10-06 16:28 ` [PATCH v13 1/2] dt-bindings: phy: rockchip: naneng-combphy: add rockchip,sgmii-mac-sel property Coia Prant
2026-10-07 14:33 ` Conor Dooley [this message]
2026-10-06 16:28 ` [PATCH v13 2/2] phy: rockchip: naneng-combphy: add SGMII MAC selection for RK3568 Coia Prant
2026-10-07 0:53 ` Shawn Lin
2026-10-07 7:27 ` 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=20261007-9753b5de7344a15472337c6d@squawk \
--to=conor@kernel.org \
--cc=coiaprant@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
/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®