mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
omap5: uevm: convert to device model
Convert omap5 uevm board to device model. Signed-off-by: Tero Kristo <t-kristo@ti.com>
This commit is contained in:
committed by
Lokesh Vutla
parent
8f1ed2e4ed
commit
803e9a1f28
@@ -7,6 +7,7 @@
|
|||||||
* Based on "dra7.dtsi"
|
* Based on "dra7.dtsi"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_DRA7XX
|
||||||
/{
|
/{
|
||||||
chosen {
|
chosen {
|
||||||
tick-timer = &timer2;
|
tick-timer = &timer2;
|
||||||
@@ -105,3 +106,44 @@
|
|||||||
&i2c1 {
|
&i2c1 {
|
||||||
u-boot,dm-spl;
|
u-boot,dm-spl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#else /* OMAP54XX */
|
||||||
|
&l4_cfg {
|
||||||
|
segment@0 {
|
||||||
|
/* SCM Core */
|
||||||
|
target-module@2000 {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* USB HS */
|
||||||
|
target-module@64000 {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&l4_per {
|
||||||
|
segment@0 {
|
||||||
|
/* UART3 */
|
||||||
|
target-module@20000 {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* I2C1 */
|
||||||
|
target-module@70000 {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* MMC1 */
|
||||||
|
target-module@9c000 {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* MMC2 */
|
||||||
|
target-module@b4000 {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
#include <asm/arch/omap.h>
|
#include <asm/arch/omap.h>
|
||||||
#include <asm/arch/sys_proto.h>
|
#include <asm/arch/sys_proto.h>
|
||||||
#include <asm/arch/mmc_host_def.h>
|
#include <asm/arch/mmc_host_def.h>
|
||||||
|
#include <serial.h>
|
||||||
#include <tca642x.h>
|
#include <tca642x.h>
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
@@ -149,40 +150,22 @@ int board_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_SPL_OS_BOOT)
|
||||||
|
int spl_start_uboot(void)
|
||||||
|
{
|
||||||
|
/* break into full u-boot on 'c' */
|
||||||
|
if (serial_tstc() && serial_getc() == 'c')
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_SPL_OS_BOOT */
|
||||||
|
|
||||||
int board_eth_init(bd_t *bis)
|
int board_eth_init(bd_t *bis)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_XHCI_OMAP)
|
|
||||||
static void enable_host_clocks(void)
|
|
||||||
{
|
|
||||||
int auxclk;
|
|
||||||
int hs_clk_ctrl_val = (OPTFCLKEN_HSIC60M_P3_CLK |
|
|
||||||
OPTFCLKEN_HSIC480M_P3_CLK |
|
|
||||||
OPTFCLKEN_HSIC60M_P2_CLK |
|
|
||||||
OPTFCLKEN_HSIC480M_P2_CLK |
|
|
||||||
OPTFCLKEN_UTMI_P3_CLK | OPTFCLKEN_UTMI_P2_CLK);
|
|
||||||
|
|
||||||
/* Enable port 2 and 3 clocks*/
|
|
||||||
setbits_le32((*prcm)->cm_l3init_hsusbhost_clkctrl, hs_clk_ctrl_val);
|
|
||||||
|
|
||||||
/* Enable port 2 and 3 usb host ports tll clocks*/
|
|
||||||
setbits_le32((*prcm)->cm_l3init_hsusbtll_clkctrl,
|
|
||||||
(OPTFCLKEN_USB_CH1_CLK_ENABLE | OPTFCLKEN_USB_CH2_CLK_ENABLE));
|
|
||||||
#ifdef CONFIG_USB_XHCI_OMAP
|
|
||||||
/* Enable the USB OTG Super speed clocks */
|
|
||||||
setbits_le32((*prcm)->cm_l3init_usb_otg_ss_clkctrl,
|
|
||||||
(OPTFCLKEN_REFCLK960M | OTG_SS_CLKCTRL_MODULEMODE_HW));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
auxclk = readl((*prcm)->scrm_auxclk1);
|
|
||||||
/* Request auxilary clock */
|
|
||||||
auxclk |= AUXCLK_ENABLE_MASK;
|
|
||||||
writel(auxclk, (*prcm)->scrm_auxclk1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief misc_init_r - Configure EVM board specific configurations
|
* @brief misc_init_r - Configure EVM board specific configurations
|
||||||
* such as power configurations, ethernet initialization as phase2 of
|
* such as power configurations, ethernet initialization as phase2 of
|
||||||
@@ -223,45 +206,6 @@ int board_mmc_init(bd_t *bis)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USB_EHCI_HCD
|
|
||||||
static struct omap_usbhs_board_data usbhs_bdata = {
|
|
||||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
|
||||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_HSIC,
|
|
||||||
.port_mode[2] = OMAP_EHCI_PORT_MODE_HSIC,
|
|
||||||
};
|
|
||||||
|
|
||||||
int ehci_hcd_init(int index, enum usb_init_type init,
|
|
||||||
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
enable_host_clocks();
|
|
||||||
|
|
||||||
ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
|
|
||||||
if (ret < 0) {
|
|
||||||
puts("Failed to initialize ehci\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ehci_hcd_stop(void)
|
|
||||||
{
|
|
||||||
return omap_ehci_hcd_stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
void usb_hub_reset_devices(struct usb_hub_device *hub, int port)
|
|
||||||
{
|
|
||||||
/* The LAN9730 needs to be reset after the port power has been set. */
|
|
||||||
if (port == 3) {
|
|
||||||
gpio_direction_output(CONFIG_OMAP_EHCI_PHY3_RESET_GPIO, 0);
|
|
||||||
udelay(10);
|
|
||||||
gpio_direction_output(CONFIG_OMAP_EHCI_PHY3_RESET_GPIO, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_USB_XHCI_OMAP
|
#ifdef CONFIG_USB_XHCI_OMAP
|
||||||
/**
|
/**
|
||||||
* @brief board_usb_init - Configure EVM board specific configurations
|
* @brief board_usb_init - Configure EVM board specific configurations
|
||||||
@@ -276,8 +220,6 @@ int board_usb_init(int index, enum usb_init_type init)
|
|||||||
ret = palmas_enable_ss_ldo();
|
ret = palmas_enable_ss_ldo();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enable_host_clocks();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2,6 +2,7 @@ CONFIG_ARM=y
|
|||||||
CONFIG_ARCH_OMAP2PLUS=y
|
CONFIG_ARCH_OMAP2PLUS=y
|
||||||
CONFIG_OMAP54XX=y
|
CONFIG_OMAP54XX=y
|
||||||
CONFIG_TARGET_OMAP5_UEVM=y
|
CONFIG_TARGET_OMAP5_UEVM=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="omap5-uevm"
|
||||||
CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC=16296
|
CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC=16296
|
||||||
CONFIG_SPL=y
|
CONFIG_SPL=y
|
||||||
CONFIG_ENV_OFFSET_REDUND=0x280000
|
CONFIG_ENV_OFFSET_REDUND=0x280000
|
||||||
@@ -10,6 +11,7 @@ CONFIG_SPL_TEXT_BASE=0x40300000
|
|||||||
CONFIG_DISTRO_DEFAULTS=y
|
CONFIG_DISTRO_DEFAULTS=y
|
||||||
# CONFIG_USE_BOOTCOMMAND is not set
|
# CONFIG_USE_BOOTCOMMAND is not set
|
||||||
CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
||||||
|
CONFIG_DEFAULT_FDT_FILE="omap5-uevm.dtb"
|
||||||
CONFIG_VERSION_VARIABLE=y
|
CONFIG_VERSION_VARIABLE=y
|
||||||
# CONFIG_SPL_NAND_SUPPORT is not set
|
# CONFIG_SPL_NAND_SUPPORT is not set
|
||||||
CONFIG_SPL_OS_BOOT=y
|
CONFIG_SPL_OS_BOOT=y
|
||||||
@@ -20,14 +22,17 @@ CONFIG_CMD_GPIO=y
|
|||||||
CONFIG_CMD_GPT=y
|
CONFIG_CMD_GPT=y
|
||||||
CONFIG_CMD_I2C=y
|
CONFIG_CMD_I2C=y
|
||||||
CONFIG_CMD_MMC=y
|
CONFIG_CMD_MMC=y
|
||||||
CONFIG_CMD_SPI=y
|
|
||||||
CONFIG_CMD_USB=y
|
CONFIG_CMD_USB=y
|
||||||
# CONFIG_CMD_SETEXPR is not set
|
# CONFIG_CMD_SETEXPR is not set
|
||||||
CONFIG_CMD_EXT4_WRITE=y
|
CONFIG_CMD_EXT4_WRITE=y
|
||||||
|
CONFIG_OF_CONTROL=y
|
||||||
CONFIG_ENV_IS_IN_MMC=y
|
CONFIG_ENV_IS_IN_MMC=y
|
||||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||||
|
CONFIG_DM=y
|
||||||
|
CONFIG_DM_MMC=y
|
||||||
|
CONFIG_AHCI=y
|
||||||
CONFIG_SCSI_AHCI=y
|
CONFIG_SCSI_AHCI=y
|
||||||
CONFIG_DFU_MMC=y
|
CONFIG_DFU_MMC=y
|
||||||
CONFIG_DFU_RAM=y
|
CONFIG_DFU_RAM=y
|
||||||
@@ -37,9 +42,9 @@ CONFIG_MMC_OMAP_HS=y
|
|||||||
CONFIG_SCSI=y
|
CONFIG_SCSI=y
|
||||||
CONFIG_CONS_INDEX=3
|
CONFIG_CONS_INDEX=3
|
||||||
CONFIG_SYS_NS16550=y
|
CONFIG_SYS_NS16550=y
|
||||||
CONFIG_SPI=y
|
# CONFIG_SPI is not set
|
||||||
CONFIG_OMAP3_SPI=y
|
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
|
CONFIG_DM_USB=y
|
||||||
CONFIG_USB_EHCI_HCD=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
CONFIG_USB_DWC3=y
|
CONFIG_USB_DWC3=y
|
||||||
CONFIG_USB_DWC3_OMAP=y
|
CONFIG_USB_DWC3_OMAP=y
|
||||||
@@ -53,3 +58,5 @@ CONFIG_USB_HOST_ETHER=y
|
|||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
CONFIG_FAT_WRITE=y
|
CONFIG_FAT_WRITE=y
|
||||||
CONFIG_OF_LIBFDT=y
|
CONFIG_OF_LIBFDT=y
|
||||||
|
CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||||
|
CONFIG_DM_ETH=y
|
||||||
|
Reference in New Issue
Block a user