2 * (C) Copyright 2015 Rockchip Electronics Co., Ltd
4 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/clock.h>
13 #include <asm/arch/periph.h>
15 #include <dm/pinctrl.h>
17 DECLARE_GLOBAL_DATA_PTR;
26 gd->ram_size = sdram_size();
31 #ifndef CONFIG_SYS_DCACHE_OFF
32 void enable_caches(void)
34 /* Enable D-cache. I-cache is already enabled in start.S */
39 #if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
41 #include <usb/dwc2_udc.h>
43 static struct dwc2_plat_otg_data rk3036_otg_data = {
49 int board_usb_init(int index, enum usb_init_type init)
54 const void *blob = gd->fdt_blob;
56 /* find the usb_otg node */
57 node = fdt_node_offset_by_compatible(blob, -1,
58 "rockchip,rk3288-usb");
61 mode = fdt_getprop(blob, node, "dr_mode", NULL);
62 if (mode && strcmp(mode, "otg") == 0) {
67 node = fdt_node_offset_by_compatible(blob, node,
68 "rockchip,rk3288-usb");
71 debug("Not found usb_otg device\n");
74 rk3036_otg_data.regs_otg = fdtdec_get_addr(blob, node, "reg");
76 return dwc2_udc_probe(&rk3036_otg_data);
79 int board_usb_cleanup(int index, enum usb_init_type init)