From 9fa3d093d626b25c64c695e29d381dd2ae7bf8cc Mon Sep 17 00:00:00 2001 From: Benoît Thébaudeau Date: Tue, 13 Nov 2012 09:57:48 +0000 Subject: ehci-mxc: Make i.MX25 EHCI configurable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use EHCI MXC configuration options for i.MX25. Signed-off-by: Benoît Thébaudeau Cc: Marek Vasut Cc: Stefano Babic Cc: Matthias Weisser --- include/configs/zmx25.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/configs') diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h index 447683a4905..e9216d9b64b 100644 --- a/include/configs/zmx25.h +++ b/include/configs/zmx25.h @@ -109,9 +109,9 @@ #define CONFIG_USB_EHCI /* Enable EHCI USB support */ #define CONFIG_USB_EHCI_MXC #define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#define CONFIG_MXC_USB_PORT 2 -#define CONFIG_MXC_USB_PORTSC 0xC0000000 -#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_MXC_USB_PORT 1 +#define CONFIG_MXC_USB_PORTSC MXC_EHCI_MODE_SERIAL +#define CONFIG_MXC_USB_FLAGS (MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN) #define CONFIG_EHCI_IS_TDI #define CONFIG_USB_STORAGE #define CONFIG_DOS_PARTITION -- cgit v1.3.1 From 961a762838d55dc9bae8fa7ea57bc3c51a9c7b57 Mon Sep 17 00:00:00 2001 From: Benoît Thébaudeau Date: Tue, 13 Nov 2012 09:58:25 +0000 Subject: mx35pdk: Add support for OTG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for the OTG port on the mx35pdk Personality board. Signed-off-by: Benoît Thébaudeau Tested-by: Stefano Babic Cc: Stefano Babic Cc: Marek Vasut --- board/freescale/mx35pdk/lowlevel_init.S | 4 ++++ board/freescale/mx35pdk/mx35pdk.c | 21 +++++++++++++++++++++ include/configs/mx35pdk.h | 14 ++++++++++++++ 3 files changed, 39 insertions(+) (limited to 'include/configs') diff --git a/board/freescale/mx35pdk/lowlevel_init.S b/board/freescale/mx35pdk/lowlevel_init.S index 75bb9586196..da8b6f3a4e2 100644 --- a/board/freescale/mx35pdk/lowlevel_init.S +++ b/board/freescale/mx35pdk/lowlevel_init.S @@ -94,6 +94,10 @@ orr r1, r1, #0x00000C00 orr r1, r1, #0x00000003 str r1, [r0, #CLKCTL_CGR1] + + ldr r1, [r0, #CLKCTL_CGR2] + orr r1, r1, #0x00C00000 + str r1, [r0, #CLKCTL_CGR2] .endm .macro setup_sdram diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c index a12531fb892..4d8f2f5eea3 100644 --- a/board/freescale/mx35pdk/mx35pdk.c +++ b/board/freescale/mx35pdk/mx35pdk.c @@ -98,6 +98,26 @@ static void setup_iomux_spi(void) mxc_request_iomux(MX35_PIN_CSPI1_SCLK, MUX_CONFIG_SION); } +static void setup_iomux_usbotg(void) +{ + int in_pad, out_pad; + + /* Set up pins for USBOTG. */ + mxc_request_iomux(MX35_PIN_USBOTG_PWR, + MUX_CONFIG_SION | MUX_CONFIG_FUNC); + mxc_request_iomux(MX35_PIN_USBOTG_OC, + MUX_CONFIG_SION | MUX_CONFIG_FUNC); + + in_pad = PAD_CTL_DRV_3_3V | PAD_CTL_HYS_SCHMITZ | PAD_CTL_PKE_ENABLE | + PAD_CTL_PUE_PUD | PAD_CTL_100K_PD | PAD_CTL_ODE_CMOS | + PAD_CTL_DRV_NORMAL | PAD_CTL_SRE_SLOW; + out_pad = PAD_CTL_DRV_3_3V | PAD_CTL_HYS_CMOS | PAD_CTL_PKE_NONE | + PAD_CTL_ODE_CMOS | PAD_CTL_DRV_NORMAL | PAD_CTL_SRE_SLOW; + + mxc_iomux_set_pad(MX35_PIN_USBOTG_PWR, out_pad); + mxc_iomux_set_pad(MX35_PIN_USBOTG_OC, in_pad); +} + static void setup_iomux_fec(void) { int pad; @@ -189,6 +209,7 @@ int board_early_init_f(void) __raw_writel(readl(&ccm->rcsr) | MXC_CCM_RCSR_NFC_FMS, &ccm->rcsr); setup_iomux_i2c(); + setup_iomux_usbotg(); setup_iomux_fec(); setup_iomux_spi(); diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index d89db7af153..00171a7cec5 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -112,6 +112,8 @@ #define CONFIG_NET_RETRY_COUNT 100 #define CONFIG_CMD_DATE +#define CONFIG_CMD_USB +#define CONFIG_USB_STORAGE #define CONFIG_CMD_MMC #define CONFIG_DOS_PARTITION #define CONFIG_EFI_PARTITION @@ -244,6 +246,18 @@ #define CONFIG_MXC_NAND_HWECC #define CONFIG_SYS_NAND_LARGEPAGE +/* EHCI driver */ +#define CONFIG_USB_EHCI +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_USB_EHCI_MXC +#define CONFIG_MXC_USB_PORT 0 +#define CONFIG_MXC_USB_FLAGS (MXC_EHCI_INTERFACE_DIFF_UNI | \ + MXC_EHCI_POWER_PINS_ENABLED | \ + MXC_EHCI_OC_PIN_ACTIVE_LOW) +#define CONFIG_MXC_USB_PORTSC (MXC_EHCI_UTMI_16BIT | MXC_EHCI_MODE_UTMI) + /* mmc driver */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -- cgit v1.3.1 From 2785694381bcd114441c44c63362fb54a251230f Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:03 +0000 Subject: mx28evk: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam --- include/configs/mx28evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 2916c710e41..8b89b25f74d 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -238,7 +238,7 @@ */ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_BOOTFILE "uImage" #define CONFIG_LOADADDR 0x42000000 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR -- cgit v1.3.1 From fbae0d108e4ee726df83130300d0305051d23caf Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:04 +0000 Subject: mx53loco: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam --- include/configs/mx53loco.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index a62ea785990..37f9d69e260 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -108,7 +108,7 @@ #undef CONFIG_CMD_IMLS -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_ETHPRIME "FEC0" -- cgit v1.3.1 From eb141bd36ca33e09eb86cdbc83bbe1b157c19aae Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:05 +0000 Subject: mx6qsabrelite: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam Acked-by: Jason Liu --- include/configs/mx6qsabrelite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index 318f857cf83..759275a03ac 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -144,7 +144,7 @@ #undef CONFIG_CMD_IMLS -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_PREBOOT "" -- cgit v1.3.1 From 072f26b1da7d25626c460f89d5e358e74d29008e Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:06 +0000 Subject: mx6qsabre_common: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam Acked-by: Jason Liu --- include/configs/mx6qsabre_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h index 50f3b018736..b8621b8e1cd 100644 --- a/include/configs/mx6qsabre_common.h +++ b/include/configs/mx6qsabre_common.h @@ -76,7 +76,7 @@ #define CONFIG_CMD_BOOTZ #undef CONFIG_CMD_IMLS -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_LOADADDR 0x10800000 #define CONFIG_SYS_TEXT_BASE 0x17800000 -- cgit v1.3.1 From bf5c6fbbf7f58084dc9a89c4bb31f909450f6e00 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:07 +0000 Subject: mx51evk: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam --- include/configs/mx51evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 89feaed7dd7..e8c6618ea92 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -149,7 +149,7 @@ #define CONFIG_CMD_DATE -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_ETHPRIME "FEC0" -- cgit v1.3.1 From d941e6b63e0dd3653b81841f7cf8238cccec8f56 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:08 +0000 Subject: mx25pdk: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam --- include/configs/mx25pdk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h index a4bd8b0aed6..b5338a00090 100644 --- a/include/configs/mx25pdk.h +++ b/include/configs/mx25pdk.h @@ -130,7 +130,7 @@ #define CONFIG_CMD_MII #define CONFIG_CMD_NET -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_LOADADDR 0x81000000 /* loadaddr env var */ #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR -- cgit v1.3.1 From 562e6c62b6754d95fd4696a74289a8292f779645 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:09 +0000 Subject: mx31pdk: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam --- include/configs/mx31pdk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 223b5b0bb92..6572676970c 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -106,7 +106,7 @@ #define CONFIG_BOARD_LATE_INIT -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_EXTRA_ENV_SETTINGS \ "bootargs_base=setenv bootargs console=ttymxc0,115200\0" \ -- cgit v1.3.1 From ec7503bb0ec4c0df199129d0958413fb9d44baf0 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Nov 2012 05:09:10 +0000 Subject: mx35pdk: Configure CONFIG_BOOTDELAY to one second One second is enough time for users to react in case they want to stop the booting process. Signed-off-by: Fabio Estevam --- include/configs/mx35pdk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index 00171a7cec5..1c2f5993d8c 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -120,7 +120,7 @@ #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 1 #define CONFIG_LOADADDR 0x80800000 /* loadaddr env var */ -- cgit v1.3.1 From 39e8576164c3bef9d6cb9ad4567c09fc6a87b5fd Mon Sep 17 00:00:00 2001 From: Benoît Thébaudeau Date: Mon, 5 Nov 2012 10:07:04 +0000 Subject: mx5: Mark lowlevel_init board-specific code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mx5 lowlevel_init.S contains board-specific code based on the reference design. Let's keep it since it avoids creating new lowlevel_init files and it may be used by many boards. But add a config to make it optional in order not to cause issues on boards not following this part of the reference design. Signed-off-by: Benoît Thébaudeau Cc: Stefano Babic Cc: Matt Sealey Acked-by: Stefano Babic --- arch/arm/cpu/armv7/mx5/lowlevel_init.S | 2 +- doc/README.imx5 | 5 +++++ include/configs/mx51_efikamx.h | 1 + include/configs/mx51evk.h | 1 + include/configs/vision2.h | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S index 29ec95797ba..6d9396a9767 100644 --- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S +++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S @@ -396,7 +396,7 @@ ENTRY(lowlevel_init) mov r10, lr mov r4, #0 /* Fix R4 to 0 */ -#if defined(CONFIG_MX51) +#if defined(CONFIG_SYS_MAIN_PWR_ON) ldr r0, =GPIO1_BASE_ADDR ldr r1, [r0, #0x0] orr r1, r1, #1 << 23 diff --git a/doc/README.imx5 b/doc/README.imx5 index f7eab7d4b2e..e08941e2ae3 100644 --- a/doc/README.imx5 +++ b/doc/README.imx5 @@ -15,3 +15,8 @@ i.MX5x SoCs. mode), which causes the effect of this failure to be much lower (in terms of frequency deviation), avoiding system failure, or at least decreasing the likelihood of system failure. + +1.2 CONFIG_SYS_MAIN_PWR_ON: Trigger MAIN_PWR_ON upon startup. + This option should be enabled for boards having a SYS_ON_OFF_CTL signal + connected to GPIO1[23] and triggering the MAIN_PWR_ON signal like in the + reference designs. diff --git a/include/configs/mx51_efikamx.h b/include/configs/mx51_efikamx.h index ffe771f2dcb..a056566efcd 100644 --- a/include/configs/mx51_efikamx.h +++ b/include/configs/mx51_efikamx.h @@ -261,5 +261,6 @@ #define CONFIG_SYS_DDR_CLKSEL 0 #define CONFIG_SYS_CLKTL_CBCDR 0x59E35145 +#define CONFIG_SYS_MAIN_PWR_ON #endif diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index e8c6618ea92..4e823553349 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -235,6 +235,7 @@ #define CONFIG_SYS_DDR_CLKSEL 0 #define CONFIG_SYS_CLKTL_CBCDR 0x59E35100 +#define CONFIG_SYS_MAIN_PWR_ON /*----------------------------------------------------------------------- * FLASH and environment organization diff --git a/include/configs/vision2.h b/include/configs/vision2.h index 848df88e7df..13c570299fe 100644 --- a/include/configs/vision2.h +++ b/include/configs/vision2.h @@ -196,6 +196,7 @@ /* 166 MHz DDR RAM */ #define CONFIG_SYS_DDR_CLKSEL 0 #define CONFIG_SYS_CLKTL_CBCDR 0x19239100 +#define CONFIG_SYS_MAIN_PWR_ON #define CONFIG_SYS_NO_FLASH -- cgit v1.3.1