blob: 1dcc8a3521ed9c47f5f71be66e38ba24c895222e [file] [log] [blame]
Felipe Balbi1e4ad742014-11-10 14:02:44 -06001/*
2 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
3 *
4 * Author: Felipe Balbi <balbi@ti.com>
5 *
6 * Based on board/ti/dra7xx/evm.c
7 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11#include <common.h>
12#include <palmas.h>
13#include <sata.h>
14#include <usb.h>
15#include <asm/omap_common.h>
Andreas Dannenberg17c29872016-06-27 09:19:22 -050016#include <asm/omap_sec_common.h>
Felipe Balbi1e4ad742014-11-10 14:02:44 -060017#include <asm/emif.h>
Lokesh Vutla334bbb32015-06-16 20:36:05 +053018#include <asm/gpio.h>
19#include <asm/arch/gpio.h>
Felipe Balbi1e4ad742014-11-10 14:02:44 -060020#include <asm/arch/clock.h>
Lokesh Vutlaf91e0c42015-06-04 16:42:41 +053021#include <asm/arch/dra7xx_iodelay.h>
Felipe Balbi1e4ad742014-11-10 14:02:44 -060022#include <asm/arch/sys_proto.h>
23#include <asm/arch/mmc_host_def.h>
24#include <asm/arch/sata.h>
25#include <asm/arch/gpio.h>
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +053026#include <asm/arch/omap.h>
Felipe Balbi1e4ad742014-11-10 14:02:44 -060027#include <environment.h>
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +053028#include <usb.h>
29#include <linux/usb/gadget.h>
30#include <dwc3-uboot.h>
31#include <dwc3-omap-uboot.h>
32#include <ti-usb-phy-uboot.h>
Felipe Balbi1e4ad742014-11-10 14:02:44 -060033
Kipisz, Steven212f96f2016-02-24 12:30:58 -060034#include "../common/board_detect.h"
Felipe Balbi1e4ad742014-11-10 14:02:44 -060035#include "mux_data.h"
36
Kipisz, Steven212f96f2016-02-24 12:30:58 -060037#define board_is_x15() board_ti_is("BBRDX15_")
Lokesh Vutlaf7f9f6b2016-11-25 11:14:20 +053038#define board_is_x15_revb1() (board_ti_is("BBRDX15_") && \
39 (strncmp("B.10", board_ti_get_rev(), 3) <= 0))
Kipisz, Steven212f96f2016-02-24 12:30:58 -060040#define board_is_am572x_evm() board_ti_is("AM572PM_")
Nishanth Menonbf43ce62016-11-25 11:14:19 +053041#define board_is_am572x_evm_reva3() \
42 (board_ti_is("AM572PM_") && \
43 (strncmp("A.30", board_ti_get_rev(), 3) <= 0))
Steve Kipiszc020d352016-04-08 17:01:29 -050044#define board_is_am572x_idk() board_ti_is("AM572IDK")
Steve Kipisz4d8397c2016-11-25 11:14:24 +053045#define board_is_am571x_idk() board_ti_is("AM571IDK")
Kipisz, Steven212f96f2016-02-24 12:30:58 -060046
Felipe Balbi1e4ad742014-11-10 14:02:44 -060047#ifdef CONFIG_DRIVER_TI_CPSW
48#include <cpsw.h>
49#endif
50
51DECLARE_GLOBAL_DATA_PTR;
52
Roger Quadros37611052017-03-13 15:04:28 +020053#define GPIO_ETH_LCD GPIO_TO_PIN(2, 22)
Lokesh Vutla334bbb32015-06-16 20:36:05 +053054/* GPIO 7_11 */
55#define GPIO_DDR_VTT_EN 203
56
Kipisz, Steven212f96f2016-02-24 12:30:58 -060057#define SYSINFO_BOARD_NAME_MAX_LEN 45
58
Keerthy385d3632016-11-30 15:02:53 +053059#define TPS65903X_PRIMARY_SECONDARY_PAD2 0xFB
60#define TPS65903X_PAD2_POWERHOLD_MASK 0x20
61
Felipe Balbi1e4ad742014-11-10 14:02:44 -060062const struct omap_sysinfo sysinfo = {
Kipisz, Steven212f96f2016-02-24 12:30:58 -060063 "Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n"
Felipe Balbi1e4ad742014-11-10 14:02:44 -060064};
65
66static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
67 .dmm_lisa_map_3 = 0x80740300,
68 .is_ma_present = 0x1
69};
70
Steve Kipisz4d8397c2016-11-25 11:14:24 +053071static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = {
72 .dmm_lisa_map_3 = 0x80640100,
73 .is_ma_present = 0x1
74};
75
Felipe Balbi1e4ad742014-11-10 14:02:44 -060076void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
77{
Steve Kipisz4d8397c2016-11-25 11:14:24 +053078 if (board_is_am571x_idk())
79 *dmm_lisa_regs = &am571x_idk_lisa_regs;
80 else
81 *dmm_lisa_regs = &beagle_x15_lisa_regs;
Felipe Balbi1e4ad742014-11-10 14:02:44 -060082}
83
84static const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs = {
Keerthyeafd4642016-05-24 11:45:07 +053085 .sdram_config_init = 0x61851b32,
86 .sdram_config = 0x61851b32,
87 .sdram_config2 = 0x08000000,
88 .ref_ctrl = 0x000040F1,
89 .ref_ctrl_final = 0x00001035,
90 .sdram_tim1 = 0xcccf36ab,
91 .sdram_tim2 = 0x308f7fda,
92 .sdram_tim3 = 0x409f88a8,
93 .read_idle_ctrl = 0x00050000,
94 .zq_config = 0x5007190b,
95 .temp_alert_config = 0x00000000,
96 .emif_ddr_phy_ctlr_1_init = 0x0024400b,
97 .emif_ddr_phy_ctlr_1 = 0x0e24400b,
98 .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
99 .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
100 .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
101 .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
102 .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
103 .emif_rd_wr_lvl_rmp_win = 0x00000000,
104 .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
105 .emif_rd_wr_lvl_ctl = 0x00000000,
106 .emif_rd_wr_exec_thresh = 0x00000305
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600107};
108
Lokesh Vutla6213db72015-06-03 14:43:21 +0530109/* Ext phy ctrl regs 1-35 */
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600110static const u32 beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs[] = {
Lokesh Vutla6213db72015-06-03 14:43:21 +0530111 0x10040100,
Lokesh Vutla11e2b042016-03-08 09:11:35 +0530112 0x00910091,
113 0x00950095,
114 0x009B009B,
115 0x009E009E,
116 0x00980098,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600117 0x00340034,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600118 0x00350035,
Lokesh Vutla11e2b042016-03-08 09:11:35 +0530119 0x00340034,
120 0x00310031,
121 0x00340034,
122 0x007F007F,
123 0x007F007F,
124 0x007F007F,
125 0x007F007F,
126 0x007F007F,
127 0x00480048,
128 0x004A004A,
129 0x00520052,
130 0x00550055,
131 0x00500050,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600132 0x00000000,
133 0x00600020,
Lokesh Vutla6213db72015-06-03 14:43:21 +0530134 0x40011080,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600135 0x08102040,
Lokesh Vutla11e2b042016-03-08 09:11:35 +0530136 0x0,
137 0x0,
138 0x0,
139 0x0,
140 0x0,
Lokesh Vutla496edff2015-06-03 14:43:22 +0530141 0x0,
142 0x0,
143 0x0,
144 0x0,
145 0x0
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600146};
147
148static const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs = {
Keerthyeafd4642016-05-24 11:45:07 +0530149 .sdram_config_init = 0x61851b32,
150 .sdram_config = 0x61851b32,
151 .sdram_config2 = 0x08000000,
152 .ref_ctrl = 0x000040F1,
153 .ref_ctrl_final = 0x00001035,
154 .sdram_tim1 = 0xcccf36b3,
155 .sdram_tim2 = 0x308f7fda,
156 .sdram_tim3 = 0x407f88a8,
157 .read_idle_ctrl = 0x00050000,
158 .zq_config = 0x5007190b,
159 .temp_alert_config = 0x00000000,
160 .emif_ddr_phy_ctlr_1_init = 0x0024400b,
161 .emif_ddr_phy_ctlr_1 = 0x0e24400b,
162 .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
163 .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
164 .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
165 .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
166 .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
167 .emif_rd_wr_lvl_rmp_win = 0x00000000,
168 .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
169 .emif_rd_wr_lvl_ctl = 0x00000000,
170 .emif_rd_wr_exec_thresh = 0x00000305
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600171};
172
173static const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[] = {
Lokesh Vutla6213db72015-06-03 14:43:21 +0530174 0x10040100,
Lokesh Vutla11e2b042016-03-08 09:11:35 +0530175 0x00910091,
176 0x00950095,
177 0x009B009B,
178 0x009E009E,
179 0x00980098,
180 0x00340034,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600181 0x00350035,
Lokesh Vutla11e2b042016-03-08 09:11:35 +0530182 0x00340034,
183 0x00310031,
184 0x00340034,
185 0x007F007F,
186 0x007F007F,
187 0x007F007F,
188 0x007F007F,
189 0x007F007F,
190 0x00480048,
191 0x004A004A,
192 0x00520052,
193 0x00550055,
194 0x00500050,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600195 0x00000000,
196 0x00600020,
Lokesh Vutla6213db72015-06-03 14:43:21 +0530197 0x40011080,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600198 0x08102040,
Lokesh Vutla11e2b042016-03-08 09:11:35 +0530199 0x0,
200 0x0,
201 0x0,
202 0x0,
203 0x0,
Lokesh Vutla496edff2015-06-03 14:43:22 +0530204 0x0,
205 0x0,
206 0x0,
207 0x0,
208 0x0
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600209};
210
211void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
212{
213 switch (emif_nr) {
214 case 1:
215 *regs = &beagle_x15_emif1_ddr3_532mhz_emif_regs;
216 break;
217 case 2:
218 *regs = &beagle_x15_emif2_ddr3_532mhz_emif_regs;
219 break;
220 }
221}
222
223void emif_get_ext_phy_ctrl_const_regs(u32 emif_nr, const u32 **regs, u32 *size)
224{
225 switch (emif_nr) {
226 case 1:
227 *regs = beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs;
228 *size = ARRAY_SIZE(beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs);
229 break;
230 case 2:
231 *regs = beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs;
232 *size = ARRAY_SIZE(beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs);
233 break;
234 }
235}
236
237struct vcores_data beagle_x15_volts = {
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530238 .mpu.value[OPP_NOM] = VDD_MPU_DRA7_NOM,
239 .mpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_MPU_NOM,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600240 .mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
241 .mpu.addr = TPS659038_REG_ADDR_SMPS12,
242 .mpu.pmic = &tps659038,
Keerthyeafd4642016-05-24 11:45:07 +0530243 .mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600244
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530245 .eve.value[OPP_NOM] = VDD_EVE_DRA7_NOM,
246 .eve.value[OPP_OD] = VDD_EVE_DRA7_OD,
247 .eve.value[OPP_HIGH] = VDD_EVE_DRA7_HIGH,
248 .eve.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_DSPEVE_NOM,
249 .eve.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_DSPEVE_OD,
250 .eve.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600251 .eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,
252 .eve.addr = TPS659038_REG_ADDR_SMPS45,
253 .eve.pmic = &tps659038,
Nishanth Menone52e3342016-04-21 14:34:25 -0500254 .eve.abb_tx_done_mask = OMAP_ABB_EVE_TXDONE_MASK,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600255
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530256 .gpu.value[OPP_NOM] = VDD_GPU_DRA7_NOM,
257 .gpu.value[OPP_OD] = VDD_GPU_DRA7_OD,
258 .gpu.value[OPP_HIGH] = VDD_GPU_DRA7_HIGH,
259 .gpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_GPU_NOM,
260 .gpu.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_GPU_OD,
261 .gpu.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_GPU_HIGH,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600262 .gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
263 .gpu.addr = TPS659038_REG_ADDR_SMPS45,
264 .gpu.pmic = &tps659038,
Nishanth Menone52e3342016-04-21 14:34:25 -0500265 .gpu.abb_tx_done_mask = OMAP_ABB_GPU_TXDONE_MASK,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600266
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530267 .core.value[OPP_NOM] = VDD_CORE_DRA7_NOM,
268 .core.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_CORE_NOM,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600269 .core.efuse.reg_bits = DRA752_EFUSE_REGBITS,
270 .core.addr = TPS659038_REG_ADDR_SMPS6,
271 .core.pmic = &tps659038,
272
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530273 .iva.value[OPP_NOM] = VDD_IVA_DRA7_NOM,
274 .iva.value[OPP_OD] = VDD_IVA_DRA7_OD,
275 .iva.value[OPP_HIGH] = VDD_IVA_DRA7_HIGH,
276 .iva.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_IVA_NOM,
277 .iva.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_IVA_OD,
278 .iva.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_IVA_HIGH,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600279 .iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,
280 .iva.addr = TPS659038_REG_ADDR_SMPS45,
281 .iva.pmic = &tps659038,
Nishanth Menone52e3342016-04-21 14:34:25 -0500282 .iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600283};
284
Keerthyd60198d2016-05-24 11:45:06 +0530285struct vcores_data am572x_idk_volts = {
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530286 .mpu.value[OPP_NOM] = VDD_MPU_DRA7_NOM,
287 .mpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_MPU_NOM,
Keerthyd60198d2016-05-24 11:45:06 +0530288 .mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
289 .mpu.addr = TPS659038_REG_ADDR_SMPS12,
290 .mpu.pmic = &tps659038,
291 .mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
292
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530293 .eve.value[OPP_NOM] = VDD_EVE_DRA7_NOM,
294 .eve.value[OPP_OD] = VDD_EVE_DRA7_OD,
295 .eve.value[OPP_HIGH] = VDD_EVE_DRA7_HIGH,
296 .eve.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_DSPEVE_NOM,
297 .eve.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_DSPEVE_OD,
298 .eve.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
Keerthyd60198d2016-05-24 11:45:06 +0530299 .eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,
300 .eve.addr = TPS659038_REG_ADDR_SMPS45,
301 .eve.pmic = &tps659038,
302 .eve.abb_tx_done_mask = OMAP_ABB_EVE_TXDONE_MASK,
303
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530304 .gpu.value[OPP_NOM] = VDD_GPU_DRA7_NOM,
305 .gpu.value[OPP_OD] = VDD_GPU_DRA7_OD,
306 .gpu.value[OPP_HIGH] = VDD_GPU_DRA7_HIGH,
307 .gpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_GPU_NOM,
308 .gpu.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_GPU_OD,
309 .gpu.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_GPU_HIGH,
Keerthyd60198d2016-05-24 11:45:06 +0530310 .gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
311 .gpu.addr = TPS659038_REG_ADDR_SMPS6,
312 .gpu.pmic = &tps659038,
313 .gpu.abb_tx_done_mask = OMAP_ABB_GPU_TXDONE_MASK,
314
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530315 .core.value[OPP_NOM] = VDD_CORE_DRA7_NOM,
316 .core.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_CORE_NOM,
Keerthyd60198d2016-05-24 11:45:06 +0530317 .core.efuse.reg_bits = DRA752_EFUSE_REGBITS,
318 .core.addr = TPS659038_REG_ADDR_SMPS7,
319 .core.pmic = &tps659038,
320
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530321 .iva.value[OPP_NOM] = VDD_IVA_DRA7_NOM,
322 .iva.value[OPP_OD] = VDD_IVA_DRA7_OD,
323 .iva.value[OPP_HIGH] = VDD_IVA_DRA7_HIGH,
324 .iva.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_IVA_NOM,
325 .iva.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_IVA_OD,
326 .iva.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_IVA_HIGH,
Keerthyd60198d2016-05-24 11:45:06 +0530327 .iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,
328 .iva.addr = TPS659038_REG_ADDR_SMPS8,
329 .iva.pmic = &tps659038,
330 .iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,
331};
332
Lokesh Vutlabeb71272016-11-23 12:54:39 +0530333int get_voltrail_opp(int rail_offset)
334{
335 int opp;
336
337 switch (rail_offset) {
338 case VOLT_MPU:
339 opp = DRA7_MPU_OPP;
340 break;
341 case VOLT_CORE:
342 opp = DRA7_CORE_OPP;
343 break;
344 case VOLT_GPU:
345 opp = DRA7_GPU_OPP;
346 break;
347 case VOLT_EVE:
348 opp = DRA7_DSPEVE_OPP;
349 break;
350 case VOLT_IVA:
351 opp = DRA7_IVA_OPP;
352 break;
353 default:
354 opp = OPP_NOM;
355 }
356
357 return opp;
358}
359
360
Kipisz, Steven212f96f2016-02-24 12:30:58 -0600361#ifdef CONFIG_SPL_BUILD
362/* No env to setup for SPL */
363static inline void setup_board_eeprom_env(void) { }
364
365/* Override function to read eeprom information */
366void do_board_detect(void)
367{
368 int rc;
369
370 rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
371 CONFIG_EEPROM_CHIP_ADDRESS);
372 if (rc)
373 printf("ti_i2c_eeprom_init failed %d\n", rc);
374}
375
376#else /* CONFIG_SPL_BUILD */
377
378/* Override function to read eeprom information: actual i2c read done by SPL*/
379void do_board_detect(void)
380{
381 char *bname = NULL;
382 int rc;
383
384 rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
385 CONFIG_EEPROM_CHIP_ADDRESS);
386 if (rc)
387 printf("ti_i2c_eeprom_init failed %d\n", rc);
388
389 if (board_is_x15())
390 bname = "BeagleBoard X15";
391 else if (board_is_am572x_evm())
392 bname = "AM572x EVM";
Steve Kipiszc020d352016-04-08 17:01:29 -0500393 else if (board_is_am572x_idk())
394 bname = "AM572x IDK";
Steve Kipisz4d8397c2016-11-25 11:14:24 +0530395 else if (board_is_am571x_idk())
396 bname = "AM571x IDK";
Kipisz, Steven212f96f2016-02-24 12:30:58 -0600397
398 if (bname)
399 snprintf(sysinfo.board_string, SYSINFO_BOARD_NAME_MAX_LEN,
400 "Board: %s REV %s\n", bname, board_ti_get_rev());
401}
402
403static void setup_board_eeprom_env(void)
404{
405 char *name = "beagle_x15";
406 int rc;
407
408 rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
409 CONFIG_EEPROM_CHIP_ADDRESS);
410 if (rc)
411 goto invalid_eeprom;
412
Nishanth Menonbf43ce62016-11-25 11:14:19 +0530413 if (board_is_x15()) {
Lokesh Vutlaf7f9f6b2016-11-25 11:14:20 +0530414 if (board_is_x15_revb1())
415 name = "beagle_x15_revb1";
416 else
417 name = "beagle_x15";
Nishanth Menonbf43ce62016-11-25 11:14:19 +0530418 } else if (board_is_am572x_evm()) {
419 if (board_is_am572x_evm_reva3())
420 name = "am57xx_evm_reva3";
421 else
422 name = "am57xx_evm";
423 } else if (board_is_am572x_idk()) {
Steve Kipiszc020d352016-04-08 17:01:29 -0500424 name = "am572x_idk";
Steve Kipisz4d8397c2016-11-25 11:14:24 +0530425 } else if (board_is_am571x_idk()) {
426 name = "am571x_idk";
Nishanth Menonbf43ce62016-11-25 11:14:19 +0530427 } else {
Kipisz, Steven212f96f2016-02-24 12:30:58 -0600428 printf("Unidentified board claims %s in eeprom header\n",
429 board_ti_get_name());
Nishanth Menonbf43ce62016-11-25 11:14:19 +0530430 }
Kipisz, Steven212f96f2016-02-24 12:30:58 -0600431
432invalid_eeprom:
433 set_board_info_env(name);
434}
435
436#endif /* CONFIG_SPL_BUILD */
437
Keerthyd60198d2016-05-24 11:45:06 +0530438void vcores_init(void)
439{
440 if (board_is_am572x_idk())
441 *omap_vcores = &am572x_idk_volts;
442 else
443 *omap_vcores = &beagle_x15_volts;
444}
445
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600446void hw_data_init(void)
447{
448 *prcm = &dra7xx_prcm;
449 *dplls_data = &dra7xx_dplls;
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600450 *ctrl = &dra7xx_ctrl;
451}
452
Roger Quadros37611052017-03-13 15:04:28 +0200453bool am571x_idk_needs_lcd(void)
454{
455 bool needs_lcd;
456
457 gpio_request(GPIO_ETH_LCD, "nLCD_Detect");
458 if (gpio_get_value(GPIO_ETH_LCD))
459 needs_lcd = false;
460 else
461 needs_lcd = true;
462
463 gpio_free(GPIO_ETH_LCD);
464
465 return needs_lcd;
466}
467
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600468int board_init(void)
469{
470 gpmc_init();
471 gd->bd->bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100);
472
473 return 0;
474}
475
476int board_late_init(void)
477{
Roger Quadros37611052017-03-13 15:04:28 +0200478 char *idk_lcd;
479
Kipisz, Steven212f96f2016-02-24 12:30:58 -0600480 setup_board_eeprom_env();
Keerthy385d3632016-11-30 15:02:53 +0530481 u8 val;
Kipisz, Steven212f96f2016-02-24 12:30:58 -0600482
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600483 /*
484 * DEV_CTRL.DEV_ON = 1 please - else palmas switches off in 8 seconds
485 * This is the POWERHOLD-in-Low behavior.
486 */
487 palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
Lokesh Vutla82cca5a2016-11-29 11:58:02 +0530488
489 /*
490 * Default FIT boot on HS devices. Non FIT images are not allowed
491 * on HS devices.
492 */
493 if (get_device_type() == HS_DEVICE)
494 setenv("boot_fit", "1");
495
Keerthy385d3632016-11-30 15:02:53 +0530496 /*
497 * Set the GPIO7 Pad to POWERHOLD. This has higher priority
498 * over DEV_CTRL.DEV_ON bit. This can be reset in case of
499 * PMIC Power off. So to be on the safer side set it back
500 * to POWERHOLD mode irrespective of the current state.
501 */
502 palmas_i2c_read_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
503 &val);
504 val = val | TPS65903X_PAD2_POWERHOLD_MASK;
505 palmas_i2c_write_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
506 val);
507
Semen Protsenko7a2af752017-02-13 19:09:37 +0200508 omap_die_id_serial();
509
Roger Quadros37611052017-03-13 15:04:28 +0200510 /* TBD: Add LCD panel detection once information is available */
511 if (am571x_idk_needs_lcd())
512 idk_lcd = "osd101t2045"; /* Default to legacy LCD */
513 else
514 idk_lcd = "no";
515 setenv("idk_lcd", idk_lcd);
516
517#if !defined(CONFIG_SPL_BUILD)
518 board_ti_set_ethaddr(2);
519#endif
520
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600521 return 0;
522}
523
Paul Kocialkowski3ef56e62016-02-27 19:18:56 +0100524void set_muxconf_regs(void)
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600525{
526 do_set_mux32((*ctrl)->control_padconf_core_base,
Lokesh Vutlaf91e0c42015-06-04 16:42:41 +0530527 early_padconf, ARRAY_SIZE(early_padconf));
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600528}
529
Lokesh Vutlaf91e0c42015-06-04 16:42:41 +0530530#ifdef CONFIG_IODELAY_RECALIBRATION
531void recalibrate_iodelay(void)
532{
Steve Kipiszc020d352016-04-08 17:01:29 -0500533 const struct pad_conf_entry *pconf;
534 const struct iodelay_cfg_entry *iod;
535 int pconf_sz, iod_sz;
Nishanth Menon89a38952016-11-25 11:14:22 +0530536 int ret;
Steve Kipiszc020d352016-04-08 17:01:29 -0500537
538 if (board_is_am572x_idk()) {
539 pconf = core_padconf_array_essential_am572x_idk;
540 pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
541 iod = iodelay_cfg_array_am572x_idk;
542 iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
Steve Kipisz4d8397c2016-11-25 11:14:24 +0530543 } else if (board_is_am571x_idk()) {
544 pconf = core_padconf_array_essential_am571x_idk;
545 pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
546 iod = iodelay_cfg_array_am571x_idk;
547 iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
Steve Kipiszc020d352016-04-08 17:01:29 -0500548 } else {
549 /* Common for X15/GPEVM */
550 pconf = core_padconf_array_essential_x15;
551 pconf_sz = ARRAY_SIZE(core_padconf_array_essential_x15);
Nishanth Menon89a38952016-11-25 11:14:22 +0530552 /* There never was an SR1.0 X15.. So.. */
553 if (omap_revision() == DRA752_ES1_1) {
554 iod = iodelay_cfg_array_x15_sr1_1;
555 iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15_sr1_1);
556 } else {
557 /* Since full production should switch to SR2.0 */
558 iod = iodelay_cfg_array_x15_sr2_0;
559 iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15_sr2_0);
560 }
Steve Kipiszc020d352016-04-08 17:01:29 -0500561 }
562
Nishanth Menon89a38952016-11-25 11:14:22 +0530563 /* Setup I/O isolation */
564 ret = __recalibrate_iodelay_start();
565 if (ret)
566 goto err;
567
568 /* Do the muxing here */
569 do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
570
571 /* Now do the weird minor deltas that should be safe */
572 if (board_is_x15() || board_is_am572x_evm()) {
573 if (board_is_x15_revb1() || board_is_am572x_evm_reva3()) {
574 pconf = core_padconf_array_delta_x15_sr2_0;
575 pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr2_0);
576 } else {
577 pconf = core_padconf_array_delta_x15_sr1_1;
578 pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr1_1);
579 }
580 do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
581 }
582
Roger Quadros37611052017-03-13 15:04:28 +0200583 if (board_is_am571x_idk()) {
584 if (am571x_idk_needs_lcd()) {
585 pconf = core_padconf_array_vout_am571x_idk;
586 pconf_sz = ARRAY_SIZE(core_padconf_array_vout_am571x_idk);
587 } else {
588 pconf = core_padconf_array_icss1eth_am571x_idk;
589 pconf_sz = ARRAY_SIZE(core_padconf_array_icss1eth_am571x_idk);
590 }
591 do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
592 }
593
Nishanth Menon89a38952016-11-25 11:14:22 +0530594 /* Setup IOdelay configuration */
595 ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
596err:
597 /* Closeup.. remove isolation */
598 __recalibrate_iodelay_end(ret);
Lokesh Vutlaf91e0c42015-06-04 16:42:41 +0530599}
600#endif
601
Jean-Jacques Hiblotd5abcf92017-02-01 11:39:14 +0100602#if defined(CONFIG_GENERIC_MMC)
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600603int board_mmc_init(bd_t *bis)
604{
605 omap_mmc_init(0, 0, 0, -1, -1);
606 omap_mmc_init(1, 0, 0, -1, -1);
607 return 0;
608}
609#endif
610
611#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
612int spl_start_uboot(void)
613{
614 /* break into full u-boot on 'c' */
615 if (serial_tstc() && serial_getc() == 'c')
616 return 1;
617
618#ifdef CONFIG_SPL_ENV_SUPPORT
619 env_init();
620 env_relocate_spec();
621 if (getenv_yesno("boot_os") != 1)
622 return 1;
623#endif
624
625 return 0;
626}
627#endif
628
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +0530629#ifdef CONFIG_USB_DWC3
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +0530630static struct dwc3_device usb_otg_ss2 = {
631 .maximum_speed = USB_SPEED_HIGH,
632 .base = DRA7_USB_OTG_SS2_BASE,
633 .tx_fifo_resize = false,
634 .index = 1,
635};
636
637static struct dwc3_omap_device usb_otg_ss2_glue = {
638 .base = (void *)DRA7_USB_OTG_SS2_GLUE_BASE,
639 .utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
640 .index = 1,
641};
642
643static struct ti_usb_phy_device usb_phy2_device = {
644 .usb2_phy_power = (void *)DRA7_USB2_PHY2_POWER,
645 .index = 1,
646};
647
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +0530648int usb_gadget_handle_interrupts(int index)
649{
650 u32 status;
651
652 status = dwc3_omap_uboot_interrupt_status(index);
653 if (status)
654 dwc3_uboot_handle_interrupt(index);
655
656 return 0;
657}
Roger Quadros55efadd2016-05-23 17:37:48 +0300658#endif /* CONFIG_USB_DWC3 */
659
660#if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
661int board_usb_init(int index, enum usb_init_type init)
662{
663 enable_usb_clocks(index);
664 switch (index) {
665 case 0:
666 if (init == USB_INIT_DEVICE) {
667 printf("port %d can't be used as device\n", index);
668 disable_usb_clocks(index);
669 return -EINVAL;
670 }
671 break;
672 case 1:
673 if (init == USB_INIT_DEVICE) {
674#ifdef CONFIG_USB_DWC3
675 usb_otg_ss2.dr_mode = USB_DR_MODE_PERIPHERAL;
676 usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
677 ti_usb_phy_uboot_init(&usb_phy2_device);
678 dwc3_omap_uboot_init(&usb_otg_ss2_glue);
679 dwc3_uboot_init(&usb_otg_ss2);
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +0530680#endif
Roger Quadros55efadd2016-05-23 17:37:48 +0300681 } else {
682 printf("port %d can't be used as host\n", index);
683 disable_usb_clocks(index);
684 return -EINVAL;
685 }
686
687 break;
688 default:
689 printf("Invalid Controller Index\n");
690 }
691
692 return 0;
693}
694
695int board_usb_cleanup(int index, enum usb_init_type init)
696{
697#ifdef CONFIG_USB_DWC3
698 switch (index) {
699 case 0:
700 case 1:
701 if (init == USB_INIT_DEVICE) {
702 ti_usb_phy_uboot_exit(index);
703 dwc3_uboot_exit(index);
704 dwc3_omap_uboot_exit(index);
705 }
706 break;
707 default:
708 printf("Invalid Controller Index\n");
709 }
710#endif
711 disable_usb_clocks(index);
712 return 0;
713}
714#endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */
Kishon Vijay Abraham I7c379aa2015-08-19 14:13:19 +0530715
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600716#ifdef CONFIG_DRIVER_TI_CPSW
717
718/* Delay value to add to calibrated value */
719#define RGMII0_TXCTL_DLY_VAL ((0x3 << 5) + 0x8)
720#define RGMII0_TXD0_DLY_VAL ((0x3 << 5) + 0x8)
721#define RGMII0_TXD1_DLY_VAL ((0x3 << 5) + 0x2)
722#define RGMII0_TXD2_DLY_VAL ((0x4 << 5) + 0x0)
723#define RGMII0_TXD3_DLY_VAL ((0x4 << 5) + 0x0)
724#define VIN2A_D13_DLY_VAL ((0x3 << 5) + 0x8)
725#define VIN2A_D17_DLY_VAL ((0x3 << 5) + 0x8)
726#define VIN2A_D16_DLY_VAL ((0x3 << 5) + 0x2)
727#define VIN2A_D15_DLY_VAL ((0x4 << 5) + 0x0)
728#define VIN2A_D14_DLY_VAL ((0x4 << 5) + 0x0)
729
730static void cpsw_control(int enabled)
731{
732 /* VTP can be added here */
733}
734
735static struct cpsw_slave_data cpsw_slaves[] = {
736 {
737 .slave_reg_ofs = 0x208,
738 .sliver_reg_ofs = 0xd80,
739 .phy_addr = 1,
740 },
741 {
742 .slave_reg_ofs = 0x308,
743 .sliver_reg_ofs = 0xdc0,
744 .phy_addr = 2,
745 },
746};
747
748static struct cpsw_platform_data cpsw_data = {
749 .mdio_base = CPSW_MDIO_BASE,
750 .cpsw_base = CPSW_BASE,
751 .mdio_div = 0xff,
752 .channels = 8,
753 .cpdma_reg_ofs = 0x800,
754 .slaves = 1,
755 .slave_data = cpsw_slaves,
756 .ale_reg_ofs = 0xd00,
757 .ale_entries = 1024,
758 .host_port_reg_ofs = 0x108,
759 .hw_stats_reg_ofs = 0x900,
760 .bd_ram_ofs = 0x2000,
761 .mac_control = (1 << 5),
762 .control = cpsw_control,
763 .host_port_num = 0,
764 .version = CPSW_CTRL_VERSION_2,
765};
766
Roger Quadros92667e82016-03-18 13:18:12 +0200767static u64 mac_to_u64(u8 mac[6])
768{
769 int i;
770 u64 addr = 0;
771
772 for (i = 0; i < 6; i++) {
773 addr <<= 8;
774 addr |= mac[i];
775 }
776
777 return addr;
778}
779
780static void u64_to_mac(u64 addr, u8 mac[6])
781{
782 mac[5] = addr;
783 mac[4] = addr >> 8;
784 mac[3] = addr >> 16;
785 mac[2] = addr >> 24;
786 mac[1] = addr >> 32;
787 mac[0] = addr >> 40;
788}
789
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600790int board_eth_init(bd_t *bis)
791{
792 int ret;
793 uint8_t mac_addr[6];
794 uint32_t mac_hi, mac_lo;
795 uint32_t ctrl_val;
Roger Quadros92667e82016-03-18 13:18:12 +0200796 int i;
797 u64 mac1, mac2;
798 u8 mac_addr1[6], mac_addr2[6];
799 int num_macs;
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600800
801 /* try reading mac address from efuse */
802 mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
803 mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
804 mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
805 mac_addr[1] = (mac_hi & 0xFF00) >> 8;
806 mac_addr[2] = mac_hi & 0xFF;
807 mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
808 mac_addr[4] = (mac_lo & 0xFF00) >> 8;
809 mac_addr[5] = mac_lo & 0xFF;
810
811 if (!getenv("ethaddr")) {
812 printf("<ethaddr> not set. Validating first E-fuse MAC\n");
813
Joe Hershberger0adb5b72015-04-08 01:41:04 -0500814 if (is_valid_ethaddr(mac_addr))
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600815 eth_setenv_enetaddr("ethaddr", mac_addr);
816 }
817
818 mac_lo = readl((*ctrl)->control_core_mac_id_1_lo);
819 mac_hi = readl((*ctrl)->control_core_mac_id_1_hi);
820 mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
821 mac_addr[1] = (mac_hi & 0xFF00) >> 8;
822 mac_addr[2] = mac_hi & 0xFF;
823 mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
824 mac_addr[4] = (mac_lo & 0xFF00) >> 8;
825 mac_addr[5] = mac_lo & 0xFF;
826
827 if (!getenv("eth1addr")) {
Joe Hershberger0adb5b72015-04-08 01:41:04 -0500828 if (is_valid_ethaddr(mac_addr))
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600829 eth_setenv_enetaddr("eth1addr", mac_addr);
830 }
831
832 ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33);
833 ctrl_val |= 0x22;
834 writel(ctrl_val, (*ctrl)->control_core_control_io1);
835
Steve Kipisz4d8397c2016-11-25 11:14:24 +0530836 /* The phy address for the AM57xx IDK are different than x15 */
837 if (board_is_am572x_idk() || board_is_am571x_idk()) {
Steve Kipiszc020d352016-04-08 17:01:29 -0500838 cpsw_data.slave_data[0].phy_addr = 0;
839 cpsw_data.slave_data[1].phy_addr = 1;
840 }
841
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600842 ret = cpsw_register(&cpsw_data);
843 if (ret < 0)
844 printf("Error %d registering CPSW switch\n", ret);
845
Roger Quadros92667e82016-03-18 13:18:12 +0200846 /*
847 * Export any Ethernet MAC addresses from EEPROM.
848 * On AM57xx the 2 MAC addresses define the address range
849 */
850 board_ti_get_eth_mac_addr(0, mac_addr1);
851 board_ti_get_eth_mac_addr(1, mac_addr2);
852
853 if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
854 mac1 = mac_to_u64(mac_addr1);
855 mac2 = mac_to_u64(mac_addr2);
856
857 /* must contain an address range */
858 num_macs = mac2 - mac1 + 1;
859 /* <= 50 to protect against user programming error */
860 if (num_macs > 0 && num_macs <= 50) {
861 for (i = 0; i < num_macs; i++) {
862 u64_to_mac(mac1 + i, mac_addr);
863 if (is_valid_ethaddr(mac_addr)) {
864 eth_setenv_enetaddr_by_index("eth",
865 i + 2,
866 mac_addr);
867 }
868 }
869 }
870 }
871
Felipe Balbi1e4ad742014-11-10 14:02:44 -0600872 return ret;
873}
874#endif
Lokesh Vutla334bbb32015-06-16 20:36:05 +0530875
876#ifdef CONFIG_BOARD_EARLY_INIT_F
877/* VTT regulator enable */
878static inline void vtt_regulator_enable(void)
879{
880 if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL)
881 return;
882
883 gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
884 gpio_direction_output(GPIO_DDR_VTT_EN, 1);
885}
886
887int board_early_init_f(void)
888{
889 vtt_regulator_enable();
890 return 0;
891}
892#endif
Daniel Allred62a09f02016-05-19 19:10:54 -0500893
894#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
895int ft_board_setup(void *blob, bd_t *bd)
896{
897 ft_cpu_setup(blob, bd);
898
899 return 0;
900}
901#endif
Lokesh Vutla7a0ea582016-06-10 09:35:43 +0530902
903#ifdef CONFIG_SPL_LOAD_FIT
904int board_fit_config_name_match(const char *name)
905{
Lokesh Vutlaf7f9f6b2016-11-25 11:14:20 +0530906 if (board_is_x15()) {
907 if (board_is_x15_revb1()) {
908 if (!strcmp(name, "am57xx-beagle-x15-revb1"))
909 return 0;
910 } else if (!strcmp(name, "am57xx-beagle-x15")) {
911 return 0;
912 }
913 } else if (board_is_am572x_evm() &&
914 !strcmp(name, "am57xx-beagle-x15")) {
Lokesh Vutla7a0ea582016-06-10 09:35:43 +0530915 return 0;
Lokesh Vutlaf7f9f6b2016-11-25 11:14:20 +0530916 } else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
Lokesh Vutla7a0ea582016-06-10 09:35:43 +0530917 return 0;
Schuyler Patton45e7f7e2016-11-25 11:14:25 +0530918 } else if (board_is_am571x_idk() && !strcmp(name, "am571x-idk")) {
919 return 0;
Lokesh Vutlaf7f9f6b2016-11-25 11:14:20 +0530920 }
921
922 return -1;
Lokesh Vutla7a0ea582016-06-10 09:35:43 +0530923}
924#endif
Andreas Dannenberg17c29872016-06-27 09:19:22 -0500925
926#ifdef CONFIG_TI_SECURE_DEVICE
927void board_fit_image_post_process(void **p_image, size_t *p_size)
928{
929 secure_boot_verify_image(p_image, p_size);
930}
Andrew F. Davis1b597ad2016-11-29 16:33:26 -0600931
932void board_tee_image_process(ulong tee_image, size_t tee_size)
933{
934 secure_tee_install((u32)tee_image);
935}
936
937U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
Andreas Dannenberg17c29872016-06-27 09:19:22 -0500938#endif