From patchwork Thu Jun 27 11:39:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13714257 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 A8154C30653 for ; Thu, 27 Jun 2024 11:40:40 +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=sxu9SpdSTVz3ebvxMLh70e0y0HDyyRtIxZX5+1VZmbE=; b=Dgjs3WQO5r4srzTwjuRA3ZBo2s AUy1pRrid8MnMvHTzEr70SnAnOte5bGaYxHezKXZN6NivNjDX5B0W1sXVGEO5rMk/rP4sd78kafzB 8Umk5d6KoR31l9YSAWsCEajsHtRrUzBFucrk6J9u2vvceATwdL/SGan4fTEzfoQ7QfDNbDxeh9G0b Cno8y56ofuePVRygjCEli8HvOl483Burlwuf169vjg4nrS2ofTrn7GUXfDEfEzn4vGWE1BtBzy4k+ QJp9bFgKm/ZofMpByRWMpdj+/UoAo2WpPSLB4t5/RSnLFUvFwy1naNJu5WwJ3wro4r9kFZrcSgbkn xKesKBFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnUM-0000000ABqW-1s1H; Thu, 27 Jun 2024 11:40:30 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnTw-0000000ABiX-08q3 for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2024 11:40:14 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ec58040f39so53343041fa.2 for ; Thu, 27 Jun 2024 04:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1719488397; x=1720093197; 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=sxu9SpdSTVz3ebvxMLh70e0y0HDyyRtIxZX5+1VZmbE=; b=ENL8L3j+heULEHJqLdMgVHrsq+E0wgR46PSIYe1Zk7eDHiLRLMcarfXTbJp5MgDLdy o6tZzD4Qohp0o6oI75vyAYfExnv58g4kgPzwRQNrJe4AZqDYr2QWdvwbLUguxxnK0pmY eEDC2mTLQG3wHaEr6LOK8zdzZOJF2QEwcx6B+NvLrXxiyCG+PE0jzDOlSf6035OAz/+m ef+G11qnWhj2LfayjvreJSqmAyt6iOyCum6w7N2kyEJjgqqt8PEPMZb/UDdx6mNmycto qkx+MABBHY9nirQAWpUsxfOiTE0axgSTXHs6+VIRZDTk2a1iBdxdrlqU+nbIjGbEQ2Q/ W1bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719488397; x=1720093197; 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=sxu9SpdSTVz3ebvxMLh70e0y0HDyyRtIxZX5+1VZmbE=; b=T6G9PMIt6T53v9KeH0OX8+V6B6aYvd8auK+IaaVIUy0YSLNGdrJqno6ahXnswQ6grW rOpgXapjD3m9cqqKHKBQue+0IDuEJgtup7tvVD1aTQt0n+hCj+hD/a4S+sSsNN7DRngf CXmK5lAwmHGytqOggde1bgwqHcxPgS2qh5gY4hIS88Xt5PddVyadJjBr7UJDd2Ubp8Iu NMuOiRTL7+s3is2r7h6s6qXY7IDeWNTVUBNGmJVgwsc36G6+MI8nZWVE4S99fKgxIaXT KptUzidOUXXZnKVU+8bHq9PWiKIh26xt6F6VdBTIk5bumvhPAZNiI66lK9l+Zgo86KWK oTHw== X-Forwarded-Encrypted: i=1; AJvYcCVlv9ktLrPuFlGQyPLatUolqebZRFmRLk5iWn8Gg8+QSrpzhQvt7U45zkV1t+V9li56Tt5FycPZtMH4YL93Okk1qj4L1nbt7E5FuloadHy3jhifnfw= X-Gm-Message-State: AOJu0YzqSCxKZ0AxglNJskeedsqiENpeKQwMmtJe/w9GWRD9gKw0hbgK rIWGwfdWxreykcGQv7dPkh919TMjg1nNj+MfLF/QKg9DNr7xma/RSJ/H03Bl4TE= X-Google-Smtp-Source: AGHT+IEX942vNvyHTmy9tspQQQL/qKLX+sbQ4RkDTe+pTb3TOEUopxyuIw7WbECrr/t329Hui5TQGA== X-Received: by 2002:a2e:8047:0:b0:2eb:ed3a:9c65 with SMTP id 38308e7fff4ca-2ec593d93a0mr77254481fa.15.1719488397179; Thu, 27 Jun 2024 04:39:57 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:7fe5:47e9:28c5:7f25]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c8468613sm62081815e9.39.2024.06.27.04.39.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 04:39:56 -0700 (PDT) From: Bartosz Golaszewski To: Vinod Koul , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin 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 v2 net-next 1/2] net: stmmac: qcom-ethqos: add support for 2.5G BASEX mode Date: Thu, 27 Jun 2024 13:39:46 +0200 Message-ID: <20240627113948.25358-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627113948.25358-1-brgl@bgdev.pl> References: <20240627113948.25358-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_044004_691648_B521853A X-CRM114-Status: GOOD ( 11.79 ) 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 2500BASEX 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..91fe57a3e59e 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_2500BASEX; +} + 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_2500BASEX: + plat_dat->speed_mode_2500 = qcom_ethqos_speed_mode_2500; + fallthrough; case PHY_INTERFACE_MODE_SGMII: ethqos->configure_func = ethqos_configure_sgmii; break;