All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Zhong <zyw@rock-chips.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Roger Quadros <rogerq@ti.com>,
	andrew@lunn.ch
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, heiko@sntech.de,
	netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: add phy-reset property for rk3066a-rayeager emac
Date: Wed, 8 Nov 2017 17:49:55 +0800	[thread overview]
Message-ID: <464f7b9f-1c07-286e-1b7f-bdef0332b4c9@rock-chips.com> (raw)
In-Reply-To: <ac15ef59-3b5e-1752-09db-0a773615f44c@gmail.com>

Hi Florian Fainelli


On 2017年11月08日 02:26, Florian Fainelli wrote:
> On 11/07/2017 01:51 AM, Chris Zhong wrote:
>>
>> On 2017年11月07日 15:54, Vladimir Zapolskiy wrote:
>>> Hello Chris,
>>>
>>> On 11/07/2017 04:49 AM, Chris Zhong wrote:
>>>> The ethernet phy of rk3066a-rayeager has a reset pin, it controlled by
>>>> GPIO1_D6, this pin should be pull down then pull up to reset the phy.
>>>> Add a phy-reset property in emac, make the phy can be reset when emac
>>>> power on.
>>> for PHY reset there are properties 'reset-gpios' and 'reset-delay-us',
>>> please reference to Documentation/devicetree/bindings/net/mdio.txt
>>>
>>> Can you try to reuse them instead of adding new custom properties?
>> This phy-reset is from Documentation/devicetree/bindings/net/arc_emac.txt.
>> And copy from arch/arm/boot/dts/rk3036-kylin.dts.
>> Can we just use these properties, they are not new.
> Because it already exists does not mean it's correct, in fact, it is not
> at all because it places the reset property for a PHY into the MAC node,
> which is just not what this is, what we should be using instead is the
> following patch series:
>
> http://patchwork.ozlabs.org/project/netdev/list/?series=9267
>
> http://patchwork.ozlabs.org/patch/828499/
> http://patchwork.ozlabs.org/patch/828505/
> http://patchwork.ozlabs.org/patch/828501/
> http://patchwork.ozlabs.org/patch/828502/
Okay, this series works for me, and I will push a new version patch 
following it,
with a reset-gpios property under phy node.
And hope this series can be applied soon.

Thanks
Chris Zhong


>>> As a side question, which is mainly addressed to Sergei and Roger,
>>> I don't quite understand why PHY properties were initially added to
>>> MAC/MDIO bus device tree nodes, in my opinion they must be moved under
>>> PHY device tree nodes.
>>>
>>> -- 
>>> With best wishes,
>>> Vladimir
>>>
>>>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
>>>> ---
>>>>
>>>>    arch/arm/boot/dts/rk3066a-rayeager.dts | 2 ++
>>>>    1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> b/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> index 570157f..6064a0a 100644
>>>> --- a/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> +++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> @@ -173,6 +173,8 @@
>>>>        pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&rmii_rst>;
>>>>        phy = <&phy0>;
>>>>        phy-supply = <&vcc_rmii>;
>>>> +    phy-reset-gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>; /* PHY_RST */
>>>> +    phy-reset-duration = <10>; /* millisecond */
>>>>        status = "okay";
>>>>          phy0: ethernet-phy@0 {
>>>>
>>>
>

WARNING: multiple messages have this Message-ID (diff)
From: zyw@rock-chips.com (Chris Zhong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: add phy-reset property for rk3066a-rayeager emac
Date: Wed, 8 Nov 2017 17:49:55 +0800	[thread overview]
Message-ID: <464f7b9f-1c07-286e-1b7f-bdef0332b4c9@rock-chips.com> (raw)
In-Reply-To: <ac15ef59-3b5e-1752-09db-0a773615f44c@gmail.com>

Hi Florian Fainelli


On 2017?11?08? 02:26, Florian Fainelli wrote:
> On 11/07/2017 01:51 AM, Chris Zhong wrote:
>>
>> On 2017?11?07? 15:54, Vladimir Zapolskiy wrote:
>>> Hello Chris,
>>>
>>> On 11/07/2017 04:49 AM, Chris Zhong wrote:
>>>> The ethernet phy of rk3066a-rayeager has a reset pin, it controlled by
>>>> GPIO1_D6, this pin should be pull down then pull up to reset the phy.
>>>> Add a phy-reset property in emac, make the phy can be reset when emac
>>>> power on.
>>> for PHY reset there are properties 'reset-gpios' and 'reset-delay-us',
>>> please reference to Documentation/devicetree/bindings/net/mdio.txt
>>>
>>> Can you try to reuse them instead of adding new custom properties?
>> This phy-reset is from Documentation/devicetree/bindings/net/arc_emac.txt.
>> And copy from arch/arm/boot/dts/rk3036-kylin.dts.
>> Can we just use these properties, they are not new.
> Because it already exists does not mean it's correct, in fact, it is not
> at all because it places the reset property for a PHY into the MAC node,
> which is just not what this is, what we should be using instead is the
> following patch series:
>
> http://patchwork.ozlabs.org/project/netdev/list/?series=9267
>
> http://patchwork.ozlabs.org/patch/828499/
> http://patchwork.ozlabs.org/patch/828505/
> http://patchwork.ozlabs.org/patch/828501/
> http://patchwork.ozlabs.org/patch/828502/
Okay, this series works for me, and I will push a new version patch 
following it,
with a reset-gpios property under phy node.
And hope this series can be applied soon.

Thanks
Chris Zhong


>>> As a side question, which is mainly addressed to Sergei and Roger,
>>> I don't quite understand why PHY properties were initially added to
>>> MAC/MDIO bus device tree nodes, in my opinion they must be moved under
>>> PHY device tree nodes.
>>>
>>> -- 
>>> With best wishes,
>>> Vladimir
>>>
>>>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
>>>> ---
>>>>
>>>>    arch/arm/boot/dts/rk3066a-rayeager.dts | 2 ++
>>>>    1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> b/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> index 570157f..6064a0a 100644
>>>> --- a/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> +++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> @@ -173,6 +173,8 @@
>>>>        pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&rmii_rst>;
>>>>        phy = <&phy0>;
>>>>        phy-supply = <&vcc_rmii>;
>>>> +    phy-reset-gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>; /* PHY_RST */
>>>> +    phy-reset-duration = <10>; /* millisecond */
>>>>        status = "okay";
>>>>          phy0: ethernet-phy at 0 {
>>>>
>>>
>

  reply	other threads:[~2017-11-08  9:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07  2:49 [PATCH] ARM: dts: add phy-reset property for rk3066a-rayeager emac Chris Zhong
2017-11-07  2:49 ` Chris Zhong
2017-11-07  7:54 ` Vladimir Zapolskiy
2017-11-07  7:54   ` Vladimir Zapolskiy
2017-11-07  7:54   ` Vladimir Zapolskiy
2017-11-07  9:51   ` Chris Zhong
2017-11-07  9:51     ` Chris Zhong
2017-11-07 18:26     ` Florian Fainelli
2017-11-07 18:26       ` Florian Fainelli
2017-11-07 18:26       ` Florian Fainelli
2017-11-08  9:49       ` Chris Zhong [this message]
2017-11-08  9:49         ` Chris Zhong
2017-11-09  8:28         ` Roger Quadros
2017-11-09  8:28           ` Roger Quadros
2017-11-09  8:28           ` Roger Quadros
2017-11-09  8:28           ` Roger Quadros
2017-11-09  8:40           ` Roger Quadros
2017-11-09  8:40             ` Roger Quadros
2017-11-09  8:40             ` Roger Quadros
2017-11-09  8:40             ` Roger Quadros
2017-11-07 15:59   ` Andrew Lunn
2017-11-07 15:59     ` Andrew Lunn
2017-11-07 15:59     ` Andrew Lunn
2017-11-09  8:20   ` Roger Quadros
2017-11-09  8:20     ` Roger Quadros
2017-11-09  8:20     ` Roger Quadros

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=464f7b9f-1c07-286e-1b7f-bdef0332b4c9@rock-chips.com \
    --to=zyw@rock-chips.com \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@ti.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=vladimir_zapolskiy@mentor.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 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.