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_17_63
:47;
69 uint64_t reserved_17_63
:47;
72 struct cvmx_gpio_bit_cfgx_cn30xx
{
73 #ifdef __BIG_ENDIAN_BITFIELD
74 uint64_t reserved_12_63
:52;
88 uint64_t reserved_12_63
:52;
91 struct cvmx_gpio_bit_cfgx_cn30xx cn31xx
;
92 struct cvmx_gpio_bit_cfgx_cn30xx cn38xx
;
93 struct cvmx_gpio_bit_cfgx_cn30xx cn38xxp2
;
94 struct cvmx_gpio_bit_cfgx_cn30xx cn50xx
;
95 struct cvmx_gpio_bit_cfgx_cn52xx
{
96 #ifdef __BIG_ENDIAN_BITFIELD
97 uint64_t reserved_15_63
:49;
115 uint64_t reserved_15_63
:49;
118 struct cvmx_gpio_bit_cfgx_cn52xx cn52xxp1
;
119 struct cvmx_gpio_bit_cfgx_cn52xx cn56xx
;
120 struct cvmx_gpio_bit_cfgx_cn52xx cn56xxp1
;
121 struct cvmx_gpio_bit_cfgx_cn30xx cn58xx
;
122 struct cvmx_gpio_bit_cfgx_cn30xx cn58xxp1
;
123 struct cvmx_gpio_bit_cfgx_s cn61xx
;
124 struct cvmx_gpio_bit_cfgx_s cn63xx
;
125 struct cvmx_gpio_bit_cfgx_s cn63xxp1
;
126 struct cvmx_gpio_bit_cfgx_s cn66xx
;
127 struct cvmx_gpio_bit_cfgx_s cn68xx
;
128 struct cvmx_gpio_bit_cfgx_s cn68xxp1
;
129 struct cvmx_gpio_bit_cfgx_s cnf71xx
;
132 union cvmx_gpio_boot_ena
{
134 struct cvmx_gpio_boot_ena_s
{
135 #ifdef __BIG_ENDIAN_BITFIELD
136 uint64_t reserved_12_63
:52;
138 uint64_t reserved_0_7
:8;
140 uint64_t reserved_0_7
:8;
142 uint64_t reserved_12_63
:52;
145 struct cvmx_gpio_boot_ena_s cn30xx
;
146 struct cvmx_gpio_boot_ena_s cn31xx
;
147 struct cvmx_gpio_boot_ena_s cn50xx
;
150 union cvmx_gpio_clk_genx
{
152 struct cvmx_gpio_clk_genx_s
{
153 #ifdef __BIG_ENDIAN_BITFIELD
154 uint64_t reserved_32_63
:32;
158 uint64_t reserved_32_63
:32;
161 struct cvmx_gpio_clk_genx_s cn52xx
;
162 struct cvmx_gpio_clk_genx_s cn52xxp1
;
163 struct cvmx_gpio_clk_genx_s cn56xx
;
164 struct cvmx_gpio_clk_genx_s cn56xxp1
;
165 struct cvmx_gpio_clk_genx_s cn61xx
;
166 struct cvmx_gpio_clk_genx_s cn63xx
;
167 struct cvmx_gpio_clk_genx_s cn63xxp1
;
168 struct cvmx_gpio_clk_genx_s cn66xx
;
169 struct cvmx_gpio_clk_genx_s cn68xx
;
170 struct cvmx_gpio_clk_genx_s cn68xxp1
;
171 struct cvmx_gpio_clk_genx_s cnf71xx
;
174 union cvmx_gpio_clk_qlmx
{
176 struct cvmx_gpio_clk_qlmx_s
{
177 #ifdef __BIG_ENDIAN_BITFIELD
178 uint64_t reserved_11_63
:53;
180 uint64_t reserved_3_7
:5;
186 uint64_t reserved_3_7
:5;
188 uint64_t reserved_11_63
:53;
191 struct cvmx_gpio_clk_qlmx_cn61xx
{
192 #ifdef __BIG_ENDIAN_BITFIELD
193 uint64_t reserved_10_63
:54;
195 uint64_t reserved_3_7
:5;
201 uint64_t reserved_3_7
:5;
203 uint64_t reserved_10_63
:54;
206 struct cvmx_gpio_clk_qlmx_cn63xx
{
207 #ifdef __BIG_ENDIAN_BITFIELD
208 uint64_t reserved_3_63
:61;
214 uint64_t reserved_3_63
:61;
217 struct cvmx_gpio_clk_qlmx_cn63xx cn63xxp1
;
218 struct cvmx_gpio_clk_qlmx_cn61xx cn66xx
;
219 struct cvmx_gpio_clk_qlmx_s cn68xx
;
220 struct cvmx_gpio_clk_qlmx_s cn68xxp1
;
221 struct cvmx_gpio_clk_qlmx_cn61xx cnf71xx
;
224 union cvmx_gpio_dbg_ena
{
226 struct cvmx_gpio_dbg_ena_s
{
227 #ifdef __BIG_ENDIAN_BITFIELD
228 uint64_t reserved_21_63
:43;
232 uint64_t reserved_21_63
:43;
235 struct cvmx_gpio_dbg_ena_s cn30xx
;
236 struct cvmx_gpio_dbg_ena_s cn31xx
;
237 struct cvmx_gpio_dbg_ena_s cn50xx
;
240 union cvmx_gpio_int_clr
{
242 struct cvmx_gpio_int_clr_s
{
243 #ifdef __BIG_ENDIAN_BITFIELD
244 uint64_t reserved_16_63
:48;
248 uint64_t reserved_16_63
:48;
251 struct cvmx_gpio_int_clr_s cn30xx
;
252 struct cvmx_gpio_int_clr_s cn31xx
;
253 struct cvmx_gpio_int_clr_s cn38xx
;
254 struct cvmx_gpio_int_clr_s cn38xxp2
;
255 struct cvmx_gpio_int_clr_s cn50xx
;
256 struct cvmx_gpio_int_clr_s cn52xx
;
257 struct cvmx_gpio_int_clr_s cn52xxp1
;
258 struct cvmx_gpio_int_clr_s cn56xx
;
259 struct cvmx_gpio_int_clr_s cn56xxp1
;
260 struct cvmx_gpio_int_clr_s cn58xx
;
261 struct cvmx_gpio_int_clr_s cn58xxp1
;
262 struct cvmx_gpio_int_clr_s cn61xx
;
263 struct cvmx_gpio_int_clr_s cn63xx
;
264 struct cvmx_gpio_int_clr_s cn63xxp1
;
265 struct cvmx_gpio_int_clr_s cn66xx
;
266 struct cvmx_gpio_int_clr_s cn68xx
;
267 struct cvmx_gpio_int_clr_s cn68xxp1
;
268 struct cvmx_gpio_int_clr_s cnf71xx
;
271 union cvmx_gpio_multi_cast
{
273 struct cvmx_gpio_multi_cast_s
{
274 #ifdef __BIG_ENDIAN_BITFIELD
275 uint64_t reserved_1_63
:63;
279 uint64_t reserved_1_63
:63;
282 struct cvmx_gpio_multi_cast_s cn61xx
;
283 struct cvmx_gpio_multi_cast_s cnf71xx
;
286 union cvmx_gpio_pin_ena
{
288 struct cvmx_gpio_pin_ena_s
{
289 #ifdef __BIG_ENDIAN_BITFIELD
290 uint64_t reserved_20_63
:44;
293 uint64_t reserved_0_17
:18;
295 uint64_t reserved_0_17
:18;
298 uint64_t reserved_20_63
:44;
301 struct cvmx_gpio_pin_ena_s cn66xx
;
304 union cvmx_gpio_rx_dat
{
306 struct cvmx_gpio_rx_dat_s
{
307 #ifdef __BIG_ENDIAN_BITFIELD
308 uint64_t reserved_24_63
:40;
312 uint64_t reserved_24_63
:40;
315 struct cvmx_gpio_rx_dat_s cn30xx
;
316 struct cvmx_gpio_rx_dat_s cn31xx
;
317 struct cvmx_gpio_rx_dat_cn38xx
{
318 #ifdef __BIG_ENDIAN_BITFIELD
319 uint64_t reserved_16_63
:48;
323 uint64_t reserved_16_63
:48;
326 struct cvmx_gpio_rx_dat_cn38xx cn38xxp2
;
327 struct cvmx_gpio_rx_dat_s cn50xx
;
328 struct cvmx_gpio_rx_dat_cn38xx cn52xx
;
329 struct cvmx_gpio_rx_dat_cn38xx cn52xxp1
;
330 struct cvmx_gpio_rx_dat_cn38xx cn56xx
;
331 struct cvmx_gpio_rx_dat_cn38xx cn56xxp1
;
332 struct cvmx_gpio_rx_dat_cn38xx cn58xx
;
333 struct cvmx_gpio_rx_dat_cn38xx cn58xxp1
;
334 struct cvmx_gpio_rx_dat_cn61xx
{
335 #ifdef __BIG_ENDIAN_BITFIELD
336 uint64_t reserved_20_63
:44;
340 uint64_t reserved_20_63
:44;
343 struct cvmx_gpio_rx_dat_cn38xx cn63xx
;
344 struct cvmx_gpio_rx_dat_cn38xx cn63xxp1
;
345 struct cvmx_gpio_rx_dat_cn61xx cn66xx
;
346 struct cvmx_gpio_rx_dat_cn38xx cn68xx
;
347 struct cvmx_gpio_rx_dat_cn38xx cn68xxp1
;
348 struct cvmx_gpio_rx_dat_cn61xx cnf71xx
;
351 union cvmx_gpio_tim_ctl
{
353 struct cvmx_gpio_tim_ctl_s
{
354 #ifdef __BIG_ENDIAN_BITFIELD
355 uint64_t reserved_4_63
:60;
359 uint64_t reserved_4_63
:60;
362 struct cvmx_gpio_tim_ctl_s cn68xx
;
363 struct cvmx_gpio_tim_ctl_s cn68xxp1
;
366 union cvmx_gpio_tx_clr
{
368 struct cvmx_gpio_tx_clr_s
{
369 #ifdef __BIG_ENDIAN_BITFIELD
370 uint64_t reserved_24_63
:40;
374 uint64_t reserved_24_63
:40;
377 struct cvmx_gpio_tx_clr_s cn30xx
;
378 struct cvmx_gpio_tx_clr_s cn31xx
;
379 struct cvmx_gpio_tx_clr_cn38xx
{
380 #ifdef __BIG_ENDIAN_BITFIELD
381 uint64_t reserved_16_63
:48;
385 uint64_t reserved_16_63
:48;
388 struct cvmx_gpio_tx_clr_cn38xx cn38xxp2
;
389 struct cvmx_gpio_tx_clr_s cn50xx
;
390 struct cvmx_gpio_tx_clr_cn38xx cn52xx
;
391 struct cvmx_gpio_tx_clr_cn38xx cn52xxp1
;
392 struct cvmx_gpio_tx_clr_cn38xx cn56xx
;
393 struct cvmx_gpio_tx_clr_cn38xx cn56xxp1
;
394 struct cvmx_gpio_tx_clr_cn38xx cn58xx
;
395 struct cvmx_gpio_tx_clr_cn38xx cn58xxp1
;
396 struct cvmx_gpio_tx_clr_cn61xx
{
397 #ifdef __BIG_ENDIAN_BITFIELD
398 uint64_t reserved_20_63
:44;
402 uint64_t reserved_20_63
:44;
405 struct cvmx_gpio_tx_clr_cn38xx cn63xx
;
406 struct cvmx_gpio_tx_clr_cn38xx cn63xxp1
;
407 struct cvmx_gpio_tx_clr_cn61xx cn66xx
;
408 struct cvmx_gpio_tx_clr_cn38xx cn68xx
;
409 struct cvmx_gpio_tx_clr_cn38xx cn68xxp1
;
410 struct cvmx_gpio_tx_clr_cn61xx cnf71xx
;
413 union cvmx_gpio_tx_set
{
415 struct cvmx_gpio_tx_set_s
{
416 #ifdef __BIG_ENDIAN_BITFIELD
417 uint64_t reserved_24_63
:40;
421 uint64_t reserved_24_63
:40;
424 struct cvmx_gpio_tx_set_s cn30xx
;
425 struct cvmx_gpio_tx_set_s cn31xx
;
426 struct cvmx_gpio_tx_set_cn38xx
{
427 #ifdef __BIG_ENDIAN_BITFIELD
428 uint64_t reserved_16_63
:48;
432 uint64_t reserved_16_63
:48;
435 struct cvmx_gpio_tx_set_cn38xx cn38xxp2
;
436 struct cvmx_gpio_tx_set_s cn50xx
;
437 struct cvmx_gpio_tx_set_cn38xx cn52xx
;
438 struct cvmx_gpio_tx_set_cn38xx cn52xxp1
;
439 struct cvmx_gpio_tx_set_cn38xx cn56xx
;
440 struct cvmx_gpio_tx_set_cn38xx cn56xxp1
;
441 struct cvmx_gpio_tx_set_cn38xx cn58xx
;
442 struct cvmx_gpio_tx_set_cn38xx cn58xxp1
;
443 struct cvmx_gpio_tx_set_cn61xx
{
444 #ifdef __BIG_ENDIAN_BITFIELD
445 uint64_t reserved_20_63
:44;
449 uint64_t reserved_20_63
:44;
452 struct cvmx_gpio_tx_set_cn38xx cn63xx
;
453 struct cvmx_gpio_tx_set_cn38xx cn63xxp1
;
454 struct cvmx_gpio_tx_set_cn61xx cn66xx
;
455 struct cvmx_gpio_tx_set_cn38xx cn68xx
;
456 struct cvmx_gpio_tx_set_cn38xx cn68xxp1
;
457 struct cvmx_gpio_tx_set_cn61xx cnf71xx
;
460 union cvmx_gpio_xbit_cfgx
{
462 struct cvmx_gpio_xbit_cfgx_s
{
463 #ifdef __BIG_ENDIAN_BITFIELD
464 uint64_t reserved_17_63
:47;
465 uint64_t synce_sel
:2;
483 uint64_t synce_sel
:2;
484 uint64_t reserved_17_63
:47;
487 struct cvmx_gpio_xbit_cfgx_cn30xx
{
488 #ifdef __BIG_ENDIAN_BITFIELD
489 uint64_t reserved_12_63
:52;
492 uint64_t reserved_2_3
:2;
498 uint64_t reserved_2_3
:2;
501 uint64_t reserved_12_63
:52;
504 struct cvmx_gpio_xbit_cfgx_cn30xx cn31xx
;
505 struct cvmx_gpio_xbit_cfgx_cn30xx cn50xx
;
506 struct cvmx_gpio_xbit_cfgx_s cn61xx
;
507 struct cvmx_gpio_xbit_cfgx_s cn66xx
;
508 struct cvmx_gpio_xbit_cfgx_s cnf71xx
;