From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A621645BC0; Tue, 29 Oct 2024 18:16:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F3A742FA1; Tue, 29 Oct 2024 18:16:13 +0100 (CET) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id 8A44842F85 for ; Tue, 29 Oct 2024 18:16:10 +0100 (CET) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03lp2176.outbound.protection.outlook.com [104.47.51.176]) by mx-outbound17-86.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 17:16:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=m30T3za7WEYMVhwqjddo+vsyYTyc51/AjQfugJkTkAO3nqkpIbTA3xOquh+VPmrINIHgGf2haTlRo5Bq1hpRb13z6dbS2bBBBWEhnaNgHQY1RaUckmeoeB5ZBLDqoo7GqwR8LulKnjDg076mIXQBf6CeIIsWRwr94jWmF8cx3PdUsUqJrZXEOzHOmxdiGO3BgX8ePM9KrNM08gd1lx9gn6LUCr+98+xfgv2JoJ5RAvjKtmO++ysVOCXwwptYHt7iGU1Ld/7Om9MTOqtYFysao9iq+8xRICu+pqNMbIdYj3iD+xjWmBEi760Yak78sLA05VkDS1VN0dNINUFBpEtjAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tguYk4TVixvlbA00LyI9d5OZ4JAU9GDOZfFRCxvBSHA=; b=U3Tlm9tRNqmEwiWWP0RCX32jMS2Nox1NxLktmhVExU7jL+k5rPdg7gG7iWh3f33io7cDOtDbICATYZ6Jl39tvM3bscut9LAwM4vj2zZr0QfMYHTBGktRlNQ006A6nVa/UGJNevsxLin72lsXBQDfy3uDswGSfHjQapKiAdlpJe+3+flOwX+jzA60Hp0qVRJss+J6CznitnysyQ0nU9WXfFzDjlYsgfZWyx1Fmrl/JkHqwwFmEYZJNjz+GkDaARurk7uzRnUTaDfC1fACYbWf0axaKQQtq/185j5BzApp0nADPw2pglKwxj73JjmFawrhz0rRl7/5zH2OJoEuiQkD3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tguYk4TVixvlbA00LyI9d5OZ4JAU9GDOZfFRCxvBSHA=; b=h+CyBjGP87FlwYQgfKUwAEKCfUOlJRktbyaUqCSeH8/DMlgmEmnS93e36aEK8yDwJMqnxLqtykyS8ZqE5GgdyVAtQZ6YdjUYpjA7HLY2heKKkoRN2iHFaIIMpp3Uz3GlOf5In9UvrdZrrg65NvyFtEXNBeX8gzuvOTKg15oLzls= Received: from DUZPR01CA0209.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::22) by DB9P190MB1226.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:220::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:43:52 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::3) by DUZPR01CA0209.outlook.office365.com (2603:10a6:10:4b6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.29 via Frontend Transport; Tue, 29 Oct 2024 16:43:52 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:43:51 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, stephen@networkplumber.org, Oleksandr Kolomeiets Subject: [PATCH v4 60/86] net/ntnic: add TSM module Date: Tue, 29 Oct 2024 17:42:04 +0100 Message-ID: <20241029164243.1648775-61-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|DB9P190MB1226:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: d37a2a38-7055-4904-c15e-08dcf838deff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?EfKsfnls1/zmifGJKuRJUuS5RaFSSBmKdemiad1+69jtwAc5P3kIWc5MC1t5?= =?us-ascii?Q?UQue1NFD39miNR39ix5bbnAm1halEW+AfmY96E7BauQ0n4NClkPZy3rtn9de?= =?us-ascii?Q?b6j8h9jgV2S0k2F8joFEfIA0A5XBT1oPIpbBX4GgxDhj4j6gNYKvwDp2Ou9F?= =?us-ascii?Q?yj00ikIgiHSJx0DfNhx/fyAlpxBOquQgY+ziqgZrqVrZ4wHAhhtPqmmz//B5?= =?us-ascii?Q?yXHpaSdT8GFUBlA7/2voeAtrhRAnryvG4pDwnwEWex2m0Cik5HbPqAfvdSxq?= =?us-ascii?Q?pfrZybDlzdDf7eAEB91l+hh7rEPD2Q9ZerbG/jsXLPQAalp06DwroddnQKdv?= =?us-ascii?Q?+c1lz5LdWOYv1ReFlGQZ+uZqPO3awcsziK5hu7juCj8905j8Lybdz2X68Ozg?= =?us-ascii?Q?PY6ZCJTQry31tuUf1+9Cn3tAX25IaQkuJWLY/QaTyAPvGUecso01ibVNWWzd?= =?us-ascii?Q?KkCwAsgl8YqgNSgZiyXtgz+g2Ibr20MdI+aBJ8577rHm/rWgppiPsfcfht8u?= =?us-ascii?Q?bfyYdW9HIsx5dp+1EXpAP6u5aEw+zTHF11g58OJl4DlT7XI/unyiFUfLmvaj?= =?us-ascii?Q?6APP58l5B62pAdkIVABVhA9Ha6KrKmzCqJQ3R4pDkbykAp9g+W75hHJqJ3uf?= =?us-ascii?Q?mlmZFjQ2dYj+97+JCZGJeVlFMakQ7QcESgjtqRIxTLaW1/T1MQaF8+XSzsnO?= =?us-ascii?Q?JT/XNL6jHOYqEsMY/eBEhPFI3RkvGgDotZLAK3Ovoly7ARVce3Um0Wemy57x?= =?us-ascii?Q?PuwBS2vTZ4qjrmemjYcY9/CQeBX/plf3gsJlz5BP/68xWk9kcU71cpFc9vXn?= =?us-ascii?Q?vZ+sKUguHe9ENL9h8TiFrb/u06ye3TPCg/lnrUz9vefWDd08vUbfI/2Qh3cO?= =?us-ascii?Q?SXCfszgawBS0Xby3KegLu8LEqQJ94CeK7GF+/Wi8b1H8PvB0zQpAb/2wAcPj?= =?us-ascii?Q?O9JbeVZoXx8+4GUh/ZHqhjpsAxWmOKMD+TQQlIYXhtQDS9Kh/2cozWv44s1p?= =?us-ascii?Q?Lwqtb/2CwvR8EmsvTf9B33xbs49rq1jWOr4B1k6n68ga3QW963j24SU60FK8?= =?us-ascii?Q?V4cRzoGtdeOAsua4JC32Y1ECytCSilKGE1mAJYjQnY87llp/1AXaa5CwUPAX?= =?us-ascii?Q?Xg1H6oo++xfsK+0uJHOoL3U6fPjfM1rf6A0CAtHRJBJsaMvIQBuN1X7vWHQN?= =?us-ascii?Q?aUmTE8RHJAUCUxLDsoWGCbJ7plP9xm1PjHE4Bb6AcW+QgDThxRg4kglt58VG?= =?us-ascii?Q?c44fR0dCqTqDwZmL0Q1gOo8ff6AUP2ML+9V7Hxs568aDSPyENAnz6OyLNey/?= =?us-ascii?Q?bX3XXPUuZi5AUvz8ujbnSzEB47gQlq3tHohVUfzPMkTad3+4rMpn5M3Jq5Vf?= =?us-ascii?Q?figa1r3xnHou0vMmAvwMSN6BGCVIzypQiDzhEKJ3kTDCg+sAiA=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(376014)(36860700013)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: mTTQ6yeh9OFY/9HHrogV2oEuwRbfRnLGb6hZN5uITf/BqNEz3ZLCko2QxMLxP2SkT8Wm6mkCumXbEMjNH5axQBVzInCTAYFZ9DWgSQBELvX1yyF/vPgGGhSDzSiSrZPEgfuGDTO1GRpZly+vXtFA6G8Vt3oxrAm5FMwqhIf/sNChAxIg5sWlJJ5pXmTZ0iRhK/dmM2c1ASN6KNYXNGCn/HKsq7woixTtz2CjyFcUP8gobmd76ZeZcAFx8swyKQOV52gHJtsTfN4gu3kxOW6wgAeoM3S/uS2e4d2WHU01GbaQZNj1UoftKKOzk9F6rZYd6Duqj8oI0e2apGExgKiMqLfsven2nMfV4I8zPW3hQt7/HQYot2aKnNlpKQTdHh8nmHu4x4LdMFYJjoBj3GZBA64HY/3dU3r3zTvXLrvcDGpRZiSwR4/9pPv/EVX1Mt60JyZlKB2rPnKUXcG1pijGLa3JTZluPGUjt3ZyRf7pLDT9ZXAXbkGIi7/aOZkqYzsqJcu0PmzG2jjXPfc9fU7X4z9fmBcSFssRcsvlEwranrhEmFd12zVGC4G2A1qIRZsNJdo/jGv3tEfhRPP0fZ5PbDBnTr7nd6Ck1USapdUMmNhl/0KV4lI/wcMF0sRJ5vlo8+NK+UeQXF0W4hdTYZhC3oUDn4udD7Eymj0Rq9SKi8E= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:43:51.9959 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d37a2a38-7055-4904-c15e-08dcf838deff X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P190MB1226 X-OriginatorOrg: napatech.com X-BESS-ID: 1730222167-304438-12711-31956-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.51.176 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkbmhuYmQGYGUNTIzNA0Oc3MMN EkyTjVyNLE3DItJcnY2Dg52cLYwiLRQqk2FgBnkR1XQgAAAA== X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260064 [from cloudscan11-75.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Oleksandr Kolomeiets fpga map was extended with tsm module support which enable statistics functionality. Signed-off-by: Oleksandr Kolomeiets --- doc/guides/nics/features/ntnic.ini | 1 + .../supported/nthw_fpga_9563_055_049_0000.c | 394 +++++++++++++++++- .../nthw/supported/nthw_fpga_mod_str_map.c | 1 + .../nthw/supported/nthw_fpga_reg_defs_tsm.h | 177 ++++++++ 4 files changed, 572 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini index e5d5abd0ed..64351bcdc7 100644 --- a/doc/guides/nics/features/ntnic.ini +++ b/doc/guides/nics/features/ntnic.ini @@ -12,6 +12,7 @@ Unicast MAC filter = Y Multicast MAC filter = Y RSS hash = Y RSS key update = Y +Basic stats = Y Linux = Y x86-64 = Y diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c b/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c index efdb084cd6..620968ceb6 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c @@ -2575,6 +2575,397 @@ static nthw_fpga_register_init_s sta_registers[] = { { STA_STATUS, 7, 1, NTHW_FPGA_REG_TYPE_RC1, 0, 1, sta_status_fields }, }; +static nthw_fpga_field_init_s tsm_con0_config_fields[] = { + { TSM_CON0_CONFIG_BLIND, 5, 8, 9 }, { TSM_CON0_CONFIG_DC_SRC, 3, 5, 0 }, + { TSM_CON0_CONFIG_PORT, 3, 0, 0 }, { TSM_CON0_CONFIG_PPSIN_2_5V, 1, 13, 0 }, + { TSM_CON0_CONFIG_SAMPLE_EDGE, 2, 3, 2 }, +}; + +static nthw_fpga_field_init_s tsm_con0_interface_fields[] = { + { TSM_CON0_INTERFACE_EX_TERM, 2, 0, 3 }, { TSM_CON0_INTERFACE_IN_REF_PWM, 8, 12, 128 }, + { TSM_CON0_INTERFACE_PWM_ENA, 1, 2, 0 }, { TSM_CON0_INTERFACE_RESERVED, 1, 3, 0 }, + { TSM_CON0_INTERFACE_VTERM_PWM, 8, 4, 0 }, +}; + +static nthw_fpga_field_init_s tsm_con0_sample_hi_fields[] = { + { TSM_CON0_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con0_sample_lo_fields[] = { + { TSM_CON0_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con1_config_fields[] = { + { TSM_CON1_CONFIG_BLIND, 5, 8, 9 }, { TSM_CON1_CONFIG_DC_SRC, 3, 5, 0 }, + { TSM_CON1_CONFIG_PORT, 3, 0, 0 }, { TSM_CON1_CONFIG_PPSIN_2_5V, 1, 13, 0 }, + { TSM_CON1_CONFIG_SAMPLE_EDGE, 2, 3, 2 }, +}; + +static nthw_fpga_field_init_s tsm_con1_sample_hi_fields[] = { + { TSM_CON1_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con1_sample_lo_fields[] = { + { TSM_CON1_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con2_config_fields[] = { + { TSM_CON2_CONFIG_BLIND, 5, 8, 9 }, { TSM_CON2_CONFIG_DC_SRC, 3, 5, 0 }, + { TSM_CON2_CONFIG_PORT, 3, 0, 0 }, { TSM_CON2_CONFIG_PPSIN_2_5V, 1, 13, 0 }, + { TSM_CON2_CONFIG_SAMPLE_EDGE, 2, 3, 2 }, +}; + +static nthw_fpga_field_init_s tsm_con2_sample_hi_fields[] = { + { TSM_CON2_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con2_sample_lo_fields[] = { + { TSM_CON2_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con3_config_fields[] = { + { TSM_CON3_CONFIG_BLIND, 5, 5, 26 }, + { TSM_CON3_CONFIG_PORT, 3, 0, 1 }, + { TSM_CON3_CONFIG_SAMPLE_EDGE, 2, 3, 1 }, +}; + +static nthw_fpga_field_init_s tsm_con3_sample_hi_fields[] = { + { TSM_CON3_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con3_sample_lo_fields[] = { + { TSM_CON3_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con4_config_fields[] = { + { TSM_CON4_CONFIG_BLIND, 5, 5, 26 }, + { TSM_CON4_CONFIG_PORT, 3, 0, 1 }, + { TSM_CON4_CONFIG_SAMPLE_EDGE, 2, 3, 1 }, +}; + +static nthw_fpga_field_init_s tsm_con4_sample_hi_fields[] = { + { TSM_CON4_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con4_sample_lo_fields[] = { + { TSM_CON4_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con5_config_fields[] = { + { TSM_CON5_CONFIG_BLIND, 5, 5, 26 }, + { TSM_CON5_CONFIG_PORT, 3, 0, 1 }, + { TSM_CON5_CONFIG_SAMPLE_EDGE, 2, 3, 1 }, +}; + +static nthw_fpga_field_init_s tsm_con5_sample_hi_fields[] = { + { TSM_CON5_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con5_sample_lo_fields[] = { + { TSM_CON5_SAMPLE_LO_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con6_config_fields[] = { + { TSM_CON6_CONFIG_BLIND, 5, 5, 26 }, + { TSM_CON6_CONFIG_PORT, 3, 0, 1 }, + { TSM_CON6_CONFIG_SAMPLE_EDGE, 2, 3, 1 }, +}; + +static nthw_fpga_field_init_s tsm_con6_sample_hi_fields[] = { + { TSM_CON6_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con6_sample_lo_fields[] = { + { TSM_CON6_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con7_host_sample_hi_fields[] = { + { TSM_CON7_HOST_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_con7_host_sample_lo_fields[] = { + { TSM_CON7_HOST_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_config_fields[] = { + { TSM_CONFIG_NTTS_SRC, 2, 5, 0 }, { TSM_CONFIG_NTTS_SYNC, 1, 4, 0 }, + { TSM_CONFIG_TIMESET_EDGE, 2, 8, 1 }, { TSM_CONFIG_TIMESET_SRC, 3, 10, 0 }, + { TSM_CONFIG_TIMESET_UP, 1, 7, 0 }, { TSM_CONFIG_TS_FORMAT, 4, 0, 1 }, +}; + +static nthw_fpga_field_init_s tsm_int_config_fields[] = { + { TSM_INT_CONFIG_AUTO_DISABLE, 1, 0, 0 }, + { TSM_INT_CONFIG_MASK, 19, 1, 0 }, +}; + +static nthw_fpga_field_init_s tsm_int_stat_fields[] = { + { TSM_INT_STAT_CAUSE, 19, 1, 0 }, + { TSM_INT_STAT_ENABLE, 1, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_led_fields[] = { + { TSM_LED_LED0_BG_COLOR, 2, 3, 0 }, { TSM_LED_LED0_COLOR, 2, 1, 0 }, + { TSM_LED_LED0_MODE, 1, 0, 0 }, { TSM_LED_LED0_SRC, 4, 5, 0 }, + { TSM_LED_LED1_BG_COLOR, 2, 12, 0 }, { TSM_LED_LED1_COLOR, 2, 10, 0 }, + { TSM_LED_LED1_MODE, 1, 9, 0 }, { TSM_LED_LED1_SRC, 4, 14, 1 }, + { TSM_LED_LED2_BG_COLOR, 2, 21, 0 }, { TSM_LED_LED2_COLOR, 2, 19, 0 }, + { TSM_LED_LED2_MODE, 1, 18, 0 }, { TSM_LED_LED2_SRC, 4, 23, 2 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_config_fields[] = { + { TSM_NTTS_CONFIG_AUTO_HARDSET, 1, 5, 1 }, + { TSM_NTTS_CONFIG_EXT_CLK_ADJ, 1, 6, 0 }, + { TSM_NTTS_CONFIG_HIGH_SAMPLE, 1, 4, 0 }, + { TSM_NTTS_CONFIG_TS_SRC_FORMAT, 4, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_ext_stat_fields[] = { + { TSM_NTTS_EXT_STAT_MASTER_ID, 8, 16, 0x0000 }, + { TSM_NTTS_EXT_STAT_MASTER_REV, 8, 24, 0x0000 }, + { TSM_NTTS_EXT_STAT_MASTER_STAT, 16, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_limit_hi_fields[] = { + { TSM_NTTS_LIMIT_HI_SEC, 16, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_limit_lo_fields[] = { + { TSM_NTTS_LIMIT_LO_NS, 32, 0, 100000 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_offset_fields[] = { + { TSM_NTTS_OFFSET_NS, 30, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_sample_hi_fields[] = { + { TSM_NTTS_SAMPLE_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_sample_lo_fields[] = { + { TSM_NTTS_SAMPLE_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_stat_fields[] = { + { TSM_NTTS_STAT_NTTS_VALID, 1, 0, 0 }, + { TSM_NTTS_STAT_SIGNAL_LOST, 8, 1, 0 }, + { TSM_NTTS_STAT_SYNC_LOST, 8, 9, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_ts_t0_hi_fields[] = { + { TSM_NTTS_TS_T0_HI_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_ts_t0_lo_fields[] = { + { TSM_NTTS_TS_T0_LO_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ntts_ts_t0_offset_fields[] = { + { TSM_NTTS_TS_T0_OFFSET_COUNT, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_pb_ctrl_fields[] = { + { TSM_PB_CTRL_INSTMEM_WR, 1, 1, 0 }, + { TSM_PB_CTRL_RST, 1, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_pb_instmem_fields[] = { + { TSM_PB_INSTMEM_MEM_ADDR, 14, 0, 0 }, + { TSM_PB_INSTMEM_MEM_DATA, 18, 14, 0 }, +}; + +static nthw_fpga_field_init_s tsm_pi_ctrl_i_fields[] = { + { TSM_PI_CTRL_I_VAL, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_pi_ctrl_ki_fields[] = { + { TSM_PI_CTRL_KI_GAIN, 24, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_pi_ctrl_kp_fields[] = { + { TSM_PI_CTRL_KP_GAIN, 24, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_pi_ctrl_shl_fields[] = { + { TSM_PI_CTRL_SHL_VAL, 4, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_stat_fields[] = { + { TSM_STAT_HARD_SYNC, 8, 8, 0 }, { TSM_STAT_LINK_CON0, 1, 0, 0 }, + { TSM_STAT_LINK_CON1, 1, 1, 0 }, { TSM_STAT_LINK_CON2, 1, 2, 0 }, + { TSM_STAT_LINK_CON3, 1, 3, 0 }, { TSM_STAT_LINK_CON4, 1, 4, 0 }, + { TSM_STAT_LINK_CON5, 1, 5, 0 }, { TSM_STAT_NTTS_INSYNC, 1, 6, 0 }, + { TSM_STAT_PTP_MI_PRESENT, 1, 7, 0 }, +}; + +static nthw_fpga_field_init_s tsm_timer_ctrl_fields[] = { + { TSM_TIMER_CTRL_TIMER_EN_T0, 1, 0, 0 }, + { TSM_TIMER_CTRL_TIMER_EN_T1, 1, 1, 0 }, +}; + +static nthw_fpga_field_init_s tsm_timer_t0_fields[] = { + { TSM_TIMER_T0_MAX_COUNT, 30, 0, 50000 }, +}; + +static nthw_fpga_field_init_s tsm_timer_t1_fields[] = { + { TSM_TIMER_T1_MAX_COUNT, 30, 0, 50000 }, +}; + +static nthw_fpga_field_init_s tsm_time_hardset_hi_fields[] = { + { TSM_TIME_HARDSET_HI_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_time_hardset_lo_fields[] = { + { TSM_TIME_HARDSET_LO_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_time_hi_fields[] = { + { TSM_TIME_HI_SEC, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_time_lo_fields[] = { + { TSM_TIME_LO_NS, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_time_rate_adj_fields[] = { + { TSM_TIME_RATE_ADJ_FRACTION, 29, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_hi_fields[] = { + { TSM_TS_HI_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ts_lo_fields[] = { + { TSM_TS_LO_TIME, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s tsm_ts_offset_fields[] = { + { TSM_TS_OFFSET_NS, 30, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_fields[] = { + { TSM_TS_STAT_OVERRUN, 1, 16, 0 }, + { TSM_TS_STAT_SAMPLES, 16, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_hi_offset_fields[] = { + { TSM_TS_STAT_HI_OFFSET_NS, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_lo_offset_fields[] = { + { TSM_TS_STAT_LO_OFFSET_NS, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_tar_hi_fields[] = { + { TSM_TS_STAT_TAR_HI_SEC, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_tar_lo_fields[] = { + { TSM_TS_STAT_TAR_LO_NS, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_x_fields[] = { + { TSM_TS_STAT_X_NS, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_x2_hi_fields[] = { + { TSM_TS_STAT_X2_HI_NS, 16, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_ts_stat_x2_lo_fields[] = { + { TSM_TS_STAT_X2_LO_NS, 32, 0, 0 }, +}; + +static nthw_fpga_field_init_s tsm_utc_offset_fields[] = { + { TSM_UTC_OFFSET_SEC, 8, 0, 0 }, +}; + +static nthw_fpga_register_init_s tsm_registers[] = { + { TSM_CON0_CONFIG, 24, 14, NTHW_FPGA_REG_TYPE_RW, 2320, 5, tsm_con0_config_fields }, + { + TSM_CON0_INTERFACE, 25, 20, NTHW_FPGA_REG_TYPE_RW, 524291, 5, + tsm_con0_interface_fields + }, + { TSM_CON0_SAMPLE_HI, 27, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con0_sample_hi_fields }, + { TSM_CON0_SAMPLE_LO, 26, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con0_sample_lo_fields }, + { TSM_CON1_CONFIG, 28, 14, NTHW_FPGA_REG_TYPE_RW, 2320, 5, tsm_con1_config_fields }, + { TSM_CON1_SAMPLE_HI, 30, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con1_sample_hi_fields }, + { TSM_CON1_SAMPLE_LO, 29, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con1_sample_lo_fields }, + { TSM_CON2_CONFIG, 31, 14, NTHW_FPGA_REG_TYPE_RW, 2320, 5, tsm_con2_config_fields }, + { TSM_CON2_SAMPLE_HI, 33, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con2_sample_hi_fields }, + { TSM_CON2_SAMPLE_LO, 32, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con2_sample_lo_fields }, + { TSM_CON3_CONFIG, 34, 10, NTHW_FPGA_REG_TYPE_RW, 841, 3, tsm_con3_config_fields }, + { TSM_CON3_SAMPLE_HI, 36, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con3_sample_hi_fields }, + { TSM_CON3_SAMPLE_LO, 35, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con3_sample_lo_fields }, + { TSM_CON4_CONFIG, 37, 10, NTHW_FPGA_REG_TYPE_RW, 841, 3, tsm_con4_config_fields }, + { TSM_CON4_SAMPLE_HI, 39, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con4_sample_hi_fields }, + { TSM_CON4_SAMPLE_LO, 38, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con4_sample_lo_fields }, + { TSM_CON5_CONFIG, 40, 10, NTHW_FPGA_REG_TYPE_RW, 841, 3, tsm_con5_config_fields }, + { TSM_CON5_SAMPLE_HI, 42, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con5_sample_hi_fields }, + { TSM_CON5_SAMPLE_LO, 41, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con5_sample_lo_fields }, + { TSM_CON6_CONFIG, 43, 10, NTHW_FPGA_REG_TYPE_RW, 841, 3, tsm_con6_config_fields }, + { TSM_CON6_SAMPLE_HI, 45, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con6_sample_hi_fields }, + { TSM_CON6_SAMPLE_LO, 44, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_con6_sample_lo_fields }, + { + TSM_CON7_HOST_SAMPLE_HI, 47, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + tsm_con7_host_sample_hi_fields + }, + { + TSM_CON7_HOST_SAMPLE_LO, 46, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + tsm_con7_host_sample_lo_fields + }, + { TSM_CONFIG, 0, 13, NTHW_FPGA_REG_TYPE_RW, 257, 6, tsm_config_fields }, + { TSM_INT_CONFIG, 2, 20, NTHW_FPGA_REG_TYPE_RW, 0, 2, tsm_int_config_fields }, + { TSM_INT_STAT, 3, 20, NTHW_FPGA_REG_TYPE_MIXED, 0, 2, tsm_int_stat_fields }, + { TSM_LED, 4, 27, NTHW_FPGA_REG_TYPE_RW, 16793600, 12, tsm_led_fields }, + { TSM_NTTS_CONFIG, 13, 7, NTHW_FPGA_REG_TYPE_RW, 32, 4, tsm_ntts_config_fields }, + { TSM_NTTS_EXT_STAT, 15, 32, NTHW_FPGA_REG_TYPE_MIXED, 0, 3, tsm_ntts_ext_stat_fields }, + { TSM_NTTS_LIMIT_HI, 23, 16, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_ntts_limit_hi_fields }, + { TSM_NTTS_LIMIT_LO, 22, 32, NTHW_FPGA_REG_TYPE_RW, 100000, 1, tsm_ntts_limit_lo_fields }, + { TSM_NTTS_OFFSET, 21, 30, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_ntts_offset_fields }, + { TSM_NTTS_SAMPLE_HI, 19, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ntts_sample_hi_fields }, + { TSM_NTTS_SAMPLE_LO, 18, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ntts_sample_lo_fields }, + { TSM_NTTS_STAT, 14, 17, NTHW_FPGA_REG_TYPE_RO, 0, 3, tsm_ntts_stat_fields }, + { TSM_NTTS_TS_T0_HI, 17, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ntts_ts_t0_hi_fields }, + { TSM_NTTS_TS_T0_LO, 16, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ntts_ts_t0_lo_fields }, + { + TSM_NTTS_TS_T0_OFFSET, 20, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + tsm_ntts_ts_t0_offset_fields + }, + { TSM_PB_CTRL, 63, 2, NTHW_FPGA_REG_TYPE_WO, 0, 2, tsm_pb_ctrl_fields }, + { TSM_PB_INSTMEM, 64, 32, NTHW_FPGA_REG_TYPE_WO, 0, 2, tsm_pb_instmem_fields }, + { TSM_PI_CTRL_I, 54, 32, NTHW_FPGA_REG_TYPE_WO, 0, 1, tsm_pi_ctrl_i_fields }, + { TSM_PI_CTRL_KI, 52, 24, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_pi_ctrl_ki_fields }, + { TSM_PI_CTRL_KP, 51, 24, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_pi_ctrl_kp_fields }, + { TSM_PI_CTRL_SHL, 53, 4, NTHW_FPGA_REG_TYPE_WO, 0, 1, tsm_pi_ctrl_shl_fields }, + { TSM_STAT, 1, 16, NTHW_FPGA_REG_TYPE_RO, 0, 9, tsm_stat_fields }, + { TSM_TIMER_CTRL, 48, 2, NTHW_FPGA_REG_TYPE_RW, 0, 2, tsm_timer_ctrl_fields }, + { TSM_TIMER_T0, 49, 30, NTHW_FPGA_REG_TYPE_RW, 50000, 1, tsm_timer_t0_fields }, + { TSM_TIMER_T1, 50, 30, NTHW_FPGA_REG_TYPE_RW, 50000, 1, tsm_timer_t1_fields }, + { TSM_TIME_HARDSET_HI, 12, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_time_hardset_hi_fields }, + { TSM_TIME_HARDSET_LO, 11, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_time_hardset_lo_fields }, + { TSM_TIME_HI, 9, 32, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_time_hi_fields }, + { TSM_TIME_LO, 8, 32, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_time_lo_fields }, + { TSM_TIME_RATE_ADJ, 10, 29, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_time_rate_adj_fields }, + { TSM_TS_HI, 6, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_hi_fields }, + { TSM_TS_LO, 5, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_lo_fields }, + { TSM_TS_OFFSET, 7, 30, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_ts_offset_fields }, + { TSM_TS_STAT, 55, 17, NTHW_FPGA_REG_TYPE_RO, 0, 2, tsm_ts_stat_fields }, + { + TSM_TS_STAT_HI_OFFSET, 62, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + tsm_ts_stat_hi_offset_fields + }, + { + TSM_TS_STAT_LO_OFFSET, 61, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + tsm_ts_stat_lo_offset_fields + }, + { TSM_TS_STAT_TAR_HI, 57, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_stat_tar_hi_fields }, + { TSM_TS_STAT_TAR_LO, 56, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_stat_tar_lo_fields }, + { TSM_TS_STAT_X, 58, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_stat_x_fields }, + { TSM_TS_STAT_X2_HI, 60, 16, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_stat_x2_hi_fields }, + { TSM_TS_STAT_X2_LO, 59, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, tsm_ts_stat_x2_lo_fields }, + { TSM_UTC_OFFSET, 65, 8, NTHW_FPGA_REG_TYPE_RW, 0, 1, tsm_utc_offset_fields }, +}; + static nthw_fpga_module_init_s fpga_modules[] = { { MOD_CAT, 0, MOD_CAT, 0, 21, NTHW_FPGA_BUS_TYPE_RAB1, 768, 34, cat_registers }, { MOD_CSU, 0, MOD_CSU, 0, 0, NTHW_FPGA_BUS_TYPE_RAB1, 9728, 2, csu_registers }, @@ -2627,6 +3018,7 @@ static nthw_fpga_module_init_s fpga_modules[] = { { MOD_TX_INS, 0, MOD_INS, 0, 2, NTHW_FPGA_BUS_TYPE_RAB1, 8704, 2, ins_registers }, { MOD_TX_RPL, 0, MOD_RPL, 0, 4, NTHW_FPGA_BUS_TYPE_RAB1, 8960, 6, rpl_registers }, { MOD_STA, 0, MOD_STA, 0, 9, NTHW_FPGA_BUS_TYPE_RAB0, 2048, 17, sta_registers }, + { MOD_TSM, 0, MOD_TSM, 0, 8, NTHW_FPGA_BUS_TYPE_RAB2, 1024, 66, tsm_registers }, }; static nthw_fpga_prod_param_s product_parameters[] = { @@ -2785,5 +3177,5 @@ static nthw_fpga_prod_param_s product_parameters[] = { }; nthw_fpga_prod_init_s nthw_fpga_9563_055_049_0000 = { - 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 36, fpga_modules, + 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 37, fpga_modules, }; diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c index a2ab266931..e8ed7faf0d 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c @@ -20,5 +20,6 @@ const struct nthw_fpga_mod_str_s sa_nthw_fpga_mod_str_map[] = { { MOD_RST9563, "RST9563" }, { MOD_SDC, "SDC" }, { MOD_STA, "STA" }, + { MOD_TSM, "TSM" }, { 0UL, NULL } }; diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_tsm.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_tsm.h index a087850aa4..cdb733ee17 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_tsm.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_tsm.h @@ -7,8 +7,158 @@ #define _NTHW_FPGA_REG_DEFS_TSM_ /* TSM */ +#define TSM_CON0_CONFIG (0xf893d371UL) +#define TSM_CON0_CONFIG_BLIND (0x59ccfcbUL) +#define TSM_CON0_CONFIG_DC_SRC (0x1879812bUL) +#define TSM_CON0_CONFIG_PORT (0x3ff0bb08UL) +#define TSM_CON0_CONFIG_PPSIN_2_5V (0xb8e78227UL) +#define TSM_CON0_CONFIG_SAMPLE_EDGE (0x4a4022ebUL) +#define TSM_CON0_INTERFACE (0x76e93b59UL) +#define TSM_CON0_INTERFACE_EX_TERM (0xd079b416UL) +#define TSM_CON0_INTERFACE_IN_REF_PWM (0x16f73c33UL) +#define TSM_CON0_INTERFACE_PWM_ENA (0x3629e73fUL) +#define TSM_CON0_INTERFACE_RESERVED (0xf9c5066UL) +#define TSM_CON0_INTERFACE_VTERM_PWM (0x6d2b1e23UL) +#define TSM_CON0_SAMPLE_HI (0x6e536b8UL) +#define TSM_CON0_SAMPLE_HI_SEC (0x5fc26159UL) +#define TSM_CON0_SAMPLE_LO (0x8bea5689UL) +#define TSM_CON0_SAMPLE_LO_NS (0x13d0010dUL) +#define TSM_CON1_CONFIG (0x3439d3efUL) +#define TSM_CON1_CONFIG_BLIND (0x98932ebdUL) +#define TSM_CON1_CONFIG_DC_SRC (0xa1825ac3UL) +#define TSM_CON1_CONFIG_PORT (0xe266628dUL) +#define TSM_CON1_CONFIG_PPSIN_2_5V (0x6f05027fUL) +#define TSM_CON1_CONFIG_SAMPLE_EDGE (0x2f2719adUL) +#define TSM_CON1_SAMPLE_HI (0xc76be978UL) +#define TSM_CON1_SAMPLE_HI_SEC (0xe639bab1UL) +#define TSM_CON1_SAMPLE_LO (0x4a648949UL) +#define TSM_CON1_SAMPLE_LO_NS (0x8edfe07bUL) +#define TSM_CON2_CONFIG (0xbab6d40cUL) +#define TSM_CON2_CONFIG_BLIND (0xe4f20b66UL) +#define TSM_CON2_CONFIG_DC_SRC (0xb0ff30baUL) +#define TSM_CON2_CONFIG_PORT (0x5fac0e43UL) +#define TSM_CON2_CONFIG_PPSIN_2_5V (0xcc5384d6UL) +#define TSM_CON2_CONFIG_SAMPLE_EDGE (0x808e5467UL) +#define TSM_CON2_SAMPLE_HI (0x5e898f79UL) +#define TSM_CON2_SAMPLE_HI_SEC (0xf744d0c8UL) +#define TSM_CON2_SAMPLE_LO (0xd386ef48UL) +#define TSM_CON2_SAMPLE_LO_NS (0xf2bec5a0UL) +#define TSM_CON3_CONFIG (0x761cd492UL) +#define TSM_CON3_CONFIG_BLIND (0x79fdea10UL) +#define TSM_CON3_CONFIG_PORT (0x823ad7c6UL) +#define TSM_CON3_CONFIG_SAMPLE_EDGE (0xe5e96f21UL) +#define TSM_CON3_SAMPLE_HI (0x9f0750b9UL) +#define TSM_CON3_SAMPLE_HI_SEC (0x4ebf0b20UL) +#define TSM_CON3_SAMPLE_LO (0x12083088UL) +#define TSM_CON3_SAMPLE_LO_NS (0x6fb124d6UL) +#define TSM_CON4_CONFIG (0x7cd9dd8bUL) +#define TSM_CON4_CONFIG_BLIND (0x1c3040d0UL) +#define TSM_CON4_CONFIG_PORT (0xff49d19eUL) +#define TSM_CON4_CONFIG_SAMPLE_EDGE (0x4adc9b2UL) +#define TSM_CON4_SAMPLE_HI (0xb63c453aUL) +#define TSM_CON4_SAMPLE_HI_SEC (0xd5be043aUL) +#define TSM_CON4_SAMPLE_LO (0x3b33250bUL) +#define TSM_CON4_SAMPLE_LO_NS (0xa7c8e16UL) +#define TSM_CON5_CONFIG (0xb073dd15UL) +#define TSM_CON5_CONFIG_BLIND (0x813fa1a6UL) +#define TSM_CON5_CONFIG_PORT (0x22df081bUL) +#define TSM_CON5_CONFIG_SAMPLE_EDGE (0x61caf2f4UL) +#define TSM_CON5_SAMPLE_HI (0x77b29afaUL) +#define TSM_CON5_SAMPLE_HI_SEC (0x6c45dfd2UL) +#define TSM_CON5_SAMPLE_LO (0xfabdfacbUL) +#define TSM_CON5_SAMPLE_LO_TIME (0x945d87e8UL) +#define TSM_CON6_CONFIG (0x3efcdaf6UL) +#define TSM_CON6_CONFIG_BLIND (0xfd5e847dUL) +#define TSM_CON6_CONFIG_PORT (0x9f1564d5UL) +#define TSM_CON6_CONFIG_SAMPLE_EDGE (0xce63bf3eUL) +#define TSM_CON6_SAMPLE_HI (0xee50fcfbUL) +#define TSM_CON6_SAMPLE_HI_SEC (0x7d38b5abUL) +#define TSM_CON6_SAMPLE_LO (0x635f9ccaUL) +#define TSM_CON6_SAMPLE_LO_NS (0xeb124abbUL) +#define TSM_CON7_HOST_SAMPLE_HI (0xdcd90e52UL) +#define TSM_CON7_HOST_SAMPLE_HI_SEC (0xd98d3618UL) +#define TSM_CON7_HOST_SAMPLE_LO (0x51d66e63UL) +#define TSM_CON7_HOST_SAMPLE_LO_NS (0x8f5594ddUL) #define TSM_CONFIG (0xef5dec83UL) +#define TSM_CONFIG_NTTS_SRC (0x1b60227bUL) +#define TSM_CONFIG_NTTS_SYNC (0x43e0a69dUL) +#define TSM_CONFIG_TIMESET_EDGE (0x8c381127UL) +#define TSM_CONFIG_TIMESET_SRC (0xe7590a31UL) +#define TSM_CONFIG_TIMESET_UP (0x561980c1UL) #define TSM_CONFIG_TS_FORMAT (0xe6efc2faUL) +#define TSM_INT_CONFIG (0x9a0d52dUL) +#define TSM_INT_CONFIG_AUTO_DISABLE (0x9581470UL) +#define TSM_INT_CONFIG_MASK (0xf00cd3d7UL) +#define TSM_INT_STAT (0xa4611a70UL) +#define TSM_INT_STAT_CAUSE (0x315168cfUL) +#define TSM_INT_STAT_ENABLE (0x980a12d1UL) +#define TSM_LED (0x6ae05f87UL) +#define TSM_LED_LED0_BG_COLOR (0x897cf9eeUL) +#define TSM_LED_LED0_COLOR (0x6d7ada39UL) +#define TSM_LED_LED0_MODE (0x6087b644UL) +#define TSM_LED_LED0_SRC (0x4fe29639UL) +#define TSM_LED_LED1_BG_COLOR (0x66be92d0UL) +#define TSM_LED_LED1_COLOR (0xcb0dd18dUL) +#define TSM_LED_LED1_MODE (0xabdb65e1UL) +#define TSM_LED_LED1_SRC (0x7282bf89UL) +#define TSM_LED_LED2_BG_COLOR (0x8d8929d3UL) +#define TSM_LED_LED2_COLOR (0xfae5cb10UL) +#define TSM_LED_LED2_MODE (0x2d4f174fUL) +#define TSM_LED_LED2_SRC (0x3522c559UL) +#define TSM_NTTS_CONFIG (0x8bc38bdeUL) +#define TSM_NTTS_CONFIG_AUTO_HARDSET (0xd75be25dUL) +#define TSM_NTTS_CONFIG_EXT_CLK_ADJ (0x700425b6UL) +#define TSM_NTTS_CONFIG_HIGH_SAMPLE (0x37135b7eUL) +#define TSM_NTTS_CONFIG_TS_SRC_FORMAT (0x6e6e707UL) +#define TSM_NTTS_EXT_STAT (0x2b0315b7UL) +#define TSM_NTTS_EXT_STAT_MASTER_ID (0xf263315eUL) +#define TSM_NTTS_EXT_STAT_MASTER_REV (0xd543795eUL) +#define TSM_NTTS_EXT_STAT_MASTER_STAT (0x92d96f5eUL) +#define TSM_NTTS_LIMIT_HI (0x1ddaa85fUL) +#define TSM_NTTS_LIMIT_HI_SEC (0x315c6ef2UL) +#define TSM_NTTS_LIMIT_LO (0x90d5c86eUL) +#define TSM_NTTS_LIMIT_LO_NS (0xe6d94d9aUL) +#define TSM_NTTS_OFFSET (0x6436e72UL) +#define TSM_NTTS_OFFSET_NS (0x12d43a06UL) +#define TSM_NTTS_SAMPLE_HI (0xcdc8aa3eUL) +#define TSM_NTTS_SAMPLE_HI_SEC (0x4f6588fdUL) +#define TSM_NTTS_SAMPLE_LO (0x40c7ca0fUL) +#define TSM_NTTS_SAMPLE_LO_NS (0x6e43ff97UL) +#define TSM_NTTS_STAT (0x6502b820UL) +#define TSM_NTTS_STAT_NTTS_VALID (0x3e184471UL) +#define TSM_NTTS_STAT_SIGNAL_LOST (0x178bedfdUL) +#define TSM_NTTS_STAT_SYNC_LOST (0xe4cd53dfUL) +#define TSM_NTTS_TS_T0_HI (0x1300d1b6UL) +#define TSM_NTTS_TS_T0_HI_TIME (0xa016ae4fUL) +#define TSM_NTTS_TS_T0_LO (0x9e0fb187UL) +#define TSM_NTTS_TS_T0_LO_TIME (0x82006941UL) +#define TSM_NTTS_TS_T0_OFFSET (0xbf70ce4fUL) +#define TSM_NTTS_TS_T0_OFFSET_COUNT (0x35dd4398UL) +#define TSM_PB_CTRL (0x7a8b60faUL) +#define TSM_PB_CTRL_INSTMEM_WR (0xf96e2cbcUL) +#define TSM_PB_CTRL_RESET (0xa38ade8bUL) +#define TSM_PB_CTRL_RST (0x3aaa82f4UL) +#define TSM_PB_INSTMEM (0xb54aeecUL) +#define TSM_PB_INSTMEM_MEM_ADDR (0x9ac79b6eUL) +#define TSM_PB_INSTMEM_MEM_DATA (0x65aefa38UL) +#define TSM_PI_CTRL_I (0x8d71a4e2UL) +#define TSM_PI_CTRL_I_VAL (0x98baedc9UL) +#define TSM_PI_CTRL_KI (0xa1bd86cbUL) +#define TSM_PI_CTRL_KI_GAIN (0x53faa916UL) +#define TSM_PI_CTRL_KP (0xc5d62e0bUL) +#define TSM_PI_CTRL_KP_GAIN (0x7723fa45UL) +#define TSM_PI_CTRL_SHL (0xaa518701UL) +#define TSM_PI_CTRL_SHL_VAL (0x56f56a6fUL) +#define TSM_STAT (0xa55bf677UL) +#define TSM_STAT_HARD_SYNC (0x7fff20fdUL) +#define TSM_STAT_LINK_CON0 (0x216086f0UL) +#define TSM_STAT_LINK_CON1 (0x5667b666UL) +#define TSM_STAT_LINK_CON2 (0xcf6ee7dcUL) +#define TSM_STAT_LINK_CON3 (0xb869d74aUL) +#define TSM_STAT_LINK_CON4 (0x260d42e9UL) +#define TSM_STAT_LINK_CON5 (0x510a727fUL) +#define TSM_STAT_NTTS_INSYNC (0xb593a245UL) +#define TSM_STAT_PTP_MI_PRESENT (0x43131eb0UL) #define TSM_TIMER_CTRL (0x648da051UL) #define TSM_TIMER_CTRL_TIMER_EN_T0 (0x17cee154UL) #define TSM_TIMER_CTRL_TIMER_EN_T1 (0x60c9d1c2UL) @@ -16,13 +166,40 @@ #define TSM_TIMER_T0_MAX_COUNT (0xaa601706UL) #define TSM_TIMER_T1 (0x36752733UL) #define TSM_TIMER_T1_MAX_COUNT (0x6beec8c6UL) +#define TSM_TIME_HARDSET_HI (0xf28bdb46UL) +#define TSM_TIME_HARDSET_HI_TIME (0x2d9a28baUL) +#define TSM_TIME_HARDSET_LO (0x7f84bb77UL) +#define TSM_TIME_HARDSET_LO_TIME (0xf8cefb4UL) #define TSM_TIME_HI (0x175acea1UL) #define TSM_TIME_HI_SEC (0xc0e9c9a1UL) #define TSM_TIME_LO (0x9a55ae90UL) #define TSM_TIME_LO_NS (0x879c5c4bUL) +#define TSM_TIME_RATE_ADJ (0xb1cc4bb1UL) +#define TSM_TIME_RATE_ADJ_FRACTION (0xb7ab96UL) #define TSM_TS_HI (0xccfe9e5eUL) #define TSM_TS_HI_TIME (0xc23fed30UL) #define TSM_TS_LO (0x41f1fe6fUL) #define TSM_TS_LO_TIME (0xe0292a3eUL) +#define TSM_TS_OFFSET (0x4b2e6e13UL) +#define TSM_TS_OFFSET_NS (0x68c286b9UL) +#define TSM_TS_STAT (0x64d41b8cUL) +#define TSM_TS_STAT_OVERRUN (0xad9db92aUL) +#define TSM_TS_STAT_SAMPLES (0xb6350e0bUL) +#define TSM_TS_STAT_HI_OFFSET (0x1aa2ddf2UL) +#define TSM_TS_STAT_HI_OFFSET_NS (0xeb040e0fUL) +#define TSM_TS_STAT_LO_OFFSET (0x81218579UL) +#define TSM_TS_STAT_LO_OFFSET_NS (0xb7ff33UL) +#define TSM_TS_STAT_TAR_HI (0x65af24b6UL) +#define TSM_TS_STAT_TAR_HI_SEC (0x7e92f619UL) +#define TSM_TS_STAT_TAR_LO (0xe8a04487UL) +#define TSM_TS_STAT_TAR_LO_NS (0xf7b3f439UL) +#define TSM_TS_STAT_X (0x419f0ddUL) +#define TSM_TS_STAT_X_NS (0xa48c3f27UL) +#define TSM_TS_STAT_X2_HI (0xd6b1c517UL) +#define TSM_TS_STAT_X2_HI_NS (0x4288c50fUL) +#define TSM_TS_STAT_X2_LO (0x5bbea526UL) +#define TSM_TS_STAT_X2_LO_NS (0x92633c13UL) +#define TSM_UTC_OFFSET (0xf622a13aUL) +#define TSM_UTC_OFFSET_SEC (0xd9c80209UL) #endif /* _NTHW_FPGA_REG_DEFS_TSM_ */ -- 2.45.0