From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Adrien Grassein <adrien.grassein@gmail.com>
Cc: fugang.duan@nxp.com, davem@davemloft.net, kuba@kernel.org,
robh+dt@kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: net: fsl-fec add mdc/mdio bitbang option
Date: Mon, 30 Nov 2020 14:08:38 -0800 [thread overview]
Message-ID: <bb81c90c-d79e-d944-e35e-305da23d9e58@gmail.com> (raw)
In-Reply-To: <20201129230416.GT2234159@lunn.ch>
On 11/29/2020 3:04 PM, Andrew Lunn wrote:
> On Sun, Nov 29, 2020 at 11:51:43PM +0100, Adrien Grassein wrote:
>> Hi Andrew,
>>
>> Please find my answers below.
>>
>> Le dim. 29 nov. 2020 à 23:41, Andrew Lunn <andrew@lunn.ch> a écrit :
>>
>> On Sun, Nov 29, 2020 at 10:59:58PM +0100, Adrien Grassein wrote:
>> > Add dt-bindings explanation for the two new gpios
>> > (mdio and mdc) used for bitbanging.
>>
>> Hi Adrien
>>
>> What is missing is an explanation of why!
>>
>> I'm sorry, it's my first upstreaming attempt.
>
> Hi Adrien
>
> Please take a look at
>
> https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html
>
> It is normal to have a patch 0/X which explains the big picture.
>
> Then the commit message for each patch should explain why you are
> doing something. That is much more important than what you are doing,
> i can see that from the patch itself.
>
>> I am currently upstreaming the "Nitrogen 8m Mini board" that seems to not use a
>> "normal" mdio bus but a "bitbanged" one with the fsl fec driver.
>
> Any idea why?
>
> Anyway, you should not replicate code, don't copy bitbanging code into
> the FEC. Just use the existing bit-banger MDIO bus master driver.
Right there should be no need for you to modify the FEC driver at all,
there is an existing generic bitbanged MDIO bus driver here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/mdio/mdio-gpio.c
with its binding here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/mdio-gpio.txt
so all you should need to do is make sure that you place a
"virtual,mdio-gpio" node, declare the PHY devices that are present on
that bus, and have your FEC nodes point to those PHY devices with an
appropriate 'phy-handle' property.
--
Florian
next prev parent reply other threads:[~2020-11-30 22:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-28 22:54 [PATCH 1/3] dt-bindings: net: fsl-fec add mdc/mdio bitbang option Adrien Grassein
2020-11-28 22:54 ` [PATCH 2/3] net: fsl: fec: " Adrien Grassein
2020-11-28 22:54 ` [PATCH 3/3] net: fsl: fec: add imx8mq support Adrien Grassein
2020-11-29 21:59 ` [PATCH v2 1/3] dt-bindings: net: fsl-fec add mdc/mdio bitbang option Adrien Grassein
2020-11-29 21:59 ` [PATCH v2 2/3] net: fsl: fec: " Adrien Grassein
2020-11-29 22:00 ` [PATCH v2 3/3] net: fsl: fec: add imx8mq support Adrien Grassein
[not found] ` <20201129224113.GS2234159@lunn.ch>
[not found] ` <CABkfQAFcSNMeYEepsx0Z6tuaif-dQhE2YBMK54t1hikAvzdASg@mail.gmail.com>
2020-11-29 23:04 ` [PATCH v2 1/3] dt-bindings: net: fsl-fec add mdc/mdio bitbang option Andrew Lunn
2020-11-30 22:08 ` Florian Fainelli [this message]
2020-11-30 22:26 ` Andrew Lunn
2020-12-04 20:09 ` Adrien Grassein
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=bb81c90c-d79e-d944-e35e-305da23d9e58@gmail.com \
--to=f.fainelli@gmail.com \
--cc=adrien.grassein@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=fugang.duan@nxp.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).