From c3c8a5748897b24f18618047804317167a531dd3 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 14 Sep 2015 13:34:43 +0800 Subject: imx-common: fix iomux settings When setting iomux for a pin mux, there is no need to check mux_ctrl_ofs. Also If still checking mux_ctrl_ofs, we have no chance to set iomux for i.MX7D IOMUXC_LPSR_SW_MUX_CTL_PAD_GPIO1_IO00, because the mux_ctrl_ofs for this register is 0. Signed-off-by: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Tested-by: Fabio Estevam diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c index b4f481f..9b9cf58 100644 --- a/arch/arm/imx-common/iomux-v3.c +++ b/arch/arm/imx-common/iomux-v3.c @@ -53,8 +53,7 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad) } #endif - if (mux_ctrl_ofs) - __raw_writel(mux_mode, base + mux_ctrl_ofs); + __raw_writel(mux_mode, base + mux_ctrl_ofs); if (sel_input_ofs) __raw_writel(sel_input, base + sel_input_ofs); -- cgit v0.10.2 From 623d96e89aca64c2762150087f4e872c55481f13 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 14 Sep 2015 13:34:44 +0800 Subject: imx: wdog: correct wcr register settings We should not simple use "writew(WCR_WDE, &wdog->wcr)" to set wcr, since this will override bits set before reset_cpu. Use clrsetbits_le16 instead of writew to fix this issue. Signed-off-by: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Sebastian Siewior Tested-by: Fabio Estevam diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c index 1d18d4b..9a77a54 100644 --- a/drivers/watchdog/imx_watchdog.c +++ b/drivers/watchdog/imx_watchdog.c @@ -55,7 +55,8 @@ void reset_cpu(ulong addr) { struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; - writew(WCR_WDE, &wdog->wcr); + clrsetbits_le16(&wdog->wcr, 0, WCR_WDE); + writew(0x5555, &wdog->wsr); writew(0xaaaa, &wdog->wsr); /* load minimum 1/2 second timeout */ while (1) { -- cgit v0.10.2 From 4fae48e8a955728471e02db38195294940396f04 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 14 Sep 2015 13:34:45 +0800 Subject: imx: mx7dsabresd set wdog SRS bit We use trigger pmic reset to reset the board, so set bit SRS to disable internal WDOG_RESET_B_DEB to make reset stable. Signed-off-by: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam Cc: Adrian Alonso Tested-by: Fabio Estevam diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index d163bee..6d88573 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -499,6 +499,8 @@ int power_init_board(void) int board_late_init(void) { + struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; + #ifdef CONFIG_CMD_BMODE add_board_boot_modes(board_boot_modes); #endif @@ -509,7 +511,13 @@ int board_late_init(void) imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads)); - set_wdog_reset((struct wdog_regs *)WDOG1_BASE_ADDR); + set_wdog_reset(wdog); + + /* + * Do not assert internal WDOG_RESET_B_DEB(controlled by bit 4), + * since we use PMIC_PWRON to reset the board. + */ + clrsetbits_le16(&wdog->wcr, 0, 0x10); return 0; } -- cgit v0.10.2 From 559964e7d4fe3405a5a074837c1904cc276c84f9 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 10 Sep 2015 16:03:38 -0300 Subject: mx6sabre_common: Add Fastboot support Tested basic fastboot commands, such as: On the mx6qsabresd U-boot prompt: => fastboot 0 On the host PC: $ fastboot getvar bootloader-version -i 0x0525 bootloader-version: U-Boot 2015.10-rc2-23960-g2462cce-dirty finished. total time: 0.000s $ fastboot reboot -i 0x0525 --> board reboots fine. Signed-off-by: Fabio Estevam diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 98eb042..2970b83 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -238,6 +238,12 @@ #define CONFIG_G_DNL_VENDOR_NUM 0x0525 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 #define CONFIG_G_DNL_MANUFACTURER "FSL" + +#define CONFIG_USB_FUNCTION_FASTBOOT +#define CONFIG_CMD_FASTBOOT +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 #endif #endif /* __MX6QSABRE_COMMON_CONFIG_H */ -- cgit v0.10.2 From 72e49e03644e6068eb753898c4a10e905c5710ba Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sun, 13 Sep 2015 13:06:42 -0300 Subject: mx7dsabresd: Staticize when possible Make the internal symbols static when possible. This prevents sparse build warnings. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 6d88573..5515913 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -44,7 +44,7 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_SYS_I2C_MXC #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) /* I2C1 for PMIC */ -struct i2c_pads_info i2c_pad_info1 = { +static struct i2c_pads_info i2c_pad_info1 = { .scl = { .i2c_mode = MX7D_PAD_I2C1_SCL__I2C1_SCL | PC, .gpio_mode = MX7D_PAD_I2C1_SCL__GPIO4_IO8 | PC, @@ -156,7 +156,7 @@ static enum qn_func qn_output[8] = { qn_enable }; -void iox74lv_init(void) +static void iox74lv_init(void) { int i; @@ -535,11 +535,11 @@ int checkboard(void) } #ifdef CONFIG_USB_EHCI_MX7 -iomux_v3_cfg_t const usb_otg1_pads[] = { +static iomux_v3_cfg_t const usb_otg1_pads[] = { MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), }; -iomux_v3_cfg_t const usb_otg2_pads[] = { +static iomux_v3_cfg_t const usb_otg2_pads[] = { MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL), }; -- cgit v0.10.2 From b7d4db2f9638bdbb5b135838ac88042a3f4a5266 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sun, 13 Sep 2015 13:06:43 -0300 Subject: mx7dsabreasd: Remove dead code iox74lv_set() is not used anywhere, so let's remove it. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 5515913..15a1daf 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -190,44 +190,6 @@ static void iox74lv_init(void) gpio_direction_output(IOX_STCP, 1); }; -void iox74lv_set(int index) -{ - int i; - for (i = 7; i >= 0; i--) { - gpio_direction_output(IOX_SHCP, 0); - - if (i == index) - gpio_direction_output(IOX_SDI, seq[qn_output[i]][0]); - else - gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]); - udelay(500); - gpio_direction_output(IOX_SHCP, 1); - udelay(500); - } - - gpio_direction_output(IOX_STCP, 0); - udelay(500); - /* - * shift register will be output to pins - */ - gpio_direction_output(IOX_STCP, 1); - - for (i = 7; i >= 0; i--) { - gpio_direction_output(IOX_SHCP, 0); - gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]); - udelay(500); - gpio_direction_output(IOX_SHCP, 1); - udelay(500); - } - - gpio_direction_output(IOX_STCP, 0); - udelay(500); - /* - * shift register will be output to pins - */ - gpio_direction_output(IOX_STCP, 1); -}; - #ifdef CONFIG_FEC_MXC static iomux_v3_cfg_t const fec1_pads[] = { MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL | MUX_PAD_CTRL(ENET_RX_PAD_CTRL), -- cgit v0.10.2 From 0df2f01d42409da80799a0dbe6f08c673c13f93d Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sun, 13 Sep 2015 13:06:44 -0300 Subject: mx7dsabresd: Include USB header Include in order to fix the following sparse warning: board/freescale/mx7dsabresd/mx7dsabresd.c:538:5: warning: symbol 'board_ehci_hcd_init' was not declared. Should it be static? Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 15a1daf..d7e4589 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -24,6 +24,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; -- cgit v0.10.2 From e0ece173045f9083ddc8997ee73db0099dabc634 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sun, 13 Sep 2015 13:06:45 -0300 Subject: mx7dsabresd: Remove get_board_rev() get_board_rev() is not actually providing the board revision. It just returns the CPU revision instead. As the CPU revision is already printed on boot, there is no reason to have get_board_rev(), so let's remove it. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index d7e4589..bb823f5 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -485,11 +485,6 @@ int board_late_init(void) return 0; } -u32 get_board_rev(void) -{ - return get_cpu_rev(); -} - int checkboard(void) { puts("Board: i.MX7D SABRESD\n"); -- cgit v0.10.2 From a6e3159e5a5eb3fca03da792aa069df6df881f40 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sun, 13 Sep 2015 13:06:46 -0300 Subject: mx7dsabresd: Remove unused config option CONFIG_FEC_DMA_MINALIGN is not used anywhere, so let's remove it. Signed-off-by: Fabio Estevam diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h index ec6e0a6..2a736c4 100644 --- a/include/configs/mx7dsabresd.h +++ b/include/configs/mx7dsabresd.h @@ -24,7 +24,6 @@ #define CONFIG_PHYLIB #define CONFIG_PHY_BROADCOM -#define CONFIG_FEC_DMA_MINALIGN 64 /* ENET1 */ #define IMX_FEC_BASE ENET_IPS_BASE_ADDR -- cgit v0.10.2 From e9c8f0982df3f37abc69989160bb27a8d4162edd Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 14 Sep 2015 11:06:30 -0300 Subject: mx6ul_14x14_evk: Remove dead code iox74lv_set() is not used anywhere, so let's remove it. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 612fb78..acb8431 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -155,49 +155,6 @@ static void iox74lv_init(void) gpio_direction_output(IOX_OE, 1); }; -void iox74lv_set(int index) -{ - int i; - - gpio_direction_output(IOX_OE, 0); - - for (i = 7; i >= 0; i--) { - gpio_direction_output(IOX_SHCP, 0); - - if (i == index) - gpio_direction_output(IOX_SDI, seq[qn_output[i]][0]); - else - gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]); - udelay(500); - gpio_direction_output(IOX_SHCP, 1); - udelay(500); - } - - gpio_direction_output(IOX_STCP, 0); - udelay(500); - /* - * shift register will be output to pins - */ - gpio_direction_output(IOX_STCP, 1); - - for (i = 7; i >= 0; i--) { - gpio_direction_output(IOX_SHCP, 0); - gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]); - udelay(500); - gpio_direction_output(IOX_SHCP, 1); - udelay(500); - } - - gpio_direction_output(IOX_STCP, 0); - udelay(500); - /* - * shift register will be output to pins - */ - gpio_direction_output(IOX_STCP, 1); - - gpio_direction_output(IOX_OE, 1); -}; - #ifdef CONFIG_SYS_I2C_MXC #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) /* I2C1 for PMIC and EEPROM */ -- cgit v0.10.2 From d547e7ab16e3c90659b8bbc9fa85460cbc653faa Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 14 Sep 2015 11:06:31 -0300 Subject: mx6ul_14x14_evk: Staticize when possible Make the internal symbols static when possible. This prevents sparse build warnings. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index acb8431..3d5c285 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -158,7 +158,7 @@ static void iox74lv_init(void) #ifdef CONFIG_SYS_I2C_MXC #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) /* I2C1 for PMIC and EEPROM */ -struct i2c_pads_info i2c_pad_info1 = { +static struct i2c_pads_info i2c_pad_info1 = { .scl = { .i2c_mode = MX6_PAD_UART4_TX_DATA__I2C1_SCL | PC, .gpio_mode = MX6_PAD_UART4_TX_DATA__GPIO1_IO28 | PC, @@ -313,7 +313,7 @@ static iomux_v3_cfg_t const quadspi_pads[] = { MX6_PAD_NAND_DQS__QSPI_A_SS0_B | MUX_PAD_CTRL(QSPI_PAD_CTRL1), }; -int board_qspi_init(void) +static int board_qspi_init(void) { /* Set the iomux */ imx_iomux_v3_setup_multiple_pads(quadspi_pads, -- cgit v0.10.2 From 07af555513de3cee3c9feb490d1aa842a8681d2c Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 14 Sep 2015 11:06:32 -0300 Subject: mx6ul_14x14_evk: Remove get_board_rev() get_board_rev() is not actually providing the board revision. It just returns the CPU revision instead. As the CPU revision is already printed on boot, there is no reason to have get_board_rev(), so let's remove it. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 3d5c285..8650f35 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -631,11 +631,6 @@ int board_late_init(void) return 0; } -u32 get_board_rev(void) -{ - return get_cpu_rev(); -} - int checkboard(void) { if (is_mx6ul_9x9_evk()) -- cgit v0.10.2 From f05f4528f2b2c88b46cde13d36e79bb292ea3f5a Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 14 Sep 2015 22:18:33 +0800 Subject: imx: mx7: drop select CPU_V7 for board target drop select CPU_V7 for board target, since ARCH_MX7 selects CPU_V7. Signed-off-by: Peng Fan Cc: Stefano Babic diff --git a/arch/arm/cpu/armv7/mx7/Kconfig b/arch/arm/cpu/armv7/mx7/Kconfig index 892ffae..ea19e5c 100644 --- a/arch/arm/cpu/armv7/mx7/Kconfig +++ b/arch/arm/cpu/armv7/mx7/Kconfig @@ -13,7 +13,6 @@ choice config TARGET_MX7DSABRESD bool "mx7dsabresd" - select CPU_V7 select DM select DM_THERMAL -- cgit v0.10.2 From 8e4ba5e0ff02fb7932cb4d9971f88c9a35a31902 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 14 Sep 2015 22:18:34 +0800 Subject: imx: mx7dsabresd: drop SYS_SOC from board Kconfig We have defined this kconfig entry in arch/arm/cpu/armv7/mx7/Kconfig, no need to redefine it in board Kconfig. Signed-off-by: Peng Fan Cc: Stefano Babic diff --git a/board/freescale/mx7dsabresd/Kconfig b/board/freescale/mx7dsabresd/Kconfig index d7c6ae4..c6a969c 100644 --- a/board/freescale/mx7dsabresd/Kconfig +++ b/board/freescale/mx7dsabresd/Kconfig @@ -6,9 +6,6 @@ config SYS_BOARD config SYS_VENDOR default "freescale" -config SYS_SOC - default "mx7" - config SYS_CONFIG_NAME default "mx7dsabresd" -- cgit v0.10.2 From 168617c9b547c4b1b24e7b4ce7078aa35a99efd2 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 7 Sep 2015 16:12:11 +0800 Subject: mtd: nand: mxs check maximum ecc that platfrom supports Check maximum ecc strength for each platfrom to avoid the calculated ecc exceed the limitation. Signed-off-by: Peng Fan Signed-off-by: Han Xu Tested-By: Tim Harvey Reviewed-by: Marek Vasut Acked-by: Scott Wood Cc: Stefano Babic diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c index 1d68901..f15cf36 100644 --- a/drivers/mtd/nand/mxs_nand.c +++ b/drivers/mtd/nand/mxs_nand.c @@ -149,6 +149,13 @@ static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size, uint32_t page_oob_size) { int ecc_strength; + int max_ecc_strength_supported; + + /* Refer to Chapter 17 for i.MX6DQ, Chapter 18 for i.MX6SX */ + if (is_cpu_type(MXC_CPU_MX6SX)) + max_ecc_strength_supported = 62; + else + max_ecc_strength_supported = 40; /* * Determine the ECC layout with the formula: @@ -162,7 +169,7 @@ static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size, / (galois_field * mxs_nand_ecc_chunk_cnt(page_data_size)); - return round_down(ecc_strength, 2); + return min(round_down(ecc_strength, 2), max_ecc_strength_supported); } static inline uint32_t mxs_nand_get_mark_offset(uint32_t page_data_size, -- cgit v0.10.2 From 5614bc7b0cc5ff312498a8dbe73e6c12e9862fbb Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Thu, 17 Sep 2015 10:39:38 +0200 Subject: imx6, aristaintetos2: add me as maintainer Add me as Maintainer for the aristainetos2b board. Signed-off-by: Heiko Schocher diff --git a/board/aristainetos/MAINTAINERS b/board/aristainetos/MAINTAINERS index 78c9b69..b463f7b 100644 --- a/board/aristainetos/MAINTAINERS +++ b/board/aristainetos/MAINTAINERS @@ -6,3 +6,4 @@ F: include/configs/aristainetos.h F: configs/aristainetos_defconfig F: include/configs/aristainetos2.h F: configs/aristainetos2_defconfig +F: configs/aristainetos2b_defconfig -- cgit v0.10.2 From f5cf9e655c183b603ce40653e64a3c60c8456d48 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 17 Sep 2015 15:13:18 -0300 Subject: cgtqmx6eval: Fit into a single line The printf can be put in a single line of code, so make it simpler Signed-off-by: Otavio Salvador diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index 574891e..cf5607b 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -212,8 +212,7 @@ int power_init_board(void) for (i = 0; i < ARRAY_SIZE(mipi_levels); i++) { if (!strcmp(mipi_levels[i].name, lv_mipi)) { - printf("set MIPI level %s\n", - mipi_levels[i].name); + printf("set MIPI level %s\n", mipi_levels[i].name); ret = pmic_reg_write(p, PFUZE100_VGEN4VOL, mipi_levels[i].value); if (ret) -- cgit v0.10.2 From a0ba61353252165fca99a8ea3d0b30651d13be5c Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 17 Sep 2015 15:13:19 -0300 Subject: cgtqmx6eval: Add a maintainer entry Add me as the board maintainer and move the status to 'Maintained'. Signed-off-by: Otavio Salvador diff --git a/board/congatec/cgtqmx6eval/MAINTAINERS b/board/congatec/cgtqmx6eval/MAINTAINERS index 35f4a2a..c41ebf5 100644 --- a/board/congatec/cgtqmx6eval/MAINTAINERS +++ b/board/congatec/cgtqmx6eval/MAINTAINERS @@ -1,6 +1,6 @@ CGTQMX6EVAL BOARD -#M: Leo Sartre -S: Orphan (since 2014-06) +M: Otavio Salvador +S: Maintained F: board/congatec/cgtqmx6eval/ F: include/configs/cgtqmx6eval.h F: configs/cgtqmx6qeval_defconfig -- cgit v0.10.2 From 3e08e1b7274bcde611928f7fdb7c78cd5f259532 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 17 Sep 2015 15:13:20 -0300 Subject: cgtqmx6eval: Add USB Mass Storage support => ums 0 mmc 0 (Mounts the micro SD) => ums 0 mmc 1 (Mounts the eMMC) => ums 0 mmc 2 (Mounts the big SD) Signed-off-by: Otavio Salvador diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index c7d54ee..7158ab0 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -63,6 +63,20 @@ #define CONFIG_USB_KEYBOARD #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP +#define CONFIG_CI_UDC +#define CONFIG_USBD_HS +#define CONFIG_USB_GADGET_DUALSPEED + +#define CONFIG_USB_GADGET +#define CONFIG_CMD_USB_MASS_STORAGE +#define CONFIG_USB_FUNCTION_MASS_STORAGE +#define CONFIG_USB_GADGET_DOWNLOAD +#define CONFIG_USB_GADGET_VBUS_DRAW 2 + +#define CONFIG_G_DNL_VENDOR_NUM 0x0525 +#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 +#define CONFIG_G_DNL_MANUFACTURER "Congatec" + /* Framebuffer */ #define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 -- cgit v0.10.2 From cf226d99426d822d6a40aef6a4dcddf818cba07f Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 23 Sep 2015 11:13:28 +0800 Subject: imx-common: consider mux_ctrl_ofs when setting mux_mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some i.MXes use __NA_ or 0 to avoid setting mux_mode, but the following patch only take i.MX6/7 into consideration. "c3c8a5748897b24f18618047804317167a531dd3 imx-common: fix iomux settings" Use is_soc_type(MXC_CPU_MX7) to avoid breaking other i.MXes when setting mux_mode. In this patch, switch to use "asm/imx-common/sys_proto.h" to avoid build break for "is_soc_type" for vf610 and mx25. Signed-off-by: Peng Fan Cc: Bhuvanchandra DV Cc: Stefano Babic Cc: Fabio Estevam Acked-by: Stefano Babic Reviewed-by: Benoît Thébaudeau diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c index 9b9cf58..228d5f8 100644 --- a/arch/arm/imx-common/iomux-v3.c +++ b/arch/arm/imx-common/iomux-v3.c @@ -11,10 +11,8 @@ #include #include #include -#if !defined(CONFIG_MX25) && !defined(CONFIG_VF610) -#include -#endif #include +#include static void *base = (void *)IOMUXC_BASE_ADDR; @@ -53,7 +51,8 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad) } #endif - __raw_writel(mux_mode, base + mux_ctrl_ofs); + if (is_soc_type(MXC_SOC_MX7) || mux_ctrl_ofs) + __raw_writel(mux_mode, base + mux_ctrl_ofs); if (sel_input_ofs) __raw_writel(sel_input, base + sel_input_ofs); -- cgit v0.10.2 From 0b530b140a0f2cc72b95f6667241d072bf166f8b Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Sun, 20 Sep 2015 22:26:01 +0800 Subject: imx: boards: Add maintainers info Add MAINTAINERS info for mx6slevk_spl, mx6ul_9x9_evk and mx6qpsabreauto. Signed-off-by: Peng Fan Cc: Stefano Babic diff --git a/board/freescale/mx6qsabreauto/MAINTAINERS b/board/freescale/mx6qsabreauto/MAINTAINERS index fb65ce4..75a8862 100644 --- a/board/freescale/mx6qsabreauto/MAINTAINERS +++ b/board/freescale/mx6qsabreauto/MAINTAINERS @@ -1,7 +1,9 @@ MX6QSABREAUTO BOARD M: Fabio Estevam +M: Peng Fan S: Maintained F: board/freescale/mx6qsabreauto/ F: include/configs/mx6qsabreauto.h F: configs/mx6dlsabreauto_defconfig F: configs/mx6qsabreauto_defconfig +F: configs/mx6qpsabreauto_defconfig diff --git a/board/freescale/mx6slevk/MAINTAINERS b/board/freescale/mx6slevk/MAINTAINERS index 18d31a8..f4e74ba 100644 --- a/board/freescale/mx6slevk/MAINTAINERS +++ b/board/freescale/mx6slevk/MAINTAINERS @@ -1,7 +1,9 @@ MX6SLEVK BOARD M: Fabio Estevam +M: Peng Fan S: Maintained F: board/freescale/mx6slevk/ F: include/configs/mx6slevk.h F: configs/mx6slevk_defconfig +F: configs/mx6slevk_spl_defconfig F: configs/mx6slevk_spinor_defconfig diff --git a/board/freescale/mx6ul_14x14_evk/MAINTAINERS b/board/freescale/mx6ul_14x14_evk/MAINTAINERS index 611feca..d5f74b7 100644 --- a/board/freescale/mx6ul_14x14_evk/MAINTAINERS +++ b/board/freescale/mx6ul_14x14_evk/MAINTAINERS @@ -4,3 +4,4 @@ S: Maintained F: board/freescale/mx6ul_14x14_evk/ F: include/configs/mx6ul_14x14_evk.h F: configs/mx6ul_14x14_evk_defconfig +F: configs/mx6ul_9x9_evk_defconfig -- cgit v0.10.2 From d449701b83fa8e541c90dfd20898a602dc7d1fc2 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 15 Sep 2015 14:05:05 +0800 Subject: imx: mx7: discard unused global variable Discard unused global variable. Signed-off-by: Peng Fan Cc: Stefano Babic diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c index 8d50149..af16ba7 100644 --- a/arch/arm/cpu/armv7/mx7/soc.c +++ b/arch/arm/cpu/armv7/mx7/soc.c @@ -15,8 +15,6 @@ #include #include -struct src *src_reg = (struct src *)SRC_BASE_ADDR; - #if defined(CONFIG_IMX_THERMAL) static const struct imx_thermal_plat imx7_thermal_plat = { .regs = (void *)ANATOP_BASE_ADDR, -- cgit v0.10.2 From 4406da0f49dd6aa96c297884911094ff903a8f77 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 15 Sep 2015 14:05:06 +0800 Subject: imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE boot_mode_apply should be applied only with CONFIG_CMD_BMODE enabled. Signed-off-by: Peng Fan Cc: Stefano Babic diff --git a/arch/arm/imx-common/init.c b/arch/arm/imx-common/init.c index 56d5010..058cf79 100644 --- a/arch/arm/imx-common/init.c +++ b/arch/arm/imx-common/init.c @@ -103,6 +103,7 @@ void init_src(void) writel(val, &src_regs->scr); } +#ifdef CONFIG_CMD_BMODE void boot_mode_apply(unsigned cfg_val) { unsigned reg; @@ -115,3 +116,4 @@ void boot_mode_apply(unsigned cfg_val) reg &= ~(1 << 28); writel(reg, &psrc->gpr10); } +#endif -- cgit v0.10.2 From 60dba18801a5a7792c8469f42aef1d189a7d863d Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 15 Sep 2015 14:05:07 +0800 Subject: imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE We use outer pmic reset and drop internal reset signal, bmode will not work as expected, so drop boot mode code for 7dsabresd board. Signed-off-by: Peng Fan Cc: Stefano Babic Cc: Adrian Alonso diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index bb823f5..ee9890b 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -421,15 +420,6 @@ int board_init(void) return 0; } -#ifdef CONFIG_CMD_BMODE -static const struct boot_mode board_boot_modes[] = { - /* 4 bit bus width */ - {"sd1", MAKE_CFGVAL(0x10, 0x10, 0x00, 0x00)}, - {"emmc", MAKE_CFGVAL(0x10, 0x2a, 0x00, 0x00)}, - {NULL, 0}, -}; -#endif - #ifdef CONFIG_POWER #define I2C_PMIC 0 int power_init_board(void) @@ -464,10 +454,6 @@ int board_late_init(void) { struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; -#ifdef CONFIG_CMD_BMODE - add_board_boot_modes(board_boot_modes); -#endif - #ifdef CONFIG_ENV_IS_IN_MMC mmc_late_init(); #endif diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h index 2a736c4..ada5de8 100644 --- a/include/configs/mx7dsabresd.h +++ b/include/configs/mx7dsabresd.h @@ -174,8 +174,6 @@ #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */ -#define CONFIG_CMD_BMODE - /* USB Configs */ #define CONFIG_CMD_USB #define CONFIG_USB_EHCI -- cgit v0.10.2 From f697c2acca9ff02c9b0cf480a4a726ed9626a53a Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 15 Sep 2015 14:05:08 +0800 Subject: imx: fix coding style Fix coding style. Signed-off-by: Peng Fan Cc: Stefano Babic diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c index af16ba7..2ed05ea 100644 --- a/arch/arm/cpu/armv7/mx7/soc.c +++ b/arch/arm/cpu/armv7/mx7/soc.c @@ -79,7 +79,7 @@ u32 get_cpu_temp_grade(int *minc, int *maxc) val &= 0x3; if (minc && maxc) { - if ( val == TEMP_AUTOMOTIVE) { + if (val == TEMP_AUTOMOTIVE) { *minc = -40; *maxc = 125; } else if (val == TEMP_INDUSTRIAL) { diff --git a/arch/arm/imx-common/init.c b/arch/arm/imx-common/init.c index 058cf79..15dab1d 100644 --- a/arch/arm/imx-common/init.c +++ b/arch/arm/imx-common/init.c @@ -44,8 +44,7 @@ void init_aips(void) writel(0x00000000, &aips2->opacr3); writel(0x00000000, &aips2->opacr4); - if (is_cpu_type(MXC_CPU_MX6SX) || is_soc_type(MXC_SOC_MX7)) - { + if (is_cpu_type(MXC_CPU_MX6SX) || is_soc_type(MXC_SOC_MX7)) { /* * Set all MPROTx to be non-bufferable, trusted for R/W, * not forced to user-mode. -- cgit v0.10.2