From 88e826be45f83308d0939b1daedccecd527582b9 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 17 Feb 2016 13:37:13 -0200 Subject: mx7dsabresd: Use Adrian's NXP email address Use the new NXP email address for the board maintainer. Signed-off-by: Fabio Estevam --- board/freescale/mx7dsabresd/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/freescale/mx7dsabresd/MAINTAINERS b/board/freescale/mx7dsabresd/MAINTAINERS index 3910ee4524..b96642a568 100644 --- a/board/freescale/mx7dsabresd/MAINTAINERS +++ b/board/freescale/mx7dsabresd/MAINTAINERS @@ -1,5 +1,5 @@ MX7DSABRESD BOARD -M: Adrian Alonso +M: Adrian Alonso S: Maintained F: board/freescale/mx7dsabresd F: include/configs/mx7dsabresd.h -- cgit v1.2.1 From 2b8e8d2671227473c9698859db38fefa328b87d0 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 17 Feb 2016 13:34:22 -0200 Subject: mx7dsabresd: Make 'ums' command functional When running the 'ums' command we get: => ums 0 mmc 0 UMS: disk start sector: 0x0, count: 0xe18000 g_dnl_register: failed!, error: -22 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage() Fix this by initializing USB OTG1 port as USB device mode instead of host. Signed-off-by: Fabio Estevam --- board/freescale/mx7dsabresd/mx7dsabresd.c | 41 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'board') diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 20e56f281b..782acc6713 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -23,6 +23,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -111,6 +112,14 @@ static iomux_v3_cfg_t const usdhc3_emmc_pads[] = { MX7D_PAD_SD3_RESET_B__GPIO6_IO11 | MUX_PAD_CTRL(USDHC_PAD_CTRL), }; +static iomux_v3_cfg_t const usb_otg1_pads[] = { + MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + +static iomux_v3_cfg_t const usb_otg2_pads[] = { + MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + #define IOX_SDI IMX_GPIO_NR(1, 9) #define IOX_STCP IMX_GPIO_NR(1, 12) #define IOX_SHCP IMX_GPIO_NR(1, 13) @@ -511,6 +520,10 @@ int board_early_init_f(void) setup_iomux_uart(); setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); + imx_iomux_v3_setup_multiple_pads(usb_otg1_pads, + ARRAY_SIZE(usb_otg1_pads)); + imx_iomux_v3_setup_multiple_pads(usb_otg2_pads, + ARRAY_SIZE(usb_otg2_pads)); return 0; } @@ -602,29 +615,11 @@ int checkboard(void) } #ifdef CONFIG_USB_EHCI_MX7 -static iomux_v3_cfg_t const usb_otg1_pads[] = { - MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - -static iomux_v3_cfg_t const usb_otg2_pads[] = { - MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - -int board_ehci_hcd_init(int port) +int board_usb_phy_mode(int port) { - switch (port) { - case 0: - imx_iomux_v3_setup_multiple_pads(usb_otg1_pads, - ARRAY_SIZE(usb_otg1_pads)); - break; - case 1: - imx_iomux_v3_setup_multiple_pads(usb_otg2_pads, - ARRAY_SIZE(usb_otg2_pads)); - break; - default: - printf("MXC USB port %d not yet supported\n", port); - return -EINVAL; - } - return 0; + if (port == 0) + return USB_INIT_DEVICE; + else + return USB_INIT_HOST; } #endif -- cgit v1.2.1 From a668436051e497da18ab79ad26649e26d8a08433 Mon Sep 17 00:00:00 2001 From: Soeren Moch Date: Thu, 4 Feb 2016 14:41:16 +0100 Subject: board: tbs2910: Autoselect environment device when booting from SD Implement board specific functions to select the environment device and partition when booting from SD/MMC. SD2: mmc 0 0 SD3: mmc 1 0 eMMC: mmc 2 1 Signed-off-by: Soeren Moch --- board/tbs/tbs2910/tbs2910.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'board') diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c index 0b509b6dd9..d302fc23b6 100644 --- a/board/tbs/tbs2910/tbs2910.c +++ b/board/tbs/tbs2910/tbs2910.c @@ -257,6 +257,17 @@ int board_mmc_init(bd_t *bis) } return 0; } + +/* set environment device to boot device when booting from SD */ +int board_mmc_get_env_dev(int devno) +{ + return devno - 1; +} + +int board_mmc_get_env_part(int devno) +{ + return (devno == 3) ? 1 : 0; /* part 0 for SD2 / SD3, part 1 for eMMC */ +} #endif /* CONFIG_FSL_ESDHC */ #ifdef CONFIG_VIDEO_IPUV3 -- cgit v1.2.1 From 2c79b7a3bbf9713046d98d7a6a0f2eb476c32a2b Mon Sep 17 00:00:00 2001 From: Julien CORJON Date: Fri, 5 Feb 2016 16:19:31 +0100 Subject: imx: mx6quq7: fix USDHC4 declaration USDHC2 does not exist on mx6quq7 board, as USDHC4 was already been declared this is probably a typo. Signed-off-by: Julien Corjon Acked-by: Boris Brezillon --- board/seco/mx6quq7/mx6quq7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c index ea1d4b8e49..3743a9e3da 100644 --- a/board/seco/mx6quq7/mx6quq7.c +++ b/board/seco/mx6quq7/mx6quq7.c @@ -93,7 +93,7 @@ int board_eth_init(bd_t *bis) static struct fsl_esdhc_cfg usdhc_cfg[2] = { {USDHC3_BASE_ADDR}, - {USDHC2_BASE_ADDR}, + {USDHC4_BASE_ADDR}, }; int board_mmc_init(bd_t *bis) -- cgit v1.2.1 From dd8bd015e8bb89891b1dc6caccbe67a0c603584a Mon Sep 17 00:00:00 2001 From: Julien CORJON Date: Fri, 5 Feb 2016 16:19:32 +0100 Subject: imx: mx6quq7: specify max_bus_witdh directly in usdhc_cfg Specify max_bus_width directly in usdhc_cfg static definition instead of tweaking it in the board_mmc_init() function. Signed-off-by: Julien Corjon --- board/seco/mx6quq7/mx6quq7.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'board') diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c index 3743a9e3da..89ae70d497 100644 --- a/board/seco/mx6quq7/mx6quq7.c +++ b/board/seco/mx6quq7/mx6quq7.c @@ -92,8 +92,8 @@ int board_eth_init(bd_t *bis) } static struct fsl_esdhc_cfg usdhc_cfg[2] = { - {USDHC3_BASE_ADDR}, - {USDHC4_BASE_ADDR}, + {USDHC3_BASE_ADDR, 0, 4}, + {USDHC4_BASE_ADDR, 0, 4}, }; int board_mmc_init(bd_t *bis) @@ -112,12 +112,10 @@ int board_mmc_init(bd_t *bis) case 0: seco_mx6_setup_usdhc_iomux(3); usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); - usdhc_cfg[0].max_bus_width = 4; break; case 1: seco_mx6_setup_usdhc_iomux(4); usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK); - usdhc_cfg[1].max_bus_width = 4; break; default: -- cgit v1.2.1 From 22bd6b4f601c14d62c38bde5186c652082353b8b Mon Sep 17 00:00:00 2001 From: Julien CORJON Date: Fri, 5 Feb 2016 16:19:33 +0100 Subject: imx: mx6quq7: add sd card detection Add board_mmc_getcd function and declare CD_GPIO for SDCard. Signed-off-by: Julien Corjon --- board/seco/mx6quq7/mx6quq7.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'board') diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c index 89ae70d497..6be0b987ca 100644 --- a/board/seco/mx6quq7/mx6quq7.c +++ b/board/seco/mx6quq7/mx6quq7.c @@ -91,11 +91,30 @@ int board_eth_init(bd_t *bis) return ret; } +#define USDHC4_CD_GPIO IMX_GPIO_NR(2, 6) + static struct fsl_esdhc_cfg usdhc_cfg[2] = { {USDHC3_BASE_ADDR, 0, 4}, {USDHC4_BASE_ADDR, 0, 4}, }; +int board_mmc_getcd(struct mmc *mmc) +{ + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; + int ret = 0; + + switch (cfg->esdhc_base) { + case USDHC3_BASE_ADDR: + ret = 1; /* Assume eMMC is always present */ + break; + case USDHC4_BASE_ADDR: + ret = !gpio_get_value(USDHC4_CD_GPIO); + break; + } + + return ret; +} + int board_mmc_init(bd_t *bis) { u32 index = 0; -- cgit v1.2.1