From patchwork Wed May 17 20:34:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 95547 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp42185vqo; Wed, 17 May 2023 13:45:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HK8byrWa6aWHFabbfEwkPnasZc1z6YYVF0q1VCG2JX9msxVJgof0EhBQKif7wnhjb+jX3 X-Received: by 2002:a17:902:a38b:b0:1ae:4248:c7f with SMTP id x11-20020a170902a38b00b001ae42480c7fmr46032pla.48.1684356326865; Wed, 17 May 2023 13:45:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684356326; cv=none; d=google.com; s=arc-20160816; b=jilgEk6EJhxt0XlYJNjj9xpOkWyaQYjpaLjcUHEBpq7t49VcapZttPqH5tVRCDJpbQ QuSGmFw+P+iE2cYzV5p6ZvB3P70Uh659yG8Nu95mBo6fEaQW8UEW5k0ePoK9RSeyLv/5 ME8B/vUzxowW3mHzowmxe4YJ5yuyq22P+Z6oecmbKAq2cWequ53paBOBgVkHVXRfDUlR cHAzNe3NVTYw8x6JSpCGE2pYx/eqmuqNUggPStG3dia5I7A8TMSPoHlWqPaVbp7NgDQI cCTrGQsAmx8kI+ogUj5OoZijCrvLMDU1RlSzrLlsdITYdF2x/Ta4HdFQhjPkrulbfd63 vdlw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+MBWhOUAOvvTZgiK7s5H33hdqjZ2816+sJdntqiIXT4=; b=n7yYFBuGILB61WcK06G9B/cB3aJ1T0jKEonOLqMT/eFfKOcRhFIsFs4YcgyvR71+gS ZAORC+0+5xl8teH399UiGvNcPNaUopC9cyv9Ap+FHqkDdVRPbfG3HVWtgRJeit/apiNJ er8wh6Jas27CK2saDX20NZbf6GHJIDxgWAm38869RDlyvA2+Rc6WNunGuTbUvmVER+p4 J9/XOMUiHLOwyvrMsKyskueCRkgKOurXuS9E8BYrk5TURhKFaufKFtclpxVatoMPvl4G GTpTzWdZC1nlSbAr1KBUcWINvE+a8migwILiYSora5UEoTOgu3aMvhSI+Avd2eP3srzn bnKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="GqJ5Vyx/"; 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 b4-20020a17090a550400b00250d2e5df8esi2443158pji.45.2023.05.17.13.45.11; Wed, 17 May 2023 13:45:26 -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="GqJ5Vyx/"; 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 S229696AbjEQUf7 (ORCPT + 99 others); Wed, 17 May 2023 16:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbjEQUf5 (ORCPT ); Wed, 17 May 2023 16:35:57 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65A7AF2; Wed, 17 May 2023 13:35:55 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 0397340005; Wed, 17 May 2023 20:35:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684355754; 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: in-reply-to:in-reply-to:references:references; bh=+MBWhOUAOvvTZgiK7s5H33hdqjZ2816+sJdntqiIXT4=; b=GqJ5Vyx/tb7Luv00L1AdVOmLyjhQvAVEZ8zxu7ha/yr3q/qJXlTt3b4tzEu64twJRFp9ti kFlAxv4Uj6E4RJ+wVlP/L8UqWIbdnrQgITngKT9UA5fD+tUnB90NNgllgEQnZ8svVQQORe WEa6dVUN75bRDfO0UohN965/qL20qLdf/k6tMPNOcIGoLZomL0HHv72aXKXTGHEDciAsO7 Q2Mk0+ctyh9ucKP6cuuQPRqvPHeavuE+hClKTlCufJr7g4LnQUaPyCl2aYVF6WboJ1gXf3 SNvQdc1SjKaZ7muKqc1i+XV57FW/r+sF/GxWk9GgPloUEOFMe6EsQXuvvO/A+Q== From: alexis.lothore@bootlin.com To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran 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?Alexis_Lothor?= =?utf-8?q?=C3=A9?= Subject: [PATCH net-next 1/2] dt-bindings: net: dsa: marvell: add MV88E6361 switch to compatibility list Date: Wed, 17 May 2023 22:34:29 +0200 Message-Id: <20230517203430.448705-2-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517203430.448705-1-alexis.lothore@bootlin.com> References: <20230517203430.448705-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766175619407788018?= X-GMAIL-MSGID: =?utf-8?q?1766175619407788018?= From: Alexis Lothoré Marvell MV88E6361 is an 8-port switch derived from the 88E6393X/88E9193X/88E6191X switches family. Since its functional behavior is very close to switches from this family, it can benefit from existing drivers for this family, so add it to the list of compatible switches Signed-off-by: Alexis Lothoré Reviewed-by: Andrew Lunn Acked-by: Conor Dooley --- Documentation/devicetree/bindings/net/dsa/marvell.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/marvell.txt b/Documentation/devicetree/bindings/net/dsa/marvell.txt index 2363b412410c..33726134f5c9 100644 --- a/Documentation/devicetree/bindings/net/dsa/marvell.txt +++ b/Documentation/devicetree/bindings/net/dsa/marvell.txt @@ -20,7 +20,7 @@ which is at a different MDIO base address in different switch families. 6171, 6172, 6175, 6176, 6185, 6240, 6320, 6321, 6341, 6350, 6351, 6352 - "marvell,mv88e6190" : Switch has base address 0x00. Use with models: - 6190, 6190X, 6191, 6290, 6390, 6390X + 6163, 6190, 6190X, 6191, 6290, 6390, 6390X - "marvell,mv88e6250" : Switch has base address 0x08 or 0x18. Use with model: 6220, 6250 From patchwork Wed May 17 20:34:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 95548 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp43287vqo; Wed, 17 May 2023 13:47:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6dKQXzfnfYYZpSxqRzMqnBku0X22ORjCarlGcMd6sXvn4nXXN9TW/fsS9SHm8t5AmM9DAt X-Received: by 2002:a17:902:ab17:b0:1ae:4c3b:bb0b with SMTP id ik23-20020a170902ab1700b001ae4c3bbb0bmr152945plb.5.1684356477835; Wed, 17 May 2023 13:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684356477; cv=none; d=google.com; s=arc-20160816; b=QKmmu1OCF1ZOGcN56woMbMdE4m8mJHt007yVRSj4uAeI5HE/CEK1TTmJBwnwe05blm +pnnv7gdlTxYCdPLRS9T3AlVjoaYdMVJIsQZ/OM5uS4iftXxTe9MBj+psfUfA/VxdF+B pR0xDhfWRqQf38/O2e8EGFv6k495fZw/+uU5wIx7USZQTOjOCiJey5ockwE+COiJlFuX 3tQHGKcGvI/UllD3Mj2UnOTULGWFq14mlyTb2+mD9tY3pNy5Fa/A5gfy/XDjUQ4qkMiF 5NBS/LbFc4jiBG6t3/LHxIV3Sx4KQMUOWED1VsAy/iNR5m/3E8FNRcH2vGgzrCyBMArD gdKA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RagYd6eCVPXftbaoMDiEGbDgJT7b4I7PTt7SjICCemQ=; b=shqNz9eRdEoRGRarTK6PBoIZGlYzy/3k7GMp0lFOiVJw/guqskHUwrU1/omo/N7czu n8TEPtm62EZpsHtVZl/6tl/wg3kdp51SvZe4n2P45cqDn0GcElTb7KCV+gk4AZMXXYW3 8iHagHIx1JGKfBDktIm+OjLHkD4jDqbQiVU9BlPcOIdjkBKNnwxjGCynyFN7Yh7DHUpG v1l7/JS0AFN84xS4gSos+L6fp4SUJ8s1X1ggT82c7aKQ14NNpxi+0UIhf4COuOQU22iF FnDPbwQ/BtXeFCex7Ygd+Kh7neZWj8vTHB85xwmiqXayyBMgUCk5h4dMRzCDz11b+cWX ldIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=MVuaYei4; 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 r7-20020a1709028bc700b001a9b29b6763si20715602plo.399.2023.05.17.13.47.42; Wed, 17 May 2023 13:47:57 -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=MVuaYei4; 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 S229799AbjEQUgG (ORCPT + 99 others); Wed, 17 May 2023 16:36:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjEQUgD (ORCPT ); Wed, 17 May 2023 16:36:03 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5413BA1; Wed, 17 May 2023 13:35:57 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 233D240007; Wed, 17 May 2023 20:35:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684355755; 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: in-reply-to:in-reply-to:references:references; bh=RagYd6eCVPXftbaoMDiEGbDgJT7b4I7PTt7SjICCemQ=; b=MVuaYei4Wfrlidypw0sqHOmlqYtDR9q5mvT49YVQUSWSAaeibBBI6BlFbuhy1RONbmfPJw wokbeNzjFKWaDxi+DbbV4jcXIICTEZW86fpzh+y8o354o8hY58INBTRC3lCFBak7lF2OvF JV12TQpgsK2fGILCLFn3vTter73nWqz+tXrL1pPcKpOR90vfOO0jlTZtoI888s+0iqQNo2 kPPixTA8fpedhKBEaZH4BGYhSe5vs/bt3J7XSWXk+c8P4uptEjIuY7BnQfOyEX8mru067Q tlq2MtRKV5bPiI6UQRIPYguuCFILJwVCAWLeCJRypjX5fu1RsT/o1A5IIFW43Q== From: alexis.lothore@bootlin.com To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran 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?Alexis_Lothor?= =?utf-8?q?=C3=A9?= Subject: [PATCH net-next 2/2] net: dsa: mv88e6xxx: enable support for 88E6361 switch Date: Wed, 17 May 2023 22:34:30 +0200 Message-Id: <20230517203430.448705-3-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517203430.448705-1-alexis.lothore@bootlin.com> References: <20230517203430.448705-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766175778123955264?= X-GMAIL-MSGID: =?utf-8?q?1766175778123955264?= From: Alexis Lothoré Marvell 88E6361 is an 8-port switch derived from the 88E6393X/88E9193X/88E6191X switches family. It can benefit from the existing mv88e6xxx driver by simply adding the proper switch description in the driver. Main differences with other switches from this family are: - 8 ports exposed (instead of 11): ports 1, 2 and 8 not available - No 5GBase-x nor SFI/USXGMII support Signed-off-by: Alexis Lothoré --- drivers/net/dsa/mv88e6xxx/chip.c | 25 +++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 3 ++- drivers/net/dsa/mv88e6xxx/port.h | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 64a2f2f83735..0be7135fa39d 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -6309,6 +6309,31 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .ptp_support = true, .ops = &mv88e6352_ops, }, + [MV88E6361] = { + .prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6361, + .family = MV88E6XXX_FAMILY_6393, + .name = "Marvell 88E6361", + .num_databases = 4096, + .num_macs = 16384, + .num_ports = 11, + /* Ports 1, 2 and 8 are not routed */ + .invalid_port_mask = BIT(1) | BIT(2) | BIT(8), + .num_internal_phys = 5, + .max_vid = 4095, + .max_sid = 63, + .port_base_addr = 0x0, + .phy_base_addr = 0x0, + .global1_addr = 0x1b, + .global2_addr = 0x1c, + .age_time_coeff = 3750, + .g1_irqs = 10, + .g2_irqs = 14, + .atu_move_port_mask = 0x1f, + .pvt = true, + .multi_chip = true, + .ptp_support = true, + .ops = &mv88e6393x_ops, + }, [MV88E6390] = { .prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6390, .family = MV88E6XXX_FAMILY_6390, diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h index da6e1339f809..c88e52e355a5 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -82,6 +82,7 @@ enum mv88e6xxx_model { MV88E6350, MV88E6351, MV88E6352, + MV88E6361, MV88E6390, MV88E6390X, MV88E6393X, @@ -100,7 +101,7 @@ enum mv88e6xxx_family { MV88E6XXX_FAMILY_6351, /* 6171 6175 6350 6351 */ MV88E6XXX_FAMILY_6352, /* 6172 6176 6240 6352 */ MV88E6XXX_FAMILY_6390, /* 6190 6190X 6191 6290 6390 6390X */ - MV88E6XXX_FAMILY_6393, /* 6191X 6193X 6393X */ + MV88E6XXX_FAMILY_6393, /* 6191X 6193X 6361 6393X */ }; /** diff --git a/drivers/net/dsa/mv88e6xxx/port.h b/drivers/net/dsa/mv88e6xxx/port.h index aec9d4fd20e3..22e2147c29a7 100644 --- a/drivers/net/dsa/mv88e6xxx/port.h +++ b/drivers/net/dsa/mv88e6xxx/port.h @@ -138,6 +138,7 @@ #define MV88E6XXX_PORT_SWITCH_ID_PROD_6141 0x3400 #define MV88E6XXX_PORT_SWITCH_ID_PROD_6341 0x3410 #define MV88E6XXX_PORT_SWITCH_ID_PROD_6352 0x3520 +#define MV88E6XXX_PORT_SWITCH_ID_PROD_6361 0x2610 #define MV88E6XXX_PORT_SWITCH_ID_PROD_6350 0x3710 #define MV88E6XXX_PORT_SWITCH_ID_PROD_6351 0x3750 #define MV88E6XXX_PORT_SWITCH_ID_PROD_6390 0x3900