From f902802f65974922834d8dc2bfa56380ab384c27 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 14 Feb 2017 13:10:10 +0000 Subject: mx6sx: udoo_neo: Define the default serial console Standard boot processes including distro boot generally expect the default console to be defined. Signed-off-by: Peter Robinson Tested-by: Breno Lima diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index 23a3685..5b46272e 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -30,6 +30,7 @@ /* Linux only */ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ + "console=ttymxc0,115200\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "fdtfile=undefined\0" \ -- cgit v0.10.2 From 276ad0650c2f7a48759871bbe87ab99ff7f73491 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 14 Feb 2017 13:10:11 +0000 Subject: mx6sx: udoo_neo: use different load address for ramdisk The fdt_addr and ramdisk_addr_r are currently both defined to 0x83000000 and that's not going to work well for anyone. Move the ramdisk_addr_r to 0x84000000. Signed-off-by: Peter Robinson diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index 5b46272e..1d737cc 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -52,7 +52,7 @@ "echo WARNING: Could not determine dtb to use; fi\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ - "ramdisk_addr_r=0x83000000\0" \ + "ramdisk_addr_r=0x84000000\0" \ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ BOOTENV -- cgit v0.10.2 From 774eb2dbc002b94587fad3b66d28ce6ee86157d2 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 14 Feb 2017 13:10:12 +0000 Subject: mx6sx: udoo_neo: Enable distro boot options in config The include/configs/udoo_neo.h already includes the distro defaults include files so it seems the board was missed in the move to the config file, whether that in initial commit or conversion, so enable the option now and remove duplicated settings. Signed-off-by: Peter Robinson diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig index f9b1337..aa2f59d 100644 --- a/configs/udoo_neo_defconfig +++ b/configs/udoo_neo_defconfig @@ -13,22 +13,13 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y -CONFIG_HUSH_PARSER=y -CONFIG_CMD_BOOTZ=y +CONFIG_DISTRO_DEFAULTS=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y -CONFIG_CMD_PART=y CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y -CONFIG_ISO_PARTITION=y -CONFIG_EFI_PARTITION=y CONFIG_OF_LIBFDT=y -- cgit v0.10.2 From f78038dc0d7d15723d7dd523ab02d1fde4486815 Mon Sep 17 00:00:00 2001 From: Andrey Yurovsky Date: Fri, 10 Feb 2017 10:33:34 -0800 Subject: mtd: nand: build MXS driver for MX7 as well The i.MX7 has the same GPMI controller as i.MX6 and is covered by the MXS driver. Tell Kconfig that we can use this driver on the MX7 platform (the MXS driver already has the few i.MX7-specific changes needed for basic operation and the board itself sets the pinmux correctly). Tested on i.MX7D with the Sabre board and a NAND Flash soldered to U12. Signed-off-by: Andrey Yurovsky diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 65bb040..a2ea9b1 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -82,7 +82,7 @@ config NAND_ARASAN config NAND_MXS bool "MXS NAND support" - depends on MX6 + depends on MX6 || MX7 help This enables NAND driver for the NAND flash controller on the MXS processors. -- cgit v0.10.2 From 9e9846a484768d387c65e0ad28960b9372648638 Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Fri, 3 Feb 2017 16:13:58 +0100 Subject: arm: imx6: tqma6: add configurable CMA size depending on the use case different CMA sizes are needed for linux. Add env var to enable passing CMA size via kernel command line Signed-off-by: Markus Niebel diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 09783a2..ceb4626 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -281,6 +281,9 @@ /* 128 MiB offset as in ARM related docu for linux suggested */ #define TQMA6_FDT_ADDRESS 0x18000000 +/* set to a resonable value, changeable by user */ +#define TQMA6_CMA_SIZE 160M + #define CONFIG_EXTRA_ENV_SETTINGS \ "board=tqma6\0" \ "uimage=uImage\0" \ @@ -293,14 +296,16 @@ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0" \ "console=" CONSOLE_DEV "\0" \ + "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ + "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \ "addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ "addfb=setenv bootargs ${bootargs} " \ "imx-fbdev.legacyfb_depth=32 consoleblank=0\0" \ "mmcpart=2\0" \ "mmcblkdev=0\0" \ - "mmcargs=run addmmc addtty addfb\0" \ + "mmcargs=run addmmc addtty addfb addcma\0" \ "addmmc=setenv bootargs ${bootargs} " \ "root=/dev/mmcblk${mmcblkdev}p${mmcpart} rw rootwait\0" \ "mmcboot=echo Booting from mmc ...; " \ @@ -317,7 +322,7 @@ "netdev=eth0\0" \ "rootpath=/srv/nfs/tqma6\0" \ "ipmode=static\0" \ - "netargs=run addnfs addip addtty addfb\0" \ + "netargs=run addnfs addip addtty addfb addcma\0" \ "addnfs=setenv bootargs ${bootargs} " \ "root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath},v3,tcp;\0" \ -- cgit v0.10.2 From dd9908da3f6dc95ef9c67d932e8beb31c64c257a Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Fri, 3 Feb 2017 16:13:59 +0100 Subject: imx6: tqma6: rely on default setting for tftp and nfs Playing with USB-to-Ethernet dongles it turns out, that these will not work with special settings Signed-off-by: Markus Niebel diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index ceb4626..dce9c25 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -93,10 +93,6 @@ #define CONFIG_MII #define CONFIG_ARP_TIMEOUT 200UL -/* Network config - Allow larger/faster download for TFTP/NFS */ -#define CONFIG_IP_DEFRAG -#define CONFIG_TFTP_BLOCKSIZE 4096 -#define CONFIG_NFS_READ_SIZE 4096 /* Command definition */ #define CONFIG_CMD_BMODE -- cgit v0.10.2 From 0b14f1a61510fef6262ba32b2726c7856e2571b2 Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Fri, 3 Feb 2017 16:14:00 +0100 Subject: mx6: tqma6: fix typo in env there was a double bracketed var ref. fix this. Signed-off-by: Markus Niebel diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index dce9c25..874b44b 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -262,7 +262,7 @@ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ "setexpr offset ${fdt_start} * " \ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \ - "sf read ${${fdt_addr}} ${offset} ${size}; " \ + "sf read ${fdt_addr} ${offset} ${size}; " \ "setenv size ; setenv offset\0" \ #define CONFIG_BOOTCOMMAND \ -- cgit v0.10.2 From 34713901ad19561caca7cef23a9a720a5adb188b Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Fri, 3 Feb 2017 16:14:01 +0100 Subject: mx6: tqma6: add rootfsmode environment for mmc / sd Signed-off-by: Markus Niebel diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 874b44b..311221d 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -295,6 +295,7 @@ "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ + "rootfsmode=ro\0" \ "addcma=setenv bootargs ${bootargs} cma=${cma_size}\0" \ "addtty=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ "addfb=setenv bootargs ${bootargs} " \ @@ -303,7 +304,8 @@ "mmcblkdev=0\0" \ "mmcargs=run addmmc addtty addfb addcma\0" \ "addmmc=setenv bootargs ${bootargs} " \ - "root=/dev/mmcblk${mmcblkdev}p${mmcpart} rw rootwait\0" \ + "root=/dev/mmcblk${mmcblkdev}p${mmcpart} ${rootfsmode} " \ + "rootwait\0" \ "mmcboot=echo Booting from mmc ...; " \ "setenv bootargs; " \ "run mmcargs; " \ -- cgit v0.10.2 From e7203d77f64296338ce3773cebd5d1a23a776b5e Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Fri, 3 Feb 2017 16:14:02 +0100 Subject: tqma6: fix rounding in env need to add before div in mmc update scripts. Otherwise we could write one block more ba acident Signed-off-by: Markus Niebel diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 311221d..9225bc1 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -133,8 +133,8 @@ "update_uboot=if tftp ${uboot}; then " \ "if itest ${filesize} > 0; then " \ "mmc dev ${mmcdev}; mmc rescan; " \ - "setexpr blkc ${filesize} / 0x200; " \ - "setexpr blkc ${blkc} + 1; " \ + "setexpr blkc ${filesize} + 0x1ff; " \ + "setexpr blkc ${blkc} / 0x200; " \ "if itest ${blkc} <= ${uboot_size}; then " \ "mmc write ${loadaddr} ${uboot_start} " \ "${blkc}; " \ @@ -145,8 +145,8 @@ "if tftp ${kernel}; then " \ "if itest ${filesize} > 0; then " \ "mmc dev ${mmcdev}; mmc rescan; " \ - "setexpr blkc ${filesize} / 0x200; " \ - "setexpr blkc ${blkc} + 1; " \ + "setexpr blkc ${filesize} + 0x1ff; " \ + "setexpr blkc ${blkc} / 0x200; " \ "if itest ${blkc} <= ${kernel_size}; then " \ "mmc write ${loadaddr} " \ "${kernel_start} ${blkc}; " \ @@ -157,8 +157,8 @@ "update_fdt=if tftp ${fdt_file}; then " \ "if itest ${filesize} > 0; then " \ "mmc dev ${mmcdev}; mmc rescan; " \ - "setexpr blkc ${filesize} / 0x200; " \ - "setexpr blkc ${blkc} + 1; " \ + "setexpr blkc ${filesize} + 0x1ff; " \ + "setexpr blkc ${blkc} / 0x200; " \ "if itest ${blkc} <= ${fdt_size}; then " \ "mmc write ${loadaddr} ${fdt_start} ${blkc}; " \ "fi; " \ -- cgit v0.10.2 From dc05e47a10b11f4266e3a41df96748d486193e6d Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Fri, 3 Feb 2017 16:14:03 +0100 Subject: tqma6: [cosmetic] sanitize environment defines Signed-off-by: Markus Niebel diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 9225bc1..1c0a762 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -291,7 +291,7 @@ "uboot=u-boot.imx\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "fdt_addr="__stringify(TQMA6_FDT_ADDRESS)"\0" \ - "console=" CONSOLE_DEV "\0" \ + "console=" CONSOLE_DEV "\0" \ "cma_size="__stringify(TQMA6_CMA_SIZE)"\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ -- cgit v0.10.2