From: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> To: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> Subject: Re: Re: [PATCH 2/4] dt-bindings: add binding for RTL8211E Ethernet PHY Date: Fri, 05 May 2017 02:26:48 +0800 [thread overview] Message-ID: <D714E47B-D6B2-4C9F-B9D7-FB9D170E0ADF@aosc.io> (raw) In-Reply-To: <a455c822-d5aa-3f66-03c5-4d1268f9104b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 于 2017年5月5日 GMT+08:00 上午2:21:29, Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 写到: >On 05/04/2017 11:10 AM, icenowy-h8G6r0blFSE@public.gmane.org wrote: >> 在 2017-04-22 08:22,Florian Fainelli 写道: >>> On 04/21/2017 04:24 PM, Icenowy Zheng wrote: >>>> From: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> >>>> >>>> Some RTL8211E Ethernet PHY have an issue that needs a workaround >>>> indicated with device tree. >>>> >>>> Add the binding for a property that indicates this workaround. >>>> >>>> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> >>>> --- >>>> .../devicetree/bindings/net/realtek,rtl8211e.txt | 22 >>>> ++++++++++++++++++++++ >>>> 1 file changed, 22 insertions(+) >>>> create mode 100644 >>>> Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> >>>> diff --git >>>> a/Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> b/Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> new file mode 100644 >>>> index 000000000000..c1913301bfe8 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> @@ -0,0 +1,22 @@ >>>> +Realtek RTL8211E Ethernet PHY >>>> + >>>> +One batch of RTL8211E is slight broken, that needs some special >(and >>>> +full of magic numbers) tweaking in order to make GbE to operate >>>> properly. >>>> +The only well-known board that used the broken batch is Pine64+. >>>> +Configure it through an Ethernet OF device node. >>>> + >>>> +Optional properties: >>>> + >>>> +- realtek,disable-rx-delay: >>>> + If set, RX delay will be completely disabled (according to >>>> Realtek). This >>>> + will affect the performance on non-broken boards. >>>> + default: do not disable RX delay. >>> >>> Please don't introduce custom properties to do that, instead correct >>> specify the "phy-mode" such that it is e.g: "rgmii-txid" which >indicates >>> that there should be no RX internal delay, but a TX internal delay >added >>> by the PHY. >> >> Checked the document, the meaning of "rgmii-txid" is not correct >here. >> >> This doesn't effect the MAC, and the MAC should still add TX delay. >> >> The definition of "rgmii-txid" in >> Documentation/devicetree/binding/net/ethernet.txt is "RGMII with >> internal TX delay provided by the PHY, the MAC should not add an TX >delay >> in this case". However, this do not indicate that the MAC doesn't add >TX >> delay; in fact that just totally disabled the PHY to provide the RX >delay. >> MAC still should to add delay on both TX/RX, which is the semantic of >> standard "rgmii". >> >> So I cannot used "rgmii-txid" here, but should continue to use this >> custom property. > >This is absolutely not a correct understanding. The 'phy-mode' property >defines the contract between the MAC and PHY. It is defined from the >PHY's perspective of the delay, which means that the MAC has to either >also provide an adequate delay (RX or TX) or not (RX or TX). So if you >specified 'phy-mode' = "rgmii" this means that the MAC needs to adds >the >TX and RX delay, so implcitly this means that your MAC operates in The MAC doesn't lose its responsibility to tweak RX/TX delays with this property set. This situation is that, the PHY's RX delay tweaking function is broken. But it doesn't mean that the PHY can take over *all* responsibility to tweak TX, it still needs MAC to tweak TX. >"rgmii-id", if the property was defined from the perspective of the >MAC, >which it is not. > >Both the Ethernet PHY driver and the MAC driver need to take care of >adjusting the delays based on the phydev->interface value. > >The property you are introducing here is absolutely not appropriate >because it is entirely redundant with what 'phy-mode' already defines, >except the latter also covers a lot more cases. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.
WARNING: multiple messages have this Message-ID (diff)
From: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> To: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.orgFlorian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> Subject: Re: Re: [PATCH 2/4] dt-bindings: add binding for RTL8211E Ethernet PHY Date: Fri, 05 May 2017 02:26:48 +0800 [thread overview] Message-ID: <D714E47B-D6B2-4C9F-B9D7-FB9D170E0ADF@aosc.io> (raw) In-Reply-To: <a455c822-d5aa-3f66-03c5-4d1268f9104b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 于 2017年5月5日 GMT+08:00 上午2:21:29, Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 写到: >On 05/04/2017 11:10 AM, icenowy-h8G6r0blFSE@public.gmane.org wrote: >> 在 2017-04-22 08:22,Florian Fainelli 写道: >>> On 04/21/2017 04:24 PM, Icenowy Zheng wrote: >>>> From: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> >>>> >>>> Some RTL8211E Ethernet PHY have an issue that needs a workaround >>>> indicated with device tree. >>>> >>>> Add the binding for a property that indicates this workaround. >>>> >>>> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> >>>> --- >>>> .../devicetree/bindings/net/realtek,rtl8211e.txt | 22 >>>> ++++++++++++++++++++++ >>>> 1 file changed, 22 insertions(+) >>>> create mode 100644 >>>> Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> >>>> diff --git >>>> a/Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> b/Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> new file mode 100644 >>>> index 000000000000..c1913301bfe8 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/net/realtek,rtl8211e.txt >>>> @@ -0,0 +1,22 @@ >>>> +Realtek RTL8211E Ethernet PHY >>>> + >>>> +One batch of RTL8211E is slight broken, that needs some special >(and >>>> +full of magic numbers) tweaking in order to make GbE to operate >>>> properly. >>>> +The only well-known board that used the broken batch is Pine64+. >>>> +Configure it through an Ethernet OF device node. >>>> + >>>> +Optional properties: >>>> + >>>> +- realtek,disable-rx-delay: >>>> + If set, RX delay will be completely disabled (according to >>>> Realtek). This >>>> + will affect the performance on non-broken boards. >>>> + default: do not disable RX delay. >>> >>> Please don't introduce custom properties to do that, instead correct >>> specify the "phy-mode" such that it is e.g: "rgmii-txid" which >indicates >>> that there should be no RX internal delay, but a TX internal delay >added >>> by the PHY. >> >> Checked the document, the meaning of "rgmii-txid" is not correct >here. >> >> This doesn't effect the MAC, and the MAC should still add TX delay. >> >> The definition of "rgmii-txid" in >> Documentation/devicetree/binding/net/ethernet.txt is "RGMII with >> internal TX delay provided by the PHY, the MAC should not add an TX >delay >> in this case". However, this do not indicate that the MAC doesn't add >TX >> delay; in fact that just totally disabled the PHY to provide the RX >delay. >> MAC still should to add delay on both TX/RX, which is the semantic of >> standard "rgmii". >> >> So I cannot used "rgmii-txid" here, but should continue to use this >> custom property. > >This is absolutely not a correct understanding. The 'phy-mode' property >defines the contract between the MAC and PHY. It is defined from the >PHY's perspective of the delay, which means that the MAC has to either >also provide an adequate delay (RX or TX) or not (RX or TX). So if you >specified 'phy-mode' = "rgmii" this means that the MAC needs to adds >the >TX and RX delay, so implcitly this means that your MAC operates in The MAC doesn't lose its responsibility to tweak RX/TX delays with this property set. This situation is that, the PHY's RX delay tweaking function is broken. But it doesn't mean that the PHY can take over *all* responsibility to tweak TX, it still needs MAC to tweak TX. >"rgmii-id", if the property was defined from the perspective of the >MAC, >which it is not. > >Both the Ethernet PHY driver and the MAC driver need to take care of >adjusting the delays based on the phydev->interface value. > >The property you are introducing here is absolutely not appropriate >because it is entirely redundant with what 'phy-mode' already defines, >except the latter also covers a lot more cases. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2017-05-04 18:26 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-21 23:24 [PATCH 0/4] RTL8211E-specified hacks Icenowy Zheng [not found] ` <20170421232436.10924-1-icenowy-h8G6r0blFSE@public.gmane.org> 2017-04-21 23:24 ` [PATCH 1/4] net: phy: realtek: change macro name for page select register Icenowy Zheng 2017-04-21 23:24 ` [PATCH 2/4] dt-bindings: add binding for RTL8211E Ethernet PHY Icenowy Zheng [not found] ` <20170421232436.10924-3-icenowy-h8G6r0blFSE@public.gmane.org> 2017-04-22 0:22 ` Florian Fainelli [not found] ` <c7aa9d7a-5e97-0e7f-2b1c-584a4de00837-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-04-22 1:12 ` icenowy-h8G6r0blFSE 2017-05-04 18:10 ` icenowy-h8G6r0blFSE [not found] ` <edf26d7de605a93bfce258de0353df6d-h8G6r0blFSE@public.gmane.org> 2017-05-04 18:21 ` Florian Fainelli [not found] ` <a455c822-d5aa-3f66-03c5-4d1268f9104b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-05-04 18:26 ` Icenowy Zheng [this message] 2017-05-04 18:26 ` Icenowy Zheng [not found] ` <D714E47B-D6B2-4C9F-B9D7-FB9D170E0ADF-h8G6r0blFSE@public.gmane.org> 2017-05-04 18:29 ` Florian Fainelli [not found] ` <068f1323-3864-620c-0deb-6c5e04a9e498-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-08-21 14:53 ` icenowy-h8G6r0blFSE [not found] ` <19ad1316a74e344d3e1c783458eb4d59-h8G6r0blFSE@public.gmane.org> 2017-08-21 19:54 ` Florian Fainelli 2017-04-21 23:24 ` [PATCH 3/4] net: phy: realtek: add disable RX delay hack for RTL8211E Icenowy Zheng [not found] ` <20170421232436.10924-4-icenowy-h8G6r0blFSE@public.gmane.org> 2017-04-22 0:35 ` Florian Fainelli 2017-04-22 7:12 ` kbuild test robot 2017-04-21 23:24 ` [PATCH 4/4] [DO NOT MERGE] arm64: allwinner: a64: enable RTL8211E PHY workaround Icenowy Zheng [not found] ` <20170421232436.10924-5-icenowy-h8G6r0blFSE@public.gmane.org> 2017-04-22 12:27 ` kbuild test robot
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=D714E47B-D6B2-4C9F-B9D7-FB9D170E0ADF@aosc.io \ --to=icenowy-h8g6r0blfse@public.gmane.org \ --cc=andrew-g2DYL2Zd6BY@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=icenowy-ymACFijhrKM@public.gmane.org \ --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \ --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.