1
2
3
4
5
6
7
8
9#include <asm/arch/sys_proto.h>
10#include <asm/arch/mux_dra7xx.h>
11
12
13static const struct pad_conf_entry cl_som_am57x_padconf_console[] = {
14 {UART3_RXD, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},
15 {UART3_TXD, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},
16};
17
18
19static const struct pad_conf_entry cl_som_am57x_padconf_pmic[] = {
20 {MCASP1_ACLKR, (M10 | PIN_INPUT)},
21 {MCASP1_FSR, (M10 | PIN_INPUT)},
22};
23
24
25static const struct pad_conf_entry cl_som_am57x_padconf_green_led[] = {
26 {GPMC_A15, (M14 | PIN_OUTPUT_PULLDOWN)},
27};
28
29
30static const struct pad_conf_entry cl_som_am57x_padconf_sd_card[] = {
31 {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)},
32 {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)},
33 {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)},
34 {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)},
35 {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)},
36 {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)},
37 {MMC1_SDCD, (M14 | PIN_INPUT) },
38 {MMC1_SDWP, (M14 | PIN_INPUT) },
39};
40
41
42static const struct pad_conf_entry cl_som_am57x_padconf_wifi[] = {
43 {UART1_CTSN, (M15 | PIN_INPUT_PULLDOWN)},
44 {UART1_RTSN, (M15 | PIN_INPUT_PULLDOWN)},
45 {UART2_RXD, (M15 | PIN_INPUT_PULLDOWN)},
46 {UART2_TXD, (M15 | PIN_INPUT_PULLDOWN)},
47 {UART2_CTSN, (M15 | PIN_INPUT_PULLDOWN)},
48 {UART2_RTSN, (M15 | PIN_INPUT_PULLDOWN)},
49};
50
51
52static const struct pad_conf_entry cl_som_am57x_padconf_qspi[] = {
53 {GPMC_A13, (M1 | PIN_INPUT) },
54 {GPMC_A18, (M1 | PIN_INPUT) },
55 {GPMC_A16, (M1 | PIN_INPUT) },
56 {GPMC_A17, (M1 | PIN_INPUT) },
57 {GPMC_CS2, (M1 | PIN_INPUT_PULLUP)},
58};
59
60
61static const struct pad_conf_entry cl_som_am57x_padconf_i2c_gpio[] = {
62 {MCASP1_AXR0, (M10 | PIN_INPUT)},
63 {MCASP1_AXR1, (M10 | PIN_INPUT)},
64};
65
66
67static const struct pad_conf_entry cl_som_am57x_padconf_emmc[] = {
68 {GPMC_A19, (M1 | PIN_INPUT_PULLUP)},
69 {GPMC_A20, (M1 | PIN_INPUT_PULLUP)},
70 {GPMC_A21, (M1 | PIN_INPUT_PULLUP)},
71 {GPMC_A22, (M1 | PIN_INPUT_PULLUP)},
72 {GPMC_A23, (M1 | PIN_INPUT_PULLUP)},
73 {GPMC_A24, (M1 | PIN_INPUT_PULLUP)},
74 {GPMC_A25, (M1 | PIN_INPUT_PULLUP)},
75 {GPMC_A26, (M1 | PIN_INPUT_PULLUP)},
76 {GPMC_A27, (M1 | PIN_INPUT_PULLUP)},
77 {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)},
78};
79
80
81static const struct pad_conf_entry cl_som_am57x_padconf_usb[] = {
82
83 {USB1_DRVVBUS, (M0 | PIN_OUTPUT_PULLDOWN | SLEWCONTROL) },
84};
85
86
87static const struct pad_conf_entry cl_som_am57x_padconf_ethernet[] = {
88
89 {VIN2A_D10, (M3 | PIN_OUTPUT_PULLUP) },
90 {VIN2A_D11, (M3 | PIN_INPUT_PULLUP) },
91
92 {VIN2A_D12, (M3 | PIN_OUTPUT) },
93 {VIN2A_D13, (M3 | PIN_OUTPUT) },
94 {VIN2A_D14, (M3 | PIN_OUTPUT) },
95 {VIN2A_D15, (M3 | PIN_OUTPUT) },
96 {VIN2A_D16, (M3 | PIN_OUTPUT) },
97 {VIN2A_D17, (M3 | PIN_OUTPUT) },
98 {VIN2A_D18, (M3 | PIN_INPUT_PULLDOWN) },
99 {VIN2A_D19, (M3 | PIN_INPUT_PULLDOWN) },
100 {VIN2A_D20, (M3 | PIN_INPUT_PULLDOWN) },
101 {VIN2A_D21, (M3 | PIN_INPUT_PULLDOWN) },
102 {VIN2A_D22, (M3 | PIN_INPUT_PULLDOWN) },
103 {VIN2A_D23, (M3 | PIN_INPUT_PULLDOWN) },
104
105 {VIN2A_CLK0, (M14 | PIN_OUTPUT_PULLDOWN)},
106};
107
108#define SET_MUX(mux_array) do_set_mux32((*ctrl)->control_padconf_core_base, \
109 mux_array, ARRAY_SIZE(mux_array))
110
111void set_muxconf_regs(void)
112{
113 SET_MUX(cl_som_am57x_padconf_console);
114 SET_MUX(cl_som_am57x_padconf_pmic);
115 SET_MUX(cl_som_am57x_padconf_green_led);
116 SET_MUX(cl_som_am57x_padconf_sd_card);
117 SET_MUX(cl_som_am57x_padconf_wifi);
118 SET_MUX(cl_som_am57x_padconf_qspi);
119 SET_MUX(cl_som_am57x_padconf_i2c_gpio);
120 SET_MUX(cl_som_am57x_padconf_emmc);
121 SET_MUX(cl_som_am57x_padconf_usb);
122 SET_MUX(cl_som_am57x_padconf_ethernet);
123}
124