Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / mips / pic32 / pic32mzda / early_pin.h
blob60e9c32101305831d6582423dc59bfaa4feca3a2
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Joshua Henderson <joshua.henderson@microchip.com>
4 * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
5 */
6 #ifndef _PIC32MZDA_EARLY_PIN_H
7 #define _PIC32MZDA_EARLY_PIN_H
9 /*
10 * This is a complete, yet overly simplistic and unoptimized, PIC32MZDA PPS
11 * configuration only useful before we have full pinctrl initialized.
14 /* Input PPS Functions */
15 enum {
16 IN_FUNC_INT3,
17 IN_FUNC_T2CK,
18 IN_FUNC_T6CK,
19 IN_FUNC_IC3,
20 IN_FUNC_IC7,
21 IN_FUNC_U1RX,
22 IN_FUNC_U2CTS,
23 IN_FUNC_U5RX,
24 IN_FUNC_U6CTS,
25 IN_FUNC_SDI1,
26 IN_FUNC_SDI3,
27 IN_FUNC_SDI5,
28 IN_FUNC_SS6,
29 IN_FUNC_REFCLKI1,
30 IN_FUNC_INT4,
31 IN_FUNC_T5CK,
32 IN_FUNC_T7CK,
33 IN_FUNC_IC4,
34 IN_FUNC_IC8,
35 IN_FUNC_U3RX,
36 IN_FUNC_U4CTS,
37 IN_FUNC_SDI2,
38 IN_FUNC_SDI4,
39 IN_FUNC_C1RX,
40 IN_FUNC_REFCLKI4,
41 IN_FUNC_INT2,
42 IN_FUNC_T3CK,
43 IN_FUNC_T8CK,
44 IN_FUNC_IC2,
45 IN_FUNC_IC5,
46 IN_FUNC_IC9,
47 IN_FUNC_U1CTS,
48 IN_FUNC_U2RX,
49 IN_FUNC_U5CTS,
50 IN_FUNC_SS1,
51 IN_FUNC_SS3,
52 IN_FUNC_SS4,
53 IN_FUNC_SS5,
54 IN_FUNC_C2RX,
55 IN_FUNC_INT1,
56 IN_FUNC_T4CK,
57 IN_FUNC_T9CK,
58 IN_FUNC_IC1,
59 IN_FUNC_IC6,
60 IN_FUNC_U3CTS,
61 IN_FUNC_U4RX,
62 IN_FUNC_U6RX,
63 IN_FUNC_SS2,
64 IN_FUNC_SDI6,
65 IN_FUNC_OCFA,
66 IN_FUNC_REFCLKI3,
69 /* Input PPS Pins */
70 #define IN_RPD2 0x00
71 #define IN_RPG8 0x01
72 #define IN_RPF4 0x02
73 #define IN_RPD10 0x03
74 #define IN_RPF1 0x04
75 #define IN_RPB9 0x05
76 #define IN_RPB10 0x06
77 #define IN_RPC14 0x07
78 #define IN_RPB5 0x08
79 #define IN_RPC1 0x0A
80 #define IN_RPD14 0x0B
81 #define IN_RPG1 0x0C
82 #define IN_RPA14 0x0D
83 #define IN_RPD6 0x0E
84 #define IN_RPD3 0x00
85 #define IN_RPG7 0x01
86 #define IN_RPF5 0x02
87 #define IN_RPD11 0x03
88 #define IN_RPF0 0x04
89 #define IN_RPB1 0x05
90 #define IN_RPE5 0x06
91 #define IN_RPC13 0x07
92 #define IN_RPB3 0x08
93 #define IN_RPC4 0x0A
94 #define IN_RPD15 0x0B
95 #define IN_RPG0 0x0C
96 #define IN_RPA15 0x0D
97 #define IN_RPD7 0x0E
98 #define IN_RPD9 0x00
99 #define IN_RPG6 0x01
100 #define IN_RPB8 0x02
101 #define IN_RPB15 0x03
102 #define IN_RPD4 0x04
103 #define IN_RPB0 0x05
104 #define IN_RPE3 0x06
105 #define IN_RPB7 0x07
106 #define IN_RPF12 0x09
107 #define IN_RPD12 0x0A
108 #define IN_RPF8 0x0B
109 #define IN_RPC3 0x0C
110 #define IN_RPE9 0x0D
111 #define IN_RPD1 0x00
112 #define IN_RPG9 0x01
113 #define IN_RPB14 0x02
114 #define IN_RPD0 0x03
115 #define IN_RPB6 0x05
116 #define IN_RPD5 0x06
117 #define IN_RPB2 0x07
118 #define IN_RPF3 0x08
119 #define IN_RPF13 0x09
120 #define IN_RPF2 0x0B
121 #define IN_RPC2 0x0C
122 #define IN_RPE8 0x0D
124 /* Output PPS Pins */
125 enum {
126 OUT_RPD2,
127 OUT_RPG8,
128 OUT_RPF4,
129 OUT_RPD10,
130 OUT_RPF1,
131 OUT_RPB9,
132 OUT_RPB10,
133 OUT_RPC14,
134 OUT_RPB5,
135 OUT_RPC1,
136 OUT_RPD14,
137 OUT_RPG1,
138 OUT_RPA14,
139 OUT_RPD6,
140 OUT_RPD3,
141 OUT_RPG7,
142 OUT_RPF5,
143 OUT_RPD11,
144 OUT_RPF0,
145 OUT_RPB1,
146 OUT_RPE5,
147 OUT_RPC13,
148 OUT_RPB3,
149 OUT_RPC4,
150 OUT_RPD15,
151 OUT_RPG0,
152 OUT_RPA15,
153 OUT_RPD7,
154 OUT_RPD9,
155 OUT_RPG6,
156 OUT_RPB8,
157 OUT_RPB15,
158 OUT_RPD4,
159 OUT_RPB0,
160 OUT_RPE3,
161 OUT_RPB7,
162 OUT_RPF12,
163 OUT_RPD12,
164 OUT_RPF8,
165 OUT_RPC3,
166 OUT_RPE9,
167 OUT_RPD1,
168 OUT_RPG9,
169 OUT_RPB14,
170 OUT_RPD0,
171 OUT_RPB6,
172 OUT_RPD5,
173 OUT_RPB2,
174 OUT_RPF3,
175 OUT_RPF13,
176 OUT_RPC2,
177 OUT_RPE8,
178 OUT_RPF2,
181 /* Output PPS Functions */
182 #define OUT_FUNC_U3TX 0x01
183 #define OUT_FUNC_U4RTS 0x02
184 #define OUT_FUNC_SDO1 0x05
185 #define OUT_FUNC_SDO2 0x06
186 #define OUT_FUNC_SDO3 0x07
187 #define OUT_FUNC_SDO5 0x09
188 #define OUT_FUNC_SS6 0x0A
189 #define OUT_FUNC_OC3 0x0B
190 #define OUT_FUNC_OC6 0x0C
191 #define OUT_FUNC_REFCLKO4 0x0D
192 #define OUT_FUNC_C2OUT 0x0E
193 #define OUT_FUNC_C1TX 0x0F
194 #define OUT_FUNC_U1TX 0x01
195 #define OUT_FUNC_U2RTS 0x02
196 #define OUT_FUNC_U5TX 0x03
197 #define OUT_FUNC_U6RTS 0x04
198 #define OUT_FUNC_SDO1 0x05
199 #define OUT_FUNC_SDO2 0x06
200 #define OUT_FUNC_SDO3 0x07
201 #define OUT_FUNC_SDO4 0x08
202 #define OUT_FUNC_SDO5 0x09
203 #define OUT_FUNC_OC4 0x0B
204 #define OUT_FUNC_OC7 0x0C
205 #define OUT_FUNC_REFCLKO1 0x0F
206 #define OUT_FUNC_U3RTS 0x01
207 #define OUT_FUNC_U4TX 0x02
208 #define OUT_FUNC_U6TX 0x04
209 #define OUT_FUNC_SS1 0x05
210 #define OUT_FUNC_SS3 0x07
211 #define OUT_FUNC_SS4 0x08
212 #define OUT_FUNC_SS5 0x09
213 #define OUT_FUNC_SDO6 0x0A
214 #define OUT_FUNC_OC5 0x0B
215 #define OUT_FUNC_OC8 0x0C
216 #define OUT_FUNC_C1OUT 0x0E
217 #define OUT_FUNC_REFCLKO3 0x0F
218 #define OUT_FUNC_U1RTS 0x01
219 #define OUT_FUNC_U2TX 0x02
220 #define OUT_FUNC_U5RTS 0x03
221 #define OUT_FUNC_U6TX 0x04
222 #define OUT_FUNC_SS2 0x06
223 #define OUT_FUNC_SDO4 0x08
224 #define OUT_FUNC_SDO6 0x0A
225 #define OUT_FUNC_OC2 0x0B
226 #define OUT_FUNC_OC1 0x0C
227 #define OUT_FUNC_OC9 0x0D
228 #define OUT_FUNC_C2TX 0x0F
230 void pic32_pps_input(int function, int pin);
231 void pic32_pps_output(int function, int pin);
233 #endif