Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp434894rwe; Fri, 26 Aug 2022 07:41:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR4dEWhT6Ny/M9UTSQzbeOuJd17EwjiY/HEEPKuqqKarwDMzn/rDNz6nC+u+iHhJUjBm39uB X-Received: by 2002:a63:6c49:0:b0:41d:e36b:1e4a with SMTP id h70-20020a636c49000000b0041de36b1e4amr3517752pgc.300.1661524897503; Fri, 26 Aug 2022 07:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661524897; cv=none; d=google.com; s=arc-20160816; b=ewkQzo54kNIm3JI4Oz2Q/JzE/XDgi8FbV7pTcYPeGcoF2idwwXBf0W+bnTnU1DXh3H wAhW/hIMkDtUiao2Zplh9Xqi0j/SBbm2Ldimu4uudcZtkx+zIhWh+e1lweNaOjCjb6vq KCPeAOVqw9ZF9e9nEgwchybnXIZDufQRmdwAV2KoonkWo5iSbZ7m077oL31PptGsXQwo 4EQzkE9tM3THhVGaXlgOge8IRgVbh72/owLuMzrXl4cdJp5EAVF52HrlN8P0YVMnEIXW +6guwrNBPLImNnH+uOimYoMtvaG0UZfLZA7DKkQKMem6zoVE2GSgTaRHKP+oFF+V+BBq pcOA== 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=EBGcmPPjqpaDTKplW8ZCyDWmnpPadRiKMDQ8Yx3Y624=; b=j/MaZbHZOzrUBKpqL6diS7OOsSdIBNyXtRllCOIPbnyDPG9HDI9Vb32nJ9AXhnl73I VEVLjLh/iso9H5u3JeEj1/OeXzu8gK9E8g2vjrqC1tIXkUbrL93xG17JPsUX3ZuZNMKC 5B4HOybV+Rhy0x9GRyQVRjc+UaEmg57O0bzyMIGFAtinmLIkFHcKkO88IfTjEVFFHiii Luyg37NNCOsLrSs2/XtHV7cPrkcDQHA3Qxqk3zFp7Dno24cSHO3nlrxVOGCNa/cchTKP oEbTNBjP0EZ4mnInpIbUELQklnEdYQcvT0H9Z/phhYg85htWn763YXoLaEC2tNgw4kGp w2zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=I+1WcXCD; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn1-20020a17090b38c100b001fafaf2e8fesi2050100pjb.104.2022.08.26.07.41.25; Fri, 26 Aug 2022 07:41:37 -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=@bootlin.com header.s=gm1 header.b=I+1WcXCD; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239758AbiHZORl (ORCPT + 99 others); Fri, 26 Aug 2022 10:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbiHZORj (ORCPT ); Fri, 26 Aug 2022 10:17:39 -0400 X-Greylist: delayed 92614 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 26 Aug 2022 07:17:37 PDT Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BF579C206; Fri, 26 Aug 2022 07:17:37 -0700 (PDT) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id AC2BD60005; Fri, 26 Aug 2022 14:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1661523456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EBGcmPPjqpaDTKplW8ZCyDWmnpPadRiKMDQ8Yx3Y624=; b=I+1WcXCD02Og/9KlbaCI7e0UycUKzVan9FO6q6YhhiryYyZQbNbtWV40yBXo6I74lmZPFk znY2lDnSwHcLlAukMAc0VqlpfcFlPZyz8bwZMRZabuTFq+re9lEIzgHxEBx9v6cIYnt3NB nVNn5jaXAj9D6zHy/7/IPmJbuTIX6iNqQDhsUEKoJU6sX9z9kTBd8whv8BKlBextLIDxAB KtZztr5OAO3WYl2JweNqfPaKZgSS3HNx+JGIY4H0sGZpqpkLkTEIXwW0rPkDHqWsEi5PG0 K4yPR1H4tUPPHPQs/vGxXwudS6tTh0a6MRlNkDn5EdCDlPke/n/Vw0tURFX0NQ== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , linux-phy@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Vinod Koul , Horatiu Vultur , Russell King , UNGLinuxDriver@microchip.com, thomas.petazzoni@bootlin.com Subject: [PATCH net-next] phy: lan966x: add support for QUSGMII Date: Fri, 26 Aug 2022 16:17:22 +0200 Message-Id: <20220826141722.563352-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Makes so that the serdes driver also takes QUSGMII in consideration. It's configured exactly as QSGMII as far as the serdes driver is concerned. Signed-off-by: Maxime Chevallier --- Dear netdev and Generic PHY maintainers, This patch should go through the net-next tree instead of the generic PHY tree, as it has a dependency on : 5e61fe157a27 "net: phy: Introduce QUSGMII PHY mode" This commits only lives in the net-next tree as of today. Given the simplicity of this patch, would that be OK for you ? Thanks, Maxime drivers/phy/microchip/lan966x_serdes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/phy/microchip/lan966x_serdes.c b/drivers/phy/microchip/lan966x_serdes.c index e86a879b92b5..d1a50fa81130 100644 --- a/drivers/phy/microchip/lan966x_serdes.c +++ b/drivers/phy/microchip/lan966x_serdes.c @@ -401,6 +401,9 @@ static int serdes_set_mode(struct phy *phy, enum phy_mode mode, int submode) submode == PHY_INTERFACE_MODE_2500BASEX) submode = PHY_INTERFACE_MODE_SGMII; + if (submode == PHY_INTERFACE_MODE_QUSGMII) + submode = PHY_INTERFACE_MODE_QSGMII; + for (i = 0; i < ARRAY_SIZE(lan966x_serdes_muxes); i++) { if (macro->idx != lan966x_serdes_muxes[i].idx || mode != lan966x_serdes_muxes[i].mode || -- 2.37.2