13c21c530SJan Charvat /* SPDX-License-Identifier: GPL-2.0-or-later */ 23c21c530SJan Charvat /******************************************************************************* 33c21c530SJan Charvat * 43c21c530SJan Charvat * CTU CAN FD IP Core 53c21c530SJan Charvat * 63c21c530SJan Charvat * Copyright (C) 2015-2018 Ondrej Ille <ondrej.ille@gmail.com> FEE CTU 73c21c530SJan Charvat * Copyright (C) 2018-2020 Ondrej Ille <ondrej.ille@gmail.com> self-funded 83c21c530SJan Charvat * Copyright (C) 2018-2019 Martin Jerabek <martin.jerabek01@gmail.com> FEE CTU 93c21c530SJan Charvat * Copyright (C) 2018-2020 Pavel Pisa <pisa@cmp.felk.cvut.cz> FEE CTU/self-funded 103c21c530SJan Charvat * 113c21c530SJan Charvat * Project advisors: 123c21c530SJan Charvat * Jiri Novak <jnovak@fel.cvut.cz> 133c21c530SJan Charvat * Pavel Pisa <pisa@cmp.felk.cvut.cz> 143c21c530SJan Charvat * 153c21c530SJan Charvat * Department of Measurement (http://meas.fel.cvut.cz/) 163c21c530SJan Charvat * Faculty of Electrical Engineering (http://www.fel.cvut.cz) 173c21c530SJan Charvat * Czech Technical University (http://www.cvut.cz/) 183c21c530SJan Charvat * 193c21c530SJan Charvat * This program is free software; you can redistribute it and/or 203c21c530SJan Charvat * modify it under the terms of the GNU General Public License 213c21c530SJan Charvat * as published by the Free Software Foundation; either version 2 223c21c530SJan Charvat * of the License, or (at your option) any later version. 233c21c530SJan Charvat * 243c21c530SJan Charvat * This program is distributed in the hope that it will be useful, 253c21c530SJan Charvat * but WITHOUT ANY WARRANTY; without even the implied warranty of 263c21c530SJan Charvat * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 273c21c530SJan Charvat * GNU General Public License for more details. 283c21c530SJan Charvat ******************************************************************************/ 293c21c530SJan Charvat 303c21c530SJan Charvat /* This file is autogenerated, DO NOT EDIT! */ 313c21c530SJan Charvat 32*52581c71SMarkus Armbruster #ifndef HW_CAN_CTU_CAN_FD_FRAME_H 33*52581c71SMarkus Armbruster #define HW_CAN_CTU_CAN_FD_FRAME_H 343c21c530SJan Charvat 353c21c530SJan Charvat /* CAN_Frame_format memory map */ 363c21c530SJan Charvat enum ctu_can_fd_can_frame_format { 373c21c530SJan Charvat CTU_CAN_FD_FRAME_FORM_W = 0x0, 383c21c530SJan Charvat CTU_CAN_FD_IDENTIFIER_W = 0x4, 393c21c530SJan Charvat CTU_CAN_FD_TIMESTAMP_L_W = 0x8, 403c21c530SJan Charvat CTU_CAN_FD_TIMESTAMP_U_W = 0xc, 413c21c530SJan Charvat CTU_CAN_FD_DATA_1_4_W = 0x10, 423c21c530SJan Charvat CTU_CAN_FD_DATA_5_8_W = 0x14, 433c21c530SJan Charvat CTU_CAN_FD_DATA_61_64_W = 0x4c, 443c21c530SJan Charvat }; 453c21c530SJan Charvat 463c21c530SJan Charvat 473c21c530SJan Charvat /* Register descriptions: */ 483c21c530SJan Charvat union ctu_can_fd_frame_form_w { 493c21c530SJan Charvat uint32_t u32; 503c21c530SJan Charvat struct ctu_can_fd_frame_form_w_s { 513c21c530SJan Charvat #ifdef __LITTLE_ENDIAN_BITFIELD 523c21c530SJan Charvat /* FRAME_FORM_W */ 533c21c530SJan Charvat uint32_t dlc : 4; 543c21c530SJan Charvat uint32_t reserved_4 : 1; 553c21c530SJan Charvat uint32_t rtr : 1; 563c21c530SJan Charvat uint32_t ide : 1; 573c21c530SJan Charvat uint32_t fdf : 1; 583c21c530SJan Charvat uint32_t reserved_8 : 1; 593c21c530SJan Charvat uint32_t brs : 1; 603c21c530SJan Charvat uint32_t esi_rsv : 1; 613c21c530SJan Charvat uint32_t rwcnt : 5; 623c21c530SJan Charvat uint32_t reserved_31_16 : 16; 633c21c530SJan Charvat #else 643c21c530SJan Charvat uint32_t reserved_31_16 : 16; 653c21c530SJan Charvat uint32_t rwcnt : 5; 663c21c530SJan Charvat uint32_t esi_rsv : 1; 673c21c530SJan Charvat uint32_t brs : 1; 683c21c530SJan Charvat uint32_t reserved_8 : 1; 693c21c530SJan Charvat uint32_t fdf : 1; 703c21c530SJan Charvat uint32_t ide : 1; 713c21c530SJan Charvat uint32_t rtr : 1; 723c21c530SJan Charvat uint32_t reserved_4 : 1; 733c21c530SJan Charvat uint32_t dlc : 4; 743c21c530SJan Charvat #endif 753c21c530SJan Charvat } s; 763c21c530SJan Charvat }; 773c21c530SJan Charvat 783c21c530SJan Charvat enum ctu_can_fd_frame_form_w_rtr { 793c21c530SJan Charvat NO_RTR_FRAME = 0x0, 803c21c530SJan Charvat RTR_FRAME = 0x1, 813c21c530SJan Charvat }; 823c21c530SJan Charvat 833c21c530SJan Charvat enum ctu_can_fd_frame_form_w_ide { 843c21c530SJan Charvat BASE = 0x0, 853c21c530SJan Charvat EXTENDED = 0x1, 863c21c530SJan Charvat }; 873c21c530SJan Charvat 883c21c530SJan Charvat enum ctu_can_fd_frame_form_w_fdf { 893c21c530SJan Charvat NORMAL_CAN = 0x0, 903c21c530SJan Charvat FD_CAN = 0x1, 913c21c530SJan Charvat }; 923c21c530SJan Charvat 933c21c530SJan Charvat enum ctu_can_fd_frame_form_w_brs { 943c21c530SJan Charvat BR_NO_SHIFT = 0x0, 953c21c530SJan Charvat BR_SHIFT = 0x1, 963c21c530SJan Charvat }; 973c21c530SJan Charvat 983c21c530SJan Charvat enum ctu_can_fd_frame_form_w_esi_rsv { 993c21c530SJan Charvat ESI_ERR_ACTIVE = 0x0, 1003c21c530SJan Charvat ESI_ERR_PASIVE = 0x1, 1013c21c530SJan Charvat }; 1023c21c530SJan Charvat 1033c21c530SJan Charvat union ctu_can_fd_identifier_w { 1043c21c530SJan Charvat uint32_t u32; 1053c21c530SJan Charvat struct ctu_can_fd_identifier_w_s { 1063c21c530SJan Charvat #ifdef __LITTLE_ENDIAN_BITFIELD 1073c21c530SJan Charvat /* IDENTIFIER_W */ 1083c21c530SJan Charvat uint32_t identifier_ext : 18; 1093c21c530SJan Charvat uint32_t identifier_base : 11; 1103c21c530SJan Charvat uint32_t reserved_31_29 : 3; 1113c21c530SJan Charvat #else 1123c21c530SJan Charvat uint32_t reserved_31_29 : 3; 1133c21c530SJan Charvat uint32_t identifier_base : 11; 1143c21c530SJan Charvat uint32_t identifier_ext : 18; 1153c21c530SJan Charvat #endif 1163c21c530SJan Charvat } s; 1173c21c530SJan Charvat }; 1183c21c530SJan Charvat 1193c21c530SJan Charvat union ctu_can_fd_timestamp_l_w { 1203c21c530SJan Charvat uint32_t u32; 1213c21c530SJan Charvat struct ctu_can_fd_timestamp_l_w_s { 1223c21c530SJan Charvat /* TIMESTAMP_L_W */ 1233c21c530SJan Charvat uint32_t time_stamp_31_0 : 32; 1243c21c530SJan Charvat } s; 1253c21c530SJan Charvat }; 1263c21c530SJan Charvat 1273c21c530SJan Charvat union ctu_can_fd_timestamp_u_w { 1283c21c530SJan Charvat uint32_t u32; 1293c21c530SJan Charvat struct ctu_can_fd_timestamp_u_w_s { 1303c21c530SJan Charvat /* TIMESTAMP_U_W */ 1313c21c530SJan Charvat uint32_t timestamp_l_w : 32; 1323c21c530SJan Charvat } s; 1333c21c530SJan Charvat }; 1343c21c530SJan Charvat 1353c21c530SJan Charvat union ctu_can_fd_data_1_4_w { 1363c21c530SJan Charvat uint32_t u32; 1373c21c530SJan Charvat struct ctu_can_fd_data_1_4_w_s { 1383c21c530SJan Charvat #ifdef __LITTLE_ENDIAN_BITFIELD 1393c21c530SJan Charvat /* DATA_1_4_W */ 1403c21c530SJan Charvat uint32_t data_1 : 8; 1413c21c530SJan Charvat uint32_t data_2 : 8; 1423c21c530SJan Charvat uint32_t data_3 : 8; 1433c21c530SJan Charvat uint32_t data_4 : 8; 1443c21c530SJan Charvat #else 1453c21c530SJan Charvat uint32_t data_4 : 8; 1463c21c530SJan Charvat uint32_t data_3 : 8; 1473c21c530SJan Charvat uint32_t data_2 : 8; 1483c21c530SJan Charvat uint32_t data_1 : 8; 1493c21c530SJan Charvat #endif 1503c21c530SJan Charvat } s; 1513c21c530SJan Charvat }; 1523c21c530SJan Charvat 1533c21c530SJan Charvat union ctu_can_fd_data_5_8_w { 1543c21c530SJan Charvat uint32_t u32; 1553c21c530SJan Charvat struct ctu_can_fd_data_5_8_w_s { 1563c21c530SJan Charvat #ifdef __LITTLE_ENDIAN_BITFIELD 1573c21c530SJan Charvat /* DATA_5_8_W */ 1583c21c530SJan Charvat uint32_t data_5 : 8; 1593c21c530SJan Charvat uint32_t data_6 : 8; 1603c21c530SJan Charvat uint32_t data_7 : 8; 1613c21c530SJan Charvat uint32_t data_8 : 8; 1623c21c530SJan Charvat #else 1633c21c530SJan Charvat uint32_t data_8 : 8; 1643c21c530SJan Charvat uint32_t data_7 : 8; 1653c21c530SJan Charvat uint32_t data_6 : 8; 1663c21c530SJan Charvat uint32_t data_5 : 8; 1673c21c530SJan Charvat #endif 1683c21c530SJan Charvat } s; 1693c21c530SJan Charvat }; 1703c21c530SJan Charvat 1713c21c530SJan Charvat union ctu_can_fd_data_61_64_w { 1723c21c530SJan Charvat uint32_t u32; 1733c21c530SJan Charvat struct ctu_can_fd_data_61_64_w_s { 1743c21c530SJan Charvat #ifdef __LITTLE_ENDIAN_BITFIELD 1753c21c530SJan Charvat /* DATA_61_64_W */ 1763c21c530SJan Charvat uint32_t data_61 : 8; 1773c21c530SJan Charvat uint32_t data_62 : 8; 1783c21c530SJan Charvat uint32_t data_63 : 8; 1793c21c530SJan Charvat uint32_t data_64 : 8; 1803c21c530SJan Charvat #else 1813c21c530SJan Charvat uint32_t data_64 : 8; 1823c21c530SJan Charvat uint32_t data_63 : 8; 1833c21c530SJan Charvat uint32_t data_62 : 8; 1843c21c530SJan Charvat uint32_t data_61 : 8; 1853c21c530SJan Charvat #endif 1863c21c530SJan Charvat } s; 1873c21c530SJan Charvat }; 1883c21c530SJan Charvat 1893c21c530SJan Charvat #endif 190