5 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
8 * TI AM335x boards information header
10 * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
12 * SPDX-License-Identifier: GPL-2.0+
18 /* Definition to control the GPIOs (for LEDs and Reset) */
19 #define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
21 static inline int board_is_b_sample(void)
23 #if defined CONFIG_B_SAMPLE
30 static inline int board_is_c_sample(void)
32 #if defined CONFIG_C_SAMPLE
39 static inline int board_is_c3_sample(void)
41 #if defined CONFIG_C3_SAMPLE
48 static inline int board_is_series(void)
50 #if defined CONFIG_SERIES
58 * Definitions for pinmuxing header and Board ID strings
60 #if defined CONFIG_B_SAMPLE
61 # define BOARD_ID_STR "SHC B-Sample\n"
62 #elif defined CONFIG_B2_SAMPLE
63 # define BOARD_ID_STR "SHC B2-Sample\n"
64 #elif defined CONFIG_C_SAMPLE
65 # if defined(CONFIG_SHC_NETBOOT)
66 # define BOARD_ID_STR "#### NETBOOT ####\nSHC C-Sample\n"
67 # elif defined(CONFIG_SHC_SDBOOT)
68 # define BOARD_ID_STR "#### SDBOOT ####\nSHC C-Sample\n"
70 # define BOARD_ID_STR "SHC C-Sample\n"
72 #elif defined CONFIG_C2_SAMPLE
73 # if defined(CONFIG_SHC_ICT)
74 # define BOARD_ID_STR "#### ICT ####\nSHC C2-Sample\n"
75 # elif defined(CONFIG_SHC_NETBOOT)
76 # define BOARD_ID_STR "#### NETBOOT ####\nSHC C2-Sample\n"
77 # elif defined(CONFIG_SHC_SDBOOT)
78 # define BOARD_ID_STR "#### SDBOOT ####\nSHC C2-Sample\n"
80 # define BOARD_ID_STR "SHC C2-Sample\n"
82 #elif defined CONFIG_C3_SAMPLE
83 # if defined(CONFIG_SHC_ICT)
84 # define BOARD_ID_STR "#### ICT ####\nSHC C3-Sample\n"
85 # elif defined(CONFIG_SHC_NETBOOT)
86 # define BOARD_ID_STR "#### NETBOOT ####\nSHC C3-Sample\n"
87 # elif defined(CONFIG_SHC_SDBOOT)
88 # define BOARD_ID_STR "#### SDBOOT ####\nSHC C3-Sample\n"
90 # define BOARD_ID_STR "SHC C3-Sample\n"
92 #elif defined CONFIG_SERIES
93 # if defined(CONFIG_SHC_ICT)
94 # define BOARD_ID_STR "#### ICT ####\nSHC\n"
95 # elif defined(CONFIG_SHC_NETBOOT)
96 # define BOARD_ID_STR "#### NETBOOT ####\nSHC\n"
97 # elif defined(CONFIG_SHC_SDBOOT)
98 # define BOARD_ID_STR "#### SDBOOT ####\nSHC\n"
100 # define BOARD_ID_STR "SHC\n"
103 # define BOARD_ID_STR "Unknown device!\n"
107 * Definitions for GPIO pin assignments
109 #if defined CONFIG_B_SAMPLE
111 # define LED_PWR_BL_GPIO GPIO_TO_PIN(1, 17)
112 # define LED_PWR_RD_GPIO GPIO_TO_PIN(1, 18)
113 # define LED_PWR_GN_GPIO GPIO_TO_PIN(1, 19)
114 # define LED_CONN_BL_GPIO GPIO_TO_PIN(0, 26)
115 # define LED_CONN_RD_GPIO GPIO_TO_PIN(0, 22)
116 # define LED_CONN_GN_GPIO GPIO_TO_PIN(0, 23)
117 # define RESET_GPIO GPIO_TO_PIN(1, 29)
118 # define WIFI_REGEN_GPIO GPIO_TO_PIN(1, 16)
119 # define WIFI_RST_GPIO GPIO_TO_PIN(0, 27)
120 # define ZIGBEE_RST_GPIO GPIO_TO_PIN(3, 18)
121 # define BIDCOS_RST_GPIO GPIO_TO_PIN(0, 12)
122 # define ENOC_RST_GPIO GPIO_TO_PIN(1, 22)
126 # define LED_PWR_BL_GPIO GPIO_TO_PIN(0, 22)
127 # define LED_PWR_RD_GPIO GPIO_TO_PIN(0, 23)
128 # define LED_LAN_BL_GPIO GPIO_TO_PIN(1, 17)
129 # define LED_LAN_RD_GPIO GPIO_TO_PIN(0, 26)
130 # define LED_CLOUD_BL_GPIO GPIO_TO_PIN(1, 18)
131 # define LED_CLOUD_RD_GPIO GPIO_TO_PIN(2, 2)
132 # define LED_PWM_GPIO GPIO_TO_PIN(1, 19)
133 # define RESET_GPIO GPIO_TO_PIN(1, 29)
134 # define WIFI_REGEN_GPIO GPIO_TO_PIN(1, 16)
135 # define WIFI_RST_GPIO GPIO_TO_PIN(0, 27)
136 # define ZIGBEE_RST_GPIO GPIO_TO_PIN(3, 18)
137 # define BIDCOS_RST_GPIO GPIO_TO_PIN(1, 24)
138 # define Z_WAVE_RST_GPIO GPIO_TO_PIN(1, 21)
139 # define ENOC_RST_GPIO GPIO_TO_PIN(1, 22)
143 #define BACK_BUTTON_GPIO GPIO_TO_PIN(1, 29)
144 #define FRONT_BUTTON_GPIO GPIO_TO_PIN(1, 25)
146 /* Reset is on GPIO pin 29 of GPIO bank 1 */
147 #define RESET_MASK (0x1 << 29)
149 #define HDR_MAGIC 0x43485342
150 #define HDR_ETH_ALEN 6
151 #define HDR_NAME_LEN 8
152 #define HDR_REV_LEN 8
153 #define HDR_SER_LEN 16
154 #define HDR_ROOT_LEN 12
155 #define HDR_FATC_LEN 12
158 * SHC parameters held in On-Board I²C EEPROM device.
163 *-------------------------------------------------------------
164 * Magic 4 0x42 0x53 0x48 0x43 [BSHC]
166 * Version 2 0x0100 for v1.0
168 * Lenght 2 The length of the complete structure, not only this header
170 * Eth-MAC 6 Ethernet MAC Address
171 * SHC Pool: 7C:AC:B2:00:10:01 - TBD
173 * --- Further values follow, not important for Bootloader ---
180 uint8_t mac_addr[HDR_ETH_ALEN];
183 void enable_uart0_pin_mux(void);
184 void enable_shc_board_pin_mux(void);
185 void enable_shc_board_pwm_pin_mux(void);