From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D6E9C433E1 for ; Wed, 26 Aug 2020 12:57:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0FCC02080C for ; Wed, 26 Aug 2020 12:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730080AbgHZM5F (ORCPT ); Wed, 26 Aug 2020 08:57:05 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:52318 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728960AbgHZM5B (ORCPT ); Wed, 26 Aug 2020 08:57:01 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kAuz4-00BwSf-PV; Wed, 26 Aug 2020 14:56:58 +0200 Date: Wed, 26 Aug 2020 14:56:58 +0200 From: Andrew Lunn To: Sascha Hauer Cc: netdev@vger.kernel.org, Florian Fainelli , Heiner Kallweit , kernel@pengutronix.de Subject: Re: ethernet-phy-ieee802.3-c22 binding and reset-gpios Message-ID: <20200826125658.GP2403519@lunn.ch> References: <20200825090933.GN13023@pengutronix.de> <20200825131400.GO2588906@lunn.ch> <20200826085857.GO13023@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200826085857.GO13023@pengutronix.de> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Aug 26, 2020 at 10:58:57AM +0200, Sascha Hauer wrote: > Hi Andrew, > > Well there is only one phy connected to the bus, so it makes no > difference if I say the reset GPIO is for the whole bus or for a single > phy only. The per bus reset should work, but currently it doesn't. First > reason I found out that mdiobus_register() doesn't handle -EPROBE_DEFER > returned by the devm_gpiod_get_optional() properly, patch follows. Thanks > Second reason is that the phy is not detected (id read returns 0xffff) > when the reset is attached to the bus. So far I haven't found the reason > for that. Try giving the PHY a bit longer to recover from the reset before probing it. And what SoC are you using? Is it FEC ethernet driver? That has MDIO issues at the moment. Andrew