Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2838046pxb; Sun, 15 Nov 2020 20:31:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOystluRqeOKZyKwO4kNpN13GORqxsiA4azLF3mYuYyFJZjTZ/7pw6WCkcIYfk2wxvdtTK X-Received: by 2002:a05:6402:1115:: with SMTP id u21mr13715630edv.148.1605501088414; Sun, 15 Nov 2020 20:31:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605501088; cv=none; d=google.com; s=arc-20160816; b=gRHSkwRwEjkbY4cSmYYmKv7J7Ql8PxqQ+ovCXHPniZaB36sgf7xA+rbz7zGQXhI/KA 3zK7t71jA6OSTmZ4mplGmLax/W49xJ33BeU+udjHVPXgemenGfz9veMS0FxR3324792P 1JR8xZvC7XmEw6pBTTAbm7h00WNetQ3tU8Pb5uxPn6r63UmhljTQC6GNfF7XSRSvY7eT srZ6YJifqJgkbl+3hZh6TuLnjDme8FFE08vh3YLn+nx90P+ZfqxIXuPJiN9urK4VEidm q8By1XU5sEVtLjeH3FDS4xdGtijDQ7hufb/cDD61/IYwuAS1jxDvSAVnXW5ENzI5p8Nn To/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=eNO29EHcV4BOXQ+t6yVnI/0F8ygGUshqUsY5NTnMcho=; b=N7CuwR40AoxPOnK53OyEOGvAPEfDKrHnjZkWaYtokEK+BCpkXrPUE08v5RRhHOKV8n yYIvgyxkXVmoXnN2mCjb5+/1rKSSZ1P1mbaRjc9b8JwiaCZTcxLg3LckT+IV43DlQ6J/ MS3tIl7UhIEG/q4rv1J0MNARid5R9pKgkMpWg3BUy8mhKeNwpHWtyDxJVXtYvXiw6aWP rZY76bIEVsD3MT/T4BExJallMDvpP6qgOh7CGiEljeOl4S68vz9cQmhAKDnn9I2j387y NCaK2k8oz5AERNmTkIagSJG/gKiI6bWu3hJdSqVRzHZJ4EYIzlKL1TsllIw0srXZSdrP AjEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JJxkKVIi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si11827939edz.444.2020.11.15.20.31.05; Sun, 15 Nov 2020 20:31:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JJxkKVIi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbgKPC6C (ORCPT + 99 others); Sun, 15 Nov 2020 21:58:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgKPC6B (ORCPT ); Sun, 15 Nov 2020 21:58:01 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B55C9C0613CF; Sun, 15 Nov 2020 18:58:01 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id j5so7654122plk.7; Sun, 15 Nov 2020 18:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eNO29EHcV4BOXQ+t6yVnI/0F8ygGUshqUsY5NTnMcho=; b=JJxkKVIiHIRQMXg0bWMZR3Qqv0r7GSUsS1FgXMueJu8fUy2PYyXiBVEmglgfIyeSbG Bt60MZKE+aKW/8IKEzNLLlEu+HQ4tloSpZFCu+35d1qFFzPHvTPupGJHeerrUI9+CEyM aiMgjPKABglmd8Ay6c6FOdSsjwsTEB+yukusiXXrrngEZ4q4eo14SJ7SUpnF8yhKY7Dr RrxYiP0A8MSBLpsk8jFn2Q4TynwpL9YGw5/T4m0P8WpkkmDrCNaxHDUgagO4si5RyD1Q Cpw10XOYojhiSnlS1NTRR4Lg+HdK5nt1oV0Bojqp2nJtbGt4hPxq4LaV/1Vas8wawKmw folw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eNO29EHcV4BOXQ+t6yVnI/0F8ygGUshqUsY5NTnMcho=; b=K96B2YebXlWKOu88MLRMP0rCZXlE9VxD+lqLmXg0VQJuI7fRiXmoh/IKpw/PIbLUyf Xepp2rimjz6y0ruFA7gnKJxpNVWcjpkLqyNUg2RVbe3g3BYJbxKUjDdta7IeDcJNGnpL R2SKDvvoR6ElztEyBcoMGFKFGqRg7C8/JgHOvjvKLgn8Dr+KqrbPFqwRuYE14G4yn8UR 5UunPGHTrLz0fU3LDnGRimo0GA8ovkuST3+Ug/jPt05ciSI3f7aQLSjGTBuJRzvXGO41 SgF5R6ncnM9v6wRt86u6yBcal5v41Mo7fpbKlWm1cZ9nKsyi2VGrQpZ9bTn0PhnZic+p uBSA== X-Gm-Message-State: AOAM5336CP9P7BOgX1KqLCukKGlq+r7Obgk33uvi60C0SCbc7J0x+sfa XgNlJ87wYmXfsy6qkYgRFji7yf43hLs= X-Received: by 2002:a17:902:6ac5:b029:d6:4e05:8343 with SMTP id i5-20020a1709026ac5b02900d64e058343mr10934436plt.8.1605495480663; Sun, 15 Nov 2020 18:58:00 -0800 (PST) Received: from [10.230.28.242] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id c12sm15393440pgi.14.2020.11.15.18.57.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Nov 2020 18:57:59 -0800 (PST) Subject: Re: [PATCH v2] net: lantiq: Wait for the GPHY firmware to be ready To: Martin Blumenstingl , hauke@hauke-m.de, netdev@vger.kernel.org Cc: andrew@lunn.ch, vivien.didelot@gmail.com, olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org References: <20201115165757.552641-1-martin.blumenstingl@googlemail.com> From: Florian Fainelli Message-ID: <972ccc3f-2e66-16a2-fb58-875552645342@gmail.com> Date: Sun, 15 Nov 2020 18:57:52 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20201115165757.552641-1-martin.blumenstingl@googlemail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/15/2020 8:57 AM, Martin Blumenstingl wrote: > A user reports (slightly shortened from the original message): > libphy: lantiq,xrx200-mdio: probed > mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing. > gswip 1e108000.switch lan: no phy at 2 > gswip 1e108000.switch lan: failed to connect to port 2: -19 > lantiq,xrx200-net 1e10b308.eth eth0: error -19 setting up slave phy > > This is a single-port board using the internal Fast Ethernet PHY. The > user reports that switching to PHY scanning instead of configuring the > PHY within device-tree works around this issue. > > The documentation for the standalone variant of the PHY11G (which is > probably very similar to what is used inside the xRX200 SoCs but having > the firmware burnt onto that standalone chip in the factory) states that > the PHY needs 300ms to be ready for MDIO communication after releasing > the reset. > > Add a 300ms delay after initializing all GPHYs to ensure that the GPHY > firmware had enough time to initialize and to appear on the MDIO bus. > Unfortunately there is no (known) documentation on what the minimum time > to wait after releasing the reset on an internal PHY so play safe and > take the one for the external variant. Only wait after the last GPHY > firmware is loaded to not slow down the initialization too much ( > xRX200 has two GPHYs but newer SoCs have at least three GPHYs). > > Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") > Reviewed-by: Andrew Lunn > Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli -- Florian