18c2ecf20Sopenharmony_ci/***********************license start***************
28c2ecf20Sopenharmony_ci * Author: Cavium Inc.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Contact: support@cavium.com
58c2ecf20Sopenharmony_ci * This file is part of the OCTEON SDK
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (c) 2003-2014 Cavium Inc.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This file is free software; you can redistribute it and/or modify
108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as
118c2ecf20Sopenharmony_ci * published by the Free Software Foundation.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * This file is distributed in the hope that it will be useful, but
148c2ecf20Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
158c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
168c2ecf20Sopenharmony_ci * NONINFRINGEMENT.  See the GNU General Public License for more
178c2ecf20Sopenharmony_ci * details.
188c2ecf20Sopenharmony_ci *
198c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License
208c2ecf20Sopenharmony_ci * along with this file; if not, write to the Free Software
218c2ecf20Sopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
228c2ecf20Sopenharmony_ci * or visit http://www.gnu.org/licenses/.
238c2ecf20Sopenharmony_ci *
248c2ecf20Sopenharmony_ci * This file may also be available under a different license from Cavium.
258c2ecf20Sopenharmony_ci * Contact Cavium Inc. for more information
268c2ecf20Sopenharmony_ci ***********************license end**************************************/
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#ifndef __CVMX_RST_DEFS_H__
298c2ecf20Sopenharmony_ci#define __CVMX_RST_DEFS_H__
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define CVMX_RST_BOOT (CVMX_ADD_IO_SEG(0x0001180006001600ull))
328c2ecf20Sopenharmony_ci#define CVMX_RST_CFG (CVMX_ADD_IO_SEG(0x0001180006001610ull))
338c2ecf20Sopenharmony_ci#define CVMX_RST_CKILL (CVMX_ADD_IO_SEG(0x0001180006001638ull))
348c2ecf20Sopenharmony_ci#define CVMX_RST_CTLX(offset) (CVMX_ADD_IO_SEG(0x0001180006001640ull) + ((offset) & 3) * 8)
358c2ecf20Sopenharmony_ci#define CVMX_RST_DELAY (CVMX_ADD_IO_SEG(0x0001180006001608ull))
368c2ecf20Sopenharmony_ci#define CVMX_RST_ECO (CVMX_ADD_IO_SEG(0x00011800060017B8ull))
378c2ecf20Sopenharmony_ci#define CVMX_RST_INT (CVMX_ADD_IO_SEG(0x0001180006001628ull))
388c2ecf20Sopenharmony_ci#define CVMX_RST_OCX (CVMX_ADD_IO_SEG(0x0001180006001618ull))
398c2ecf20Sopenharmony_ci#define CVMX_RST_POWER_DBG (CVMX_ADD_IO_SEG(0x0001180006001708ull))
408c2ecf20Sopenharmony_ci#define CVMX_RST_PP_POWER (CVMX_ADD_IO_SEG(0x0001180006001700ull))
418c2ecf20Sopenharmony_ci#define CVMX_RST_SOFT_PRSTX(offset) (CVMX_ADD_IO_SEG(0x00011800060016C0ull) + ((offset) & 3) * 8)
428c2ecf20Sopenharmony_ci#define CVMX_RST_SOFT_RST (CVMX_ADD_IO_SEG(0x0001180006001680ull))
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciunion cvmx_rst_boot {
458c2ecf20Sopenharmony_ci	uint64_t u64;
468c2ecf20Sopenharmony_ci	struct cvmx_rst_boot_s {
478c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
488c2ecf20Sopenharmony_ci		uint64_t chipkill:1;
498c2ecf20Sopenharmony_ci		uint64_t jtcsrdis:1;
508c2ecf20Sopenharmony_ci		uint64_t ejtagdis:1;
518c2ecf20Sopenharmony_ci		uint64_t romen:1;
528c2ecf20Sopenharmony_ci		uint64_t ckill_ppdis:1;
538c2ecf20Sopenharmony_ci		uint64_t jt_tstmode:1;
548c2ecf20Sopenharmony_ci		uint64_t vrm_err:1;
558c2ecf20Sopenharmony_ci		uint64_t reserved_37_56:20;
568c2ecf20Sopenharmony_ci		uint64_t c_mul:7;
578c2ecf20Sopenharmony_ci		uint64_t pnr_mul:6;
588c2ecf20Sopenharmony_ci		uint64_t reserved_21_23:3;
598c2ecf20Sopenharmony_ci		uint64_t lboot_oci:3;
608c2ecf20Sopenharmony_ci		uint64_t lboot_ext:6;
618c2ecf20Sopenharmony_ci		uint64_t lboot:10;
628c2ecf20Sopenharmony_ci		uint64_t rboot:1;
638c2ecf20Sopenharmony_ci		uint64_t rboot_pin:1;
648c2ecf20Sopenharmony_ci#else
658c2ecf20Sopenharmony_ci		uint64_t rboot_pin:1;
668c2ecf20Sopenharmony_ci		uint64_t rboot:1;
678c2ecf20Sopenharmony_ci		uint64_t lboot:10;
688c2ecf20Sopenharmony_ci		uint64_t lboot_ext:6;
698c2ecf20Sopenharmony_ci		uint64_t lboot_oci:3;
708c2ecf20Sopenharmony_ci		uint64_t reserved_21_23:3;
718c2ecf20Sopenharmony_ci		uint64_t pnr_mul:6;
728c2ecf20Sopenharmony_ci		uint64_t c_mul:7;
738c2ecf20Sopenharmony_ci		uint64_t reserved_37_56:20;
748c2ecf20Sopenharmony_ci		uint64_t vrm_err:1;
758c2ecf20Sopenharmony_ci		uint64_t jt_tstmode:1;
768c2ecf20Sopenharmony_ci		uint64_t ckill_ppdis:1;
778c2ecf20Sopenharmony_ci		uint64_t romen:1;
788c2ecf20Sopenharmony_ci		uint64_t ejtagdis:1;
798c2ecf20Sopenharmony_ci		uint64_t jtcsrdis:1;
808c2ecf20Sopenharmony_ci		uint64_t chipkill:1;
818c2ecf20Sopenharmony_ci#endif
828c2ecf20Sopenharmony_ci	} s;
838c2ecf20Sopenharmony_ci};
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ciunion cvmx_rst_cfg {
868c2ecf20Sopenharmony_ci	uint64_t u64;
878c2ecf20Sopenharmony_ci	struct cvmx_rst_cfg_s {
888c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
898c2ecf20Sopenharmony_ci		uint64_t bist_delay:58;
908c2ecf20Sopenharmony_ci		uint64_t reserved_3_5:3;
918c2ecf20Sopenharmony_ci		uint64_t cntl_clr_bist:1;
928c2ecf20Sopenharmony_ci		uint64_t warm_clr_bist:1;
938c2ecf20Sopenharmony_ci		uint64_t soft_clr_bist:1;
948c2ecf20Sopenharmony_ci#else
958c2ecf20Sopenharmony_ci		uint64_t soft_clr_bist:1;
968c2ecf20Sopenharmony_ci		uint64_t warm_clr_bist:1;
978c2ecf20Sopenharmony_ci		uint64_t cntl_clr_bist:1;
988c2ecf20Sopenharmony_ci		uint64_t reserved_3_5:3;
998c2ecf20Sopenharmony_ci		uint64_t bist_delay:58;
1008c2ecf20Sopenharmony_ci#endif
1018c2ecf20Sopenharmony_ci	} s;
1028c2ecf20Sopenharmony_ci};
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ciunion cvmx_rst_ckill {
1058c2ecf20Sopenharmony_ci	uint64_t u64;
1068c2ecf20Sopenharmony_ci	struct cvmx_rst_ckill_s {
1078c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1088c2ecf20Sopenharmony_ci		uint64_t reserved_47_63:17;
1098c2ecf20Sopenharmony_ci		uint64_t timer:47;
1108c2ecf20Sopenharmony_ci#else
1118c2ecf20Sopenharmony_ci		uint64_t timer:47;
1128c2ecf20Sopenharmony_ci		uint64_t reserved_47_63:17;
1138c2ecf20Sopenharmony_ci#endif
1148c2ecf20Sopenharmony_ci	} s;
1158c2ecf20Sopenharmony_ci};
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ciunion cvmx_rst_ctlx {
1188c2ecf20Sopenharmony_ci	uint64_t u64;
1198c2ecf20Sopenharmony_ci	struct cvmx_rst_ctlx_s {
1208c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1218c2ecf20Sopenharmony_ci		uint64_t reserved_10_63:54;
1228c2ecf20Sopenharmony_ci		uint64_t prst_link:1;
1238c2ecf20Sopenharmony_ci		uint64_t rst_done:1;
1248c2ecf20Sopenharmony_ci		uint64_t rst_link:1;
1258c2ecf20Sopenharmony_ci		uint64_t host_mode:1;
1268c2ecf20Sopenharmony_ci		uint64_t reserved_4_5:2;
1278c2ecf20Sopenharmony_ci		uint64_t rst_drv:1;
1288c2ecf20Sopenharmony_ci		uint64_t rst_rcv:1;
1298c2ecf20Sopenharmony_ci		uint64_t rst_chip:1;
1308c2ecf20Sopenharmony_ci		uint64_t rst_val:1;
1318c2ecf20Sopenharmony_ci#else
1328c2ecf20Sopenharmony_ci		uint64_t rst_val:1;
1338c2ecf20Sopenharmony_ci		uint64_t rst_chip:1;
1348c2ecf20Sopenharmony_ci		uint64_t rst_rcv:1;
1358c2ecf20Sopenharmony_ci		uint64_t rst_drv:1;
1368c2ecf20Sopenharmony_ci		uint64_t reserved_4_5:2;
1378c2ecf20Sopenharmony_ci		uint64_t host_mode:1;
1388c2ecf20Sopenharmony_ci		uint64_t rst_link:1;
1398c2ecf20Sopenharmony_ci		uint64_t rst_done:1;
1408c2ecf20Sopenharmony_ci		uint64_t prst_link:1;
1418c2ecf20Sopenharmony_ci		uint64_t reserved_10_63:54;
1428c2ecf20Sopenharmony_ci#endif
1438c2ecf20Sopenharmony_ci	} s;
1448c2ecf20Sopenharmony_ci};
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ciunion cvmx_rst_delay {
1478c2ecf20Sopenharmony_ci	uint64_t u64;
1488c2ecf20Sopenharmony_ci	struct cvmx_rst_delay_s {
1498c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1508c2ecf20Sopenharmony_ci		uint64_t reserved_32_63:32;
1518c2ecf20Sopenharmony_ci		uint64_t warm_rst_dly:16;
1528c2ecf20Sopenharmony_ci		uint64_t soft_rst_dly:16;
1538c2ecf20Sopenharmony_ci#else
1548c2ecf20Sopenharmony_ci		uint64_t soft_rst_dly:16;
1558c2ecf20Sopenharmony_ci		uint64_t warm_rst_dly:16;
1568c2ecf20Sopenharmony_ci		uint64_t reserved_32_63:32;
1578c2ecf20Sopenharmony_ci#endif
1588c2ecf20Sopenharmony_ci	} s;
1598c2ecf20Sopenharmony_ci};
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ciunion cvmx_rst_eco {
1628c2ecf20Sopenharmony_ci	uint64_t u64;
1638c2ecf20Sopenharmony_ci	struct cvmx_rst_eco_s {
1648c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1658c2ecf20Sopenharmony_ci		uint64_t reserved_32_63:32;
1668c2ecf20Sopenharmony_ci		uint64_t eco_rw:32;
1678c2ecf20Sopenharmony_ci#else
1688c2ecf20Sopenharmony_ci		uint64_t eco_rw:32;
1698c2ecf20Sopenharmony_ci		uint64_t reserved_32_63:32;
1708c2ecf20Sopenharmony_ci#endif
1718c2ecf20Sopenharmony_ci	} s;
1728c2ecf20Sopenharmony_ci};
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ciunion cvmx_rst_int {
1758c2ecf20Sopenharmony_ci	uint64_t u64;
1768c2ecf20Sopenharmony_ci	struct cvmx_rst_int_s {
1778c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1788c2ecf20Sopenharmony_ci		uint64_t reserved_12_63:52;
1798c2ecf20Sopenharmony_ci		uint64_t perst:4;
1808c2ecf20Sopenharmony_ci		uint64_t reserved_4_7:4;
1818c2ecf20Sopenharmony_ci		uint64_t rst_link:4;
1828c2ecf20Sopenharmony_ci#else
1838c2ecf20Sopenharmony_ci		uint64_t rst_link:4;
1848c2ecf20Sopenharmony_ci		uint64_t reserved_4_7:4;
1858c2ecf20Sopenharmony_ci		uint64_t perst:4;
1868c2ecf20Sopenharmony_ci		uint64_t reserved_12_63:52;
1878c2ecf20Sopenharmony_ci#endif
1888c2ecf20Sopenharmony_ci	} s;
1898c2ecf20Sopenharmony_ci	struct cvmx_rst_int_cn70xx {
1908c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1918c2ecf20Sopenharmony_ci		uint64_t reserved_11_63:53;
1928c2ecf20Sopenharmony_ci		uint64_t perst:3;
1938c2ecf20Sopenharmony_ci		uint64_t reserved_3_7:5;
1948c2ecf20Sopenharmony_ci		uint64_t rst_link:3;
1958c2ecf20Sopenharmony_ci#else
1968c2ecf20Sopenharmony_ci		uint64_t rst_link:3;
1978c2ecf20Sopenharmony_ci		uint64_t reserved_3_7:5;
1988c2ecf20Sopenharmony_ci		uint64_t perst:3;
1998c2ecf20Sopenharmony_ci		uint64_t reserved_11_63:53;
2008c2ecf20Sopenharmony_ci#endif
2018c2ecf20Sopenharmony_ci	} cn70xx;
2028c2ecf20Sopenharmony_ci};
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ciunion cvmx_rst_ocx {
2058c2ecf20Sopenharmony_ci	uint64_t u64;
2068c2ecf20Sopenharmony_ci	struct cvmx_rst_ocx_s {
2078c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2088c2ecf20Sopenharmony_ci		uint64_t reserved_3_63:61;
2098c2ecf20Sopenharmony_ci		uint64_t rst_link:3;
2108c2ecf20Sopenharmony_ci#else
2118c2ecf20Sopenharmony_ci		uint64_t rst_link:3;
2128c2ecf20Sopenharmony_ci		uint64_t reserved_3_63:61;
2138c2ecf20Sopenharmony_ci#endif
2148c2ecf20Sopenharmony_ci	} s;
2158c2ecf20Sopenharmony_ci};
2168c2ecf20Sopenharmony_ci
2178c2ecf20Sopenharmony_ciunion cvmx_rst_power_dbg {
2188c2ecf20Sopenharmony_ci	uint64_t u64;
2198c2ecf20Sopenharmony_ci	struct cvmx_rst_power_dbg_s {
2208c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2218c2ecf20Sopenharmony_ci		uint64_t reserved_3_63:61;
2228c2ecf20Sopenharmony_ci		uint64_t str:3;
2238c2ecf20Sopenharmony_ci#else
2248c2ecf20Sopenharmony_ci		uint64_t str:3;
2258c2ecf20Sopenharmony_ci		uint64_t reserved_3_63:61;
2268c2ecf20Sopenharmony_ci#endif
2278c2ecf20Sopenharmony_ci	} s;
2288c2ecf20Sopenharmony_ci};
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_ciunion cvmx_rst_pp_power {
2318c2ecf20Sopenharmony_ci	uint64_t u64;
2328c2ecf20Sopenharmony_ci	struct cvmx_rst_pp_power_s {
2338c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2348c2ecf20Sopenharmony_ci		uint64_t reserved_48_63:16;
2358c2ecf20Sopenharmony_ci		uint64_t gate:48;
2368c2ecf20Sopenharmony_ci#else
2378c2ecf20Sopenharmony_ci		uint64_t gate:48;
2388c2ecf20Sopenharmony_ci		uint64_t reserved_48_63:16;
2398c2ecf20Sopenharmony_ci#endif
2408c2ecf20Sopenharmony_ci	} s;
2418c2ecf20Sopenharmony_ci	struct cvmx_rst_pp_power_cn70xx {
2428c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2438c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
2448c2ecf20Sopenharmony_ci		uint64_t gate:4;
2458c2ecf20Sopenharmony_ci#else
2468c2ecf20Sopenharmony_ci		uint64_t gate:4;
2478c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
2488c2ecf20Sopenharmony_ci#endif
2498c2ecf20Sopenharmony_ci	} cn70xx;
2508c2ecf20Sopenharmony_ci};
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_ciunion cvmx_rst_soft_prstx {
2538c2ecf20Sopenharmony_ci	uint64_t u64;
2548c2ecf20Sopenharmony_ci	struct cvmx_rst_soft_prstx_s {
2558c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2568c2ecf20Sopenharmony_ci		uint64_t reserved_1_63:63;
2578c2ecf20Sopenharmony_ci		uint64_t soft_prst:1;
2588c2ecf20Sopenharmony_ci#else
2598c2ecf20Sopenharmony_ci		uint64_t soft_prst:1;
2608c2ecf20Sopenharmony_ci		uint64_t reserved_1_63:63;
2618c2ecf20Sopenharmony_ci#endif
2628c2ecf20Sopenharmony_ci	} s;
2638c2ecf20Sopenharmony_ci};
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ciunion cvmx_rst_soft_rst {
2668c2ecf20Sopenharmony_ci	uint64_t u64;
2678c2ecf20Sopenharmony_ci	struct cvmx_rst_soft_rst_s {
2688c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2698c2ecf20Sopenharmony_ci		uint64_t reserved_1_63:63;
2708c2ecf20Sopenharmony_ci		uint64_t soft_rst:1;
2718c2ecf20Sopenharmony_ci#else
2728c2ecf20Sopenharmony_ci		uint64_t soft_rst:1;
2738c2ecf20Sopenharmony_ci		uint64_t reserved_1_63:63;
2748c2ecf20Sopenharmony_ci#endif
2758c2ecf20Sopenharmony_ci	} s;
2768c2ecf20Sopenharmony_ci};
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ci#endif
279