blob: 4e1fd2b2b54787a18a4721f8e043df26d652285d [file] [log] [blame]
developerb7ba14b2019-05-02 20:24:50 +08001/*
2 * Copyright (c) 2019, MediaTek Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef MT_GPIO_CFG_H
8#define MT_GPIO_CFG_H
9
10#include <stdint.h>
11#include <plat/common/common_def.h>
12
13#define IOCFG_0_BASE 0x11F20000
14#define IOCFG_1_BASE 0x11E80000
15#define IOCFG_2_BASE 0x11E70000
16#define IOCFG_3_BASE 0x11E90000
17#define IOCFG_4_BASE 0x11D30000
18#define IOCFG_5_BASE 0x11D20000
19#define IOCFG_6_BASE 0x11C50000
20#define IOCFG_7_BASE 0x11F30000
21
22typedef struct {
23 int8_t offset;
24} PIN_offset;
25
26PIN_offset PULL_offset[] = {
27 /* 0 */ {6},
28 /* 1 */ {7},
29 /* 2 */ {8},
30 /* 3 */ {9},
31 /* 4 */ {11},
32 /* 5 */ {12},
33 /* 6 */ {13},
34 /* 7 */ {14},
35 /* 8 */ {0},
36 /* 9 */ {26},
37 /* 10 */ {27},
38 /* 11 */ {10},
39 /* 12 */ {17},
40 /* 13 */ {6},
41 /* 14 */ {7},
42 /* 15 */ {8},
43 /* 16 */ {9},
44 /* 17 */ {10},
45 /* 18 */ {11},
46 /* 19 */ {12},
47 /* 20 */ {13},
48 /* 21 */ {14},
49 /* 22 */ {15},
50 /* 23 */ {16},
51 /* 24 */ {17},
52 /* 25 */ {18},
53 /* 26 */ {19},
54 /* 27 */ {20},
55 /* 28 */ {21},
56 /* 29 */ {-1},
57 /* 30 */ {-1},
58 /* 31 */ {-1},
59 /* 32 */ {-1},
60 /* 33 */ {-1},
61 /* 34 */ {-1},
62 /* 35 */ {-1},
63 /* 36 */ {-1},
64 /* 37 */ {-1},
65 /* 38 */ {-1},
66 /* 39 */ {-1},
67 /* 40 */ {-1},
68 /* 41 */ {-1},
69 /* 42 */ {-1},
70 /* 43 */ {8},
71 /* 44 */ {9},
72 /* 45 */ {10},
73 /* 46 */ {11},
74 /* 47 */ {12},
75 /* 48 */ {13},
76 /* 49 */ {14},
77 /* 50 */ {0},
78 /* 51 */ {1},
79 /* 52 */ {2},
80 /* 53 */ {3},
81 /* 54 */ {4},
82 /* 55 */ {5},
83 /* 56 */ {6},
84 /* 57 */ {7},
85 /* 58 */ {8},
86 /* 59 */ {9},
87 /* 60 */ {10},
88 /* 61 */ {0},
89 /* 62 */ {1},
90 /* 63 */ {2},
91 /* 64 */ {3},
92 /* 65 */ {4},
93 /* 66 */ {5},
94 /* 67 */ {6},
95 /* 68 */ {7},
96 /* 69 */ {8},
97 /* 70 */ {9},
98 /* 71 */ {10},
99 /* 72 */ {11},
100 /* 73 */ {12},
101 /* 74 */ {13},
102 /* 75 */ {14},
103 /* 76 */ {15},
104 /* 77 */ {16},
105 /* 78 */ {17},
106 /* 79 */ {18},
107 /* 80 */ {19},
108 /* 81 */ {20},
109 /* 82 */ {21},
110 /* 83 */ {22},
111 /* 84 */ {23},
112 /* 85 */ {24},
113 /* 86 */ {25},
114 /* 87 */ {26},
115 /* 88 */ {27},
116 /* 89 */ {24},
117 /* 90 */ {1},
118 /* 91 */ {-1},
119 /* 92 */ {-1},
120 /* 93 */ {-1},
121 /* 94 */ {-1},
122 /* 95 */ {15},
123 /* 96 */ {17},
124 /* 97 */ {18},
125 /* 98 */ {19},
126 /* 99 */ {20},
127 /* 100 */ {21},
128 /* 101 */ {22},
129 /* 102 */ {23},
130 /* 103 */ {28},
131 /* 104 */ {29},
132 /* 105 */ {30},
133 /* 106 */ {31},
134 /* 107 */ {0},
135 /* 108 */ {1},
136 /* 109 */ {2},
137 /* 110 */ {3},
138 /* 111 */ {4},
139 /* 112 */ {5},
140 /* 113 */ {6},
141 /* 114 */ {7},
142 /* 115 */ {8},
143 /* 116 */ {9},
144 /* 117 */ {10},
145 /* 118 */ {11},
146 /* 119 */ {12},
147 /* 120 */ {13},
148 /* 121 */ {14},
149 /* 122 */ {-1},
150 /* 123 */ {-1},
151 /* 124 */ {-1},
152 /* 125 */ {-1},
153 /* 126 */ {-1},
154 /* 127 */ {-1},
155 /* 128 */ {-1},
156 /* 129 */ {-1},
157 /* 130 */ {-1},
158 /* 131 */ {-1},
159 /* 132 */ {-1},
160 /* 133 */ {-1},
161 /* 134 */ {0},
162 /* 135 */ {1},
163 /* 136 */ {2},
164 /* 137 */ {3},
165 /* 138 */ {4},
166 /* 139 */ {5},
167 /* 140 */ {6},
168 /* 141 */ {7},
169 /* 142 */ {8},
170 /* 143 */ {9},
171 /* 144 */ {11},
172 /* 145 */ {12},
173 /* 146 */ {13},
174 /* 147 */ {14},
175 /* 148 */ {15},
176 /* 149 */ {16},
177 /* 150 */ {18},
178 /* 151 */ {19},
179 /* 152 */ {20},
180 /* 153 */ {21},
181 /* 154 */ {22},
182 /* 155 */ {23},
183 /* 156 */ {24},
184 /* 157 */ {25},
185 /* 158 */ {26},
186 /* 159 */ {27},
187 /* 160 */ {28},
188 /* 161 */ {0},
189 /* 162 */ {1},
190 /* 163 */ {2},
191 /* 164 */ {3},
192 /* 165 */ {4},
193 /* 166 */ {5},
194 /* 167 */ {11},
195 /* 168 */ {12},
196 /* 169 */ {13},
197 /* 170 */ {14},
198 /* 171 */ {15},
199 /* 172 */ {16},
200 /* 173 */ {17},
201 /* 174 */ {18},
202 /* 175 */ {19},
203 /* 176 */ {20},
204 /* 177 */ {10},
205 /* 178 */ {16},
206 /* 179 */ {25}
207};
208#endif /* MT_GPIO_CFG_H */