From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933802AbdKGJvr (ORCPT ); Tue, 7 Nov 2017 04:51:47 -0500 Received: from regular1.263xmail.com ([211.150.99.138]:34848 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933753AbdKGJvp (ORCPT ); Tue, 7 Nov 2017 04:51:45 -0500 X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-RL-SENDER: zyw@rock-chips.com X-FST-TO: netdev@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: zyw@rock-chips.com X-UNIQUE-TAG: <42e3f9912afdda8fd88d6d4930da312e> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] ARM: dts: add phy-reset property for rk3066a-rayeager emac To: Vladimir Zapolskiy , Sergei Shtylyov , Roger Quadros Cc: heiko@sntech.de, Rob Herring , Mark Rutland , Russell King , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <1510022959-19440-1-git-send-email-zyw@rock-chips.com> From: Chris Zhong Message-ID: Date: Tue, 7 Nov 2017 17:51:27 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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 { >> > > -- Chris Zhong