1 /***********************license start***************
2 * Author: Cavium Networks
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
7 * Copyright (c) 2003-2010 Cavium Networks
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
28 #ifndef __CVMX_GPIO_DEFS_H__
29 #define __CVMX_GPIO_DEFS_H__
31 #define CVMX_GPIO_BIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000800ull) + ((offset) & 15) * 8)
32 #define CVMX_GPIO_BOOT_ENA (CVMX_ADD_IO_SEG(0x00010700000008A8ull))
33 #define CVMX_GPIO_CLK_GENX(offset) (CVMX_ADD_IO_SEG(0x00010700000008C0ull) + ((offset) & 3) * 8)
34 #define CVMX_GPIO_CLK_QLMX(offset) (CVMX_ADD_IO_SEG(0x00010700000008E0ull) + ((offset) & 1) * 8)
35 #define CVMX_GPIO_DBG_ENA (CVMX_ADD_IO_SEG(0x00010700000008A0ull))
36 #define CVMX_GPIO_INT_CLR (CVMX_ADD_IO_SEG(0x0001070000000898ull))
37 #define CVMX_GPIO_RX_DAT (CVMX_ADD_IO_SEG(0x0001070000000880ull))
38 #define CVMX_GPIO_TX_CLR (CVMX_ADD_IO_SEG(0x0001070000000890ull))
39 #define CVMX_GPIO_TX_SET (CVMX_ADD_IO_SEG(0x0001070000000888ull))
40 #define CVMX_GPIO_XBIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000900ull) + ((offset) & 31) * 8 - 8*16)
42 union cvmx_gpio_bit_cfgx
{
44 struct cvmx_gpio_bit_cfgx_s
{
45 uint64_t reserved_17_63
:47;
56 struct cvmx_gpio_bit_cfgx_cn30xx
{
57 uint64_t reserved_12_63
:52;
65 struct cvmx_gpio_bit_cfgx_cn30xx cn31xx
;
66 struct cvmx_gpio_bit_cfgx_cn30xx cn38xx
;
67 struct cvmx_gpio_bit_cfgx_cn30xx cn38xxp2
;
68 struct cvmx_gpio_bit_cfgx_cn30xx cn50xx
;
69 struct cvmx_gpio_bit_cfgx_cn52xx
{
70 uint64_t reserved_15_63
:49;
80 struct cvmx_gpio_bit_cfgx_cn52xx cn52xxp1
;
81 struct cvmx_gpio_bit_cfgx_cn52xx cn56xx
;
82 struct cvmx_gpio_bit_cfgx_cn52xx cn56xxp1
;
83 struct cvmx_gpio_bit_cfgx_cn30xx cn58xx
;
84 struct cvmx_gpio_bit_cfgx_cn30xx cn58xxp1
;
85 struct cvmx_gpio_bit_cfgx_s cn63xx
;
86 struct cvmx_gpio_bit_cfgx_s cn63xxp1
;
89 union cvmx_gpio_boot_ena
{
91 struct cvmx_gpio_boot_ena_s
{
92 uint64_t reserved_12_63
:52;
94 uint64_t reserved_0_7
:8;
96 struct cvmx_gpio_boot_ena_s cn30xx
;
97 struct cvmx_gpio_boot_ena_s cn31xx
;
98 struct cvmx_gpio_boot_ena_s cn50xx
;
101 union cvmx_gpio_clk_genx
{
103 struct cvmx_gpio_clk_genx_s
{
104 uint64_t reserved_32_63
:32;
107 struct cvmx_gpio_clk_genx_s cn52xx
;
108 struct cvmx_gpio_clk_genx_s cn52xxp1
;
109 struct cvmx_gpio_clk_genx_s cn56xx
;
110 struct cvmx_gpio_clk_genx_s cn56xxp1
;
111 struct cvmx_gpio_clk_genx_s cn63xx
;
112 struct cvmx_gpio_clk_genx_s cn63xxp1
;
115 union cvmx_gpio_clk_qlmx
{
117 struct cvmx_gpio_clk_qlmx_s
{
118 uint64_t reserved_3_63
:61;
122 struct cvmx_gpio_clk_qlmx_s cn63xx
;
123 struct cvmx_gpio_clk_qlmx_s cn63xxp1
;
126 union cvmx_gpio_dbg_ena
{
128 struct cvmx_gpio_dbg_ena_s
{
129 uint64_t reserved_21_63
:43;
132 struct cvmx_gpio_dbg_ena_s cn30xx
;
133 struct cvmx_gpio_dbg_ena_s cn31xx
;
134 struct cvmx_gpio_dbg_ena_s cn50xx
;
137 union cvmx_gpio_int_clr
{
139 struct cvmx_gpio_int_clr_s
{
140 uint64_t reserved_16_63
:48;
143 struct cvmx_gpio_int_clr_s cn30xx
;
144 struct cvmx_gpio_int_clr_s cn31xx
;
145 struct cvmx_gpio_int_clr_s cn38xx
;
146 struct cvmx_gpio_int_clr_s cn38xxp2
;
147 struct cvmx_gpio_int_clr_s cn50xx
;
148 struct cvmx_gpio_int_clr_s cn52xx
;
149 struct cvmx_gpio_int_clr_s cn52xxp1
;
150 struct cvmx_gpio_int_clr_s cn56xx
;
151 struct cvmx_gpio_int_clr_s cn56xxp1
;
152 struct cvmx_gpio_int_clr_s cn58xx
;
153 struct cvmx_gpio_int_clr_s cn58xxp1
;
154 struct cvmx_gpio_int_clr_s cn63xx
;
155 struct cvmx_gpio_int_clr_s cn63xxp1
;
158 union cvmx_gpio_rx_dat
{
160 struct cvmx_gpio_rx_dat_s
{
161 uint64_t reserved_24_63
:40;
164 struct cvmx_gpio_rx_dat_s cn30xx
;
165 struct cvmx_gpio_rx_dat_s cn31xx
;
166 struct cvmx_gpio_rx_dat_cn38xx
{
167 uint64_t reserved_16_63
:48;
170 struct cvmx_gpio_rx_dat_cn38xx cn38xxp2
;
171 struct cvmx_gpio_rx_dat_s cn50xx
;
172 struct cvmx_gpio_rx_dat_cn38xx cn52xx
;
173 struct cvmx_gpio_rx_dat_cn38xx cn52xxp1
;
174 struct cvmx_gpio_rx_dat_cn38xx cn56xx
;
175 struct cvmx_gpio_rx_dat_cn38xx cn56xxp1
;
176 struct cvmx_gpio_rx_dat_cn38xx cn58xx
;
177 struct cvmx_gpio_rx_dat_cn38xx cn58xxp1
;
178 struct cvmx_gpio_rx_dat_cn38xx cn63xx
;
179 struct cvmx_gpio_rx_dat_cn38xx cn63xxp1
;
182 union cvmx_gpio_tx_clr
{
184 struct cvmx_gpio_tx_clr_s
{
185 uint64_t reserved_24_63
:40;
188 struct cvmx_gpio_tx_clr_s cn30xx
;
189 struct cvmx_gpio_tx_clr_s cn31xx
;
190 struct cvmx_gpio_tx_clr_cn38xx
{
191 uint64_t reserved_16_63
:48;
194 struct cvmx_gpio_tx_clr_cn38xx cn38xxp2
;
195 struct cvmx_gpio_tx_clr_s cn50xx
;
196 struct cvmx_gpio_tx_clr_cn38xx cn52xx
;
197 struct cvmx_gpio_tx_clr_cn38xx cn52xxp1
;
198 struct cvmx_gpio_tx_clr_cn38xx cn56xx
;
199 struct cvmx_gpio_tx_clr_cn38xx cn56xxp1
;
200 struct cvmx_gpio_tx_clr_cn38xx cn58xx
;
201 struct cvmx_gpio_tx_clr_cn38xx cn58xxp1
;
202 struct cvmx_gpio_tx_clr_cn38xx cn63xx
;
203 struct cvmx_gpio_tx_clr_cn38xx cn63xxp1
;
206 union cvmx_gpio_tx_set
{
208 struct cvmx_gpio_tx_set_s
{
209 uint64_t reserved_24_63
:40;
212 struct cvmx_gpio_tx_set_s cn30xx
;
213 struct cvmx_gpio_tx_set_s cn31xx
;
214 struct cvmx_gpio_tx_set_cn38xx
{
215 uint64_t reserved_16_63
:48;
218 struct cvmx_gpio_tx_set_cn38xx cn38xxp2
;
219 struct cvmx_gpio_tx_set_s cn50xx
;
220 struct cvmx_gpio_tx_set_cn38xx cn52xx
;
221 struct cvmx_gpio_tx_set_cn38xx cn52xxp1
;
222 struct cvmx_gpio_tx_set_cn38xx cn56xx
;
223 struct cvmx_gpio_tx_set_cn38xx cn56xxp1
;
224 struct cvmx_gpio_tx_set_cn38xx cn58xx
;
225 struct cvmx_gpio_tx_set_cn38xx cn58xxp1
;
226 struct cvmx_gpio_tx_set_cn38xx cn63xx
;
227 struct cvmx_gpio_tx_set_cn38xx cn63xxp1
;
230 union cvmx_gpio_xbit_cfgx
{
232 struct cvmx_gpio_xbit_cfgx_s
{
233 uint64_t reserved_12_63
:52;
236 uint64_t reserved_2_3
:2;
240 struct cvmx_gpio_xbit_cfgx_s cn30xx
;
241 struct cvmx_gpio_xbit_cfgx_s cn31xx
;
242 struct cvmx_gpio_xbit_cfgx_s cn50xx
;