Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp519411pxb; Mon, 25 Apr 2022 15:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOx2pZ54hNde/F5ggoy1KS5ZHi256p3x6POU0/TI8WCLwlRZRmaZ7ZdUVMY3FfaCYA8uXR X-Received: by 2002:a17:902:8d96:b0:15a:1b5c:9330 with SMTP id v22-20020a1709028d9600b0015a1b5c9330mr20120590plo.8.1650925565327; Mon, 25 Apr 2022 15:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650925565; cv=none; d=google.com; s=arc-20160816; b=KjAEdQMjfOo1GqNttbo6jpdUUK+3YE+oFTEVypta7kLQ246bzbSgZaO0sIiu/hlyyh AgrOQOAMyC4oiV7dLlJLgWVb+qSsKfWtSvWllKZx9QTE1FkIaspqQ4q0kyRWW/0e9rDT bjWdNbueL8hSDIXgVUpADw0nNf6VRZ9mefT6bwbgG/Tds3h0V0w1OyRCZnekUNaCJBMA TucGFKZPSTyZ72GBBN2oZ4BRPKWARCEscc2mzCwprBAY3ACVbaGuiI/bIj6fo0Zmipiw V8jYk5esvfqcEzBFu8ni0aw2c7+fyG5dhdQeib6IwwKCv4bL5mGd+ZxOV5sUf+eHOPM1 JCgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=38IMGApEWMDQRzOu9Up92LzBejF2/6NEUKrWMdbx4cI=; b=tS5wXX+t6KsW4dEu8LIAyNaHjc2gicidrc6K/2JhOp5auQLT2Lh7zVdYBCnha3Xxg+ GcvG3GJRMMvWPyQ435E0rVtczT8LNnbLESqZMq8EKVjY1eIK2xHlinpXzEeXDZqlhQNT /3s8vo4O5JLqKWeUEdyU9ePWHTK8OE9sA7AhDg1ZIIB6RWyJt/9bcLV49T0CRE9el6Ce WsWA2NBNtVDpW6z3pjCo4LpiI/UqLps7YGg1CQ5KcOOHAzcJfp+xinusnQTXgyUQNn1I d5RZtC7YeCRV5vIkhTdm7wXKHMTHXQ2TQW3Zp3kHknNMB6rp6GUCkpQr/o0dmpP4su9B MPsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hauke-m.de header.s=MBO0001 header.b=EQNXJJUL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj14-20020a17090b4f4e00b001d22ac4fe6csi546753pjb.92.2022.04.25.15.25.50; Mon, 25 Apr 2022 15:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hauke-m.de header.s=MBO0001 header.b=EQNXJJUL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245151AbiDYURZ (ORCPT + 99 others); Mon, 25 Apr 2022 16:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242284AbiDYURX (ORCPT ); Mon, 25 Apr 2022 16:17:23 -0400 X-Greylist: delayed 516 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 25 Apr 2022 13:14:17 PDT Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21D331240E2 for ; Mon, 25 Apr 2022 13:14:16 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4KnGGV3KQxz9sQq; Mon, 25 Apr 2022 22:05:38 +0200 (CEST) Message-ID: <6c52dc89-015a-9c51-9568-778ccb8c2dd9@hauke-m.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1650917136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=38IMGApEWMDQRzOu9Up92LzBejF2/6NEUKrWMdbx4cI=; b=EQNXJJULaE/lP/xYon/esS8BNihN8LpOs2J1cknYX2/AEY5M4BSrpqhcaXWtoEzj+KZQBf Gf/ViTcF+7fnvHnKnIPc/kf5hO7JwwR60PNyzyE4tFppH4mSX4m/dJl9x/vZfE49OAnHG6 IOL4aMPW4gOdM54duSST9DhK/n7JvxsvcA7LcVdhPze2bxKvFhw6lVlqlwTnDDwcl0ho/h pKnkgc+uiaRKKKSY5Pl05lKZekQGRNf4Rcy12iHO9y5OqExeOdK+vBWHb+R21THynA8xGV SROjM86sw94+neuYkknMylIz7+XGD/NMAL8qalPe38ipPW+pJFNfduUyzfxf8g== Date: Mon, 25 Apr 2022 22:05:32 +0200 MIME-Version: 1.0 Subject: Re: [PATCH net] net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK Content-Language: en-US To: Martin Blumenstingl , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, andrew@lunn.ch, vivien.didelot@gmail.com, olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, stable@vger.kernel.org, Jan Hoffmann References: <20220425152027.2220750-1-martin.blumenstingl@googlemail.com> From: Hauke Mehrtens In-Reply-To: <20220425152027.2220750-1-martin.blumenstingl@googlemail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/25/22 17:20, Martin Blumenstingl wrote: > Commit 4b5923249b8fa4 ("net: dsa: lantiq_gswip: Configure all remaining > GSWIP_MII_CFG bits") added all known bits in the GSWIP_MII_CFGp > register. It helped bring this register into a well-defined state so the > driver has to rely less on the bootloader to do things right. > Unfortunately it also sets the GSWIP_MII_CFG_RMII_CLK bit without any > possibility to configure it. Upon further testing it turns out that all > boards which are supported by the GSWIP driver in OpenWrt which use an > RMII PHY have a dedicated oscillator on the board which provides the > 50MHz RMII reference clock. > > Don't set the GSWIP_MII_CFG_RMII_CLK bit (but keep the code which always > clears it) to fix support for the Fritz!Box 7362 SL in OpenWrt. This is > a board with two Atheros AR8030 RMII PHYs. With the "RMII clock" bit set > the MAC also generates the RMII reference clock whose signal then > conflicts with the signal from the oscillator on the board. This results > in a constant cycle of the PHY detecting link up/down (and as a result > of that: the two ports using the AR8030 PHYs are not working). > > At the time of writing this patch there's no known board where the MAC > (GSWIP) has to generate the RMII reference clock. If needed this can be > implemented in future by providing a device-tree flag so the > GSWIP_MII_CFG_RMII_CLK bit can be toggled per port. > > Fixes: 4b5923249b8fa4 ("net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits") > Cc: stable@vger.kernel.org > Tested-by: Jan Hoffmann > Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Looks like Linux does not have a standard device tree flag to indicate that MAC should provide the RMII clock. Deactivating it is probably a good solution. > --- > drivers/net/dsa/lantiq_gswip.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c > index a416240d001b..12c15da55664 100644 > --- a/drivers/net/dsa/lantiq_gswip.c > +++ b/drivers/net/dsa/lantiq_gswip.c > @@ -1681,9 +1681,6 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port, > break; > case PHY_INTERFACE_MODE_RMII: > miicfg |= GSWIP_MII_CFG_MODE_RMIIM; > - > - /* Configure the RMII clock as output: */ > - miicfg |= GSWIP_MII_CFG_RMII_CLK; > break; > case PHY_INTERFACE_MODE_RGMII: > case PHY_INTERFACE_MODE_RGMII_ID: