Message ID | 20240607-iep-v3-0-4824224105bc@siemens.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 1CEBFC27C6E for <linux-arm-kernel@archiver.kernel.org>; Fri, 7 Jun 2024 13:14:39 +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:Cc:To:MIME-Version:Message-Id:Date: Subject: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=UK84Ff7k10jRArNBzcpwszzqI6ASNyPYq9S5VxXiXEQ=; b=DddE1Iy1+1MRjL 6lcSQrFpRnyYIKRS+Wl06zsEZbJ5C3TWpgs94102zMlLnxdwZrwG3N6Sy4FOQpfMHqICPsBgt5ZPI BGoKiLgWFFC0QEMJqMyV2B0l6/XfYOyU1SyAzCa9kMowEB6FcL1rKRFj34meU+0rwxNQZJ3fbnE+s i9fU8C7UTbq78zW4fuWVyQuaBwjKTFu1PXli/tde+mRqcDQPx7dnrUVonO91bN20R+uUCPYV5/7+G DyJ1xXiKaYSc/ms5+/IWSNlcl2n8l6wBjDEXtnpV4Im0Afw+XIJ58AlKdD0LGxTazF8bAhzTKbwgP R3w20UpeJmbj3Ktu2wDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFZQE-0000000E4Rd-1bIj; Fri, 07 Jun 2024 13:14:22 +0000 Received: from mta-64-228.siemens.flowmailer.net ([185.136.64.228]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFZQA-0000000E4Pr-0O6l for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 13:14:20 +0000 Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20240607131409fc9fe52efdb88dba55 for <linux-arm-kernel@lists.infradead.org>; Fri, 07 Jun 2024 15:14:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2; d=siemens.com; i=diogo.ivo@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=sTjKOiLBJ41DZpxQsI71jhDcMjYRDYvyrj4yxx6L3Vc=; b=puEFBW1ivREMLt24MKBqv3xL4egFgbQFdsko6t6gnS+ZPCsXIEYlp9XGNMdqe60wukEyA1 av894e3zYg66Ul5E9MZLDiIQs/4PaQnmSS3jUi1UKuBQFr1a3CpHgwthZuZn0ZAaONAuGYlY gZhjxsaqF2RBP9mepK7SVcEtSMtkU=; From: Diogo Ivo <diogo.ivo@siemens.com> Subject: [PATCH net-next v3 0/4] Enable PTP timestamping/PPS for AM65x SR1.0 devices Date: Fri, 07 Jun 2024 14:02:41 +0100 Message-Id: <20240607-iep-v3-0-4824224105bc@siemens.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPEEY2YC/1WMwQ6DIBAFf8XsuTQIithT/6PpAXFb9yAaIMTG+ O8l9NB4fJk3s0NATxjgVu3gMVGgxeUhLxXYybg3MhrzBsFFw1vRM8KV6WFojLRDz5WG/Fw9vmg rlQc4jMzhFuGZyUQhLv5T8qku/FRKNeOsE520vGt7Mcp7IJzRhatd5lJI4m8p3vwskS00GmvLT au0OlvHcXwBXZs3HtgAAAA= To: MD Danish Anwar <danishanwar@ti.com>, Roger Quadros <rogerq@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Richard Cochran <richardcochran@gmail.com>, Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Tero Kristo <kristo@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Jan Kiszka <jan.kiszka@siemens.com>, Jacob Keller <jacob.e.keller@intel.com>, Simon Horman <horms@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Diogo Ivo <diogo.ivo@siemens.com>, Wojciech Drewek <wojciech.drewek@intel.com> X-Developer-Signature: v=1; a=ed25519-sha256; t=1717766048; l=3009; i=diogo.ivo@siemens.com; s=20240529; h=from:subject:message-id; bh=M57GmtZA7uRuye5XGW7w65bnbiEuyeFO424hHO+XQY8=; b=qIfW66+YKoQkrc5SJJN2tiHs003VGAqgW6y5350rcJBm/109jXHtPaZiTAK/yAPMRkGG2jQLh 8MkaSvLmFPzC8+gyCxWEwtVlBRJoogcaKmSUfwFxeKwVZjxvI7qDBTO X-Developer-Key: i=diogo.ivo@siemens.com; a=ed25519; pk=BRGXhMh1q5KDlZ9y2B8SodFFY8FGupal+NMtJPwRpUQ= 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-20240607_061418_846362_0077AE84 X-CRM114-Status: GOOD ( 17.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Enable PTP timestamping/PPS for AM65x SR1.0 devices
|
expand
|
This patch series enables support for PTP in AM65x SR1.0 devices. This feature relies heavily on the Industrial Ethernet Peripheral (IEP) hardware module, which implements a hardware counter through which time is kept. This hardware block is the basis for exposing a PTP hardware clock to userspace and for issuing timestamps for incoming/outgoing packets, allowing for time synchronization. The IEP also has compare registers that fire an interrupt when the counter reaches the value stored in a compare register. This feature allows us to support PPS events in the kernel. The changes are separated into four patches: - PATCH 01/04: Register SR1.0 devices with the IEP infrastructure to expose a PHC clock to userspace, allowing time to be adjusted using standard PTP tools. The code for issuing/ collecting packet timestamps is already present in the current state of the driver, so only this needs to be done. - PATCH 02/04: Remove unnecessary spinlock synchronization. - PATCH 03/04: Add support for IEP compare event/interrupt handling to enable PPS events. - PATCH 04/04: Add the interrupts to the IOT2050 device tree. Currently every compare event generates two interrupts, the first corresponding to the actual event and the second being a spurious but otherwise harmless interrupt. The root cause of this has been identified and has been solved in the platform's SDK. A forward port of the SDK's patches also fixes the problem in upstream but is not included here since it's upstreaming is out of the scope of this series. If someone from TI would be willing to chime in and help get the interrupt changes upstream that would be great! Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com> --- Changes in v3: - Collect Reviewed-by tags - Add patch 02/04 removing spinlocks from IEP driver - Use mutex-based synchronization when accessing HW registers - Link to v2: https://lore.kernel.org/r/20240604-iep-v2-0-ea8e1c0a5686@siemens.com Changes in v2: - Collect Reviewed-by tags - PATCH 01/03: Limit line length to 80 characters - PATCH 02/03: Proceed with limited functionality if getting IRQ fails, limit line length to 80 characters - Link to v1: https://lore.kernel.org/r/20240529-iep-v1-0-7273c07592d3@siemens.com --- Diogo Ivo (4): net: ti: icssg-prueth: Enable PTP timestamping support for SR1.0 devices net: ti: icss-iep: Remove spinlock-based synchronization net: ti: icss-iep: Enable compare events arm64: dts: ti: iot2050: Add IEP interrupts for SR1.0 devices .../boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi | 12 ++++ drivers/net/ethernet/ti/icssg/icss_iep.c | 84 +++++++++++++++++++--- drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 51 ++++++++++++- 3 files changed, 136 insertions(+), 11 deletions(-) --- base-commit: 2f0e3f6a6824dfda2759225326d9c69203c06bc8 change-id: 20240529-iep-8bb4a3cb9068 Best regards,