Message ID | 20201115185210.573739-1-martin.blumenstingl@googlemail.com |
---|---|
Headers | show |
Series | dwmac-meson8b: picosecond precision RX delay support | expand |
On Sun, Nov 15, 2020 at 07:52:09PM +0100, Martin Blumenstingl wrote: > Newer SoCs starting with the Amlogic Meson G12A have more a precise > RGMII RX delay configuration register. This means more complexity in the > code. Extract the existing RGMII delay configuration code into a > separate function to make it easier to read/understand even when adding > more logic in the future. > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On 11/15/20 10:52 AM, Martin Blumenstingl wrote: > Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX > delay register which allows picoseconds precision. Parse the new > "amlogic,rgmii-rx-delay-ps" property or fall back to the old > "amlogic,rx-delay-ns". > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Maybe also issue a warning when the 'amlogic,rx-delay-ns' property is found in addition to the 'amlogic,rgmii-rx-delay-ps'? Up to you how to manage existing DTBs being deployed.
On 11/15/20 10:52 AM, Martin Blumenstingl wrote: > Newer SoCs starting with the Amlogic Meson G12A have more a precise > RGMII RX delay configuration register. This means more complexity in the > code. Extract the existing RGMII delay configuration code into a > separate function to make it easier to read/understand even when adding > more logic in the future. > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian
On 11/15/20 10:52 AM, Martin Blumenstingl wrote: > Amlogic Meson G12A (and newer: G12B, SM1) SoCs have a more advanced RX > delay logic. Instead of fine-tuning the delay in the nanoseconds range > it now allows tuning in 200 picosecond steps. This support comes with > new bits in the PRG_ETH1[19:16] register. > > Add support for validating the RGMII RX delay as well as configuring the > register accordingly on these platforms. > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian
Hi Florian, On Tue, Nov 17, 2020 at 7:36 PM Florian Fainelli <f.fainelli@gmail.com> wrote: > > On 11/15/20 10:52 AM, Martin Blumenstingl wrote: > > Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX > > delay register which allows picoseconds precision. Parse the new > > "amlogic,rgmii-rx-delay-ps" property or fall back to the old > > "amlogic,rx-delay-ns". > > > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> > > Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> first of all: thanks for reviewing this (and the rest of the series)! > Maybe also issue a warning when the 'amlogic,rx-delay-ns' property is > found in addition to the 'amlogic,rgmii-rx-delay-ps'? Up to you how to > manage existing DTBs being deployed. none of the upstream DTBs uses amlogic,rx-delay-ns - and I am also not aware of anything being in use "downstream". I will add a sentence to the commit description when I re-send this without RFC, something along those lines: "No upstream DTB uses the old amlogic,rx-delay-ns (yet). Only include minimalistic logic to fall back to the old property, without any special validation (for example: old and new property are given at the same time)" What do you think? Best regards, Martin