Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3547067rwb; Tue, 16 Aug 2022 05:10:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+ds2teQGzDMCXkVx2vDCMiHxreGpGXsFRQxrvI/9AMXGSFgiZ2pVoyMjH2Lj3BpapEEKJ X-Received: by 2002:a05:6402:51c6:b0:43d:dd3a:196e with SMTP id r6-20020a05640251c600b0043ddd3a196emr18505290edd.213.1660651817498; Tue, 16 Aug 2022 05:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660651817; cv=none; d=google.com; s=arc-20160816; b=O5Bw2ksD+tDoE3u2gdESWJITFRlOtrZxdsIr0dt0U0gvklaHXlNWyHh8C5Tp1GiCjb qr7BS8QUGTuXFBS31rO9OKPVDK1WklFt4yLsikZbdsvuSDBjDocD0hBYo08x2i5THyZ2 RbL6cI7a58F5ycI8Gly4d5qXSIFizfutUkEEDqTnq7nDCEXjjilQkPYwH6mJh0Aa2Mdm NLNc2bnzbhgqJWgb9jT8EmJqS+12bLukXMz6xL7+J/W9Sn2Lmpin30+3kSVjqQDaP9ut DqeEODTQmUSeenlQoMoWASF3kFN7RaW8yvo0QbD/Wb3HpyYPYgfoebv6eFvmFZDOXsJj fF0A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0PwUiz2cZ6J2ZE4+k54D/cPS4GO274f8vuj7tTp6RnQ=; b=0EuE6yPL/QdzJ03DZvvQJ8V7MInk3p49nI+Y6+pFEe2xr4h/rLmOTChoCcSwnA6Rj5 N9FCBrtc8qtJG8defY3I6IlBTBUy3waJH0C+rbjGvZ44WxZ/HPDJuQLiIau+k2HiKIAZ 50V7J75OQNndN3lNwli1852m+xxhIMqX0KB7sD4uWlW3Zx+4PtHIenbSulv26MEvQqzW Jfp9+za6OpsoHsgaf0syOL+g+M7bl20L6V1w9ogeX9VPPJCj+Io/a0jwi6bhZJoa77gC 8j9r7nJwsJnHvSmBPkw6f2DkSWGjuIzwHGdCdcknMx6Tw3r5aJbKzYOhSPOQfkQneWJB HDpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=eEzpxSwU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js22-20020a17090797d600b00731646d634esi10561365ejc.802.2022.08.16.05.09.45; Tue, 16 Aug 2022 05:10:17 -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 (test mode) header.i=@axis.com header.s=axis-central1 header.b=eEzpxSwU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233997AbiHPMBM (ORCPT + 99 others); Tue, 16 Aug 2022 08:01:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235424AbiHPMAg (ORCPT ); Tue, 16 Aug 2022 08:00:36 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6DBCA2866; Tue, 16 Aug 2022 04:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1660650349; x=1692186349; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0PwUiz2cZ6J2ZE4+k54D/cPS4GO274f8vuj7tTp6RnQ=; b=eEzpxSwUQW2HhH1j9RdkArFphB/ZwBjtX1b48V4nFRbVe9LNOdAS8CT6 9aqzYneMVnbhLMn2JJBXV5dG2boPtIZ74XGOjE4V347qMNeUbwAjQvqVX VUacou23TEiXAX4BtYg99tfw0wXcQ0RUKPLUJqtMP1n3PoigRkH9YVjPJ jO8tsxXeFgWZBb7UN/My3Jvsv4Cb6acjo46lA4RfIffgT8ZqFkaxZ58Kf rkGDSlFfYKWoPm7kJfNQJqZ1jjioqZY6hkCBRqOxT1vpj71A1gV2mX4du 1F8yhk+dGcNtG9p2hfde2nTIJ4mE6/ga65IdcN41Uh2/mwklRlZaBwg1h A==; From: Marcus Carlberg To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: , Marcus Carlberg , , Subject: [PATCH] net: dsa: mv88e6xxx: support RGMII cmode Date: Tue, 16 Aug 2022 13:45:34 +0200 Message-ID: <20220816114534.10407-1-marcus.carlberg@axis.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Since the probe defaults all interfaces to the highest speed possible (10GBASE-X in mv88e6393x) before the phy mode configuration from the devicetree is considered it is currently impossible to use port 0 in RGMII mode. This change will allow RGMII modes to be configurable for port 0 enabling port 0 to be configured as RGMII as well as serial depending on configuration. Signed-off-by: Marcus Carlberg --- drivers/net/dsa/mv88e6xxx/port.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index 90c55f23b7c9..2e005449e733 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -517,6 +517,12 @@ static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port, case PHY_INTERFACE_MODE_RMII: cmode = MV88E6XXX_PORT_STS_CMODE_RMII; break; + case PHY_INTERFACE_MODE_RGMII: + case PHY_INTERFACE_MODE_RGMII_ID: + case PHY_INTERFACE_MODE_RGMII_RXID: + case PHY_INTERFACE_MODE_RGMII_TXID: + cmode = MV88E6XXX_PORT_STS_CMODE_RGMII; + break; case PHY_INTERFACE_MODE_1000BASEX: cmode = MV88E6XXX_PORT_STS_CMODE_1000BASEX; break; -- 2.20.1