From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32F062D3751; Thu, 3 Jul 2025 22:53:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751583195; cv=none; b=QRqvw+agjJwCjBrw8O/wBTYrOfG7XJyziTCFkjP7aqGj7D6kuH+vAOjHfTYvw5w7Heq6OucnTzkGjmkPdB+zqmXrsnp2m2hIvpId13BIRA847AHpF+WmQxBlC2abA5SeWiZfhhtK0GMn2DRoxHp83CqQI94IeleHbbdcHOFlitk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751583195; c=relaxed/simple; bh=3bWBSlOd1mEysHg8taMzS1I42clX6SsWKrJ8TpC5pSg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=U833O2lzPvP4M2Yf9gxcHXuccSQGDM6QfZgKXmuj6IVdVE57GeszTy1t7t4n1fLArH5tJWRsMlTHKAWruEt1is4VyrpfIDAZU4wH4qb2wcANuSRvU/8ckHQqtIj/I+IB40USUTuSmL/iBdGlPzsD+gmeoG2iz/a6E9MQQFgoq4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=let/ROpg; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="let/ROpg" Message-ID: <218ed5ce-6e0d-41f7-809b-04e554d08c5a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1751583186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LIyqDlLt3CT1utfTbk2TkfmajXEi5ZvgikV+/3VcJck=; b=let/ROpgpEs+HqLRrGdvieskEbzt9tFEKP9ekxEOGcwqnmErdLrGJ016+f28aLWFswBbmF exExgIED9KiRFUeIyT4jn1VfJq/r0JPY0xLLmJbbbF+GAA6mGFCUB1WGIJTwYsMse1RLb4 HiQRVv3DpWbFq6UjPVjAFyXhxzupLh0= Date: Thu, 3 Jul 2025 23:52:17 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next v10 06/11] net: ti: prueth: Adds HW timestamping support for PTP using PRU-ICSS IEP module To: Parvathi Pudi , danishanwar@ti.com, rogerq@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, ssantosh@kernel.org, richardcochran@gmail.com, s.hauer@pengutronix.de, m-karicheri2@ti.com, glaroque@baylibre.com, afd@ti.com, saikrishnag@marvell.com, m-malladi@ti.com, jacob.e.keller@intel.com, diogo.ivo@siemens.com, javier.carrasco.cruz@gmail.com, horms@kernel.org, s-anna@ti.com, basharath@couthit.com Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pratheesh@ti.com, prajith@ti.com, vigneshr@ti.com, praneeth@ti.com, srk@ti.com, rogerq@ti.com, krishna@couthit.com, pmohan@couthit.com, mohan@couthit.com References: <20250702140633.1612269-1-parvathi@couthit.com> <20250702151756.1656470-7-parvathi@couthit.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20250702151756.1656470-7-parvathi@couthit.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 02/07/2025 16:17, Parvathi Pudi wrote: > From: Roger Quadros > > PRU-ICSS IEP module, which is capable of timestamping RX and > TX packets at HW level, is used for time synchronization by PTP4L. > > This change includes interaction between firmware and user space > application (ptp4l) with required packet timestamps. The driver > initializes the PRU firmware with appropriate mode and configuration > flags. Firmware updates local registers with the flags set by driver > and uses for further operation. RX SOF timestamp comes along with > packet and firmware will rise interrupt with TX SOF timestamp after > pushing the packet on to the wire. > > IEP driver is available in upstream and we are reusing for hardware > configuration for ICSSM as well. On top of that we have extended it > with the changes for AM57xx SoC. > > Extended ethtool for reading HW timestamping capability of the PRU > interfaces. > > Currently ordinary clock (OC) configuration has been validated with > Linux ptp4l. > > Signed-off-by: Roger Quadros > Signed-off-by: Andrew F. Davis > Signed-off-by: Basharath Hussain Khaja > Signed-off-by: Parvathi Pudi > --- > drivers/net/ethernet/ti/icssg/icss_iep.c | 42 ++ > drivers/net/ethernet/ti/icssm/icssm_ethtool.c | 23 + > drivers/net/ethernet/ti/icssm/icssm_prueth.c | 423 +++++++++++++++++- > drivers/net/ethernet/ti/icssm/icssm_prueth.h | 11 + > .../net/ethernet/ti/icssm/icssm_prueth_ptp.h | 85 ++++ > 5 files changed, 582 insertions(+), 2 deletions(-) > create mode 100644 drivers/net/ethernet/ti/icssm/icssm_prueth_ptp.h > Reviewed-by: Vadim Fedorenko