Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1089347ybt; Wed, 1 Jul 2020 18:37:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVeL31G/qsfeql0Zf9U5ipwLgyIgbzRv800m0qzVNJ+1l30pSC8AkFDPa5aZ5L0bub04n4 X-Received: by 2002:a17:906:fa9b:: with SMTP id lt27mr24629215ejb.513.1593653874725; Wed, 01 Jul 2020 18:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593653874; cv=none; d=google.com; s=arc-20160816; b=H5HbsbpMbqhJcupLwJdHJRkt1huqJr/EDE3SlMbUmhVoFaYQi5OW0t6l4qpfVQf6S7 Z0rd8vxuvmbmO8bSuF4EBCb04gR/naXrcDwFFv2LwUmV4qvF+n1Ah6owMK2eVJz+3uIA Str0MUB11uR865ymnAJIHR57bOCkSY0f6Sl01KkZ3kGmRmQwSbslfHjrRwFl8/WIROwo FVrT+dTROGle63/zraCxXIkU6DuqJYCn0GuBMNboeJ3aODcYP6rRTLimbb17AxpVnWAS 9Txe2nDyCoURIbJqiqp9Jh8678vbQn7EK5zLFza8WGw2QFINNYZU1jBH1AZrLJ0mMQEt jz8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PD3DRRSLAFiAT2JS/gtfwceJKK5SMF77hlgm3mfwDAU=; b=f22LBkmghHRppdyJqZ0sxWDTOYJ8ZEh2wUCVUMVAwU5YAR1f4+lDGHKfcMd8RG8nEn nzLAeZnGlRuCbFqZSkYjBiGX4eniTIfuRe3kfLz8XRyqQxQzUPTUDUMRmqdsVjJu0w4D 2/VyzpQIMP9Mnc2g3FplJc1IbuJ1OEf0bl9JVvzTa47ajqzmoItfaEvxrtCZwQvBP/8u Gm/uobNjHOQBtaqfak+nJK08v3WbhXVtF6FtttJ+qJHo78kwHX0KqoSpz6Jdj5KeWQIE y2RVt/QctTQpdJLBWW90PBhD4ct55yb4VkOPu6RRAAM4BYYEbz3mCaSLV3MVZ8MRzQ9b moxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yy3it853; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z27si5462450ejl.277.2020.07.01.18.37.31; Wed, 01 Jul 2020 18:37:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yy3it853; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728681AbgGBBft (ORCPT + 99 others); Wed, 1 Jul 2020 21:35:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:53954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728316AbgGBBXY (ORCPT ); Wed, 1 Jul 2020 21:23:24 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1C5720748; Thu, 2 Jul 2020 01:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593653003; bh=KWQ4e3p+UIInG0QsWaTKjw4uJUmUUZQzFdKT60LPMKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yy3it853cghdNRbF9XTBt2aPNvrQfUClzx4xpBjFSWdHCtVHpo2YFxAR5+R29gSHw KMYk9ms4sns9EdfEoYwGuWSXaMs9ue1i3h1pqBANBZjO+Kp0w1+5txJumekHhqF21i CE4PE+GM2fKr4TSsI4yzYPrqJs+CuJTtDVaLgK7I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sascha Hauer , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 23/53] net: ethernet: mvneta: Add 2500BaseX support for SoCs without comphy Date: Wed, 1 Jul 2020 21:21:32 -0400 Message-Id: <20200702012202.2700645-23-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702012202.2700645-1-sashal@kernel.org> References: <20200702012202.2700645-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sascha Hauer [ Upstream commit 1a642ca7f38992b086101fe204a1ae3c90ed8016 ] The older SoCs like Armada XP support a 2500BaseX mode in the datasheets referred to as DR-SGMII (Double rated SGMII) or HS-SGMII (High Speed SGMII). This is an upclocked 1000BaseX mode, thus PHY_INTERFACE_MODE_2500BASEX is the appropriate mode define for it. adding support for it merely means writing the correct magic value into the MVNETA_SERDES_CFG register. Signed-off-by: Sascha Hauer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/mvneta.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 401eeeca89660..af578a5813bd2 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -110,6 +110,7 @@ #define MVNETA_SERDES_CFG 0x24A0 #define MVNETA_SGMII_SERDES_PROTO 0x0cc7 #define MVNETA_QSGMII_SERDES_PROTO 0x0667 +#define MVNETA_HSGMII_SERDES_PROTO 0x1107 #define MVNETA_TYPE_PRIO 0x24bc #define MVNETA_FORCE_UNI BIT(21) #define MVNETA_TXQ_CMD_1 0x24e4 @@ -3558,6 +3559,11 @@ static int mvneta_config_interface(struct mvneta_port *pp, mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO); break; + + case PHY_INTERFACE_MODE_2500BASEX: + mvreg_write(pp, MVNETA_SERDES_CFG, + MVNETA_HSGMII_SERDES_PROTO); + break; default: return -EINVAL; } -- 2.25.1