From patchwork Fri Mar 4 11:08:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Horatiu Vultur X-Patchwork-Id: 12768971 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 B3F3DC433EF for ; Fri, 4 Mar 2022 11:07:58 +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=hmfDHaSBXL4SbeLvyp0UPtBt9cxsgm3/bPeLT9P3de4=; b=kdhqfu5FOVoOl4 vw08P9E5ZVr8lcccQIXWculLI3hG8RWM6HTf0guXn85GN5N7PWBuKzpsGpRpMSMWcbNMVz/RhvAS8 9UACd+wvhkRCqr4qzyF59tT75ljIlCOD0borOdTNNRFF7XfKyUhQjm54gzzueAXx4HjWaGaKXkWJQ L1wDpqd9ex/UiN7g27B3smfF1ttZy8VdHcxW6+SjCjwcBhVdW606gqc2rIRFgaZ/ccibilWQHZDN8 FcOHDKC1Yflr6hTasHAaccOp/X8InTYXLMlW+UFXZ8PUo3FAU6Hw5XuAj/UrUo5QdDpS2FqbUEdax hmU+CmK5WgnrgFa03lag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQ5lc-009gd3-Mh; Fri, 04 Mar 2022 11:06:36 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQ5lY-009gbv-VQ for linux-arm-kernel@lists.infradead.org; Fri, 04 Mar 2022 11:06:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646391992; x=1677927992; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=p8Fa23wYHcovyCGBRwDb95f17RKV5nETuLwfv0uMp7M=; b=JXUetVdN2nlOwy8H8rZhIucjnPTuEYXYzzRmVL9ozuU1iQKtgjGqqy+4 DuqntJhjRhyW+ihwRBvlWteB3Ns84/GUyd/4/x2q0iFjXR2RSbJ+SGibW o6FqHOyCj57fTqNZ17Jq5DuAEBrsngr86frgqlAEkUjpzZIVfVYpQh0ex 1Zmbzi0Y2QTgYgH82fs2h4eo3CgxzzNEePnLBsadwqCe9rtXH3U9MZzeE 551yA3Cu45NGQxBI6uPGf3NX5018VorWlWzJfWiyqzDrJ8pZt7m6hMVp5 wErnrjc/KjKQTXlZjCJSfYYyQOXRD0FLeAKYw65V9rDYcuo7f8pRyZ+bu Q==; X-IronPort-AV: E=Sophos;i="5.90,155,1643698800"; d="scan'208";a="87822961" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Mar 2022 04:06:31 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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.2375.17; Fri, 4 Mar 2022 04:06:30 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 4 Mar 2022 04:06:28 -0700 From: Horatiu Vultur To: , , , CC: , , , , , , Horatiu Vultur Subject: [PATCH net-next 0/9] net: sparx5: Add PTP Hardware Clock support Date: Fri, 4 Mar 2022 12:08:51 +0100 Message-ID: <20220304110900.3199904-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220304_030633_102882_B97B8DCD X-CRM114-Status: UNSURE ( 7.24 ) X-CRM114-Notice: Please train this message. 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 Add support for PTP Hardware Clock (PHC) for sparx5. Horatiu Vultur (9): net: sparx5: Move ifh from port to local variable dt-bindings: net: sparx5: Extend with the ptp interrupt dts: sparx5: Enable ptp interrupt net: sparx5: Add registers that are used by ptp functionality net: sparx5: Add support for ptp clocks net: sparx5: Implement SIOCSHWTSTAMP and SIOCGHWTSTAMP net: sparx5: Update extraction/injection for timestamping net: sparx5: Add support for ptp interrupts net: sparx5: Implement get_ts_info .../bindings/net/microchip,sparx5-switch.yaml | 2 + arch/arm64/boot/dts/microchip/sparx5.dtsi | 5 +- .../net/ethernet/microchip/sparx5/Makefile | 3 +- .../microchip/sparx5/sparx5_ethtool.c | 34 + .../ethernet/microchip/sparx5/sparx5_fdma.c | 2 + .../ethernet/microchip/sparx5/sparx5_main.c | 21 + .../ethernet/microchip/sparx5/sparx5_main.h | 66 +- .../microchip/sparx5/sparx5_main_regs.h | 335 ++++++++- .../ethernet/microchip/sparx5/sparx5_netdev.c | 42 +- .../ethernet/microchip/sparx5/sparx5_packet.c | 37 +- .../ethernet/microchip/sparx5/sparx5_ptp.c | 685 ++++++++++++++++++ 11 files changed, 1221 insertions(+), 11 deletions(-) create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c