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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 42931C433F5 for ; Thu, 23 Sep 2021 14:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 274BB61107 for ; Thu, 23 Sep 2021 14:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241517AbhIWOLT (ORCPT ); Thu, 23 Sep 2021 10:11:19 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56766 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241463AbhIWOLT (ORCPT ); Thu, 23 Sep 2021 10:11:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=xQgxqK+Omh+ETGrdtsoUW3Gy+NDg808eHja9Ii9a27k=; b=aUgT2IAoRFPgCSOsS1DrMz/sxk 9KKSua9q2PVGi3AUTA4VapP2feVpP6qwKDMsBy+H58mdCL5jojpPFeLFbXAh5Vm07zxcMfgaSDwBD e+wE/fpY8UV4go6pvI00WHKgt34XSBWB0cC4NL5MQwO4VratZbPAXsscbaSbv//DOgBk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mTPPr-007w1H-D7; Thu, 23 Sep 2021 16:09:35 +0200 Date: Thu, 23 Sep 2021 16:09:35 +0200 From: Andrew Lunn To: Geert Uytterhoeven Cc: Heiner Kallweit , Russell King , Biju Das , Florian Fainelli , Adam Ford , Grygorii Strashko , Linux-Renesas , Linux ARM , netdev , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Geert Uytterhoeven Subject: Re: [PATCH 0/9] renesas: Add compatible properties to Ethernet PHY nodes Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Thu, Sep 23, 2021 at 01:00:11PM +0200, Geert Uytterhoeven wrote: > On Thu, Sep 9, 2021 at 10:49 AM Geert Uytterhoeven > wrote: > > If an Ethernet PHY reset is asserted when the Ethernet driver is > > initialized, the PHY cannot be probed: > > > > mdio_bus ee700000.ethernet-ffffffff: MDIO device at address 1 is missing > > > > This happens because the Linux PHY subsystem tries to read the PHY > > Identifier registers before handling PHY reset. Hence if the PHY reset > > was asserted before, identification fails. > > > > An easy way to reproduce this issue is by using kexec to launch a new > > kernel (the PHY reset will be asserted before starting the new kernel), > > or by unbinding and rebinding the Ethernet driver (the PHY reset will be > > asserted during unbind), e.g. on koelsch: > > > > echo ee700000.ethernet > /sys/bus/platform/drivers/sh-eth/unbind > > $ echo ee700000.ethernet > /sys/bus/platform/drivers/sh-eth/bind > > > > The recommended approach[1][2] seems to be working around this issue by > > adding compatible values to all ethernet-phy nodes, so Linux can > > identify the PHY at any time, without reading the PHY ID from the > > device, and regardless of the state of the PHY reset line. > > > > Hence this patch series adds such compatible values to all Ethernet PHY > > subnodes representing PHYs on all boards with Renesas ARM and ARM64 > > SoCs. For easier review, I have split the series in one patch per PHY > > model. It is a reasonable approach. Reviewed-by: Andrew Lunn Andrew