blob: ea90bc6e3420d2e3dedc98873aaf8f52814d83b3 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +03002/*
3 * Pinmux configuration for Compulab CM-T54 board
4 *
5 * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
6 *
7 * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +03008 */
9
10#ifndef _CM_T54_MUX_DATA_H
11#define _CM_T54_MUX_DATA_H
12
Simon Glass1e268642020-05-10 11:39:55 -060013#include <common.h>
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030014#include <asm/arch/mux_omap5.h>
15#include <asm/arch/sys_proto.h>
16
17const struct pad_conf_entry core_padconf_array_essential[] = {
18 /* MMC1 - SD CARD */
19 {SDCARD_CLK, (PTU | IEN | M0)}, /* SDCARD_CLK */
20 {SDCARD_CMD, (PTU | IEN | M0)}, /* SDCARD_CMD */
21 {SDCARD_DATA0, (PTU | IEN | M0)}, /* SDCARD_DATA0 */
22 {SDCARD_DATA1, (PTU | IEN | M0)}, /* SDCARD_DATA1 */
23 {SDCARD_DATA2, (PTU | IEN | M0)}, /* SDCARD_DATA2 */
24 {SDCARD_DATA3, (PTU | IEN | M0)}, /* SDCARD_DATA3 */
25
26 /* SD CARD CD and WP GPIOs*/
27 {TIMER5_PWM_EVT, (PTU | IEN | M6)}, /* GPIO8_228 */
28 {TIMER6_PWM_EVT, (PTU | IEN | M6)}, /* GPIO8_229 */
29
30 /* MMC2 - eMMC */
31 {EMMC_CLK, (PTU | IEN | M0)}, /* EMMC_CLK */
32 {EMMC_CMD, (PTU | IEN | M0)}, /* EMMC_CMD */
33 {EMMC_DATA0, (PTU | IEN | M0)}, /* EMMC_DATA0 */
34 {EMMC_DATA1, (PTU | IEN | M0)}, /* EMMC_DATA1 */
35 {EMMC_DATA2, (PTU | IEN | M0)}, /* EMMC_DATA2 */
36 {EMMC_DATA3, (PTU | IEN | M0)}, /* EMMC_DATA3 */
37 {EMMC_DATA4, (PTU | IEN | M0)}, /* EMMC_DATA4 */
38 {EMMC_DATA5, (PTU | IEN | M0)}, /* EMMC_DATA5 */
39 {EMMC_DATA6, (PTU | IEN | M0)}, /* EMMC_DATA6 */
40 {EMMC_DATA7, (PTU | IEN | M0)}, /* EMMC_DATA7 */
41
42 /* UART4 */
43 {I2C5_SCL, (PTU | IEN | M2)}, /* UART4_RX */
44 {I2C5_SDA, (M2)}, /* UART4_TX */
45
46 /* Led */
47 {HSI2_CAFLAG, (PTU | M6)}, /* GPIO3_80 */
48
49 /* I2C1 */
50 {I2C1_PMIC_SCL, (PTU | IEN | M0)}, /* I2C1_PMIC_SCL */
51 {I2C1_PMIC_SDA, (PTU | IEN | M0)}, /* I2C1_PMIC_SDA */
52
53 /* USBB2, USBB3 */
54 {USBB2_HSIC_STROBE, (PTU | IEN | M0)}, /* USBB2_HSIC_STROBE */
55 {USBB2_HSIC_DATA, (PTU | IEN | M0)}, /* USBB2_HSIC_DATA */
56 {USBB3_HSIC_STROBE, (PTU | IEN | M0)}, /* USBB3_HSIC_STROBE */
57 {USBB3_HSIC_DATA, (PTU | IEN | M0)}, /* USBB3_HSIC_DATA */
58
59 /* USB Hub and USB Eth reset GPIOs */
60 {HSI2_CAREADY, (PTD | M6)}, /* GPIO3_76 */
61 {HSI2_ACDATA, (PTD | M6)}, /* GPIO3_83 */
62
63 /* I2C4 */
64 {I2C4_SCL, (PTU | IEN | M0)}, /* I2C4_SCL */
65 {I2C4_SDA, (PTU | IEN | M0)}, /* I2C4_SDA */
66};
67
68const struct pad_conf_entry wkup_padconf_array_essential[] = {
69 {SR_PMIC_SCL, (PTU | IEN | M0)}, /* SR_PMIC_SCL */
70 {SR_PMIC_SDA, (PTU | IEN | M0)}, /* SR_PMIC_SDA */
71 {SYS_32K, (IEN | M0)}, /* SYS_32K */
72
73 /* USB Hub clock */
74 {FREF_CLK1_OUT, (PTD | IEN | M0)}, /* FREF_CLK1_OUT */
75};
76
77/*
Paul Kocialkowskia00b1e52016-02-27 19:18:56 +010078 * Routine: set_muxconf_regs
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030079 * Description: setup board pinmux configuration.
80 */
Paul Kocialkowskia00b1e52016-02-27 19:18:56 +010081void set_muxconf_regs(void)
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030082{
83 do_set_mux((*ctrl)->control_padconf_core_base,
84 core_padconf_array_essential,
85 sizeof(core_padconf_array_essential) /
86 sizeof(struct pad_conf_entry));
87
88 do_set_mux((*ctrl)->control_padconf_wkup_base,
89 wkup_padconf_array_essential,
90 sizeof(wkup_padconf_array_essential) /
91 sizeof(struct pad_conf_entry));
92}
93
94#endif /* _CM_T54_MUX_DATA_H */