From patchwork Thu Feb 2 12:59:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Sankaranarayanan X-Patchwork-Id: 4875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp221270wrn; Thu, 2 Feb 2023 05:00:16 -0800 (PST) X-Google-Smtp-Source: AK7set9RRfK1Cub2sGy4KAOtMaudBMYBc/noUnprYz/BuvNQqz/HvYXfuDsp1Aw3777YCE6vYQhM X-Received: by 2002:a17:906:edc4:b0:885:5231:359c with SMTP id sb4-20020a170906edc400b008855231359cmr5628037ejb.5.1675342816720; Thu, 02 Feb 2023 05:00:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675342816; cv=none; d=google.com; s=arc-20160816; b=znak4CNpR/AtXJWxFZNot5NLfZSrYktbshC+7HNZlCVDVDqt/LATMKXPPV5n8w0Fbz YkFvkXmYpNhJBdRQs+Q/hU69qx8l2nVcvETTNjYYy+VahBa0+lV3e81vLOs/Qd74aZiW Uu8G6c4NKnLA8izxa8EW1f7CT0Tu62B9fxraAsnRdNqWmNjqHqD3nZuIbwe5xKfPObbV Jv1ELYJjwOKv1JboC1FCxXX54wqW7nT84l+AG650B+gZPnYTlWjKeZvVtJ8+rCgCoKFg EBOFjEq1mHATjgO6ahq5ryAFX0EwKX0BLzFWld/vkEjJOCMdaaHn1RmXkQy5GjKfFtpH 8wiA== 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=XLLUJ57hxuIYSwhLQ4LbZhoGhYtei4eRn4upq83t8iU=; b=dutamd7kDXHd1WJKltXAg5XHoiPDQalQniPg4K32DmH9o6rqJME5um9VlRqMU+ySJx tuIlBeLV0N4AKy8Alfg11xww9tC2UyqolCCkIIS4AiCYnEkxVyApiMN/Vcyx9TPKefXW NL9ZpIoWoZ5ilUqZumia089cHR8N075NtKfo7Q42JVEoGJU61rrrj2wD/bzuLymtqm01 2TulOyfITfMivqsZFzFA5tQPdM4xmWOr8bSQtrBJ42F/Z+WgyqnAhthUuFDrdH+TrYSM 0gKn9+UAke/jQ3rNNlQB49lHgOMoh64gjzDFFMyEYcgXMMvD3qXuteQtzKakDhYeMERe rKjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=tmu36813; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ui41-20020a170907c92900b0088a5739138esi11625992ejc.837.2023.02.02.04.59.52; Thu, 02 Feb 2023 05:00:16 -0800 (PST) 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=@microchip.com header.s=mchp header.b=tmu36813; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232102AbjBBM6y (ORCPT + 99 others); Thu, 2 Feb 2023 07:58:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232055AbjBBM6t (ORCPT ); Thu, 2 Feb 2023 07:58:49 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20FA2193; Thu, 2 Feb 2023 04:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1675342728; x=1706878728; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=M4PS6q2vlELtVeU299jusw0WmeBgXsL/prLMnsK3L9I=; b=tmu36813dCCkMxBY3xx56EHFYezViHFriEGINhSmuuDlu+IHYQPTzvsx 4ZA3IofW5nE8GGRLzP3fGYYILfTF2fCQpURgn0M4jgF2Vj+oW2j4hTElH ZkGqL5Sf/q64O8A5MPmubFDcjo57ulWL2p3vmgk9tH90SzaU4H2m6VI5h QAzvpam+WFEklwBkMg2ixXp+LrpsErhfIHP3Iui+oYRzwkIgQBnjDXnzd Lii3+f4417YHXVDXMZk0J6l5dpimBKJalnAIVR2NfhByzy6R6cmv67YCs 5Du1U1Ecnj5g/mn9EtrdF/mNX7XztZyobjOYTjKRpIyiEOS6+u/TAwjiN w==; X-IronPort-AV: E=Sophos;i="5.97,267,1669100400"; d="scan'208";a="135251457" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Feb 2023 05:58:27 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 2 Feb 2023 05:58:27 -0700 Received: from che-lt-i67786lx.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Thu, 2 Feb 2023 05:58:23 -0700 From: Rakesh Sankaranarayanan To: , CC: , , , , , , , , , Subject: [RFC PATCH net-next 00/11] net: dsa: microchip: lan937x: add switch cascade support Date: Thu, 2 Feb 2023 18:29:19 +0530 Message-ID: <20230202125930.271740-1-rakesh.sankaranarayanan@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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?1756724269012707713?= X-GMAIL-MSGID: =?utf-8?q?1756724269012707713?= LAN937x switch series support cascade mode of operation, in which two switch can be connected to work like a single switch having the advantage of increased number of ports. Two switches can be connected using SPI, and a dedicated port from each switch will be inter-connected forming a data path between two switches, known as cascaded port. This patch series add support for cascade mode of operation using SPI protocol and configures cascaded ports from each switches based on the requirement. Patch series tested on LAN9373 Dual Board, which is a custom board with two LAN9373 switches connected in cascaded mode, and PORT 4 used as cascaded port from each switch. Rakesh Sankaranarayanan (11): net: dsa: microchip: lan937x: add cascade tailtag net: dsa: microchip: lan937x: update SMI index net: dsa: microchip: lan937x: enable cascade port net: dsa: microchip: lan937x: update port number for LAN9373 net: dsa: microchip: lan937x: add shared global interrupt net: dsa: microchip: lan937x: get cascade tag protocol net: dsa: microchip: lan937x: update switch register net: dsa: microchip: lan937x: avoid mib read for cascaded port net: dsa: microchip: lan937x: update port membership with dsa port net: dsa: microchip: lan937x: update vlan untag membership net: dsa: microchip: lan937x: update multicast table drivers/net/dsa/microchip/ksz9477.c | 8 ++- drivers/net/dsa/microchip/ksz_common.c | 47 ++++++++++---- drivers/net/dsa/microchip/ksz_common.h | 3 + drivers/net/dsa/microchip/lan937x.h | 1 + drivers/net/dsa/microchip/lan937x_main.c | 33 +++++++++- drivers/net/dsa/microchip/lan937x_reg.h | 3 + include/net/dsa.h | 17 +++++ net/dsa/tag_ksz.c | 80 ++++++++++++++++++++++-- 8 files changed, 173 insertions(+), 19 deletions(-)