Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359697
| From | Caesar Wang <caesar.upstream@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree |
| Date | 2016-03-17 11:10 +0100 |
| Message-ID | <rdD2r-626-25@gated-at.bofh.it> (permalink) |
| References | <rcvJE-17X-11@gated-at.bofh.it> <rcvJF-17X-39@gated-at.bofh.it> <rdk9t-1ft-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/9] arc_emac: fixes the emac issues and cleanup emac drivers Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
[PATCH v3 1/9] net: arc_emac: make the rockchip emac document more compatible Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
Re: [PATCH v3 1/9] net: arc_emac: make the rockchip emac document more compatible Rob Herring <robh@kernel.org> - 2016-03-18 21:30 +0100
[PATCH v3 3/9] net: arc_emac: support the phy reset for emac driver Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
[PATCH v3 4/9] net: arc: trivial: cleanup the emac driver Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
[PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
Re: [PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 15:00 +0100
Re: [PATCH v3 2/9] net: arc_emac: add phy reset is optional for device tree Caesar Wang <caesar.upstream@gmail.com> - 2016-03-17 11:10 +0100
[PATCH v3 6/9] clk: rockchip: associate the rk3036 HCLK_EMAC clock-id Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
[PATCH v3 7/9] clk: rockchip: add clock-id for rk3036 emac pll source clock Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
[PATCH v3 8/9] clk: rockchip: associate SCLK_MAC_PLL and disable reparenting on rk3036 Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
[PATCH v3 5/9] clk: rockchip: add node-id for rk3036 emac hclk Caesar Wang <wxt@rock-chips.com> - 2016-03-14 09:10 +0100
Re: [PATCH v3 0/9] arc_emac: fixes the emac issues and cleanup emac drivers David Miller <davem@davemloft.net> - 2016-03-17 00:30 +0100
csiph-web