1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup raspberrypi_gpio |
---|
5 | * |
---|
6 | * @brief Raspberry PI 1 rev2 GPIO interface definitions. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2015 Andre Marques <andre.lousa.marques at gmail.com> |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #define JTAG_PIN_COUNT 5 |
---|
18 | #define SPI_PIN_COUNT 5 |
---|
19 | #define I2C_PIN_COUNT 2 |
---|
20 | |
---|
21 | const rtems_gpio_pin_conf jtag_config[JTAG_PIN_COUNT] = { |
---|
22 | { /*arm_tdi */ |
---|
23 | .pin_number = 4, |
---|
24 | .function = BSP_SPECIFIC, |
---|
25 | .pull_mode = NO_PULL_RESISTOR, |
---|
26 | .interrupt = NULL, |
---|
27 | .output_enabled = FALSE, |
---|
28 | .logic_invert = FALSE, |
---|
29 | .bsp_specific = &alt_func_def[5] |
---|
30 | }, |
---|
31 | { /* arm_trst */ |
---|
32 | .pin_number = 22, |
---|
33 | .function = BSP_SPECIFIC, |
---|
34 | .pull_mode = NO_PULL_RESISTOR, |
---|
35 | .interrupt = NULL, |
---|
36 | .output_enabled = FALSE, |
---|
37 | .logic_invert = FALSE, |
---|
38 | .bsp_specific = &alt_func_def[4] |
---|
39 | }, |
---|
40 | { /* arm_tdo */ |
---|
41 | .pin_number = 24, |
---|
42 | .function = BSP_SPECIFIC, |
---|
43 | .pull_mode = NO_PULL_RESISTOR, |
---|
44 | .interrupt = NULL, |
---|
45 | .output_enabled = FALSE, |
---|
46 | .logic_invert = FALSE, |
---|
47 | .bsp_specific = &alt_func_def[4] |
---|
48 | }, |
---|
49 | { /* arm_tck */ |
---|
50 | .pin_number = 25, |
---|
51 | .function = BSP_SPECIFIC, |
---|
52 | .pull_mode = NO_PULL_RESISTOR, |
---|
53 | .interrupt = NULL, |
---|
54 | .output_enabled = FALSE, |
---|
55 | .logic_invert = FALSE, |
---|
56 | .bsp_specific = &alt_func_def[4] |
---|
57 | }, |
---|
58 | { /* arm_tms */ |
---|
59 | .pin_number = 27, |
---|
60 | .function = BSP_SPECIFIC, |
---|
61 | .pull_mode = NO_PULL_RESISTOR, |
---|
62 | .interrupt = NULL, |
---|
63 | .output_enabled = FALSE, |
---|
64 | .logic_invert = FALSE, |
---|
65 | .bsp_specific = &alt_func_def[4] |
---|
66 | } |
---|
67 | }; |
---|
68 | |
---|
69 | const rtems_gpio_pin_conf spi_config[SPI_PIN_COUNT] = { |
---|
70 | { /* spi_miso */ |
---|
71 | .pin_number = 7, |
---|
72 | .function = BSP_SPECIFIC, |
---|
73 | .pull_mode = NO_PULL_RESISTOR, |
---|
74 | .interrupt = NULL, |
---|
75 | .output_enabled = FALSE, |
---|
76 | .logic_invert = FALSE, |
---|
77 | .bsp_specific = &alt_func_def[0] |
---|
78 | }, |
---|
79 | { /* spi_mosi */ |
---|
80 | .pin_number = 8, |
---|
81 | .function = BSP_SPECIFIC, |
---|
82 | .pull_mode = NO_PULL_RESISTOR, |
---|
83 | .interrupt = NULL, |
---|
84 | .output_enabled = FALSE, |
---|
85 | .logic_invert = FALSE, |
---|
86 | .bsp_specific = &alt_func_def[0] |
---|
87 | }, |
---|
88 | { /* spi_sclk */ |
---|
89 | .pin_number = 9, |
---|
90 | .function = BSP_SPECIFIC, |
---|
91 | .pull_mode = NO_PULL_RESISTOR, |
---|
92 | .interrupt = NULL, |
---|
93 | .output_enabled = FALSE, |
---|
94 | .logic_invert = FALSE, |
---|
95 | .bsp_specific = &alt_func_def[0] |
---|
96 | }, |
---|
97 | { /* spi_ce_0 */ |
---|
98 | .pin_number = 10, |
---|
99 | .function = BSP_SPECIFIC, |
---|
100 | .pull_mode = NO_PULL_RESISTOR, |
---|
101 | .interrupt = NULL, |
---|
102 | .output_enabled = FALSE, |
---|
103 | .logic_invert = FALSE, |
---|
104 | .bsp_specific = &alt_func_def[0] |
---|
105 | }, |
---|
106 | { /* spi_ce_1 */ |
---|
107 | .pin_number = 11, |
---|
108 | .function = BSP_SPECIFIC, |
---|
109 | .pull_mode = NO_PULL_RESISTOR, |
---|
110 | .interrupt = NULL, |
---|
111 | .output_enabled = FALSE, |
---|
112 | .logic_invert = FALSE, |
---|
113 | .bsp_specific = &alt_func_def[0] |
---|
114 | } |
---|
115 | }; |
---|
116 | |
---|
117 | const rtems_gpio_pin_conf i2c_config[I2C_PIN_COUNT] = { |
---|
118 | { /* i2c_sda */ |
---|
119 | .pin_number = 2, |
---|
120 | .function = BSP_SPECIFIC, |
---|
121 | .pull_mode = PULL_UP, |
---|
122 | .interrupt = NULL, |
---|
123 | .output_enabled = FALSE, |
---|
124 | .logic_invert = FALSE, |
---|
125 | .bsp_specific = &alt_func_def[0] |
---|
126 | }, |
---|
127 | { /* i2c_scl */ |
---|
128 | .pin_number = 3, |
---|
129 | .function = BSP_SPECIFIC, |
---|
130 | .pull_mode = PULL_UP, |
---|
131 | .interrupt = NULL, |
---|
132 | .output_enabled = FALSE, |
---|
133 | .logic_invert = FALSE, |
---|
134 | .bsp_specific = &alt_func_def[0] |
---|
135 | } |
---|
136 | }; |
---|