Pending patches for merging
Subsystems (2)
v2 cover Pending patches for merging
This sends all the patches I've been keeping in my tree and are awaiting to be applied. Basically:
* Wandboard LCD support and environment changes
* mx28evk environment changes
* SabreSD eMMC installation support
* IOMUX fix
* FDT loadaddr fix
Changes in v2:
- Change loadaddr to allow use with more than 1G of RAM
Otavio Salvador (9):
wandboard: add Future Eletronics 7" WVGA LCD extension board
wandboard: Use '0' as bootdelay but interruptable
wandboard: Pass 'quiet' bootparam by default
mx6sabresd: Add eMMC specific environment to allow U-Boot update
imx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro
mx28evk: Use 512k for fdt partition to align it
mx28evk: Add 'nandboot' environment command
mx28evk: Extend environment to easy write of NAND system
ARM: mx6: Change the FDT loading address to avoid overlaping
arch/arm/include/asm/imx-common/iomux-v3.h | 2 + board/wandboard/wandboard.c | 240 ++++++++++++++++++++++++++--- include/configs/cgtqmx6eval.h | 2 +- include/configs/mx28evk.h | 55 ++++++- include/configs/mx6sabre_common.h | 25 ++- include/configs/mx6sabresd.h | 2 + include/configs/nitrogen6x.h | 2 +- include/configs/udoo.h | 2 +- include/configs/wandboard.h | 40 ++++- 9 files changed, 337 insertions(+), 33 deletions(-)
Signature · 1 line
1.8.4.3
PATCH v2 1/9 wandboard: add Future Eletronics 7" WVGA LCD extension board
This adds support for the 7" WVGA produced by Future Eletronics and make it dynamically detect if it is connected or not based on the touchscreen controller.
---
Changes in v2: None
board/wandboard/wandboard.c | 240 +++++++++++++++++++++++++++++++++++++++----- include/configs/wandboard.h | 35 ++++++- 2 files changed, 251 insertions(+), 24 deletions(-)
board/wandboard/wandboard.c +217 -23
@@ -15,6 +15,7 @@#include <asm/arch/sys_proto.h> #include <asm/gpio.h> #include <asm/imx-common/iomux-v3.h> +#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/boot_mode.h> #include <asm/io.h> #include <asm/sizes.h>
@@ -25,6 +26,7 @@#include <miiphy.h> #include <netdev.h> #include <linux/fb.h> +#include <i2c.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -39,6 +41,10 @@ DECLARE_GLOBAL_DATA_PTR;#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) +#define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)#define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)#define ETH_PHY_RESET IMX_GPIO_NR(3, 29)
@@ -208,50 +214,236 @@ int board_phy_config(struct phy_device *phydev) }#if defined(CONFIG_VIDEO_IPUV3 ) -static struct fb_videomode const hdmi = { - .name ="HDMI" , - .refresh =60 , - .xres =1024 , - .yres =768 , - .pixclock =15385 , - .left_margin =220 , - .right_margin =40 , - .upper_margin =21 , - .lower_margin =7 , - .hsync_len =60 , - .vsync_len =10 , - .sync =FB_SYNC_EXT , - .vmode =FB_VMODE_NONINTERLACED +struct i2c_pads_info i2c_pad_info = { + .scl = { + .i2c_mode =MX6_PAD_KEY_COL3__I2C2_SCL + |MUX_PAD_CTRL (I2C_PAD_CTRL ), + .gpio_mode =MX6_PAD_KEY_COL3__GPIO_4_12 + |MUX_PAD_CTRL (I2C_PAD_CTRL ), + .gp =IMX_GPIO_NR (4 ,12 ) + }, + .sda = { + .i2c_mode =MX6_PAD_KEY_ROW3__I2C2_SDA + |MUX_PAD_CTRL (I2C_PAD_CTRL ), + .gpio_mode =MX6_PAD_KEY_ROW3__GPIO_4_13 + |MUX_PAD_CTRL (I2C_PAD_CTRL ), + .gp =IMX_GPIO_NR (4 ,13 ) + } }; -int board_video_skip (void ) -{ -int ret; +static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = { +MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK , +MX6_PAD_DI0_PIN2__IPU1_DI0_PIN2 ,/* HSync */ +MX6_PAD_DI0_PIN3__IPU1_DI0_PIN3 ,/* VSync */ +MX6_PAD_DI0_PIN4__IPU1_DI0_PIN4 + |MUX_PAD_CTRL (PAD_CTL_DSE_120ohm),/* Contrast */ +MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15 ,/* DISP0_DRDY */ + +MX6_PAD_DISP0_DAT0__IPU1_DISP0_DAT_0 , +MX6_PAD_DISP0_DAT1__IPU1_DISP0_DAT_1 , +MX6_PAD_DISP0_DAT2__IPU1_DISP0_DAT_2 , +MX6_PAD_DISP0_DAT3__IPU1_DISP0_DAT_3 , +MX6_PAD_DISP0_DAT4__IPU1_DISP0_DAT_4 , +MX6_PAD_DISP0_DAT5__IPU1_DISP0_DAT_5 , +MX6_PAD_DISP0_DAT6__IPU1_DISP0_DAT_6 , +MX6_PAD_DISP0_DAT7__IPU1_DISP0_DAT_7 , +MX6_PAD_DISP0_DAT8__IPU1_DISP0_DAT_8 , +MX6_PAD_DISP0_DAT9__IPU1_DISP0_DAT_9 , +MX6_PAD_DISP0_DAT10__IPU1_DISP0_DAT_10 , +MX6_PAD_DISP0_DAT11__IPU1_DISP0_DAT_11 , +MX6_PAD_DISP0_DAT12__IPU1_DISP0_DAT_12 , +MX6_PAD_DISP0_DAT13__IPU1_DISP0_DAT_13 , +MX6_PAD_DISP0_DAT14__IPU1_DISP0_DAT_14 , +MX6_PAD_DISP0_DAT15__IPU1_DISP0_DAT_15 , +MX6_PAD_DISP0_DAT16__IPU1_DISP0_DAT_16 , +MX6_PAD_DISP0_DAT17__IPU1_DISP0_DAT_17 , + +MX6_PAD_SD4_DAT2__GPIO_2_10 + |MUX_PAD_CTRL (NO_PAD_CTRL ),/* DISP0_BKLEN */ +MX6_PAD_SD4_DAT3__GPIO_2_11 + |MUX_PAD_CTRL (NO_PAD_CTRL ),/* DISP0_VDDEN */ +}; - ret =ipuv3_fb_init (&hdmi,0 ,IPU_PIX_FMT_RGB24 ); +struct display_info_t { +int bus; +int addr; +int pixfmt; +int (*detect)(struct display_info_t const *dev); +void (*enable)(struct display_info_t const *dev); +struct fb_videomode mode; +}; -if (ret) { -printf ("HDMI cannot be configured: %d\n" , ret); -return ret; - } +static int detect_hdmi (struct display_info_t const *dev) +{ +struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR ; +return readb (&hdmi->phy_stat0) &HDMI_DVI_STAT ; +} +static void do_enable_hdmi (struct display_info_t const *dev) +{imx_enable_hdmi_phy (); +} -return ret; +static int detect_i2c (struct display_info_t const *dev) +{ +return ((0 ==i2c_set_bus_num (dev->bus)) && + (0 ==i2c_probe (dev->addr))); +} + +static void enable_fwadapt_7wvga (struct display_info_t const *dev) +{ +imx_iomux_v3_setup_multiple_pads ( + fwadapt_7wvga_pads, +ARRAY_SIZE (fwadapt_7wvga_pads)); + +gpio_direction_output (IMX_GPIO_NR (2 ,10 ),1 ); +gpio_direction_output (IMX_GPIO_NR (2 ,11 ),1 ); +} + +static struct display_info_t const displays[] = {{ + .bus =-1 , + .addr =0 , + .pixfmt =IPU_PIX_FMT_RGB24 , + .detect = detect_hdmi, + .enable = do_enable_hdmi, + .mode = { + .name ="HDMI" , + .refresh =60 , + .xres =1024 , + .yres =768 , + .pixclock =15385 , + .left_margin =220 , + .right_margin =40 , + .upper_margin =21 , + .lower_margin =7 , + .hsync_len =60 , + .vsync_len =10 , + .sync =FB_SYNC_EXT , + .vmode =FB_VMODE_NONINTERLACED +} }, { + .bus =0 , + .addr =0x10 , + .pixfmt =IPU_PIX_FMT_RGB666 , + .detect = detect_i2c, + .enable = enable_fwadapt_7wvga, + .mode = { + .name ="FWBADAPT-LCD-F07A-0102" , + .refresh =60 , + .xres =800 , + .yres =480 , + .pixclock =33260 , + .left_margin =128 , + .right_margin =128 , + .upper_margin =22 , + .lower_margin =22 , + .hsync_len =1 , + .vsync_len =1 , + .sync =0 , + .vmode =FB_VMODE_NONINTERLACED +} } }; + +int board_video_skip (void ) +{ +int i; +int ret; +int detected =0 ; +char const *panel =getenv ("panel" ); +if (!panel) { +for (i =0 ; i <ARRAY_SIZE (displays); i++) { +struct display_info_t const *dev = displays+i; +if (dev->detect && dev->detect (dev)) { + panel = dev->mode.name; + detected =1 ; +break ; + } + } +if (!panel) { + panel = displays[0 ].mode.name; +printf ("No panel detected: default to %s\n" , panel); + i =0 ; + } + }else { +for (i =0 ; i <ARRAY_SIZE (displays); i++) { +if (!strcmp (panel, displays[i].mode.name)) +break ; + } + } +if (i <ARRAY_SIZE (displays)) { + ret =ipuv3_fb_init (&displays[i].mode,0 , + displays[i].pixfmt); + +if (!ret) { + displays[i].enable (displays+i); +printf ("Display: %s (%ux%u) %s\n" , + displays[i].mode.name, + displays[i].mode.xres, + displays[i].mode.yres, + (detected ?"[auto]" :"" )); + }else +printf ("LCD %s cannot be configured: %d\n" , + displays[i].mode.name, ret); + }else { +printf ("unsupported panel %s\n" , panel); +return -EINVAL ; + } + +return 0 ; }static void setup_display (void ) {struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR ; +struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR ;int reg;enable_ipu_clock ();imx_setup_hdmi (); +/* Turn on LDB0, LDB1, IPU,IPU DI0 clocks */ + reg =__raw_readl (&mxc_ccm->CCGR3); + reg |=MXC_CCM_CCGR3_LDB_DI0_MASK |MXC_CCM_CCGR3_LDB_DI1_MASK ; +writel (reg, &mxc_ccm->CCGR3); + +/* set LDB0, LDB1 clk select to 011/011 */ + reg =readl (&mxc_ccm->cs2cdr); + reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK + |MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK ); + reg |= (3 <<MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_OFFSET ) + | (3 <<MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET ); +writel (reg, &mxc_ccm->cs2cdr); + + reg =readl (&mxc_ccm->cscmr2); + reg |=MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV |MXC_CCM_CSCMR2_LDB_DI1_IPU_DIV ; +writel (reg, &mxc_ccm->cscmr2); + reg =readl (&mxc_ccm->chsccdr); reg |= (CHSCCDR_CLK_SEL_LDB_DI0 <<MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET ); + reg |= (CHSCCDR_CLK_SEL_LDB_DI0 + <<MXC_CCM_CHSCCDR_IPU1_DI1_CLK_SEL_OFFSET );writel (reg, &mxc_ccm->chsccdr); + + reg =IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES + |IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_LOW + |IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW + |IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG + |IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT + |IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG + |IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT + |IOMUXC_GPR2_LVDS_CH0_MODE_DISABLED + |IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0 ; +writel (reg, &iomux->gpr[2 ]); + + reg =readl (&iomux->gpr[3 ]); + reg = (reg & ~(IOMUXC_GPR3_LVDS1_MUX_CTL_MASK + |IOMUXC_GPR3_HDMI_MUX_CTL_MASK )) + | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0 + <<IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET ); +writel (reg, &iomux->gpr[3 ]); + +/* Disable LCD backlight */ +imx_iomux_v3_setup_pad (MX6_PAD_DI0_PIN4__GPIO_4_20 ); +gpio_direction_input (IMX_GPIO_NR (4 ,20 )); }#endif /* CONFIG_VIDEO_IPUV3 */
@@ -309,6 +501,8 @@ int board_init(void)/* address of boot parameters */ gd->bd->bi_boot_params =PHYS_SDRAM +0x100 ; +setup_i2c (1 ,CONFIG_SYS_I2C_SPEED ,0x7f , &i2c_pad_info); +return 0 ; }
include/configs/wandboard.h +34 -1
@@ -55,6 +55,12 @@#define CONFIG_LOADADDR 0x12000000#define CONFIG_SYS_TEXT_BASE 0x17800000 +/* I2C Configs */ +#define CONFIG_CMD_I2C +#define CONFIG_I2C_MULTI_BUS +#define CONFIG_I2C_MXC +#define CONFIG_SYS_I2C_SPEED 100000 +/* MMC Configuration */ #define CONFIG_FSL_ESDHC #define CONFIG_FSL_USDHC
@@ -97,6 +103,7 @@#define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IPUV3_CLK 260000000 +#define CONFIG_CMD_HDMIDETECT #define CONFIG_IMX_HDMI #if defined(CONFIG_MX6DL ) || defined(CONFIG_MX6S )
@@ -134,7 +141,33 @@"fi; " \"fi\0" \"mmcargs=setenv bootargs console=${console},${baudrate} " \ -"root=${mmcroot}\0" \ +"root=${mmcroot}; run videoargs\0" \ +"videoargs=" \ +"setenv nextcon 0; " \ +"if hdmidet; then " \ +"setenv bootargs ${bootargs} " \ +"video=mxcfb${nextcon}:dev=hdmi,1280x720M at 60," \ +"if=RGB24; " \ +"setenv fbmen fbmem=28M; " \ +"setexpr nextcon ${nextcon} + 1; " \ +"else " \ +"echo - no HDMI monitor;" \ +"fi; " \ +"i2c dev 0; " \ +"if i2c probe 0x10; then " \ +"setenv bootargs ${bootargs} " \ +"video=mxcfb${nextcon}:dev=lcd,800x480 at 60," \ +"if=RGB666; " \ +"if test 0 -eq ${nextcon}; then " \ +"setenv fbmem fbmem=10M; " \ +"else " \ +"setenv fbmem ${fbmem},10M; " \ +"fi; " \ +"setexpr nextcon ${nextcon} + 1; " \ +"else " \ +"echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \ +"fi; " \ +"setenv bootargs ${bootargs} ${fbmem}\0" \"loadbootscript=" \"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \"bootscript=echo Running bootscript from mmc ...; " \
Signature · 1 line
1.8.4.3
PATCH v2 2/9 wandboard: Use '0' as bootdelay but interruptable
In reply to Otavio SalvadorThe '0' as bootdelay reduces a lot the boot time while we still allow the boot to be interruptable if need.
---
Changes in v2: None
include/configs/wandboard.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/wandboard.h +2 -1
@@ -48,7 +48,8 @@#define CONFIG_CMD_BMODE #define CONFIG_CMD_SETEXPR -#define CONFIG_BOOTDELAY 5 +#define CONFIG_BOOTDELAY 0 +#define CONFIG_ZERO_BOOTDELAY_CHECK #define CONFIG_SYS_MEMTEST_START 0x10000000#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
Signature · 1 line
1.8.4.3
Fabio Estevam
reviewerPATCH v2 2/9 wandboard: Use '0' as bootdelay but interruptable
Hi Otavio,
Quoted 2 lines · Otavio Salvador
The '0' as bootdelay reduces a lot the boot time while we still allow the boot to be interruptable if need.
When I initially sent the patch for Wandboard, I put the boot delay as 1 and Wolfgang was not happy with it.
Like I said in the previous reply, we should create a Falcon mode target to provide a build with a minimum delay.
Regards,
Fabio Estevam
PATCH v2 2/9 wandboard: Use '0' as bootdelay but interruptable
Hi Otavio
Quoted 4 lines · Fabio Estevam
Hi Otavio,
On Thu, Nov 28, 2013 at 12:51 PM, Otavio Salvador
<[email protected]> wrote:
Quoted 9 lines
Quoted 2 lines
The '0' as bootdelay reduces a lot the boot time while we still allow the boot to be interruptable if need.
When I initially sent the patch for Wandboard, I put the boot delay as 1 and Wolfgang was not happy with it.
Like I said in the previous reply, we should create a Falcon mode target to provide a build with a minimum delay.
Why you don't just change your parameter locally in your build?
Michael
Quoted 7 lines
Regards,
Fabio Estevam
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v2 2/9 wandboard: Use '0' as bootdelay but interruptable
Dear Michael Trimarchi,
Quoted 5 lines · In message <CAOf5uwkWjhPpZ7=iby1hkOkpDaW_bkbic1MzA--dRu0FcPk4XA@mail.gmail.com>…
Quoted 3 lines
Like I said in the previous reply, we should create a Falcon mode target to provide a build with a minimum delay.
Why you don't just change your parameter locally in your build?
Why don't you do that?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A man is not complete until he is married -- then he is finished.
PATCH v2 2/9 wandboard: Use '0' as bootdelay but interruptable
Hi
Quoted 11 lines · Wolfgang Denk
Dear Michael Trimarchi,
Quoted 5 lines · In message <CAOf5uwkWjhPpZ7=iby1hkOkpDaW_bkbic1MzA--dRu0FcPk4XA@mail.gmail.com>…
Quoted 3 lines
Like I said in the previous reply, we should create a Falcon mode target to provide a build with a minimum delay.
Why you don't just change your parameter locally in your build?
Why don't you do that?
I already do and make no sense to post patch that change environment variable for developing board. I just was agree with Fabio
Michael
Quoted 10 lines
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A man is not complete until he is married -- then he is finished.
PATCH v2 2/9 wandboard: Use '0' as bootdelay but interruptable
Hello,
Quoted 8 lines · Michael Trimarchi
Quoted 7 lines · Wolfgang Denk
Dear Michael Trimarchi,
Quoted 4 lines · In message <CAOf5uwkWjhPpZ7=iby1hkOkpDaW_bkbic1MzA--dRu0FcPk4XA@mail.gmail.com>…
Quoted 3 lines
Like I said in the previous reply, we should create a Falcon mode target to provide a build with a minimum delay.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Why you don't just change your parameter locally in your build?
Why don't you do that?
I already do and make no sense to post patch that change environment variable for developing board. I just was agree with Fabio
I try to send all patches I think could be merged; this don't imply they need to be accepted so I did in my tree (but also send it for review).
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
PATCH v2 3/9 wandboard: Pass 'quiet' bootparam by default
In reply to Otavio SalvadorThis reduces the boot time and makes easier to spot important images.
---
Changes in v2: None
include/configs/wandboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/wandboard.h +1 -1
@@ -142,7 +142,7 @@"fi; " \"fi\0" \"mmcargs=setenv bootargs console=${console},${baudrate} " \ -"root=${mmcroot}; run videoargs\0" \ +"root=${mmcroot} quiet; run videoargs\0" \"videoargs=" \"setenv nextcon 0; " \"if hdmidet; then " \
Signature · 1 line
1.8.4.3
Fabio Estevam
reviewerPATCH v2 3/9 wandboard: Pass 'quiet' bootparam by default
Hi Otavio,
Quoted 1 line · Otavio Salvador
This reduces the boot time and makes easier to spot important images.
I don't like this 'quiet' option to be the default as proposed here.
It would be better to create a fast boot target (preferably with Falcon support) and there people can pass all the 'fast' boot options like quiet, lpj, etc.
In the general use case, let's avoid this option.
Regards,
Fabio Estevam
PATCH v2 4/9 mx6sabresd: Add eMMC specific environment to allow U-Boot update
In reply to Otavio SalvadorA new 'update_emmc_firmware' target is added to allow for easy U-Boot update in the eMMC as it has secury boot partition and this needs specific handling on how to program the specific partition.
---
Changes in v2: None
include/configs/mx6sabre_common.h | 23 +++++++++++++++++++++++ include/configs/mx6sabresd.h | 2 ++ 2 files changed, 25 insertions(+)
include/configs/mx6sabre_common.h +23 -0
@@ -90,6 +90,28 @@#define CONFIG_LOADADDR 0x12000000#define CONFIG_SYS_TEXT_BASE 0x17800000 +#ifdef CONFIG_SUPPORT_EMMC_BOOT +#define EMMC_ENV \ + "emmcdev=2\0" \ + "update_emmc_firmware=" \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "if ${get_cmd} ${update_sd_firmware_filename}; then " \ + "if mmc dev ${emmcdev} && " \ + "mmc open ${emmcdev} 1; then " \ + "setexpr fw_sz ${filesize} / 0x200; " \ + "setexpr fw_sz ${fw_sz} + 1; " \ + "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ + "mmc close ${emmcdev} 1; " \ + "fi; " \ + "fi\0" +#else +#define EMMC_DEV "" +#endif +#define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "uimage=uImage\0" \
@@ -116,6 +138,7 @@"mmc write ${loadaddr} 0x2 ${fw_sz}; " \"fi; " \"fi\0" \ +EMMC_ENV \"mmcargs=setenv bootargs console=${console},${baudrate} " \"root=${mmcroot}\0" \"loadbootscript=" \
include/configs/mx6sabresd.h +2 -0
@@ -30,6 +30,8 @@#define CONFIG_SYS_MMC_ENV_DEV 1/* SDHC3 */ #endif +#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ +/* Framebuffer */ #define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3
Signature · 1 line
1.8.4.3
PATCH v2 5/9 imx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro
In reply to Otavio SalvadorThe macro allows easy setting in per-pin, as for example:
,----
| imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | MUX_MODE_SION); `----
The IOMUX_CONFIG_SION allows for reading PAD value from PSR register.
The following quote from the datasheet:
,----
| ... | 28.4.2.2 GPIO Write Mode | The programming sequence for driving output signals should be as follows: | 1. Configure IOMUX to select GPIO mode (Via IOMUXC), also enable SION if need | to read loopback pad value through PSR | 2. Configure GPIO direction register to output (GPIO_GDIR[GDIR] set to 1b). | 3. Write value to data register (GPIO_DR). | ...
`----
This fixes the gpio_get_value to properly work when a GPIO is set for output and has no conflicts.
Thanks for Beno?t Th?baudeau <[email protected]>, Fabio Estevam <[email protected]> and Eric B?nard <[email protected]> for helping to properly trace this down.
---
Changes in v2: None
arch/arm/include/asm/imx-common/iomux-v3.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/imx-common/iomux-v3.h +2 -0
@@ -63,6 +63,8 @@ typedef u64 iomux_v3_cfg_t;#define MUX_SEL_INPUT_SHIFT 59#define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT) +#define MUX_MODE_SION ((iomux_v3_cfg_t)IOMUX_CONFIG_SION << \ + MUX_MODE_SHIFT)#define MUX_PAD_CTRL (x) ((iomux_v3_cfg_t)(x) << MUX_PAD_CTRL_SHIFT) #define IOMUX_PAD(pad_ctrl_ofs, mux_ctrl_ofs, mux_mode, sel_input_ofs, \
Signature · 1 line
1.8.4.3
PATCH v2 6/9 mx28evk: Use 512k for fdt partition to align it
In reply to Otavio SalvadorUsing 512k for fdt partition allow it to be aligned with the other small partitions and 512k erase block size.
---
Changes in v2: None
include/configs/mx28evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/mx28evk.h +1 -1
@@ -96,7 +96,7 @@"512k(environment)," \"512k(redundant-environment)," \"4m(kernel)," \ -"128k(fdt)," \ +"512k(fdt)," \"8m(ramdisk)," \ "-(filesystem)"#endif
Signature · 1 line
1.8.4.3
PATCH v2 7/9 mx28evk: Add 'nandboot' environment command
In reply to Otavio SalvadorThis reads the kernel, ftd and boot into ubifs filesystem. While on that, the SD firmware filename definition has been moved next to the other SD related commands.
---
Changes in v2: None
include/configs/mx28evk.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
include/configs/mx28evk.h +17 -1
@@ -162,7 +162,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "update_nand_full_filename=u-boot.nand\0" \ "update_nand_firmware_filename=u-boot.sb\0" \ - "update_sd_firmware_filename=u-boot.sd\0" \ "update_nand_firmware_maxsz=0x100000\0" \ "update_nand_stride=0x40\0"/* MX28 datasheet ch. 12.12 */ \"update_nand_count=0x4\0" /* MX28 datasheet ch. 12.12 */ \
@@ -190,6 +189,23 @@"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \"nand write ${loadaddr} ${fw_off} ${filesize} ; " \"fi\0" \ +"nandargs=setenv bootargs console=${console_mainline},${baudrate} " \ +"rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \ +"nandboot=" /* Boot from NAND */ \ +"mtdparts default; " \ +"run nandargs; " \ +"nand read ${loadaddr} kernel 0x00400000; " \ +"if test ${boot_fdt} = yes; then " \ +"nand read ${fdt_addr} fdt 0x00080000; " \ +"bootm ${loadaddr} - ${fdt_addr}; " \ +"else " \ +"if test ${boot_fdt} = no; then " \ +"bootm; " \ +"else " \ +"echo \"ERROR: Set boot_fdt to yes or no.\"; " \ +"fi; " \ +"fi\0" \ +"update_sd_firmware_filename=u-boot.sd\0" \"update_sd_firmware=" /* Update the SD firmware partition */ \"if mmc rescan ; then " \"if tftp ${update_sd_firmware_filename} ; then " \
Signature · 1 line
1.8.4.3
PATCH v2 8/9 mx28evk: Extend environment to easy write of NAND system
In reply to Otavio SalvadorThis adds following new targets:
- update_nand_kernel
- update_nand_fdt
- update_nand_filesystem
and to avoid confusion, the 'update_nand_full' has been renamed to 'update_nand_firmware_full'.
---
Changes in v2: None
include/configs/mx28evk.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
include/configs/mx28evk.h +34 -1
@@ -160,6 +160,7 @@/* Extra Environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ + "ubifs_file=filesystem.ubifs\0" \ "update_nand_full_filename=u-boot.nand\0" \ "update_nand_firmware_filename=u-boot.sb\0" \ "update_nand_firmware_maxsz=0x100000\0" \
@@ -170,7 +171,7 @@"nand info ; " \"setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \"setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \ -"update_nand_full=" /* Update FCB, DBBT and FW */ \ +"update_nand_firmware_full=" /* Update FCB, DBBT and FW */ \"if tftp ${update_nand_full_filename} ; then " \"run update_nand_get_fcb_size ; " \"nand scrub -y 0x0 ${filesize} ; " \
@@ -189,6 +190,38 @@"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \"nand write ${loadaddr} ${fw_off} ${filesize} ; " \"fi\0" \ +"update_nand_kernel=" /* Update kernel */ \ +"mtdparts default; " \ +"nand erase.part kernel; " \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"${get_cmd} ${uimage}; " \ +"nand write ${loadaddr} kernel ${filesize}\0" \ +"update_nand_fdt=" /* Update fdt */ \ +"mtdparts default; " \ +"nand erase.part fdt; " \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"${get_cmd} ${fdt_file}; " \ +"nand write ${loadaddr} fdt ${filesize}\0" \ +"update_nand_filesystem=" /* Update filesystem */ \ +"mtdparts default; " \ +"nand erase.part filesystem; " \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"${get_cmd} ${ubifs_file}; " \ +"ubi part filesystem; " \ +"ubi create filesystem; " \ +"ubi write ${loadaddr} filesystem ${filesize}\0" \"nandargs=setenv bootargs console=${console_mainline},${baudrate} " \"rootfstype=ubifs ubi.mtd=6 root=ubi0_0 ${mtdparts}\0" \"nandboot=" /* Boot from NAND */ \
Signature · 1 line
1.8.4.3
PATCH v2 9/9 ARM: mx6: Change the FDT loading address to avoid overlaping
In reply to Otavio SalvadorThis patch fixes allow for the DeviceTree and initrd relocation fixing the boot of FSL 3.10.9-1.0.0-alpha kernel.
This changes following boards:
- mx6sabreauto
- mx6sabresd
- wandboard
- udoo
- nitrogen6x
- cgtqmx6eval
The reasoning, as explained by Hui Liu, is:
,----
| The FDT blob will be placed at DDR physical addr: 0x11000000. When Linux kernel | Boot up, it will decompress the compressed kernel image and place the decompressed | kernel image at the low end of the DDR memory and start running from it. If the | decompressed kernel image is bigger for example than 16M, it may over written the | fdt blob which u-boot loaded to the DDR memory @0x11000000 with fdt_addr=0x11000000 | | To expand the fdt_addr from 0x11000000 to 0x18000000, which can avoid the override | Since we will not likely have one kernel image larger than 128MB.
`----
---
Changes in v2:
- Change loadaddr to allow use with more than 1G of RAM
include/configs/cgtqmx6eval.h | 2 +- include/configs/mx6sabre_common.h | 2 +- include/configs/nitrogen6x.h | 2 +- include/configs/udoo.h | 2 +- include/configs/wandboard.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
include/configs/cgtqmx6eval.h +1 -1
@@ -81,7 +81,7 @@"console=ttymxc1\0" \"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"mmcdev=1\0" \"mmcpart=1\0" \
include/configs/mx6sabre_common.h +1 -1
@@ -116,7 +116,7 @@"script=boot.scr\0" \"uimage=uImage\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"console=" CONFIG_CONSOLE_DEV "\0" \
include/configs/nitrogen6x.h +1 -1
@@ -179,7 +179,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=imx6q-sabrelite.dtb\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"mmcdev=0\0" \
include/configs/udoo.h +1 -1
@@ -93,7 +93,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \"mmcdev=0\0" \
include/configs/wandboard.h +1 -1
@@ -121,7 +121,7 @@"fdt_high=0xffffffff\0" \"initrd_high=0xffffffff\0" \"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -"fdt_addr=0x11000000\0" \ +"fdt_addr=0x18000000\0" \"boot_fdt=try\0" \"ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Signature · 1 line
1.8.4.3