Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1984814iob; Thu, 19 May 2022 21:44:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwie/+6V5yO4KEDvrNxykHpWwC0bbcmiw4NzPBcmGHycJVwhih4AG1rbbiqLrPOzn0SRtKA X-Received: by 2002:a17:907:98c4:b0:6fe:a1e6:eae5 with SMTP id kd4-20020a17090798c400b006fea1e6eae5mr3474435ejc.309.1653021866899; Thu, 19 May 2022 21:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653021866; cv=none; d=google.com; s=arc-20160816; b=SO5LtmwnkUqrrjKkEHlvGkygWLsGkJh0pjvG+93uanh86lqS31JZUooILXwuoM6v2+ F3M3qQUgj1MCUmeh91zfVgDHnDrETcO+spDZjI5DDNp9ZQd03ueyhcz83Eyibr39/oCN xMzN9E7rIr6Ug+f/K9qJKdovLykp7lMOLXTtY3AgU4yYwitVLQVWpMGXJnbdX+n6ARJa ocQw7irSA35fMjg6fljD3VJ7kp5UMs0MqJKyQl+CQMa5YA0d+jnAw3XSlReoX7cWiDLN KVtPNY/29MFNYpVvtPm7OYCXKR8pfDNflREzz/s86rW4S5f9qyDEuZBfGagWvdrbIFrQ ZzqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=30Q8obn7fVx0WpjeIrxqO72NAYu9ZR5ZQbK3CveRK4k=; b=ZdBZ92rlypR2qlELPV5vDKHfkx7Ns21MaEW55pqyjq4hYVN58c9nQGnLJCZi5rbn4t LOYylot9z50wZo8eVz7Jonk5Z8IZ8PZ1VtbVTLT5UDC3K5ApwknZtF2Q6s6sOZoT/dSj 5EDkxaCKH02w1DuX6ddCUeR8ClzDppTfYYe5fNHxusfihGdsk3TKwwTLAQfvgrOcsv6n 8L0wbZoLmNPBvtLDpkg2waUnzd/OWZIG86JMhfRZbSKyR/DXeJF4v10IcgOzkmtQMCLl QdLlBeshOuOT368jh1X1UpwrlYXrawWjfVpHaDK/BMw3VIFBUxyP6wE54dmRZd7E67hz KsXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=X46jRghN; 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 i5-20020a1709064fc500b006f46995d1bfsi4267463ejw.548.2022.05.19.21.44.00; Thu, 19 May 2022 21:44:26 -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=@lunn.ch header.s=20171124 header.b=X46jRghN; 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 S244301AbiESTCL (ORCPT + 99 others); Thu, 19 May 2022 15:02:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244319AbiESTBB (ORCPT ); Thu, 19 May 2022 15:01:01 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66CEDCE2F; Thu, 19 May 2022 12:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding: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=30Q8obn7fVx0WpjeIrxqO72NAYu9ZR5ZQbK3CveRK4k=; b=X4 6jRghNiloLNde3Ixf8nY/PsgQKrP85prblbwpt2r8ltCQs6FBwo0H5PvuWb8/fp3KJfGPbv4cWXoG b0EosV+i7WComxN0hci1jQlpKb5zCJMNlVfhcn/+hMTJqU3t6ZddVbs9rJS3EprMPzMDsOqcSGct1 OkYumOZvk0CGC1k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nrlO4-003X2h-Bo; Thu, 19 May 2022 21:00:40 +0200 Date: Thu, 19 May 2022 21:00:40 +0200 From: Andrew Lunn To: Michael Nazzareno Trimarchi Cc: Tommaso Merciai , Alberto Bianchi , linuxfancy@googlegroups.com, linux-amarula , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev , LKML Subject: Re: [PATCH] net: phy: DP83822: enable rgmii mode if phy_interface_is_rgmii Message-ID: References: <20220519182423.1554379-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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_PASS,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 On Thu, May 19, 2022 at 08:29:26PM +0200, Michael Nazzareno Trimarchi wrote: > Hi > > Il gio 19 mag 2022, 20:24 Tommaso Merciai > ha scritto: > > RGMII mode can be enable from dp83822 straps, and also writing bit 9 > of register 0x17 - RMII and Status Register (RCSR). > When phy_interface_is_rgmii this mode must be enabled > > References: > ?- https://www.ti.com/lit/gpn/dp83822i p66 > > Signed-off-by: Tommaso Merciai > Co-developed-by: Michael Trimarchi > Suggested-by: Alberto Bianchi > Tested-by: Tommaso Merciai > --- > ?drivers/net/phy/dp83822.c | 4 ++++ > ?1 file changed, 4 insertions(+) > > diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c > index ce17b2af3218..66fa61fb86db 100644 > --- a/drivers/net/phy/dp83822.c > +++ b/drivers/net/phy/dp83822.c > @@ -408,6 +408,10 @@ static int dp83822_config_init(struct phy_device > *phydev) > ? ? ? ? ? ? ? ? ? ? ? ? if (err) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return err; > ? ? ? ? ? ? ? ? } > + > +? ? ? ? ? ? ? ?/* Enable RGMII Mode */ > +? ? ? ? ? ? ? ?phy_set_bits_mmd(phydev, DP83822_DEVADDR, > +? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MII_DP83822_RCSR, BIT(9)); > ? ? ? ? } > > > > Please define bit 9 and this break other connection. Introduce again the switch > for phy interface connection Hi guys Please try to perform your own reviews before posting to the list. I agree with an #define for BIT(9). However, i don't understand what you mean by the rest of your comments. Please make sure your colleges understand you. Andrew