From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756510AbdKGHyl (ORCPT ); Tue, 7 Nov 2017 02:54:41 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:59567 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756287AbdKGHyg (ORCPT ); Tue, 7 Nov 2017 02:54:36 -0500 Subject: Re: [PATCH] ARM: dts: add phy-reset property for rk3066a-rayeager emac To: Chris Zhong , Sergei Shtylyov , Roger Quadros References: <1510022959-19440-1-git-send-email-zyw@rock-chips.com> CC: , Rob Herring , Mark Rutland , Russell King , , , , , From: Vladimir Zapolskiy Message-ID: Date: Tue, 7 Nov 2017 09:54:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <1510022959-19440-1-git-send-email-zyw@rock-chips.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.87] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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 > --- > > 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 { >