Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1313589rda; Mon, 23 Oct 2023 08:51:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1ftivfsTvSFJDpuJieeXsfUrwwJNPlgs7kRGFDTKvAPyX5G4U/MdHUV1icOerFTDC/SDk X-Received: by 2002:a05:6359:6006:b0:168:dbb0:eb30 with SMTP id rw6-20020a056359600600b00168dbb0eb30mr3146979rwb.11.1698076265378; Mon, 23 Oct 2023 08:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698076265; cv=none; d=google.com; s=arc-20160816; b=zCHD1uptVAlNq1rijH4LQMpiUMOURLlNNvbRI/FdbMGSCGioFW0OQtadkJfLyKOqsy bFd7S8OfIBfMI6BN7RVYEQlt2FnQuD8POgqyUfp8mOrHcAg/hYW4m0544LSAKcdLaSar qW30DKYRXWULFajlTgZuEfOwmUHG0mur8nvmtgziFs8IOUU4Fib2EYvEeqpQ+Rig2mb5 10GQ2C0Oub4+OP+vNjyUvgiew5C2yRZb70DhwBJ2dhGDQh2E2qEqq7S0jf9315Qp4YIZ owBxGmt5dbPU2oeh7rLe2/L9jXSM7xSGPcrk4KxgN889xUcC2JUHdmCYk7GCfv4rAYyZ FBrA== 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=vjTVkjCQdXsf3tUmJ77Jk9QRxhArGxc9gP+wJ5AuGB0=; fh=zFiaEL/+7oOUDknpaiQAT565P9dhSq3/yGTcIE1bbjs=; b=jHnGePoX/j2RUkOIkcDrjy5XgRbbLoQ5o33ieq3GWz4WKlh8knjTp3ItMCBh2epMIO u4GhlX+Gnd6/LhX65JulcGQgM4MGn+vGIv4JHM8cq5UT3JboC5c8Z87mux3xdzep0nrj Sa7BKU7U3t7BwLvGzi4VPPTWI23Z9MhO0EqgW+VXU+ds4Ipo3UN8FLQW7ZboDMgj3jEH 7SexWAzAQi05XAGHld+DBkSH0EIXHoOnZ41mdzFT8ptQdCcTKUZ9IeyxBsueE7BLykFR Riy5JBoJvBXGV3+DGC7TfIYg5agKD+7Y6YQWIOLrX0mRBAEVqymaxKmxKppGsojMPF4l 4wyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SHW0P8+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d15-20020a63f24f000000b0057cbd803b30si6723359pgk.654.2023.10.23.08.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 08:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SHW0P8+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 44825809692A; Mon, 23 Oct 2023 08:50:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233494AbjJWPuS (ORCPT + 99 others); Mon, 23 Oct 2023 11:50:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233227AbjJWPuO (ORCPT ); Mon, 23 Oct 2023 11:50:14 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AE749D; Mon, 23 Oct 2023 08:50:09 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1E1F01BF210; Mon, 23 Oct 2023 15:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1698076207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=vjTVkjCQdXsf3tUmJ77Jk9QRxhArGxc9gP+wJ5AuGB0=; b=SHW0P8+Ov4W6o8525HadMppMPrqfnbfazhjdIOG8bi/hKCuuAnUJGv4Y9s/tWDMj3wWeza 5MvThii/WbcZI1pf9Dy+jr3Sh261/X8p9PWgK6WSPjv0FuQ3OiSRsbXrylZ0xs9d4Dxmr2 TrD5k3OPv24PWvcBpUaGrZ+apxA4BeFfN6UnsqczQ/YWwHH1VueFyZpuUu4wvO1UWDcg4r a95InWiX+MUeY2XJy+DzWOSJOeCWfpzhXS71W31SIRV1peZITrDjul0WfpwY1abWXeDq3S otOSvwKr2nQwbOHrGigseB3KhpxUQ6qYBML20DVZWL64GKPau2u8Q74iVcbsug== From: Romain Gantois To: davem@davemloft.net, Rob Herring , Krzysztof Kozlowski Cc: Romain Gantois , Jakub Kicinski , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko , Andy Gross , Bjorn Andersson , Konrad Dybcio , Maxime Chevallier Subject: [PATCH net-next 0/5] net: ipqess: introduce Qualcomm IPQESS driver Date: Mon, 23 Oct 2023 17:50:07 +0200 Message-ID: <20231023155013.512999-1-romain.gantois@bootlin.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: romain.gantois@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 23 Oct 2023 08:50:24 -0700 (PDT) Hello everyone, This is a driver for the Qualcomm IPQ4019 Ethernet Switch Subsystem. The IPQ4019 SoC integrates a modified version of the QCA8K Ethernet switch. One major difference with the original switch IP is that port tags are passed to the integrated Ethernet controller out-of-band. My colleague Maxime Chevallier submitted several iterations of this driver about a year ago, here is the latest one: https://lore.kernel.org/netdev/20221104174151.439008-1-maxime.chevallier@bootlin.com/ These series were rejected because they required adding out-of-band tagging support to the DSA subsystem. Therefore, we rewrote the driver as a pure switchdev module, which shares a common backend library with the current QCA8K driver. The main driver components are: - ipqess_switch.c which registers and configures the integrated switch - ipqess_port.c which creates net devices for each one of the front-facing ports. - ipqess_edma.c which handles the integrated EDMA Ethernet controller linked to the CPU port. - drivers/net/dsa/qca/qca8k-common.c which defines low-level ESS access methods common to this driver and the original DSA QCA8K driver. Thanks to the people from Sartura for providing us hardware and working on the base QCA8K driver, and to Maxime for his work on the EDMA code. Best regards, Romain Romain Gantois (5): net: dt-bindings: Introduce the Qualcomm IPQESS Ethernet switch net: dsa: qca: Make the QCA8K hardware library available globally net: ipqess: introduce the Qualcomm IPQESS driver net: ipqess: add a PSGMII calibration procedure to the IPQESS driver dts: qcom: ipq4019: Add description for the IPQ4019 ESS EDMA and switch .../bindings/net/qcom,ipq4019-ess.yaml | 152 ++ MAINTAINERS | 7 + .../boot/dts/qcom/qcom-ipq4018-ap120c-ac.dtsi | 13 + arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi | 94 + drivers/net/dsa/qca/Kconfig | 10 + drivers/net/dsa/qca/Makefile | 5 +- drivers/net/dsa/qca/qca8k-8xxx.c | 2 +- drivers/net/dsa/qca/qca8k-common.c | 97 +- drivers/net/dsa/qca/qca8k-leds.c | 2 +- drivers/net/ethernet/qualcomm/Kconfig | 14 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/ethernet/qualcomm/ipqess/Makefile | 8 + .../ethernet/qualcomm/ipqess/ipqess_calib.c | 495 ++++ .../ethernet/qualcomm/ipqess/ipqess_edma.c | 1162 ++++++++++ .../ethernet/qualcomm/ipqess/ipqess_edma.h | 484 ++++ .../qualcomm/ipqess/ipqess_notifiers.c | 306 +++ .../qualcomm/ipqess/ipqess_notifiers.h | 29 + .../ethernet/qualcomm/ipqess/ipqess_port.c | 2017 +++++++++++++++++ .../ethernet/qualcomm/ipqess/ipqess_port.h | 99 + .../ethernet/qualcomm/ipqess/ipqess_switch.c | 559 +++++ .../ethernet/qualcomm/ipqess/ipqess_switch.h | 40 + .../net/dsa/qca => include/linux/dsa}/qca8k.h | 74 +- 22 files changed, 5648 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/qcom,ipq4019-ess.yaml create mode 100644 drivers/net/ethernet/qualcomm/ipqess/Makefile create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_calib.c create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_edma.c create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_edma.h create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_notifiers.c create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_notifiers.h create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_port.c create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_port.h create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_switch.c create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_switch.h rename {drivers/net/dsa/qca => include/linux/dsa}/qca8k.h (87%) -- 2.42.0