2 * Copyright (C) 2012 Altera Corporation <www.altera.com>
4 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm/arch/reset_manager.h>
12 #include <usb/s3c_udc.h>
13 #include <usb_mass_storage.h>
19 DECLARE_GLOBAL_DATA_PTR
;
24 * Miscellaneous platform dependent initialisations
28 /* Address of boot parameters for ATAG (if ATAG is used) */
29 gd
->bd
->bi_boot_params
= CONFIG_SYS_SDRAM_BASE
+ 0x100;
37 #ifdef CONFIG_PHY_MICREL_KSZ9021
38 int board_phy_config(struct phy_device
*phydev
)
42 * These skew settings for the KSZ9021 ethernet phy is required for ethernet
43 * to work reliably on most flavors of cyclone5 boards.
45 ret
= ksz9021_phy_extended_write(phydev
,
46 MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW
,
51 ret
= ksz9021_phy_extended_write(phydev
,
52 MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW
,
57 ret
= ksz9021_phy_extended_write(phydev
,
58 MII_KSZ9021_EXT_RGMII_CLOCK_SKEW
,
63 if (phydev
->drv
->config
)
64 return phydev
->drv
->config(phydev
);
70 #ifdef CONFIG_USB_GADGET
71 struct dwc2_plat_otg_data socfpga_otg_data
= {
72 .regs_otg
= CONFIG_USB_DWC2_REG_ADDR
,
73 .usb_gusbcfg
= 0x1417,
76 int board_usb_init(int index
, enum usb_init_type init
)
78 return dwc2_udc_probe(&socfpga_otg_data
);
81 int g_dnl_board_usb_cable_connected(void)