From patchwork Mon Oct 23 15:50:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Gantois X-Patchwork-Id: 13433088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26964C004C0 for ; Mon, 23 Oct 2023 15:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=h+0P+f+KLq6Lai9DXrKusg59Jc6QIat7vmjlJvdeldw=; b=KV++edSGWuAKlC Tjxs61KBec4YKj3xtxbqM4Tv/C+nkYYfmeKXX41/TlaK+8jWjGjT1TCQedO5lVxx39Vje69sqg1bT 6qTk5mpsGAwy2xpos763uwM3KXBPttQVNQXbkh1jzZgPOuwD25+ED1XxbtwwCMjaVU/Mmo/ltRhWv 8D8LaAUbkvj9lNUFD7cWwVRyIMJ6nS63A2jFv463ySxj9Fsrm8ZzYMTChBXE+24FGmKCVC8Ru3Ytt UTIBJPYkZ4Z/+6jtxnqIdrhpnNPwO+41fd9RFwTRk6Kvqul1M/kc5wd6QGrfFuSNSF9YTLpt6vUd6 b/VgP9Vf3tKJYlVL8onw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1quxC6-007k9j-1W; Mon, 23 Oct 2023 15:50:18 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1quxC2-007k7M-0N for linux-arm-kernel@lists.infradead.org; Mon, 23 Oct 2023 15:50:16 +0000 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 X-GND-Sasl: romain.gantois@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_085014_451873_E82D75F9 X-CRM114-Status: GOOD ( 15.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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%)