Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3773940rwa; Tue, 23 Aug 2022 09:54:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cpyjZmXbBF5P4FZ+F5hn268QF+Y95ZPBW8YYyF0BDhM6ZqONPUy8+nyzxDScd+mcPuuh/ X-Received: by 2002:a17:90b:4cc7:b0:1fa:b5c2:4c7d with SMTP id nd7-20020a17090b4cc700b001fab5c24c7dmr4157181pjb.69.1661273655345; Tue, 23 Aug 2022 09:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661273655; cv=none; d=google.com; s=arc-20160816; b=NM401trPvItWMVfqJnu5XzzYq+FqABhE1SFgsMOOulZxAOFTm/F7t34F5ob9ufzW1v ZAbFKpMmyH0eQJOmyRVSG1nR2XMuw+P/RO3j0UiQgnRZRUfw1xt8X47Gy2OttdB6ysUV +XUYaEvg5PYFVt50Fxs1CfDN5BXQarya8hXqawH/kIh4RYZeithIMMunym9vDthnHWLv cM0ylWxHDqyoAoCZSci9Uzz72sgF1VCF5yOpWpvRi2mMHKd8Itf0VtYyTkrVuwoOnFdh sdLqmwhateXt7T3A3U2+bwIz7TqAugd+MmvMBkYtyipYgpV3QvC8FRdh+rsEBsyQlBjz 8Ymw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Ogh2atKJ9UodHmzEsteEl10kYw0tZ8eyotdKvJ4XPig=; b=LOpZtdPbUxsdF3Wto9RmKr04VzcD4Y14/lNFzit3+gB244clcXvjOe9CsAWoxzI6E/ hYIM3IxVQ42a5M+ns59d6Bx0OnnyQXiFnVoFBli0M9LFDnDxFHV7POLZjbUSFLiAnqOF fcZoi0qHICIEuSDv60rMj8BZhLW/HDQk6y0qqpUQX5OdT9sw/IuozRFHPLcElZCD5J1z bn2saz+Le5MEKX+yHtdAWpLWNHkBCWsf/Sz2vpOu9XDpLdM6nZSI18TeRcyBaejjnnv6 TtL+K76+NOi4bTSBLejeSZDpDeOTwvugOq0GUkVc71Npwkrh4khqO2GeN5FmMI4cq0aL j89A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@fe80.eu header.s=20190804 header.b=PQDiMIx1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fe80.eu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a170902e85100b0016c512176adsi9076529plg.576.2022.08.23.09.54.04; Tue, 23 Aug 2022 09:54:15 -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=fail header.i=@fe80.eu header.s=20190804 header.b=PQDiMIx1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fe80.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242150AbiHWQrP (ORCPT + 99 others); Tue, 23 Aug 2022 12:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245528AbiHWQpc (ORCPT ); Tue, 23 Aug 2022 12:45:32 -0400 Received: from mail.base45.de (mail.base45.de [IPv6:2001:67c:2050:320::77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A353DC9935; Tue, 23 Aug 2022 07:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fe80.eu; s=20190804; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ogh2atKJ9UodHmzEsteEl10kYw0tZ8eyotdKvJ4XPig=; b=PQDiMIx1UJ2L7XoqAxhusxDWVz gMWWp3i8+t735BmFt1n250F5qFXi6++sLQh5PTZFV+zWzAW3e6OdTRW57nGThUkk2s2RYxu3gCQCr GB+BYz467FN3Xv66JEKizLzLH/CkqsBx7JTRbj19yi1DReYwCkNoBudvNe2CdYhng9415CR9aM1sy yX2cvDqT7fY1TWdMA8SoxkKLmitSUw8ZwE9OOq8LmfDG0Yjuh1waoe6tc+vXNC/Pc/6Gzcz2R0cne AHxqbZAPlkvFtXAEV7kqZ+XUUKTkpOTXQ039ceSDKQYlJXhuNdwxPyN/mu1uKLYmTHsMmCzmTQOpa S2TdN52g==; Received: from [2a02:2454:9869:1a::98b] (helo=javelin) by mail.base45.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oQUwL-00HVMm-2u; Tue, 23 Aug 2022 14:31:37 +0000 Date: Tue, 23 Aug 2022 16:31:35 +0200 From: Alexander 'lynxis' Couzens To: Paolo Abeni Cc: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Matthias Brugger , Russell King , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Golle Subject: Re: [PATCH 1/4] net: mediatek: sgmii: fix powering up the SGMII phy Message-ID: <20220823163135.013ec257@javelin> In-Reply-To: <6f147fbd31980c6155ea6e7deba26d8210ed6afd.camel@redhat.com> References: <20220820224538.59489-1-lynxis@fe80.eu> <20220820224538.59489-2-lynxis@fe80.eu> <6f147fbd31980c6155ea6e7deba26d8210ed6afd.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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, T_SCC_BODY_TEXT_LINE 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 Hi Paolo, > On Sun, 2022-08-21 at 00:45 +0200, Alexander Couzens wrote: > > There are cases when the SGMII_PHYA_PWD register contains 0x9 which > > prevents SGMII from working. The SGMII still shows link but no > > traffic can flow. Writing 0x0 to the PHYA_PWD register fix the > > issue. 0x0 was taken from a good working state of the SGMII > > interface. > > do you have access to register documentation? what does 0x9 actually > mean? is the '0' value based on just empirical evaluation? I don't have any documentation which describes 0x9. The datasheet [1] only contains the PHYA_PWD (0x10) bit and the initial value is 0x10. 0x0 value is based on a register readout without the patch from a working state. I've tested it on mt7622 and Daniel Golle on mt7986. [1] MT7622 Reference Manual, v1.0, 2018-12-19, 1972 pages Best, lynxis