Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2680857pxb; Tue, 13 Apr 2021 07:44:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv29q+WLTFd0flB0rGCmdOmXBRu+Ow9Fo1+nCRbqPDhWH37ecqbqrUr9PMNiZQZwdnu/wA X-Received: by 2002:a17:90a:bb02:: with SMTP id u2mr359381pjr.175.1618325053872; Tue, 13 Apr 2021 07:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618325053; cv=none; d=google.com; s=arc-20160816; b=PS4PjDXs+cmsog6o1tKcYed8RmRxG0eSSi56LCk1RY4piX6eZbJ6IA4J4bQjb2HUp9 8RsIkk8k0K6lNmoIGP7/9MkIT5ieH1DrHYqegDvHSsVZwnwRUIYk3IUSV0LKERQrqfDL 6/pVSIKewB6gzxnIm2o6v3zNMOQ4tJFLh8CgWaVcUTmm76NdC4wuq/qmPb75weawEA1N fX/ltv4GBmGR3uUN8Ko8GbmdfA4hIUk8ZS63/2jd6WY2SZMHjy2zgzPDWAd4T8CXG4DB Xc9PaH4D1+XsTE2l8mVKtS+l02QuBY08QgxgEOwxjkejJt+8OgjWSYXJmf1d5I4FGL6o Z7/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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=nk1ygfdyE4m+uOC4UV7C+pc/Yt/fxtH9QE5hwgJ8GvA=; b=Xd/7rsDRzmgT97PC1OVjmvGlZOnovytQWWZJ0MfgohtcNZG/UrBGpY+8mYoMzZ6vZX spioOop8dV7eCHvA3Ydk6f190WaFWBfD1zlzlbbGKWTe5eZDKBRhv2MneIl/jHJHJEa2 OcuphvElrs3b78tqiKnq8cYz/BcE4wqUoNKgwFBVb4Uo9zGdmnawPqWjJa7fXkkSvLG9 GaP0xJ21xfOkHGaFshjK4faIVcum2a2nCQuGmOCwU0Z1e0L63e8XjlQrBTVsOMLmNryw nC6avGbMs08ROrJq8nFP9kbeBY+No+SGAoZeQziFFRAk+gnU2R07Qo8dHW4VbcKLKQpj 6/JQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m136si17935989pga.183.2021.04.13.07.44.01; Tue, 13 Apr 2021 07:44:13 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244584AbhDMLLW (ORCPT + 99 others); Tue, 13 Apr 2021 07:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243781AbhDMLLQ (ORCPT ); Tue, 13 Apr 2021 07:11:16 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99E95C061756 for ; Tue, 13 Apr 2021 04:10:56 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWGwU-0005NZ-1e; Tue, 13 Apr 2021 13:10:50 +0200 Message-ID: <5277e89e497be121aa7d371a434a3f510fa00e4b.camel@pengutronix.de> Subject: Re: [PATCH v2 0/7] remove different PHY fixups From: Lucas Stach To: Russell King - ARM Linux admin Cc: Oleksij Rempel , Shawn Guo , Sascha Hauer , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Philippe Schenker , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, David Jander , Fabio Estevam , linux-arm-kernel@lists.infradead.org Date: Tue, 13 Apr 2021 13:10:47 +0200 In-Reply-To: <20210413105144.GN1463@shell.armlinux.org.uk> References: <20210309112615.625-1-o.rempel@pengutronix.de> <20210413105144.GN1463@shell.armlinux.org.uk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Russell, sorry for the noise of this arriving in your inbox twice. Apparently I messed up and replied in private in my last mail. Am Dienstag, dem 13.04.2021 um 11:51 +0100 schrieb Russell King - ARM Linux admin: > On Tue, Apr 13, 2021 at 12:00:45PM +0200, Lucas Stach wrote: > > I agree with the opinion that those PHY fixups introduce more harm than > > good. Essentially they are pushing board specific configuration values > > into the PHY, without any checks that the fixup is even running on the > > specific board it was targeted at. > > Yes and no. The problem is, that's an easy statement to make when one > doesn't understand what they're all doing. > > Some are "board specific" in that the normal setup for e.g. iMX6 would > be to enable clock output from the AR8035 PHY and feed that into the > iMX6 - as far as I'm aware, that's the only working configuration for > that SoC and PHY. However, it's also true that this fixup should not > be applied unconditionally. > > Then there's SmartEEE - it has been found that the PHY defaults for > this lead to link drops independent of the board and SoC that it is > connected to. It seems that the PHY is essentially broken - it powers > up with SmartEEE enabled, and when connected to another SmartEEE > supporting device, it seems guaranteed that it will result in link > drops in its default configuration. > > Freescale's approach has apparently been to unconditionally disable > SmartEEE for all their platforms because of this. With a bit of > research however (as has been done by Jon and myself) we've found > that increasing the Tw parameter for 1G connections results in a > much more stable link. > > So, just saying that these are bad without actually understanding what > they are doing is _also_ bad. I'm not saying the fixups are bad per se. What I'm saying is that they are inherently board specific and the right way to apply them is either via DT properties, or if absolutely necessary via a fixup that at least checks that it is running on the specific board it was targeted at. While SmartEEE disabling will cause no big harm, aside from a bit more power consumption, a wrong clock configuration can cause major confusion. Especially if the configuration in DT and values put into the PHY via fixups differ from each other. Regards, Lucas