From patchwork Wed Jun 19 18:45:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13704442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 778A5C27C53 for ; Wed, 19 Jun 2024 18:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SJn78QxgCMJZC/Bt30akmrrLqCYwQcxiOnm8hqmwEKA=; b=FR1bevYE1icJL+EuZfR6NjihWL Jny95Fhtk6PMn+kejpjHbzj51CH+I3m6SZn2uXPbC0QEsX6n7xj1zUSdEUbDfPdQAfrI3Gb2EkoDk yL+nDES9Oepm75MahYopvAKtKSxsqHlr9Uywi0mUGrCt4S67PbLYvIry5uOyM2A9j1V78QzQSn9TT E6RpXfQjPyjh1QJEOiLBQEhmlK49lsUfWOgSfOmeDsN1vhJiotYVZqXmMbVYZgCGVN+2AAe8T2bgG 2CYPIqnb7Unq0BQC+aZjuPzMrI9BWTYtZgWxwKdfE7g7kJQO6zryl41YAiJyafKa6aXppSULBWEjf +aWf3M/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sK0Jy-00000002QXK-2dkT; Wed, 19 Jun 2024 18:46:14 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sK0Jq-00000002QRu-0uvA for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 18:46:07 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-36336aa7ca1so79142f8f.1 for ; Wed, 19 Jun 2024 11:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1718822764; x=1719427564; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SJn78QxgCMJZC/Bt30akmrrLqCYwQcxiOnm8hqmwEKA=; b=ETk8dMrl5BGvOZdw/zycRb0zY/24CqFplvj/68gpc45OVp5mmLvCklp2YzXz3kJB8J OwVeCoCpUP+twB1Rto7fEHrlzm0p0CkDBWY6I+i8Rup0n0uFH6doCO2ctozUcfvU67HI rNeLfmid5kZYi+SYX3YWwZbGiqpSkM9mCcRM18s4vSviFYajtgGx0UQFXQJBTQcwMccO /Zn73eBZtpWRDjFZfTymZmODF8tXajVUnxTJ4Hleg68Lx2W68kzsvxkyyFKtTq/sbijc CmLxdIGQ616inMxx9K0jKqyZGn8OMdRrGD5qjaQ/L0f7Rqw+SHY/gR911tk4f3IC1xGt pk8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718822764; x=1719427564; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SJn78QxgCMJZC/Bt30akmrrLqCYwQcxiOnm8hqmwEKA=; b=po8xeD2ldd+19jLR3sZokdNK9tH5htAnIq2PUV/AI73o8hg5NF3wGBS6tNmgYR5v8i 4nYlSBEWItTBveUfyRDj4Ky6HeM6Au5Zj4OdiA5IayIrnWYJCsNt6sPhy8Qi1tMywvQn 3eP1JJVT46CF3nh66qHyA8nl5ZgMlg7yF00oTDWHc0aHsnhi3v68DmFBsAwCsC9BXuWv 0wbunk7IT+0VPj0oAJAmLAWJUKsAOQbvn5qfvIrgtMzRAgbRhxcftEhLE47kmdJ1X+jC JjxnJMHxomfyjtxjqEGbU0tjuqN/XHA2RlDKF3wQRApXddD7UpAfoIHEv05i7aEeVLoz woIg== X-Forwarded-Encrypted: i=1; AJvYcCXbXGE0cd3wf4GMWrAX6TTYfRKCIM8NBAMlt+dqLNuF9P7/XD/0fSbcrj7OAcSSp/tH3xzjob2acyfU0qLBOX1qEagCpNByzUxdJcVf88qg06jEtwA= X-Gm-Message-State: AOJu0Yyc9UE+4iwG4qtmAIwlKZ0MzcV1/e5J8u3gEKQBas6Lc9vw+g8i gzYVqJh/jOk9DR5s46O8+0J25TRSFG7gTBiTxhuzhGGD8jufIFmuB9d3cZqm+vw= X-Google-Smtp-Source: AGHT+IGvNKdudrDJsFCz+vta1snIK9cUncMqGFnepCueFTkJUGgeHU0mX5Ge8h1gAZtVNK+LZc9FoA== X-Received: by 2002:a05:6000:1363:b0:362:dbc2:9486 with SMTP id ffacd0b85a97d-36319c6f86emr2312112f8f.68.1718822764283; Wed, 19 Jun 2024 11:46:04 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:991f:deb8:4c5d:d73d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36098c8c596sm7594156f8f.14.2024.06.19.11.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 11:46:03 -0700 (PDT) From: Bartosz Golaszewski To: Vinod Koul , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH net-next 2/8] net: stmmac: qcom-ethqos: add support for 2.5G overlocked SGMII mode Date: Wed, 19 Jun 2024 20:45:43 +0200 Message-ID: <20240619184550.34524-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240619184550.34524-1-brgl@bgdev.pl> References: <20240619184550.34524-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_114606_306208_778AC86E X-CRM114-Status: GOOD ( 11.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski Add support for 2.5G speed in Overclocked SGMII mode to the QCom ethqos driver. Signed-off-by: Bartosz Golaszewski --- .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 80eb72bc6311..dac91bc72070 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -665,6 +665,14 @@ static int ethqos_configure_sgmii(struct qcom_ethqos *ethqos) return val; } +static void qcom_ethqos_speed_mode_2500(struct net_device *ndev, void *data) +{ + struct stmmac_priv *priv = netdev_priv(ndev); + + priv->plat->max_speed = 2500; + priv->plat->phy_interface = PHY_INTERFACE_MODE_OCSGMII; +} + static int ethqos_configure(struct qcom_ethqos *ethqos) { return ethqos->configure_func(ethqos); @@ -787,6 +795,9 @@ static int qcom_ethqos_probe(struct platform_device *pdev) case PHY_INTERFACE_MODE_RGMII_TXID: ethqos->configure_func = ethqos_configure_rgmii; break; + case PHY_INTERFACE_MODE_OCSGMII: + plat_dat->speed_mode_2500 = qcom_ethqos_speed_mode_2500; + fallthrough; case PHY_INTERFACE_MODE_SGMII: ethqos->configure_func = ethqos_configure_sgmii; break;