summaryrefslogtreecommitdiff
path: root/board/toradex
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2019-03-25 17:25:01 +0100
committerStefano Babic <sbabic@denx.de>2019-04-13 20:30:09 +0200
commit9f9ecdfffd070b302245c1470a259a2af32c47de (patch)
tree4a1a846f43d5e43f3f6be5433efc582ac0bf98ec /board/toradex
parent6d277bc323eb7a38686a1fca401f561abd1546e7 (diff)
downloadu-boot-9f9ecdfffd070b302245c1470a259a2af32c47de.tar.gz
u-boot-9f9ecdfffd070b302245c1470a259a2af32c47de.tar.bz2
u-boot-9f9ecdfffd070b302245c1470a259a2af32c47de.zip
colibri_vf: migrate fec, esdhc, nfc and usb to driver model
Migrate FEC, ESDHC, NFC and USB to driver model. While at it also do no longer enable optional I2C clock in board file as the generic clock code now handles this. Note for space reason and as it is not required just for booting we do not enable I2C in U-Boot by default. While at it also update copyright period. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Diffstat (limited to 'board/toradex')
-rw-r--r--board/toradex/colibri_vf/colibri_vf.c82
1 files changed, 1 insertions, 81 deletions
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index 8e0dea2dc2..c4d05532fe 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -16,23 +16,16 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <fdt_support.h>
-#include <fsl_esdhc.h>
#include <fsl_dcu_fb.h>
#include <g_dnl.h>
-#include <i2c.h>
#include <jffs2/load_kernel.h>
-#include <miiphy.h>
-#include <mmc.h>
#include <mtd_node.h>
-#include <netdev.h>
#include <usb.h>
#include "../common/tdx-common.h"
DECLARE_GLOBAL_DATA_PTR;
-#define USB_PEN_GPIO 83
-#define USB_CDET_GPIO 102
#define PTC0_GPIO_45 45
static struct ddrmc_cr_setting colibri_vf_cr_settings[] = {
@@ -239,25 +232,6 @@ static void setup_tcon(void)
}
#endif
-#ifdef CONFIG_FSL_ESDHC
-struct fsl_esdhc_cfg esdhc_cfg[1] = {
- {ESDHC1_BASE_ADDR},
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
- /* eSDHC1 is always present */
- return 1;
-}
-
-int board_mmc_init(bd_t *bis)
-{
- esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-
- return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
-}
-#endif
-
static inline int is_colibri_vf61(void)
{
struct mscm *mscm = (struct mscm *)MSCM_BASE_ADDR;
@@ -290,7 +264,7 @@ static void clock_init(void)
CCM_CCGR3_ANADIG_CTRL_MASK | CCM_CCGR3_SCSC_CTRL_MASK);
clrsetbits_le32(&ccm->ccgr4, CCM_REG_CTRL_MASK,
CCM_CCGR4_WKUP_CTRL_MASK | CCM_CCGR4_CCM_CTRL_MASK |
- CCM_CCGR4_GPC_CTRL_MASK | CCM_CCGR4_I2C0_CTRL_MASK);
+ CCM_CCGR4_GPC_CTRL_MASK);
clrsetbits_le32(&ccm->ccgr6, CCM_REG_CTRL_MASK,
CCM_CCGR6_OCOTP_CTRL_MASK | CCM_CCGR6_DDRMC_CTRL_MASK);
clrsetbits_le32(&ccm->ccgr7, CCM_REG_CTRL_MASK,
@@ -379,14 +353,6 @@ static void mscm_init(void)
writew(MSCM_IRSPRC_CP0_EN, &mscmir->irsprc[i]);
}
-int board_phy_config(struct phy_device *phydev)
-{
- if (phydev->drv->config)
- phydev->drv->config(phydev);
-
- return 0;
-}
-
int board_early_init_f(void)
{
clock_init();
@@ -433,13 +399,8 @@ int board_init(void)
* so we must use the external oscillator in order
* to maintain correct time in the hwclock
*/
-
setbits_le32(&scsc->sosc_ctr, SCSC_SOSC_CTR_SOSC_EN);
-#ifdef CONFIG_USB_EHCI_VF
- gpio_request(USB_CDET_GPIO, "usb-cdet-gpio");
-#endif
-
return 0;
}
@@ -476,47 +437,6 @@ int ft_board_setup(void *blob, bd_t *bd)
}
#endif
-#ifdef CONFIG_USB_EHCI_VF
-int board_ehci_hcd_init(int port)
-{
- switch (port) {
- case 0:
- /* USBC does not have PEN, also configured as USB client only */
- break;
- case 1:
- gpio_request(USB_PEN_GPIO, "usb-pen-gpio");
- gpio_direction_output(USB_PEN_GPIO, 0);
- break;
- }
- return 0;
-}
-
-int board_usb_phy_mode(int port)
-{
- switch (port) {
- case 0:
- /*
- * Port 0 is used only in client mode on Colibri Vybrid modules
- * Check for state of USB client gpio pin and accordingly return
- * USB_INIT_DEVICE or USB_INIT_HOST.
- */
- if (gpio_get_value(USB_CDET_GPIO))
- return USB_INIT_DEVICE;
- else
- return USB_INIT_HOST;
- case 1:
- /* Port 1 is used only in host mode on Colibri Vybrid modules */
- return USB_INIT_HOST;
- default:
- /*
- * There are only two USB controllers on Vybrid. Ideally we will
- * not reach here. However return USB_INIT_HOST if we do.
- */
- return USB_INIT_HOST;
- }
-}
-#endif
-
/*
* Backlight off before OS handover
*/