From patchwork Wed Jan 15 10:27:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 239610 List-Id: U-Boot discussion From: marex at denx.de (Marek Vasut) Date: Wed, 15 Jan 2020 11:27:30 +0100 Subject: [PATCH 1/3] ARM: imx: vining2000: Clean up uSDHC4 setup Message-ID: <20200115102732.167211-1-marex@denx.de> Simplify the uSDHC4 eMMC controller setup. This is the only eMMC present on the system and only controller that is used, so drop the extra logic. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Silvio Fricke Cc: Stefano Babic Reviewed-by: Stefano Babic --- board/softing/vining_2000/vining_2000.c | 27 ++++--------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index ef914b13a1..6dc3fc8b50 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -427,8 +427,6 @@ void board_preboot_os(void) #include #include -static struct fsl_esdhc_cfg usdhc_cfg = { USDHC4_BASE_ADDR }; - static iomux_v3_cfg_t const pcie_pads[] = { MX6_PAD_NAND_DATA02__GPIO4_IO_6 | MUX_PAD_CTRL(GPIO_PAD_CTRL), }; @@ -461,30 +459,13 @@ static void vining2000_spl_setup_iomux_uart(void) imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads)); } +static struct fsl_esdhc_cfg usdhc_cfg = { USDHC4_BASE_ADDR }; + int board_mmc_init(bd_t *bis) { - struct src *src_regs = (struct src *)SRC_BASE_ADDR; - u32 val; - u32 port; - - val = readl(&src_regs->sbmr1); - - if ((val & 0xc0) != 0x40) { - printf("Not boot from USDHC!\n"); - return -EINVAL; - } - - port = (val >> 11) & 0x3; - printf("port %d\n", port); - switch (port) { - case 3: - imx_iomux_v3_setup_multiple_pads( - usdhc4_pads, ARRAY_SIZE(usdhc4_pads)); - usdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK); - usdhc_cfg.esdhc_base = USDHC4_BASE_ADDR; - break; - } + imx_iomux_v3_setup_multiple_pads(usdhc4_pads, ARRAY_SIZE(usdhc4_pads)); + usdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK); gd->arch.sdhc_clk = usdhc_cfg.sdhc_clk; return fsl_esdhc_initialize(bis, &usdhc_cfg); } From patchwork Wed Jan 15 10:27:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 239611 List-Id: U-Boot discussion From: marex at denx.de (Marek Vasut) Date: Wed, 15 Jan 2020 11:27:31 +0100 Subject: [PATCH 2/3] ARM: imx: vining2000: Properly discern PFUZE100 and PFUZE200 In-Reply-To: <20200115102732.167211-1-marex@denx.de> References: <20200115102732.167211-1-marex@denx.de> Message-ID: <20200115102732.167211-2-marex@denx.de> The PFUZE100 and PFUZE200 PMICs can be discerned by bit 0 in DeviceID register. Print the correct identification of the PMICs. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Silvio Fricke Cc: Stefano Babic --- board/softing/vining_2000/vining_2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index 6dc3fc8b50..c74c06eaee 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -146,7 +146,7 @@ static struct pmic *pfuze_init(unsigned char i2cbus) return NULL; pmic_reg_read(p, PFUZE100_DEVICEID, ®); - printf("PMIC: PFUZE100 ID=0x%02x\n", reg); + printf("PMIC: PFUZE%i00 ID=0x%02x\n", (reg & 1) ? 2 : 1, reg); /* Set SW1AB stanby volage to 0.975V */ pmic_reg_read(p, PFUZE100_SW1ABSTBY, ®); From patchwork Wed Jan 15 10:27:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 239612 List-Id: U-Boot discussion From: marex at denx.de (Marek Vasut) Date: Wed, 15 Jan 2020 11:27:32 +0100 Subject: [PATCH 3/3] ARM: imx: vining2000: Enable SPL SDP by default In-Reply-To: <20200115102732.167211-1-marex@denx.de> References: <20200115102732.167211-1-marex@denx.de> Message-ID: <20200115102732.167211-3-marex@denx.de> Enable SPL SDP fallback boot option in default build. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Silvio Fricke Cc: Stefano Babic --- configs/vining_2000_defconfig | 9 +++++++++ include/configs/vining_2000.h | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig index c1542fe5d3..34b49ce972 100644 --- a/configs/vining_2000_defconfig +++ b/configs/vining_2000_defconfig @@ -26,6 +26,9 @@ CONFIG_BOUNCE_BUFFER=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_FS_EXT4=y CONFIG_SPL_I2C_SUPPORT=y +CONFIG_SPL_USB_HOST_SUPPORT=y +CONFIG_SPL_USB_GADGET=y +CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y @@ -74,5 +77,11 @@ CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Softing" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index 0c0baf2738..61d9c62068 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -66,12 +66,10 @@ #define CONFIG_PHY_ATHEROS -#ifdef CONFIG_CMD_USB #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#endif #ifdef CONFIG_CMD_PCI #define CONFIG_PCI_SCAN_SHOW