Re: [RFC PATCH 6/6] arm64: dts: amlogic: t7: khadas-vim4: enable the ethernet port
From: Andrew Lunn
Date: Mon Oct 05 2026 - 12:08:10 EST
> +ðmac {
> + status = "okay";
> + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
> + pinctrl-names = "default";
> +
> + /*
> + * The RGMII clock delays are added by the MAC, so the PHY is
> + * asked for the mode that adds none.
> + */
> + phy-mode = "rgmii";
> + phy-handle = <&external_phy>;
> + amlogic,tx-delay-ns = <2>;
> + rx-internal-delay-ps = <2000>;
I agree with Maxime here, rgmii is wrong. We really need to understand
what is going on here, especially since you are asking for the MAC to
do the usual 2ns, nothing special.
Is the PHY not actually inserting the correct delay? What does the
datasheet say?
Also, we have one vendor property and one generic property. Can
amlogic,tx-delay-ns be replaced by tx-internal-delay-ps? But that
comes later, once we have determined these properties really must be
used.
Humm, what is meson8b_init_rgmii_delays() doing? What is
phydev->interface in the PHY driver.
Please take a read on:
https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287
and figure out what is going on here, because at a first look, it
seems broken.
Andrew