2 * Copyright (C) 2013 Samsung Electronics
4 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/cpu.h>
13 #include <asm/arch/board.h>
14 #include <asm/arch/power.h>
15 #include <asm/arch/system.h>
16 #include <asm/arch/pinmux.h>
17 #include <asm/arch/dp_info.h>
18 #include <asm/arch/xhci-exynos.h>
19 #include <power/tps65090_pmic.h>
26 #include <dwc3-uboot.h>
27 #include <samsung-usb-phy-uboot.h>
29 DECLARE_GLOBAL_DATA_PTR;
37 static int has_edp_bridge(void)
41 node = fdtdec_next_compatible(gd->fdt_blob, 0, COMPAT_PARADE_PS8625);
43 /* No node for bridge in device tree. */
47 /* Default is with bridge ic */
51 void exynos_lcd_power_on(void)
55 #ifdef CONFIG_POWER_TPS65090
56 ret = tps65090_init();
58 printf("%s: tps65090_init() failed\n", __func__);
62 tps65090_fet_enable(6);
68 if (parade_init(gd->fdt_blob))
69 printf("%s: ps8625_init() failed\n", __func__);
72 void exynos_backlight_on(unsigned int onoff)
74 #ifdef CONFIG_POWER_TPS65090
75 tps65090_fet_enable(1);
80 int board_get_revision(void)
85 #ifdef CONFIG_USB_DWC3
86 static struct dwc3_device dwc3_device_data = {
87 .maximum_speed = USB_SPEED_SUPER,
89 .dr_mode = USB_DR_MODE_PERIPHERAL,
93 int usb_gadget_handle_interrupts(void)
95 dwc3_uboot_handle_interrupt(0);
99 int board_usb_init(int index, enum usb_init_type init)
101 struct exynos_usb3_phy *phy = (struct exynos_usb3_phy *)
102 samsung_get_base_usb3_phy();
105 error("usb3 phy not supported");
109 set_usbdrd_phy_ctrl(POWER_USB_DRD_PHY_CTRL_EN);
110 exynos5_usb3_phy_init(phy);
112 return dwc3_uboot_init(&dwc3_device_data);
115 #ifdef CONFIG_SET_DFU_ALT_INFO
116 char *get_dfu_alt_system(char *interface, char *devstr)
118 return getenv("dfu_alt_system");
121 char *get_dfu_alt_boot(char *interface, char *devstr)
127 dev_num = simple_strtoul(devstr, NULL, 10);
129 mmc = find_mmc_device(dev_num);
137 alt_boot = CONFIG_DFU_ALT_BOOT_SD;
139 alt_boot = CONFIG_DFU_ALT_BOOT_EMMC;