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-2012 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_MULTI_CAST (CVMX_ADD_IO_SEG(0x00010700000008B0ull))
38 #define CVMX_GPIO_PIN_ENA (CVMX_ADD_IO_SEG(0x00010700000008B8ull))
39 #define CVMX_GPIO_RX_DAT (CVMX_ADD_IO_SEG(0x0001070000000880ull))
40 #define CVMX_GPIO_TIM_CTL (CVMX_ADD_IO_SEG(0x00010700000008A0ull))
41 #define CVMX_GPIO_TX_CLR (CVMX_ADD_IO_SEG(0x0001070000000890ull))
42 #define CVMX_GPIO_TX_SET (CVMX_ADD_IO_SEG(0x0001070000000888ull))
43 #define CVMX_GPIO_XBIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000900ull) + ((offset) & 31) * 8 - 8*16)
45 union cvmx_gpio_bit_cfgx
{
47 struct cvmx_gpio_bit_cfgx_s
{
48 #ifdef __BIG_ENDIAN_BITFIELD
49 uint64_t reserved_21_63
:42;
50 uint64_t output_sel
:5;
70 uint64_t output_sel
:5;
71 uint64_t reserved_21_63
:42;
74 struct cvmx_gpio_bit_cfgx_cn30xx
{
75 #ifdef __BIG_ENDIAN_BITFIELD
76 uint64_t reserved_12_63
:52;
90 uint64_t reserved_12_63
:52;
93 struct cvmx_gpio_bit_cfgx_cn30xx cn31xx
;
94 struct cvmx_gpio_bit_cfgx_cn30xx cn38xx
;
95 struct cvmx_gpio_bit_cfgx_cn30xx cn38xxp2
;
96 struct cvmx_gpio_bit_cfgx_cn30xx cn50xx
;
97 struct cvmx_gpio_bit_cfgx_cn52xx
{
98 #ifdef __BIG_ENDIAN_BITFIELD
99 uint64_t reserved_15_63
:49;
117 uint64_t reserved_15_63
:49;
120 struct cvmx_gpio_bit_cfgx_cn52xx cn52xxp1
;
121 struct cvmx_gpio_bit_cfgx_cn52xx cn56xx
;
122 struct cvmx_gpio_bit_cfgx_cn52xx cn56xxp1
;
123 struct cvmx_gpio_bit_cfgx_cn30xx cn58xx
;
124 struct cvmx_gpio_bit_cfgx_cn30xx cn58xxp1
;
125 struct cvmx_gpio_bit_cfgx_s cn61xx
;
126 struct cvmx_gpio_bit_cfgx_s cn63xx
;
127 struct cvmx_gpio_bit_cfgx_s cn63xxp1
;
128 struct cvmx_gpio_bit_cfgx_s cn66xx
;
129 struct cvmx_gpio_bit_cfgx_s cn68xx
;
130 struct cvmx_gpio_bit_cfgx_s cn68xxp1
;
131 struct cvmx_gpio_bit_cfgx_s cn70xx
;
132 struct cvmx_gpio_bit_cfgx_s cn73xx
;
133 struct cvmx_gpio_bit_cfgx_s cnf71xx
;
136 union cvmx_gpio_boot_ena
{
138 struct cvmx_gpio_boot_ena_s
{
139 #ifdef __BIG_ENDIAN_BITFIELD
140 uint64_t reserved_12_63
:52;
142 uint64_t reserved_0_7
:8;
144 uint64_t reserved_0_7
:8;
146 uint64_t reserved_12_63
:52;
149 struct cvmx_gpio_boot_ena_s cn30xx
;
150 struct cvmx_gpio_boot_ena_s cn31xx
;
151 struct cvmx_gpio_boot_ena_s cn50xx
;
154 union cvmx_gpio_clk_genx
{
156 struct cvmx_gpio_clk_genx_s
{
157 #ifdef __BIG_ENDIAN_BITFIELD
158 uint64_t reserved_32_63
:32;
162 uint64_t reserved_32_63
:32;
165 struct cvmx_gpio_clk_genx_s cn52xx
;
166 struct cvmx_gpio_clk_genx_s cn52xxp1
;
167 struct cvmx_gpio_clk_genx_s cn56xx
;
168 struct cvmx_gpio_clk_genx_s cn56xxp1
;
169 struct cvmx_gpio_clk_genx_s cn61xx
;
170 struct cvmx_gpio_clk_genx_s cn63xx
;
171 struct cvmx_gpio_clk_genx_s cn63xxp1
;
172 struct cvmx_gpio_clk_genx_s cn66xx
;
173 struct cvmx_gpio_clk_genx_s cn68xx
;
174 struct cvmx_gpio_clk_genx_s cn68xxp1
;
175 struct cvmx_gpio_clk_genx_s cnf71xx
;
178 union cvmx_gpio_clk_qlmx
{
180 struct cvmx_gpio_clk_qlmx_s
{
181 #ifdef __BIG_ENDIAN_BITFIELD
182 uint64_t reserved_11_63
:53;
184 uint64_t reserved_3_7
:5;
190 uint64_t reserved_3_7
:5;
192 uint64_t reserved_11_63
:53;
195 struct cvmx_gpio_clk_qlmx_cn61xx
{
196 #ifdef __BIG_ENDIAN_BITFIELD
197 uint64_t reserved_10_63
:54;
199 uint64_t reserved_3_7
:5;
205 uint64_t reserved_3_7
:5;
207 uint64_t reserved_10_63
:54;
210 struct cvmx_gpio_clk_qlmx_cn63xx
{
211 #ifdef __BIG_ENDIAN_BITFIELD
212 uint64_t reserved_3_63
:61;
218 uint64_t reserved_3_63
:61;
221 struct cvmx_gpio_clk_qlmx_cn63xx cn63xxp1
;
222 struct cvmx_gpio_clk_qlmx_cn61xx cn66xx
;
223 struct cvmx_gpio_clk_qlmx_s cn68xx
;
224 struct cvmx_gpio_clk_qlmx_s cn68xxp1
;
225 struct cvmx_gpio_clk_qlmx_cn61xx cnf71xx
;
228 union cvmx_gpio_dbg_ena
{
230 struct cvmx_gpio_dbg_ena_s
{
231 #ifdef __BIG_ENDIAN_BITFIELD
232 uint64_t reserved_21_63
:43;
236 uint64_t reserved_21_63
:43;
239 struct cvmx_gpio_dbg_ena_s cn30xx
;
240 struct cvmx_gpio_dbg_ena_s cn31xx
;
241 struct cvmx_gpio_dbg_ena_s cn50xx
;
244 union cvmx_gpio_int_clr
{
246 struct cvmx_gpio_int_clr_s
{
247 #ifdef __BIG_ENDIAN_BITFIELD
248 uint64_t reserved_16_63
:48;
252 uint64_t reserved_16_63
:48;
255 struct cvmx_gpio_int_clr_s cn30xx
;
256 struct cvmx_gpio_int_clr_s cn31xx
;
257 struct cvmx_gpio_int_clr_s cn38xx
;
258 struct cvmx_gpio_int_clr_s cn38xxp2
;
259 struct cvmx_gpio_int_clr_s cn50xx
;
260 struct cvmx_gpio_int_clr_s cn52xx
;
261 struct cvmx_gpio_int_clr_s cn52xxp1
;
262 struct cvmx_gpio_int_clr_s cn56xx
;
263 struct cvmx_gpio_int_clr_s cn56xxp1
;
264 struct cvmx_gpio_int_clr_s cn58xx
;
265 struct cvmx_gpio_int_clr_s cn58xxp1
;
266 struct cvmx_gpio_int_clr_s cn61xx
;
267 struct cvmx_gpio_int_clr_s cn63xx
;
268 struct cvmx_gpio_int_clr_s cn63xxp1
;
269 struct cvmx_gpio_int_clr_s cn66xx
;
270 struct cvmx_gpio_int_clr_s cn68xx
;
271 struct cvmx_gpio_int_clr_s cn68xxp1
;
272 struct cvmx_gpio_int_clr_s cnf71xx
;
275 union cvmx_gpio_multi_cast
{
277 struct cvmx_gpio_multi_cast_s
{
278 #ifdef __BIG_ENDIAN_BITFIELD
279 uint64_t reserved_1_63
:63;
283 uint64_t reserved_1_63
:63;
286 struct cvmx_gpio_multi_cast_s cn61xx
;
287 struct cvmx_gpio_multi_cast_s cnf71xx
;
290 union cvmx_gpio_pin_ena
{
292 struct cvmx_gpio_pin_ena_s
{
293 #ifdef __BIG_ENDIAN_BITFIELD
294 uint64_t reserved_20_63
:44;
297 uint64_t reserved_0_17
:18;
299 uint64_t reserved_0_17
:18;
302 uint64_t reserved_20_63
:44;
305 struct cvmx_gpio_pin_ena_s cn66xx
;
308 union cvmx_gpio_rx_dat
{
310 struct cvmx_gpio_rx_dat_s
{
311 #ifdef __BIG_ENDIAN_BITFIELD
312 uint64_t reserved_24_63
:40;
316 uint64_t reserved_24_63
:40;
319 struct cvmx_gpio_rx_dat_s cn30xx
;
320 struct cvmx_gpio_rx_dat_s cn31xx
;
321 struct cvmx_gpio_rx_dat_cn38xx
{
322 #ifdef __BIG_ENDIAN_BITFIELD
323 uint64_t reserved_16_63
:48;
327 uint64_t reserved_16_63
:48;
330 struct cvmx_gpio_rx_dat_cn38xx cn38xxp2
;
331 struct cvmx_gpio_rx_dat_s cn50xx
;
332 struct cvmx_gpio_rx_dat_cn38xx cn52xx
;
333 struct cvmx_gpio_rx_dat_cn38xx cn52xxp1
;
334 struct cvmx_gpio_rx_dat_cn38xx cn56xx
;
335 struct cvmx_gpio_rx_dat_cn38xx cn56xxp1
;
336 struct cvmx_gpio_rx_dat_cn38xx cn58xx
;
337 struct cvmx_gpio_rx_dat_cn38xx cn58xxp1
;
338 struct cvmx_gpio_rx_dat_cn61xx
{
339 #ifdef __BIG_ENDIAN_BITFIELD
340 uint64_t reserved_20_63
:44;
344 uint64_t reserved_20_63
:44;
347 struct cvmx_gpio_rx_dat_cn38xx cn63xx
;
348 struct cvmx_gpio_rx_dat_cn38xx cn63xxp1
;
349 struct cvmx_gpio_rx_dat_cn61xx cn66xx
;
350 struct cvmx_gpio_rx_dat_cn38xx cn68xx
;
351 struct cvmx_gpio_rx_dat_cn38xx cn68xxp1
;
352 struct cvmx_gpio_rx_dat_cn61xx cnf71xx
;
355 union cvmx_gpio_tim_ctl
{
357 struct cvmx_gpio_tim_ctl_s
{
358 #ifdef __BIG_ENDIAN_BITFIELD
359 uint64_t reserved_4_63
:60;
363 uint64_t reserved_4_63
:60;
366 struct cvmx_gpio_tim_ctl_s cn68xx
;
367 struct cvmx_gpio_tim_ctl_s cn68xxp1
;
370 union cvmx_gpio_tx_clr
{
372 struct cvmx_gpio_tx_clr_s
{
373 #ifdef __BIG_ENDIAN_BITFIELD
374 uint64_t reserved_24_63
:40;
378 uint64_t reserved_24_63
:40;
381 struct cvmx_gpio_tx_clr_s cn30xx
;
382 struct cvmx_gpio_tx_clr_s cn31xx
;
383 struct cvmx_gpio_tx_clr_cn38xx
{
384 #ifdef __BIG_ENDIAN_BITFIELD
385 uint64_t reserved_16_63
:48;
389 uint64_t reserved_16_63
:48;
392 struct cvmx_gpio_tx_clr_cn38xx cn38xxp2
;
393 struct cvmx_gpio_tx_clr_s cn50xx
;
394 struct cvmx_gpio_tx_clr_cn38xx cn52xx
;
395 struct cvmx_gpio_tx_clr_cn38xx cn52xxp1
;
396 struct cvmx_gpio_tx_clr_cn38xx cn56xx
;
397 struct cvmx_gpio_tx_clr_cn38xx cn56xxp1
;
398 struct cvmx_gpio_tx_clr_cn38xx cn58xx
;
399 struct cvmx_gpio_tx_clr_cn38xx cn58xxp1
;
400 struct cvmx_gpio_tx_clr_cn61xx
{
401 #ifdef __BIG_ENDIAN_BITFIELD
402 uint64_t reserved_20_63
:44;
406 uint64_t reserved_20_63
:44;
409 struct cvmx_gpio_tx_clr_cn38xx cn63xx
;
410 struct cvmx_gpio_tx_clr_cn38xx cn63xxp1
;
411 struct cvmx_gpio_tx_clr_cn61xx cn66xx
;
412 struct cvmx_gpio_tx_clr_cn38xx cn68xx
;
413 struct cvmx_gpio_tx_clr_cn38xx cn68xxp1
;
414 struct cvmx_gpio_tx_clr_cn61xx cnf71xx
;
417 union cvmx_gpio_tx_set
{
419 struct cvmx_gpio_tx_set_s
{
420 #ifdef __BIG_ENDIAN_BITFIELD
421 uint64_t reserved_24_63
:40;
425 uint64_t reserved_24_63
:40;
428 struct cvmx_gpio_tx_set_s cn30xx
;
429 struct cvmx_gpio_tx_set_s cn31xx
;
430 struct cvmx_gpio_tx_set_cn38xx
{
431 #ifdef __BIG_ENDIAN_BITFIELD
432 uint64_t reserved_16_63
:48;
436 uint64_t reserved_16_63
:48;
439 struct cvmx_gpio_tx_set_cn38xx cn38xxp2
;
440 struct cvmx_gpio_tx_set_s cn50xx
;
441 struct cvmx_gpio_tx_set_cn38xx cn52xx
;
442 struct cvmx_gpio_tx_set_cn38xx cn52xxp1
;
443 struct cvmx_gpio_tx_set_cn38xx cn56xx
;
444 struct cvmx_gpio_tx_set_cn38xx cn56xxp1
;
445 struct cvmx_gpio_tx_set_cn38xx cn58xx
;
446 struct cvmx_gpio_tx_set_cn38xx cn58xxp1
;
447 struct cvmx_gpio_tx_set_cn61xx
{
448 #ifdef __BIG_ENDIAN_BITFIELD
449 uint64_t reserved_20_63
:44;
453 uint64_t reserved_20_63
:44;
456 struct cvmx_gpio_tx_set_cn38xx cn63xx
;
457 struct cvmx_gpio_tx_set_cn38xx cn63xxp1
;
458 struct cvmx_gpio_tx_set_cn61xx cn66xx
;
459 struct cvmx_gpio_tx_set_cn38xx cn68xx
;
460 struct cvmx_gpio_tx_set_cn38xx cn68xxp1
;
461 struct cvmx_gpio_tx_set_cn61xx cnf71xx
;
464 union cvmx_gpio_xbit_cfgx
{
466 struct cvmx_gpio_xbit_cfgx_s
{
467 #ifdef __BIG_ENDIAN_BITFIELD
468 uint64_t reserved_17_63
:47;
469 uint64_t synce_sel
:2;
487 uint64_t synce_sel
:2;
488 uint64_t reserved_17_63
:47;
491 struct cvmx_gpio_xbit_cfgx_cn30xx
{
492 #ifdef __BIG_ENDIAN_BITFIELD
493 uint64_t reserved_12_63
:52;
496 uint64_t reserved_2_3
:2;
502 uint64_t reserved_2_3
:2;
505 uint64_t reserved_12_63
:52;
508 struct cvmx_gpio_xbit_cfgx_cn30xx cn31xx
;
509 struct cvmx_gpio_xbit_cfgx_cn30xx cn50xx
;
510 struct cvmx_gpio_xbit_cfgx_s cn61xx
;
511 struct cvmx_gpio_xbit_cfgx_s cn66xx
;
512 struct cvmx_gpio_xbit_cfgx_s cnf71xx
;