devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Caesar Wang <caesar.upstream@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Caesar Wang <wxt@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	netdev@vger.kernel.org, Kumar Gala <galak@codeaurora.org>,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	keescook@google.com, leozwang@google.com
Subject: Re: [PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree
Date: Thu, 17 Mar 2016 18:02:47 +0800	[thread overview]
Message-ID: <56EA80C7.30303@gmail.com> (raw)
In-Reply-To: <56E96656.5000101@cogentembedded.com>

Hi Sergei,

在 2016年03月16日 21:57, Sergei Shtylyov 写道:
> Hello.
>
> On 3/14/2016 11:01 AM, Caesar Wang wrote:
>
>> This patch adds the following property for arc_emac.
>>
>> 1) phy-reset-gpios:
>> The phy-reset-gpio is an optional property for arc emac device tree 
>> boot.
>> Change the binding document to match the driver code.
>>
>> 2) phy-reset-duration:
>> Different boards may require different phy reset duration. Add property
>> phy-reset-duration for device tree probe, so that the boards that need
>> a longer reset duration can specify it in their device tree.
>>
>> Anyway, we can add the above property for arc emac.
>>
>> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>
>   Could you have a look at drivers/net/ethernet/cadence/macb/? It 
> seems to be the only driver which places the PHY's "reset-gpios" prop 
> correctly, into the PHY subnode? I'm currently working on adding 
> support of this prop into phylib...

I see the driver on now.


     /* Power up the PHY if there is a GPIO reset */
     phy_node =  of_get_next_available_child(np, NULL);
     if (phy_node) {
         int gpio = of_get_named_gpio(phy_node, "reset-gpios", 0);
         if (gpio_is_valid(gpio))
             bp->reset_gpio = gpio_to_desc(gpio);
         gpiod_set_value(bp->reset_gpio, GPIOD_OUT_HIGH);
     }
     of_node_put(phy_node);
...

Frankly, I don't like this way in device drivers.
That's seem same with the /drivers/mmc/core/pwrseq_simple.c,  power up 
the device.
Is it not really reset hardware PHY from the gpio reset pin?  Just power up.

Of course, I hope to see and test it if you improve the PHY framework to 
support the phy reset.:-)

---

Anyway,  David had applied this series patches into net branch.

Although the clock and dts patches should be applied into Heiko branch,  
I'm glad to see David's way.

Heiko branch:
https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/


I wish won't destory Heiko to merge in the future.


-Caesar



>
> MBR, Sergei
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip


-- 
Thanks,
Caesar

  reply	other threads:[~2016-03-17 10:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  8:01 [PATCH v3 0/9] arc_emac: fixes the emac issues and cleanup emac drivers Caesar Wang
     [not found] ` <1457942520-12859-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-03-14  8:01   ` [PATCH v3 1/9] net: arc_emac: make the rockchip emac document more compatible Caesar Wang
     [not found]     ` <1457942520-12859-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-03-18 20:22       ` Rob Herring
2016-03-14  8:01   ` [PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree Caesar Wang
     [not found]     ` <1457942520-12859-3-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-03-16 13:57       ` Sergei Shtylyov
2016-03-17 10:02         ` Caesar Wang [this message]
2016-03-14  8:01   ` [PATCH v3 5/9] clk: rockchip: add node-id for rk3036 emac hclk Caesar Wang
2016-03-14  8:01   ` [PATCH v3 7/9] clk: rockchip: add clock-id for rk3036 emac pll source clock Caesar Wang
2016-03-14  8:02   ` [PATCH v3 9/9] ARM: dts: rockchip: add to support emac for rk3036 SoCs Caesar Wang
2016-03-16 23:28 ` [PATCH v3 0/9] arc_emac: fixes the emac issues and cleanup emac drivers David Miller

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=56EA80C7.30303@gmail.com \
    --to=caesar.upstream@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=heiko@sntech.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=keescook@google.com \
    --cc=leozwang@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=wxt@rock-chips.com \
    /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).