1 /*
2  * Copyright (c) 2012, Freescale Semiconductor, Inc.
3  * All rights reserved.
4  *
5  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
6  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
9  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
10  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
12  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
14  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15  */
16 
17 // File: sjc_iomux_config.c
18 
19 /* ------------------------------------------------------------------------------
20  * <auto-generated>
21  *     This code was generated by a tool.
22  *     Runtime Version:3.4.0.0
23  *
24  *     Changes to this file may cause incorrect behavior and will be lost if
25  *     the code is regenerated.
26  * </auto-generated>
27  * ------------------------------------------------------------------------------
28 */
29 
30 #include "iomux_config.h"
31 #include "registers/regsiomuxc.h"
32 
33 // Function to configure IOMUXC for sjc module.
sjc_iomux_config(void)34 void sjc_iomux_config(void)
35 {
36     // Config sjc.JTAG_MOD to pad JTAG_MOD(H6)
37     // HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD_WR(0x0000B060);
38     // Pad Control Register:
39     // IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD(0x020E0614)
40     //   HYS [16] - Hysteresis Enable Field Reset: DISABLED
41     //     DISABLED (0) - CMOS input
42     //     ENABLED (1) - Schmitt trigger input
43     //   PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU
44     //     100K_OHM_PD (0) - 100K Ohm Pull Down
45     //     47K_OHM_PU (1) - 47K Ohm Pull Up
46     //     100K_OHM_PU (2) - 100K Ohm Pull Up
47     //     22K_OHM_PU (3) - 22K Ohm Pull Up
48     //   PUE [13] - Pull / Keep Select Field Reset: PULL
49     //              NOTE: Read Only Field
50     //              The value of this field is fixed and cannot be changed.
51     //     KEEP (0) - Keeper Enabled
52     //     PULL (1) - Pull Enabled
53     //   PKE [12] - Pull / Keep Enable Field Reset: ENABLED
54     //     DISABLED (0) - Pull/Keeper Disabled
55     //     ENABLED (1) - Pull/Keeper Enabled
56     //   ODE [11] - Open Drain Enable Field Reset: DISABLED
57     //              Enables open drain of the pin.
58     //              NOTE: Read Only Field
59     //              The value of this field is fixed and cannot be changed.
60     //     DISABLED (0) - Output is CMOS.
61     //     ENABLED (1) - Output is Open Drain.
62     //   SPEED [7:6] - Speed Field Reset: 50MHZ
63     //                 NOTE: Read Only Field
64     //                 The value of this field is fixed and cannot be changed.
65     //     RESERVED0 (0) - Reserved
66     //     50MHZ (1) - Low (50 MHz)
67     //     100MHZ (2) - Medium (100 MHz)
68     //     200MHZ (3) - Maximum (200 MHz)
69     //   DSE [5:3] - Drive Strength Field Reset: 60_OHM
70     //               NOTE: Read Only Field
71     //               The value of this field is fixed and cannot be changed.
72     //     HIZ (0) - HI-Z
73     //     240_OHM (1) - 240 Ohm
74     //     120_OHM (2) - 120 Ohm
75     //     80_OHM (3) - 80 Ohm
76     //     60_OHM (4) - 60 Ohm
77     //     48_OHM (5) - 48 Ohm
78     //     40_OHM (6) - 40 Ohm
79     //     34_OHM (7) - 34 Ohm
80     //   SRE [0] - Slew Rate Field Reset: SLOW
81     //             Slew rate control.
82     //             NOTE: Read Only Field
83     //             The value of this field is fixed and cannot be changed.
84     //     SLOW (0) - Slow Slew Rate
85     //     FAST (1) - Fast Slew Rate
86     HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD_WR(
87             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD_HYS_V(DISABLED) |
88             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD_PUS_V(100K_OHM_PU) |
89             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD_PKE_V(ENABLED));
90 
91     // Config sjc.JTAG_TCK to pad JTAG_TCK(H5)
92     // HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK_WR(0x00007060);
93     // Pad Control Register:
94     // IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK(0x020E0618)
95     //   HYS [16] - Hysteresis Enable Field Reset: DISABLED
96     //     DISABLED (0) - CMOS input
97     //     ENABLED (1) - Schmitt trigger input
98     //   PUS [15:14] - Pull Up / Down Config. Field Reset: 47K_OHM_PU
99     //     100K_OHM_PD (0) - 100K Ohm Pull Down
100     //     47K_OHM_PU (1) - 47K Ohm Pull Up
101     //     100K_OHM_PU (2) - 100K Ohm Pull Up
102     //     22K_OHM_PU (3) - 22K Ohm Pull Up
103     //   PUE [13] - Pull / Keep Select Field Reset: PULL
104     //              NOTE: Read Only Field
105     //              The value of this field is fixed and cannot be changed.
106     //     KEEP (0) - Keeper Enabled
107     //     PULL (1) - Pull Enabled
108     //   PKE [12] - Pull / Keep Enable Field Reset: ENABLED
109     //     DISABLED (0) - Pull/Keeper Disabled
110     //     ENABLED (1) - Pull/Keeper Enabled
111     //   ODE [11] - Open Drain Enable Field Reset: DISABLED
112     //              Enables open drain of the pin.
113     //              NOTE: Read Only Field
114     //              The value of this field is fixed and cannot be changed.
115     //     DISABLED (0) - Output is CMOS.
116     //     ENABLED (1) - Output is Open Drain.
117     //   SPEED [7:6] - Speed Field Reset: 50MHZ
118     //                 NOTE: Read Only Field
119     //                 The value of this field is fixed and cannot be changed.
120     //     RESERVED0 (0) - Reserved
121     //     50MHZ (1) - Low (50 MHz)
122     //     100MHZ (2) - Medium (100 MHz)
123     //     200MHZ (3) - Maximum (200 MHz)
124     //   DSE [5:3] - Drive Strength Field Reset: 60_OHM
125     //               NOTE: Read Only Field
126     //               The value of this field is fixed and cannot be changed.
127     //     HIZ (0) - HI-Z
128     //     240_OHM (1) - 240 Ohm
129     //     120_OHM (2) - 120 Ohm
130     //     80_OHM (3) - 80 Ohm
131     //     60_OHM (4) - 60 Ohm
132     //     48_OHM (5) - 48 Ohm
133     //     40_OHM (6) - 40 Ohm
134     //     34_OHM (7) - 34 Ohm
135     //   SRE [0] - Slew Rate Field Reset: SLOW
136     //             Slew rate control.
137     //             NOTE: Read Only Field
138     //             The value of this field is fixed and cannot be changed.
139     //     SLOW (0) - Slow Slew Rate
140     //     FAST (1) - Fast Slew Rate
141     HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK_WR(
142             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK_HYS_V(DISABLED) |
143             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK_PUS_V(47K_OHM_PU) |
144             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK_PKE_V(ENABLED));
145 
146     // Config sjc.JTAG_TDI to pad JTAG_TDI(G5)
147     // HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI_WR(0x00007060);
148     // Pad Control Register:
149     // IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI(0x020E061C)
150     //   HYS [16] - Hysteresis Enable Field Reset: DISABLED
151     //     DISABLED (0) - CMOS input
152     //     ENABLED (1) - Schmitt trigger input
153     //   PUS [15:14] - Pull Up / Down Config. Field Reset: 47K_OHM_PU
154     //     100K_OHM_PD (0) - 100K Ohm Pull Down
155     //     47K_OHM_PU (1) - 47K Ohm Pull Up
156     //     100K_OHM_PU (2) - 100K Ohm Pull Up
157     //     22K_OHM_PU (3) - 22K Ohm Pull Up
158     //   PUE [13] - Pull / Keep Select Field Reset: PULL
159     //              NOTE: Read Only Field
160     //              The value of this field is fixed and cannot be changed.
161     //     KEEP (0) - Keeper Enabled
162     //     PULL (1) - Pull Enabled
163     //   PKE [12] - Pull / Keep Enable Field Reset: ENABLED
164     //     DISABLED (0) - Pull/Keeper Disabled
165     //     ENABLED (1) - Pull/Keeper Enabled
166     //   ODE [11] - Open Drain Enable Field Reset: DISABLED
167     //              Enables open drain of the pin.
168     //              NOTE: Read Only Field
169     //              The value of this field is fixed and cannot be changed.
170     //     DISABLED (0) - Output is CMOS.
171     //     ENABLED (1) - Output is Open Drain.
172     //   SPEED [7:6] - Speed Field Reset: 50MHZ
173     //                 NOTE: Read Only Field
174     //                 The value of this field is fixed and cannot be changed.
175     //     RESERVED0 (0) - Reserved
176     //     50MHZ (1) - Low (50 MHz)
177     //     100MHZ (2) - Medium (100 MHz)
178     //     200MHZ (3) - Maximum (200 MHz)
179     //   DSE [5:3] - Drive Strength Field Reset: 60_OHM
180     //               NOTE: Read Only Field
181     //               The value of this field is fixed and cannot be changed.
182     //     HIZ (0) - HI-Z
183     //     240_OHM (1) - 240 Ohm
184     //     120_OHM (2) - 120 Ohm
185     //     80_OHM (3) - 80 Ohm
186     //     60_OHM (4) - 60 Ohm
187     //     48_OHM (5) - 48 Ohm
188     //     40_OHM (6) - 40 Ohm
189     //     34_OHM (7) - 34 Ohm
190     //   SRE [0] - Slew Rate Field Reset: SLOW
191     //             Slew rate control.
192     //             NOTE: Read Only Field
193     //             The value of this field is fixed and cannot be changed.
194     //     SLOW (0) - Slow Slew Rate
195     //     FAST (1) - Fast Slew Rate
196     HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI_WR(
197             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI_HYS_V(DISABLED) |
198             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI_PUS_V(47K_OHM_PU) |
199             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI_PKE_V(ENABLED));
200 
201     // Config sjc.JTAG_TDO to pad JTAG_TDO(G6)
202     // HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDO_WR(0x000090B1);
203     // Pad Control Register:
204     // IOMUXC_SW_PAD_CTL_PAD_JTAG_TDO(0x020E0620)
205     //   HYS [16] - Hysteresis Enable Field Reset: DISABLED
206     //              NOTE: Read Only Field
207     //              The value of this field is fixed and cannot be changed.
208     //     DISABLED (0) - CMOS input
209     //     ENABLED (1) - Schmitt trigger input
210     //   PUS [15:14] - Pull Up / Down Config. Field Reset: 100K_OHM_PU
211     //                 NOTE: Read Only Field
212     //                 The value of this field is fixed and cannot be changed.
213     //     100K_OHM_PD (0) - 100K Ohm Pull Down
214     //     47K_OHM_PU (1) - 47K Ohm Pull Up
215     //     100K_OHM_PU (2) - 100K Ohm Pull Up
216     //     22K_OHM_PU (3) - 22K Ohm Pull Up
217     //   PUE [13] - Pull / Keep Select Field Reset: KEEP
218     //              NOTE: Read Only Field
219     //              The value of this field is fixed and cannot be changed.
220     //     KEEP (0) - Keeper Enabled
221     //     PULL (1) - Pull Enabled
222     //   PKE [12] - Pull / Keep Enable Field Reset: ENABLED
223     //     DISABLED (0) - Pull/Keeper Disabled
224     //     ENABLED (1) - Pull/Keeper Enabled
225     //   ODE [11] - Open Drain Enable Field Reset: DISABLED
226     //              Enables open drain of the pin.
227     //              NOTE: Read Only Field
228     //              The value of this field is fixed and cannot be changed.
229     //     DISABLED (0) - Output is CMOS.
230     //     ENABLED (1) - Output is Open Drain.
231     //   SPEED [7:6] - Speed Field Reset: 100MHZ
232     //                 NOTE: Read Only Field
233     //                 The value of this field is fixed and cannot be changed.
234     //     RESERVED0 (0) - Reserved
235     //     50MHZ (1) - Low (50 MHz)
236     //     100MHZ (2) - Medium (100 MHz)
237     //     200MHZ (3) - Maximum (200 MHz)
238     //   DSE [5:3] - Drive Strength Field Reset: 40_OHM
239     //               NOTE: Read Only Field
240     //               The value of this field is fixed and cannot be changed.
241     //     HIZ (0) - HI-Z
242     //     240_OHM (1) - 240 Ohm
243     //     120_OHM (2) - 120 Ohm
244     //     80_OHM (3) - 80 Ohm
245     //     60_OHM (4) - 60 Ohm
246     //     48_OHM (5) - 48 Ohm
247     //     40_OHM (6) - 40 Ohm
248     //     34_OHM (7) - 34 Ohm
249     //   SRE [0] - Slew Rate Field Reset: FAST
250     //             Slew rate control.
251     //             NOTE: Read Only Field
252     //             The value of this field is fixed and cannot be changed.
253     //     SLOW (0) - Slow Slew Rate
254     //     FAST (1) - Fast Slew Rate
255     HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDO_WR(
256             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TDO_PKE_V(ENABLED));
257 
258     // Config sjc.JTAG_TMS to pad JTAG_TMS(C3)
259     // HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS_WR(0x00007060);
260     // Pad Control Register:
261     // IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS(0x020E0624)
262     //   HYS [16] - Hysteresis Enable Field Reset: DISABLED
263     //     DISABLED (0) - CMOS input
264     //     ENABLED (1) - Schmitt trigger input
265     //   PUS [15:14] - Pull Up / Down Config. Field Reset: 47K_OHM_PU
266     //     100K_OHM_PD (0) - 100K Ohm Pull Down
267     //     47K_OHM_PU (1) - 47K Ohm Pull Up
268     //     100K_OHM_PU (2) - 100K Ohm Pull Up
269     //     22K_OHM_PU (3) - 22K Ohm Pull Up
270     //   PUE [13] - Pull / Keep Select Field Reset: PULL
271     //              NOTE: Read Only Field
272     //              The value of this field is fixed and cannot be changed.
273     //     KEEP (0) - Keeper Enabled
274     //     PULL (1) - Pull Enabled
275     //   PKE [12] - Pull / Keep Enable Field Reset: ENABLED
276     //     DISABLED (0) - Pull/Keeper Disabled
277     //     ENABLED (1) - Pull/Keeper Enabled
278     //   ODE [11] - Open Drain Enable Field Reset: DISABLED
279     //              Enables open drain of the pin.
280     //              NOTE: Read Only Field
281     //              The value of this field is fixed and cannot be changed.
282     //     DISABLED (0) - Output is CMOS.
283     //     ENABLED (1) - Output is Open Drain.
284     //   SPEED [7:6] - Speed Field Reset: 50MHZ
285     //                 NOTE: Read Only Field
286     //                 The value of this field is fixed and cannot be changed.
287     //     RESERVED0 (0) - Reserved
288     //     50MHZ (1) - Low (50 MHz)
289     //     100MHZ (2) - Medium (100 MHz)
290     //     200MHZ (3) - Maximum (200 MHz)
291     //   DSE [5:3] - Drive Strength Field Reset: 60_OHM
292     //               NOTE: Read Only Field
293     //               The value of this field is fixed and cannot be changed.
294     //     HIZ (0) - HI-Z
295     //     240_OHM (1) - 240 Ohm
296     //     120_OHM (2) - 120 Ohm
297     //     80_OHM (3) - 80 Ohm
298     //     60_OHM (4) - 60 Ohm
299     //     48_OHM (5) - 48 Ohm
300     //     40_OHM (6) - 40 Ohm
301     //     34_OHM (7) - 34 Ohm
302     //   SRE [0] - Slew Rate Field Reset: SLOW
303     //             Slew rate control.
304     //             NOTE: Read Only Field
305     //             The value of this field is fixed and cannot be changed.
306     //     SLOW (0) - Slow Slew Rate
307     //     FAST (1) - Fast Slew Rate
308     HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS_WR(
309             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS_HYS_V(DISABLED) |
310             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS_PUS_V(47K_OHM_PU) |
311             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS_PKE_V(ENABLED));
312 
313     // Config sjc.JTAG_TRSTB to pad JTAG_TRSTB(C2)
314     // HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB_WR(0x00007060);
315     // Pad Control Register:
316     // IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB(0x020E0628)
317     //   HYS [16] - Hysteresis Enable Field Reset: DISABLED
318     //     DISABLED (0) - CMOS input
319     //     ENABLED (1) - Schmitt trigger input
320     //   PUS [15:14] - Pull Up / Down Config. Field Reset: 47K_OHM_PU
321     //     100K_OHM_PD (0) - 100K Ohm Pull Down
322     //     47K_OHM_PU (1) - 47K Ohm Pull Up
323     //     100K_OHM_PU (2) - 100K Ohm Pull Up
324     //     22K_OHM_PU (3) - 22K Ohm Pull Up
325     //   PUE [13] - Pull / Keep Select Field Reset: PULL
326     //              NOTE: Read Only Field
327     //              The value of this field is fixed and cannot be changed.
328     //     KEEP (0) - Keeper Enabled
329     //     PULL (1) - Pull Enabled
330     //   PKE [12] - Pull / Keep Enable Field Reset: ENABLED
331     //     DISABLED (0) - Pull/Keeper Disabled
332     //     ENABLED (1) - Pull/Keeper Enabled
333     //   ODE [11] - Open Drain Enable Field Reset: DISABLED
334     //              Enables open drain of the pin.
335     //              NOTE: Read Only Field
336     //              The value of this field is fixed and cannot be changed.
337     //     DISABLED (0) - Output is CMOS.
338     //     ENABLED (1) - Output is Open Drain.
339     //   SPEED [7:6] - Speed Field Reset: 50MHZ
340     //                 NOTE: Read Only Field
341     //                 The value of this field is fixed and cannot be changed.
342     //     RESERVED0 (0) - Reserved
343     //     50MHZ (1) - Low (50 MHz)
344     //     100MHZ (2) - Medium (100 MHz)
345     //     200MHZ (3) - Maximum (200 MHz)
346     //   DSE [5:3] - Drive Strength Field Reset: 60_OHM
347     //               NOTE: Read Only Field
348     //               The value of this field is fixed and cannot be changed.
349     //     HIZ (0) - HI-Z
350     //     240_OHM (1) - 240 Ohm
351     //     120_OHM (2) - 120 Ohm
352     //     80_OHM (3) - 80 Ohm
353     //     60_OHM (4) - 60 Ohm
354     //     48_OHM (5) - 48 Ohm
355     //     40_OHM (6) - 40 Ohm
356     //     34_OHM (7) - 34 Ohm
357     //   SRE [0] - Slew Rate Field Reset: SLOW
358     //             Slew rate control.
359     //             NOTE: Read Only Field
360     //             The value of this field is fixed and cannot be changed.
361     //     SLOW (0) - Slow Slew Rate
362     //     FAST (1) - Fast Slew Rate
363     HW_IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB_WR(
364             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB_HYS_V(DISABLED) |
365             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB_PUS_V(47K_OHM_PU) |
366             BF_IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB_PKE_V(ENABLED));
367 }
368