summaryrefslogtreecommitdiffstats
path: root/bsps/arm/raspberrypi/gpio/gpio-interfaces-pi1-rev2.c
blob: 1a89bf7c12a07bc756505f634184c4a5478429de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**
 * @file
 *
 * @ingroup raspberrypi_gpio
 *
 * @brief Raspberry PI 1 rev2 GPIO interface definitions.
 */

/*
 *  Copyright (c) 2015 Andre Marques <andre.lousa.marques at gmail.com>
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#define JTAG_PIN_COUNT 5
#define SPI_PIN_COUNT 5
#define I2C_PIN_COUNT 2

const rtems_gpio_pin_conf jtag_config[JTAG_PIN_COUNT] = {
  { /*arm_tdi */
    .pin_number = 4,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[5]
  },
  { /* arm_trst */
    .pin_number = 22,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[4]
  },
  { /* arm_tdo */
    .pin_number = 24,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[4]
  },
  { /* arm_tck */
    .pin_number = 25,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[4]
  },
  { /* arm_tms */
    .pin_number = 27,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[4]
  }
};

const rtems_gpio_pin_conf spi_config[SPI_PIN_COUNT] = {
  { /* spi_miso */
    .pin_number = 7,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  },
  { /* spi_mosi */
    .pin_number = 8,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  },
  { /* spi_sclk */
    .pin_number = 9,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  },
  { /* spi_ce_0 */
    .pin_number = 10,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  },
  { /* spi_ce_1 */
    .pin_number = 11,
    .function = BSP_SPECIFIC,
    .pull_mode = NO_PULL_RESISTOR,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  }
};

const rtems_gpio_pin_conf i2c_config[I2C_PIN_COUNT] = {
  { /* i2c_sda */
    .pin_number = 2,
    .function = BSP_SPECIFIC,
    .pull_mode = PULL_UP,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  },
  { /* i2c_scl */
    .pin_number = 3,
    .function = BSP_SPECIFIC,
    .pull_mode = PULL_UP,
    .interrupt = NULL,
    .output_enabled = FALSE,
    .logic_invert = FALSE,
    .bsp_specific = &alt_func_def[0]
  }
};