From patchwork Tue Mar 5 11:40:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diogo Ivo X-Patchwork-Id: 13582244 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 15977C54E41 for ; Tue, 5 Mar 2024 11:41:29 +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=1PguCJKO2ADLvRsdOTupltTxD4WtygMZsNc7NwkCeG4=; b=ihQkA1/BpwZrEx dwBZEVhtOwh5Gp+RFj4Ck7o+pp291Mb7t/vmWrbCaxT1Us2x3hjX0/rwTpdxO9eDu8/ZkFsn4AIzl WFF8FvtLBIyfnmYcc5+CzhtAGX047JY5PWhPlwjsorIA5ZgdIBVFAEhJF9h+7+pMRnKsJqO6cNapk tu8vqgXBCE8KhB15cwxK8NW3Mlzx3bp7+g9X3fpDWdohykfl2kPwkCpvloKwC9niAc2d+Y25jT6s7 Aeo5kTGSEQY7YORXiVI1NZInruyPiHZmlotJDQTw8fC9Xd6LpBKz3HnRssQxdQ6CA7L/7MvU0CwVz quDFB9jjcv5qj839M0iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhTAW-0000000DPcj-1AHf; Tue, 05 Mar 2024 11:41:12 +0000 Received: from mta-65-228.siemens.flowmailer.net ([185.136.65.228]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhTAL-0000000DPZ7-37LS for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2024 11:41:09 +0000 Received: by mta-65-228.siemens.flowmailer.net with ESMTPSA id 202403051140533825cba593ef3374de for ; Tue, 05 Mar 2024 12:40:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=diogo.ivo@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=lmEudoCgUl1CiCBCCEg36MOvVlnzhYi3gy//qv1hPX8=; b=BLDrdKFpksDHUi69X5nTsL1leA6QXlM+81886e46JlpXlGXan9OOxq7In5VDthsw0WlUKs OFGb+3M5NinIB1Cxr19SsGN+o111x8faHwUH7WaD5jfe0+Ozj5YooBhEjhtDu4h46IyRxoWP qncZYA/KW68406xHH44QGTKx/DV90=; From: Diogo Ivo To: danishanwar@ti.com, rogerq@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew@lunn.ch, dan.carpenter@linaro.org, jacob.e.keller@intel.com, robh@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, vigneshr@ti.com, wsa+renesas@sang-engineering.com, hkallweit1@gmail.com, arnd@arndb.de, vladimir.oltean@nxp.com, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org Cc: Diogo Ivo , jan.kiszka@siemens.com Subject: [PATCH net-next v4 00/10] Support ICSSG-based Ethernet on AM65x SR1.0 devices Date: Tue, 5 Mar 2024 11:40:20 +0000 Message-ID: <20240305114045.388893-1-diogo.ivo@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1320519:519-21489:flowmailer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240305_034102_355760_DC557408 X-CRM114-Status: GOOD ( 15.03 ) 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, This series extends the current ICSSG-based Ethernet driver to support AM65x Silicon Revision 1.0 devices. Notable differences between the Silicon Revisions are that there is no TX core in SR1.0 with this being handled by the firmware, requiring extra DMA channels to manage communication with the firmware (with the firmware being different as well) and in the packet classifier. The motivation behind it is that a significant number of Siemens devices containing SR1.0 silicon have been deployed in the field and need to be supported and updated to newer kernel versions without losing functionality. This series is based on TI's 5.10 SDK [1]. The third version of this patch series can be found in [2]. Detailed descriptions of the changes in this series can be found in each commit's message. However, in its current form the driver has two problems: - Setting the link to 100Mbit/s and half duplex results in slower than expected speeds. We have identified that this comes from icssg_rgmii_get_fullduplex() misreporting a full duplex connection and thus we send the wrong command to the firmware. - When using 3 TX channels we observe a timeout on TX queue 0. We have made no real progress on this front in identifying the root cause. For both of these topics help from someone more familiar with the hardware would be greatly appreciated so that we can support these features rather than disable them in the final driver version. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y [2]: https://lore.kernel.org/netdev/20240221152421.112324-1-diogo.ivo@siemens.com/ Diogo Ivo (10): dt-bindings: net: Add support for AM65x SR1.0 in ICSSG eth: Move IPv4/IPv6 multicast address bases to their own symbols net: ti: icssg-prueth: Move common functions into a separate file net: ti: icssg-prueth: Add SR1.0-specific configuration bits net: ti: icssg-prueth: Add SR1.0-specific description bits net: ti: icssg-prueth: Adjust IPG configuration for SR1.0 net: ti: icssg-prueth: Adjust the number of TX channels for SR1.0 net: ti: icssg-prueth: Add functions to configure SR1.0 packet classifier net: ti: icssg-prueth: Modify common functions for SR1.0 net: ti: icssg-prueth: Add ICSSG Ethernet driver for AM65x SR1.0 platforms .../bindings/net/ti,icssg-prueth.yaml | 35 +- drivers/net/ethernet/ti/Kconfig | 15 + drivers/net/ethernet/ti/Makefile | 9 + .../net/ethernet/ti/icssg/icssg_classifier.c | 113 +- drivers/net/ethernet/ti/icssg/icssg_common.c | 1222 +++++++++++++++++ drivers/net/ethernet/ti/icssg/icssg_config.c | 14 +- drivers/net/ethernet/ti/icssg/icssg_config.h | 56 + drivers/net/ethernet/ti/icssg/icssg_ethtool.c | 10 + drivers/net/ethernet/ti/icssg/icssg_prueth.c | 1189 +--------------- drivers/net/ethernet/ti/icssg/icssg_prueth.h | 79 +- .../net/ethernet/ti/icssg/icssg_prueth_sr1.c | 1171 ++++++++++++++++ include/linux/etherdevice.h | 12 +- 12 files changed, 2715 insertions(+), 1210 deletions(-) create mode 100644 drivers/net/ethernet/ti/icssg/icssg_common.c create mode 100644 drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c Reviewed-by: MD Danish Anwar