Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1844783iob; Thu, 19 May 2022 16:31:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMFO0HDgO1B3WnZd/x1i9TFtj8+0YN0kflDszEg/LtZEzgumZKAw51FD3Hfd4Xc3PYBnZj X-Received: by 2002:a05:6a00:1f0d:b0:518:3c8d:78b1 with SMTP id be13-20020a056a001f0d00b005183c8d78b1mr6388108pfb.23.1653003075965; Thu, 19 May 2022 16:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653003075; cv=none; d=google.com; s=arc-20160816; b=mrApbQfbHMatWNSp/EDGWSRiONnkgcasLvU7JZIYe5k8wK+2hldkHxAVWCUECBzt2j 8CRH1TS+lztbsOn8zkua76KS87MNH53WdP4b15+NU4LPVIQcNv6Ek0sFMkfY31VO2F6Q dzErfd4rs9Bp1GsUQytj9R3hx5tPmJCBdHz+eE+OaSH8INnbAkGU3SNIEdrfw9az74dW J4R5j1MD6DFegTIDyHPMe6VsfyBgjwY0/82fs2ZPdcNzZ6BJ9XT3nFklf5xWOSwmIlbt qcG0ghGh0mKtk4+MV7P9EQunENtfbJDNuh81vM0krp1GXSY4efONCGP0xKtqDpJjIXOr isDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=0zXiDiE6F3yYGhahJvZZTWKFFsEbzGr9QORv3wWtDJQ=; b=nv+J5NENmT/vW2IgiuC196JSq7d/eBc1fb7aLUvuIPMJDrlK/+cVm6LIeaLk8DXDsd ip14qA8RhgLQnlMsqX05Zh1vbaKAHxCijnjB0Ekg7xhHQF7oIgUEwtJvPGCdvCKYRPW3 RjXSJYCLh3kXaXvHi7JEgBiY94M26WADM0Y478Vlua3qakjnRYowtMoSLv+PnKDb3+Lw ANBHN7+36Ccb2op5Xw/HJhkv+ZXLNx+iARjV5QSTVzX+DQNS80LWQy4XbdRz8Faw3KYT LrcyXrsyxRMblDUF/2EE3QCTwK2pNz8z7IpVNc/4hEEI4H+mRjTOItHogtusIc9BUjt0 rlxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@amarulasolutions.com header.s=google header.b=V8wIWjQy; 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=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj3-20020a17090b344300b001d98efcb4dbsi976249pjb.186.2022.05.19.16.31.05; Thu, 19 May 2022 16:31: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=@amarulasolutions.com header.s=google header.b=V8wIWjQy; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243837AbiESSYd (ORCPT + 99 others); Thu, 19 May 2022 14:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243186AbiESSY3 (ORCPT ); Thu, 19 May 2022 14:24:29 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D1444A0C for ; Thu, 19 May 2022 11:24:27 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id r30so8319373wra.13 for ; Thu, 19 May 2022 11:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0zXiDiE6F3yYGhahJvZZTWKFFsEbzGr9QORv3wWtDJQ=; b=V8wIWjQy0gnRJ9VHvwB+urOZ0vIubT+3rhYgmm5p2O881Y+q62VYVuLxSOO2d8HzKo dgi+Z2Q+pTPSMW7/OU2S8ysoHBOfvYhpdb/8CxJs/2JEUl/QO7JY7ZYu4azf2DKFFgvP 9omkOKGItCBP63Bp7QYszAGr8vt/UYwlfri9o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0zXiDiE6F3yYGhahJvZZTWKFFsEbzGr9QORv3wWtDJQ=; b=oGYOTst6TbMQCGtgBukcFrpy5vpmooIQvx8h1dPooLYpqzISdEJr21zdMtIbtO+Wwv Sc3OJEesnXELvwUI8lvTnZjQD2hr098kxERnDpQvgz/Uva+43FNgi2YhpYb7jsQdiPLB 8YHPtcyOhUSyignHQdatEJddjcHH28VBaawoPx54Z5Ud4a7Ffjst8/gzvZ0AtuvtBLzn KVYOh/WE5+oGdEMmfi+zX5MIGB3IiRHPAfiZxm/UukKk+oT+uMpLwgBQQiS0JdtXO1Cx /uiGoCcPDsTo4A4Pgbxitm+pDtgbO/OODbWaP8+T6C/WFRkFeo+G/q7HQiZxRAQwbfSg G6gQ== X-Gm-Message-State: AOAM533oPMNSyLTRVwkiCZCDxEcbRhc36eraQ9eu6rTCUG+8OwtNehyz XQtnxbFQQF6yDFJj02rDl4wxfA== X-Received: by 2002:a5d:5888:0:b0:20d:270f:6b61 with SMTP id n8-20020a5d5888000000b0020d270f6b61mr5133314wrf.211.1652984666107; Thu, 19 May 2022 11:24:26 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-154.cust.vodafonedsl.it. [188.217.53.154]) by smtp.gmail.com with ESMTPSA id y7-20020a05600c17c700b003942a244f45sm183796wmo.30.2022.05.19.11.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 11:24:25 -0700 (PDT) From: Tommaso Merciai Cc: tommaso.merciai@amarulasolutions.com, alberto.bianchi@amarulasolutions.com, michael@amarulasolutions.com, linuxfancy@googlegroups.com, linux-amarula@amarulasolutions.com, Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: phy: DP83822: enable rgmii mode if phy_interface_is_rgmii Date: Thu, 19 May 2022 20:24:23 +0200 Message-Id: <20220519182423.1554379-1-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)); } if (dp83822->fx_enabled) { -- 2.25.1