Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp712rwd; Wed, 17 May 2023 13:41:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IhnKEV7VpmxXdPS39dJ9dkWiliKKurnhitmgOTcXCHR6IPp9nOeOpNZcXT6nVZs8Wj9aH X-Received: by 2002:a05:6a00:2ea4:b0:643:b27f:6c43 with SMTP id fd36-20020a056a002ea400b00643b27f6c43mr1123794pfb.27.1684356074258; Wed, 17 May 2023 13:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684356074; cv=none; d=google.com; s=arc-20160816; b=XjQqX+3xjFW5VJjfo/3kF9dcYF9aZedziOtbQb7mt8YwJ0xpIiZ3xrK6jBVsdvC9hk OQMiJyaEVOOCa1vSfKTX8DCJSArn8wsTrrDBtYTvUQMChZOHxL7gJzqTY67X4FsLY3IL 25oQLgwlaXqcERUU89nB8Nje/AjMKX4yO6dM9CrUjKvcbjUXc1UMN/1X8RwgbrixIHFr EhIQuJAvvda7ixfAwTWoC7IIa7ig6TrmMQTlDdMclkOwuHGq1CBkBoytvY4XSmJiGGGZ lr7LJNmP1GMzhqlRm8If1BFq7TKfEvBJYNw70Io0X1dMVr6BxEtk3eXSPY6KXDWMw4TH yCBA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r28-20020aa79edc000000b00643ba887601si23220116pfq.307.2023.05.17.13.40.44; Wed, 17 May 2023 13:41:14 -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 S229791AbjEQUgG (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=20Lothor=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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.40.1