🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Linus Walleij Sun, 29 Nov 2026 22:47
Re: [PATCH net-next v16 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode for family D
#24243
Author: Linus Walleij
Date: Sun, 29 Nov 2026 22:47
47 lines
11338 bytes
On Sun, Nov 29, 2026 at 4:07 PM Mieczyslaw Nalewaj <namiltd@yahoo.com> wrote:

> On family D, RGMII on extension interface 1 needs additional pin drive
> and slew controls, the EXT1 RGMII TX clock delay field in EXT_TXC_DLY
> (0x13f9, bits [5:3]) must be cleared, the pin mux in the top-level
> configuration register must be set up, and SerDes 1, which shares the
> pins, must be disabled.
>
> Program the EXT1 pin controls explicitly when selecting RGMII instead
> of relying on values inherited from the family C initialization table.
> Set the RG1 DN and DP fields to 7 and 5 respectively, as prescribed by
> the RTL8367D port API, while preserving unrelated register fields.
>
> The vendor RGMII setup for EXT1 clears the RGMII field of EXT_TXC_DLY
> (0x13f9, bits [5:3]) in addition to programming TXDELAY in RGMXF.
> Do the same so that any non-zero reset or bootloader value in that field
> cannot add an extra TX delay on top of tx-internal-delay-ps, making
> tx-internal-delay-ps the only source of TX delay.
>
> If the internal MAC4 block occupies extension 1, do not advertise RGMII
> for port 7 in phylink_get_caps(), so the configuration is refused before
> any EXT1 register is touched. This mirrors the vendor RTL8367D API, which
> returns an error for RGMII on port 7 when UTP port 4 uses the RGMII
> interface. The driver logs an error naming the conflict. RGMII is the
> only interface of port 7 this driver implements, so port 7 then has no
> supported interface: phylink_create() fails for it, and if it is a CPU
> port the switch does not probe.
>
> When MAC4 does not own the pins, bind the RGMII/MII pins to MAC7 and
> disable SerDes 1, which shares them. The TX delay field, the pin mux and
> the SerDes 1 disable are all programmed before RGMII is selected, so the
> shared pins are never driven by RGMII and SerDes 1 at the same time.
>
> The family D branch is not reachable until the chip table entry is
> added in the last patch.
>
> Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>

It's a bit weird that the D branch is unused until later in the
patch series but I guess there are patch mechanics reasons
and other than that this looks good to me, so:
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads