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 D99F145B96; Tue, 22 Oct 2024 00:39:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3F40406BB; Tue, 22 Oct 2024 00:39:35 +0200 (CEST) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id 440C940A6E for ; Tue, 22 Oct 2024 00:39:32 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02lp2106.outbound.protection.outlook.com [104.47.11.106]) by mx-outbound19-70.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Oct 2024 22:39:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=thpUdcDW/24jbfENkFfx0rvIwVN5oBze53dsB78rh5jVJeiuDGLEPdfc07v7qpQCfcmlSFUvPeF8zKrN392bmdCqEyvlcA5KXNGmo9MT5zURoFh4iCXl/cmNct990piGSwkjTXezjkKxy6knXmcMbwgUzblCaqwSP9UP7bJra5eql5vYng2qgT7SNgLXaKsgS36j6eDguXb5hetjDM5PPBPyX95WQB3LfVOjRxR5+8fIs9qCHWmtf1vKSgsturQj1WlvqndjoRWRtO/IHk3cRyiZnmTr8E8RBxu6aJ3mQtcZZm+pKYq1SfRJ7gJIXmR8TUl7NLDPOV9OgvDcQmqfHw== 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=lCsJCJkMO9PMJ8vnDZzQJizq2NXR40DcFydc8HBcEjqE+uN/UgIM/n6qVErCB4Hiq70K3gyd+y3j1eslq09y43SEi5+HTRNbKtlJrC9tCpfU1zVj/+2ignkR1iLXm+KAlwFlqvPUv62dU2qwZJXYXaPgBpYnSiPMUDSYitPUZ3D+QpGyxwHw+t+FgPNo6CdnsaWw1rCXZENq0sxeNC/nKev4Ps1bneFtrKu46K9+M249tcb+oS2EQpaHGuQYVXxSxtUeGUGCptJ7uT+4P/7JR7fO80JLLQNbyEpbMkgYlWnVjoRZmkjhrgMvq1HlbLuMlC/NH/NdjShn47eMaIMpqg== 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=ZnW0jR0pQwE2DBj1CdYiouWXnuHqz0Pr2s9UWjhCuJv52GAlnNOwpHnltEdn2n4d4Fd2k7eytnzTgWMdf+VxZx3tCTjPpf+EKKUoWsa3nmBQR72wzURTNLd6k5nv1q8mPC6+qGNCHL/rgZWLKHCXNgjdhmkgG/JUgRJ0E4J1yBw= Received: from AS9PR04CA0133.eurprd04.prod.outlook.com (2603:10a6:20b:48a::6) by AM9P190MB1345.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:266::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 21:06:14 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::6c) by AS9PR04CA0133.outlook.office365.com (2603:10a6:20b:48a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 21:06:14 +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 AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 21:06:13 +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, Oleksandr Kolomeiets Subject: [PATCH v1 60/73] net/ntnic: add TSM module Date: Mon, 21 Oct 2024 23:05:02 +0200 Message-ID: <20241021210527.2075431-61-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241021210527.2075431-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001A8:EE_|AM9P190MB1345:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 752dc2a4-1bdd-433e-379e-08dcf2143281 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sAbnD4MwAetKhUdcxX+C29UJdtrgugZqn+Aov0SAuMBMlJIFKU5RQBaHZNe8?= =?us-ascii?Q?D8hxrEYEYlfE0cPCmgh2oDyC3D+fnALov9I8ORxTfjex4XYynooQNgIQ3Tap?= =?us-ascii?Q?DBpVTCEzFWKhGltNGATzHoKM/wSjMwJV3B+2Q2S1hkd5pYYSvC+t6TqeXKjg?= =?us-ascii?Q?eugp5fEsXjlMr7dPTzvWsbBGK7ZbOzFjwhGI+CdUOf5az9dz8GZud9Ww/M2Q?= =?us-ascii?Q?/qXieH5H4kpx4lR7ynoDfQimALeOuqXTdkZF51XwKhE68QrPQcpLEPnrBXZS?= =?us-ascii?Q?A2nXmBFoL7zVFcY9GE/co0mPw3p+fVBkgrIp9tjzKLXr04TuBZU4A4dd6QWf?= =?us-ascii?Q?d/bC3IoSQSQ+LmFdO63enmLA3UvVO+W5RfSlqzYMdsZCICbVMTsuyt76EZcR?= =?us-ascii?Q?1LwOkJntKVEiaudCuvqInQk/BEBpmpF+ifHYxa/CZaodjQOzf0YMAYg49gTg?= =?us-ascii?Q?r85balG+2E4Q6puDIgbO49/voUxl/kR+xjqXMcnxwzYL1drueQkEUTvG61tq?= =?us-ascii?Q?g7BOv133TFztsnCNw77aQ3LEHSjWb63Y+7EyHOOXUmC6I/N0KzecoezZPLb4?= =?us-ascii?Q?Frgw7DBrPWhdb42NTCceKyxqps53VzK6/vPpa84ZnuPkuByozTcwSkD4fFU5?= =?us-ascii?Q?bgjM2+/JgX6Sm371/a33UExdhG0oQ7MQ4nTH8wA5PTDy/A/WW+Y+7B0jS/do?= =?us-ascii?Q?MqEL++vp9dgPt/B/0isAKZKqOXJYUcWpX7+kUHjtrM37cfLJzLlgHlRR4HN9?= =?us-ascii?Q?LpUTKmyav3c2PcNU1/t0Iz7Cuat9dGv0pcjvJj91yN8SVO4Zulfu5YYd9RuK?= =?us-ascii?Q?TtsvSlbApruVmekK0c+ZAuSJSgpQmT/YB6Z+CRZosBvc/vk2ZiSoWL88A4+s?= =?us-ascii?Q?1pG4ZcUgkX6h3cK8gPhf2dI8KXkgmrj4vQ8I279yvoXVmeq4eJjZWiCUhfhQ?= =?us-ascii?Q?6wdlFd7SJZNulCz1RP1gshVMrJGZtT5T5LbJS3ZXy1KBhasIqtRlCevWIEFI?= =?us-ascii?Q?q74cLPYRrSTt/NHXyc50LAJHAjnb5waAwOZv7hbSryHZty5nP0gW8/6SRPRY?= =?us-ascii?Q?+mdYeumImW8qfvL+H2b26/MAXe89pB+EW7wbDR6DcfDbsfuPpCv0vNZvXerj?= =?us-ascii?Q?E1LsMonF8F1QwUKN4Xwga6Vu6NwX08aHumnm9ZWBDS8ppm0MEp1K/0n6wlp0?= =?us-ascii?Q?fN3CzEM4Y2ar0dJigVt0F9LevMWVmgMD9uuYjQj3hAVbxzthZZVMJNxTqZDX?= =?us-ascii?Q?5wRqPai/f1Q40fNJNJVvamyc7Lv1If2gVGvPRKUoiQ4zJLr+I57B7Csuv+4l?= =?us-ascii?Q?P0yZ6E1q4hY6wZ3pIfQ5JbnzvQ7S32qwnmh8V3uVqn/XykM8T4Htw51rVF56?= =?us-ascii?Q?RpE8eJs85izpGK3saX6LBv9p3uX5erkTJvnrj7OzmPIYYyiFsw=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)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: /2qFa9sdI/tzmyK1a98VKTlQYl+8ricGjouBtwy4MLvFTJ0X/z6QdjvgrucWwyycrEJ5u8sI2EZtsW3DUYEI1g2z+Ph81O2pXBkZYoadZQ/zDi3T0UMAF3jI8cJY90G4j5eh+BJOIHAfOQfU2A0Y9DElezct84ACotE6EoFg0VKsaUN2o8nO0ywORxrRxN4OVSIA1bVBTX3kdZAIqJAs2oot4hyS4vXpkwh2yVIixdI3tHHt6b1i3eqmlUgoyod9gvxyF+a4TT1eFVlYGBswlB+cWrSXUTetwmzxtQaFE6xex+s8QYndCm6WRZkUgo4VWsxJkWyKHt7+9Yb8ludj4LkSPoitL/5omNIrJfUgaxSKELrkO6GzFLyaOHXSFpkuYgIet5szP6AtC32CrER9HONTjP2Cd7ATktPyooMZLL7e4cmN8j8masUKA+b5HsQbEnktPzIWlVkk89NzQzyfh3OlDkdYG+WFKF6ZhXyPU/KUfD7XelkMmgNdPEG1pm7vMLmoAxkFEhmRNZWsG7J2REdfkVlgwwrsMCOSMqz+TGtifH8zp5Fq3Unf97IcABlA0RV15igcqjHD+el/qCrzaSdgs8/Kj/sn6Rg8xW/8S6cTWwwJlaG8C+yftGnRhK28SzvH5nCe/3SR75CfiIE3gSJz0LEXa83yOh96dxSU/V0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:06:13.8802 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 752dc2a4-1bdd-433e-379e-08dcf2143281 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: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1345 X-OriginatorOrg: napatech.com X-BESS-ID: 1729550370-304934-12655-49164-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.11.106 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.259884 [from cloudscan17-193.eu-central-1b.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