public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Damien Dejean <dam.dejean@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] net: phy: realtek: add RTL8224 polarity swap support
Date: Sat, 17 Jan 2026 11:47:13 +0100	[thread overview]
Message-ID: <30324c2a-8dc9-46e3-b220-4d6cd06d2480@kernel.org> (raw)
In-Reply-To: <20260116173920.371523-2-dam.dejean@gmail.com>

On 16/01/2026 18:39, Damien Dejean wrote:
> The RTL8224 has a register to configure the polarity of every pair of
> each port. It provides device designers more flexbility when wiring the
> chip.
> 
> Unfortunately, the register is left in an unknown state after a reset.
> Thus on devices where the bootloader don't initialize it, the driver has
> to do it to detect and use a link.
> 
> The MDI polarity swap can be set in the device tree using the property
> realtek,mdi-polarity-swap. The u32 value is a bitfield where bit[0..3]
> control the polarity of pairs A...D.
> 
> Signed-off-by: Damien Dejean <dam.dejean@gmail.com>
> ---
>  .../bindings/net/realtek,rtl82xx.yaml         |  7 +++++
>  drivers/net/phy/realtek/realtek_main.c        | 29 +++++++++++++++++++
>  2 files changed, 36 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> index 2d04d90f8b97..4abcc5cfaf5f 100644
> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> @@ -67,6 +67,13 @@ properties:
>        - off
>      default: keep
>  
> +  realtek,mdi-polarity-swap:
> +    description:
> +      A bitmap to describe pair polarity swap. Bit 0 to swap polarity of pair A,
> +      bit 1 to swap polarity of pair B, bit 2 to swap polarity of pair C and bit
> +      3 to swap polarity of pair D.
> +    $ref: /schemas/types.yaml#/definitions/uint32

Same problem.

Best regards,
Krzysztof

  reply	other threads:[~2026-01-17 10:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 17:39 [PATCH 1/2] net: phy: realtek: add RTL8224 pair swap support Damien Dejean
2026-01-16 17:39 ` [PATCH 2/2] net: phy: realtek: add RTL8224 polarity " Damien Dejean
2026-01-17 10:47   ` Krzysztof Kozlowski [this message]
2026-01-16 18:10 ` [PATCH 1/2] net: phy: realtek: add RTL8224 pair " Andrew Lunn
2026-01-19 17:54   ` Damien Dejean
2026-01-17 10:47 ` Krzysztof Kozlowski

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=30324c2a-8dc9-46e3-b220-4d6cd06d2480@kernel.org \
    --to=krzk@kernel.org \
    --cc=dam.dejean@gmail.com \
    --cc=netdev@vger.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