Message ID | 20230519141303.245235-1-alexis.lothore@bootlin.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1276254vqo; Fri, 19 May 2023 07:24:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6aE87KqwVXFsXk4Chg3qIaj7l9jy/xvOZnHFA6eU1V3Xk2Hj2tJ9/SFEZvdW0BFpGLMZ3S X-Received: by 2002:a17:902:ab59:b0:1ac:83d1:9246 with SMTP id ij25-20020a170902ab5900b001ac83d19246mr2124447plb.61.1684506290533; Fri, 19 May 2023 07:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684506290; cv=none; d=google.com; s=arc-20160816; b=t274/EGUPPtWsgGHD09Hs0Agh2EiEgQI2e79nh+bcjc6vWAeC4eE/TaVy3Tr/O3bec r3AGpzPdzAmLJGjzsXlquizkAHoVff7sN07lFojEiUAkFr0dv2+0heZ6taJeltRmRYgW Z7rQIejZOrWI9rwgPjhE4+yZKwXPxFbxk/caRryVZye35Vuq+a4JxfMIUxiDxP40y4U4 y2U2FS3JH9mWc8PlLWFqhEWjsgYobIvKI7G80PbEKuzrpoNI21ghw/14GT4QB4qWIXyU hEaCjYSgAGKK0pAMb1q2d50iLiGts/qvlS364nO3/6rr6xBpscWTop+rvlJrNXZv9/I7 uDug== 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=hNOWLwZhohqqCv++hyHHKNma3nLjTIdFany2731ha0U=; b=dpfwTQ3cRsuXiIqyRYbLNMip6Agnr+g4AHoWM3PL/YXWDx1oLY+G27ZVVT7dcNABGs itzz286Qcf8axBW4LbyiTWJtTU5FmVh7GL1NBow1kwA2ytnwISLZWh55FsCHeadaC14k 0D1Koz7JNYNC1ZXDGO7ozway7Dhk2zUOnireeSfqzRwv75681LZxm1aGbaXgDqeNwUXw lq3Ts/ycPuoj3oAvuIJfFKe8r0z4iYCVkKpKxZyTViDSda7BEYwnG4hRfhrDYMREvVLQ iQ9Ed6YW8KzewjUgNg5ue78JogIGKqQVrMhsUzS4aMfhG9oTlOqWbM001qbaUK6pGfXt jtew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PQx2oP1A; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a170902c40800b001ac939babd7si3966698plk.507.2023.05.19.07.24.32; Fri, 19 May 2023 07:24:50 -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=PQx2oP1A; 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 S232069AbjESONI (ORCPT <rfc822;wlfightup@gmail.com> + 99 others); Fri, 19 May 2023 10:13:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjESONE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 19 May 2023 10:13:04 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D7EC192; Fri, 19 May 2023 07:13:00 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id B6E69E000C; Fri, 19 May 2023 14:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684505579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNOWLwZhohqqCv++hyHHKNma3nLjTIdFany2731ha0U=; b=PQx2oP1A1g1UHKp0oSO4ocOP25FfBY43imsJdUNEXikVPyEyKgFMqUaTXPbK481EZfNaAK xanp4U3sYWNcgc36H5pEf5prYuMrh6cLKkKDSkSPzJvb2nl0U30MaxHWGPEJ+W9r8L7mrB VKdKLJOD4nW3PF7LiILdk8fddZnNilY3+Y4hLotCCfgMXi5WwHNXjffbzyhdIqQxVXMXWq 1xJUrSfogvg6NlFStl9x2dL50IDQwu+xJFedVDvZngjDUKqV1QseR/x+MQqd1g4mHE5Im6 ebRdszPtTgdylld2CKabKbqrH/LgA70jHFllQSaLX0jsVSv+sqBVLKo9dSe51w== From: alexis.lothore@bootlin.com To: Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Richard Cochran <richardcochran@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Russell King <linux@armlinux.org.uk> Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, paul.arola@telus.com, scott.roberts@telus.com, =?utf-8?q?Marek_Beh=C3=BAn?= <kabel@kernel.org>, =?utf-8?q?Alexis_Lothor?= =?utf-8?q?=C3=A9?= <alexis.lothore@bootlin.com> Subject: [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: add 88E6361 support Date: Fri, 19 May 2023 16:12:56 +0200 Message-Id: <20230519141303.245235-1-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766332868031514187?= X-GMAIL-MSGID: =?utf-8?q?1766332868031514187?= |
Series |
net: dsa: mv88e6xxx: add 88E6361 support
|
|
Message
Alexis Lothoré
May 19, 2023, 2:12 p.m. UTC
From: Alexis Lothoré <alexis.lothore@bootlin.com>
This series brings initial support for Marvell 88E6361 switch.
MV88E6361 is a 8 ports switch with 5 integrated Gigabit PHYs and 3
2.5Gigabit SerDes interfaces. It is in fact a new variant in the
88E639X/88E6193X/88E6191X family with a subset of existing features:
- port 0: MII, RMII, RGMII, 1000BaseX, 2500BaseX
- port 3 to 7: triple speed internal phys
- port 9 and 10: 1000BaseX, 25000BaseX
Since said family is already well supported in mv88e6xxx driver, adding
initial support for this new switch mostly consists in finding the ID
exposed in its identification register, adding a proper description
in switch description tables in mv88e6xxx driver, and enforcing 88E6361
specificities in mv88e6393x_XXX methods.
- first 4 commits introduce an internal phy offset field for switches which
have internal phys but not starting from port 0
- 5th commit is a fix on existing switches based on first commits
- 6th commit is a slight modification to prepare 886361 support
- last commit introduces 88E6361 support in 88E6393X family
This initial support has been tested with two samples of a custom board
with the following hardware configuration:
- a main CPU connected to MV88E6361 using port 0 as CPU port
- port 9 wired to a SFP cage
- port 10 wired to a G.Hn transceiver
The following setup was used:
PC <-ethernet-> (copper SFP) - Board 1 - (G.hn) <-phone line(RJ11)-> (G.hn) Board 2
The unit 1 has been configured to bridge SFP port and G.hn port together,
which allowed to successfully ping Board 2 from PC.
Now that this series brings fixes for existing switches, I am not sure if
a split into two series is desirable. If so, please let me know. Also, my
current testing hardware does not use ports with internal PHYs, so further
feedback/testing on 6393X family would be highly appreciated
Changes since v1:
- rework mv88e6xxx_port_ppu_updates to use internal helper
- add internal phys offset field to manage switches which do not have
internal PHYs right on first ports
- fix 88E639X/88E6193X/88E6191X internal phy layout
- enforce 88E6361 features in mv88e6393x_port_set_speed_duplex
- enforce 88E6361 features in mv88e6393x_port_max_speed_mode
- enforce 88E6361 features in mv88e6393x_phylink_get_caps
- add Reviewed-By and Acked-By on untouched patch
Alexis Lothoré (7):
dt-bindings: net: dsa: marvell: add MV88E6361 switch to compatibility
list
net: dsa: mv88e6xxx: pass directly chip structure to
mv88e6xxx_phy_is_internal
net: dsa: mv88e6xxx: use mv88e6xxx_phy_is_internal in
mv88e6xxx_port_ppu_updates
net: dsa: mv88e6xxx: add field to specify internal phys layout
net: dsa: mv88e6xxx: fix 88E6393X family internal phys layout
net: dsa: mv88e6xxx: pass mv88e6xxx_chip structure to
port_max_speed_mode
net: dsa: mv88e6xxx: enable support for 88E6361 switch
.../devicetree/bindings/net/dsa/marvell.txt | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 69 ++++++++++++++-----
drivers/net/dsa/mv88e6xxx/chip.h | 11 ++-
drivers/net/dsa/mv88e6xxx/global2.c | 6 +-
drivers/net/dsa/mv88e6xxx/port.c | 23 +++++--
drivers/net/dsa/mv88e6xxx/port.h | 13 ++--
6 files changed, 94 insertions(+), 30 deletions(-)