All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config
@ 2018-09-04 13:23 Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 02/13] pico-imx6ul: Convert to SPL Otavio Salvador
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

Instead of keeping a custom environment, use a more generic approach
by switching to disto config.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 configs/pico-imx6ul_defconfig |  2 +
 include/configs/pico-imx6ul.h | 69 ++++++++++-------------------------
 2 files changed, 21 insertions(+), 50 deletions(-)

diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index 59ef7b7f22..3f969a2d6e 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -4,7 +4,9 @@ CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_TARGET_PICO_IMX6UL=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/technexion/pico-imx6ul/imximage.cfg"
+CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
 CONFIG_BOOTDELAY=3
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 80a2d1fbdb..1a148bf1a6 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -52,64 +52,33 @@
 #define CONFIG_SYS_MMC_IMG_LOAD_PART	1
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"script=boot.scr\0" \
 	"image=zImage\0" \
 	"console=ttymxc5\0" \
 	"fdt_high=0xffffffff\0" \
 	"initrd_high=0xffffffff\0" \
-	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"fdt_addr=0x83000000\0" \
-	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
-	"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
+	"fdt_addr_r=0x83000000\0" \
+	"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+	"pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+	"ramdisk_addr_r=0x83000000\0" \
+	"ramdiskaddr=0x83000000\0" \
+	"scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
 	CONFIG_DFU_ENV_SETTINGS \
-	"finduuid=part uuid mmc 0:2 uuid\0" \
+	"finduuid=part uuid mmc 0:1 uuid\0" \
 	"partitions=" \
 		"uuid_disk=${uuid_gpt_disk};" \
-		"name=boot,size=16MiB;name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \
-	"setup_emmc=gpt write mmc 0 $partitions; reset;\0" \
-	"mmcargs=setenv bootargs console=${console},${baudrate} " \
-		"root=PARTUUID=${uuid} rootwait rw\0" \
-	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
-	"mmcboot=echo Booting from mmc ...; " \
-		"run finduuid; " \
-		"run mmcargs; " \
-		"if run loadfdt; then " \
-			"bootz ${loadaddr} - ${fdt_addr}; " \
-		"else " \
-			"echo WARN: Cannot load the DT; " \
-		"fi;\0" \
-	"netargs=setenv bootargs console=${console},${baudrate} " \
-		"root=/dev/nfs " \
-	"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
-		"netboot=echo Booting from net ...; " \
-		"run netargs; " \
-		"if test ${ip_dyn} = yes; then " \
-			"setenv get_cmd dhcp; " \
-		"else " \
-			"setenv get_cmd tftp; " \
-		"fi; " \
-		"${get_cmd} ${image}; " \
-		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
-			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
-				"bootz ${loadaddr} - ${fdt_addr}; " \
-			"else " \
-				"if test ${boot_fdt} = try; then " \
-					"bootz; " \
-				"else " \
-					"echo WARN: Cannot load the DT; " \
-				"fi; " \
-			"fi; " \
-		"else " \
-			"bootz; " \
-		"fi;\0" \
-
-#define CONFIG_BOOTCOMMAND \
-	   "if mmc rescan; then " \
-		   "if run loadimage; then " \
-			   "run mmcboot; " \
-		   "else run netboot; " \
-		   "fi; " \
-	   "else run netboot; fi"
+		"name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \
+	"fastboot_partition_alias_system=rootfs\0" \
+	"setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \
+	BOOTENV
+
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0) \
+	func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
 
 #define CONFIG_SYS_MEMTEST_START	0x80000000
 #define CONFIG_SYS_MEMTEST_END		CONFIG_SYS_MEMTEST_START + SZ_128M
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 02/13] pico-imx6ul: Convert to SPL
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 03/13] pico-imx6ul: Add fastboot support Otavio Salvador
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

There are two versions of imx6ul pico SOMs: one with 256MB and another
one with 512MB of RAM.

Convert to SPL so that both versions can be supported. This patch
doesn't rework the clock initialization to avoid changing the behavior
in this same patch, so it will be cleaned up in future.

Currently only the 256MB is tested/supported.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2:
- add newline after SPDX header
- avoid initializing CCGR7 as UL does not have it
- mention clocks initialization will be cleaned up in future

 arch/arm/mach-imx/mx6/Kconfig         |   1 +
 board/technexion/pico-imx6ul/Makefile |   2 +-
 board/technexion/pico-imx6ul/spl.c    | 115 ++++++++++++++++++++++++++
 configs/pico-imx6ul_defconfig         |  14 +++-
 include/configs/pico-imx6ul.h         |   1 +
 5 files changed, 131 insertions(+), 2 deletions(-)
 create mode 100644 board/technexion/pico-imx6ul/spl.c

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index a2799c436e..06c25bae36 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -402,6 +402,7 @@ config TARGET_OT1200
 config TARGET_PICO_IMX6UL
 	bool "PICO-IMX6UL-EMMC"
 	select MX6UL
+	select SUPPORT_SPL
 
 config TARGET_LITEBOARD
 	bool "Grinn liteBoard (i.MX6UL)"
diff --git a/board/technexion/pico-imx6ul/Makefile b/board/technexion/pico-imx6ul/Makefile
index 8fdb7875ac..b7493df01c 100644
--- a/board/technexion/pico-imx6ul/Makefile
+++ b/board/technexion/pico-imx6ul/Makefile
@@ -2,4 +2,4 @@
 # (C) Copyright 2015 Technexion Ltd.
 # (C) Copyright 2015 Freescale Semiconductor, Inc.
 
-obj-y  := pico-imx6ul.o
+obj-y  := pico-imx6ul.o spl.o
diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c
new file mode 100644
index 0000000000..78c731fe7c
--- /dev/null
+++ b/board/technexion/pico-imx6ul/spl.c
@@ -0,0 +1,115 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <asm/arch/clock.h>
+#include <asm/arch/iomux.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/crm_regs.h>
+#include <asm/arch/mx6ul_pins.h>
+#include <asm/arch/mx6-pins.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
+#include <asm/mach-imx/iomux-v3.h>
+#include <asm/mach-imx/boot_mode.h>
+#include <linux/libfdt.h>
+#include <spl.h>
+
+#if defined(CONFIG_SPL_BUILD)
+#include <asm/arch/mx6-ddr.h>
+
+static struct mx6ul_iomux_grp_regs mx6_grp_ioregs = {
+	.grp_addds = 0x00000030,
+	.grp_ddrmode_ctl = 0x00020000,
+	.grp_b0ds = 0x00000030,
+	.grp_ctlds = 0x00000030,
+	.grp_b1ds = 0x00000030,
+	.grp_ddrpke = 0x00000000,
+	.grp_ddrmode = 0x00020000,
+	.grp_ddr_type = 0x00080000,
+};
+
+static struct mx6ul_iomux_ddr_regs mx6_ddr_ioregs = {
+	.dram_dqm0 = 0x00000030,
+	.dram_dqm1 = 0x00000030,
+	.dram_ras = 0x00000030,
+	.dram_cas = 0x00000030,
+	.dram_odt0 = 0x00000030,
+	.dram_odt1 = 0x00000030,
+	.dram_sdba2 = 0x00000000,
+	.dram_sdclk_0 = 0x00000030,
+	.dram_sdqs0 = 0x00000030,
+	.dram_sdqs1 = 0x00000030,
+	.dram_reset = 0x00000030,
+};
+
+static struct mx6_mmdc_calibration mx6_mmcd_calib = {
+	.p0_mpwldectrl0 = 0x00000000,
+	.p0_mpdgctrl0 = 0x01380134,
+	.p0_mprddlctl = 0x40404244,
+	.p0_mpwrdlctl = 0x40405050,
+};
+
+static struct mx6_ddr_sysinfo ddr_sysinfo = {
+	.dsize		= 0,
+	.cs1_mirror	= 0,
+	.cs_density	= 32,
+	.ncs		= 1,
+	.bi_on		= 1,
+	.rtt_nom	= 1,
+	.rtt_wr		= 0,
+	.ralat		= 5,
+	.walat		= 0,
+	.mif3_mode	= 3,
+	.rst_to_cke	= 0x23,
+	.sde_to_rst	= 0x10,
+	.refsel = 1,
+	.refr = 3,
+};
+
+static struct mx6_ddr3_cfg mem_ddr = {
+	.mem_speed = 1333,
+	.density = 2,
+	.width = 16,
+	.banks = 8,
+	.rowaddr = 14,
+	.coladdr = 10,
+	.pagesz = 2,
+	.trcd = 1350,
+	.trcmin = 4950,
+	.trasmin = 3600,
+};
+
+static void ccgr_init(void)
+{
+	struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
+
+	writel(0xFFFFFFFF, &ccm->CCGR0);
+	writel(0xFFFFFFFF, &ccm->CCGR1);
+	writel(0xFFFFFFFF, &ccm->CCGR2);
+	writel(0xFFFFFFFF, &ccm->CCGR3);
+	writel(0xFFFFFFFF, &ccm->CCGR4);
+	writel(0xFFFFFFFF, &ccm->CCGR5);
+	writel(0xFFFFFFFF, &ccm->CCGR6);
+}
+
+static void spl_dram_init(void)
+{
+	mx6ul_dram_iocfg(mem_ddr.width, &mx6_ddr_ioregs, &mx6_grp_ioregs);
+	mx6_dram_cfg(&ddr_sysinfo, &mx6_mmcd_calib, &mem_ddr);
+}
+
+void board_init_f(ulong dummy)
+{
+	ccgr_init();
+	arch_cpu_init();
+	board_early_init_f();
+	timer_init();
+	preloader_console_init();
+	spl_dram_init();
+	memset(__bss_start, 0, __bss_end - __bss_start);
+	board_init_r(NULL, 0);
+}
+
+void reset_cpu(ulong addr)
+{
+}
+#endif
diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index 3f969a2d6e..589e67be96 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -1,12 +1,23 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_TARGET_PICO_IMX6UL=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL=y
+CONFIG_SPL_LIBDISK_SUPPORT=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/technexion/pico-imx6ul/imximage.cfg"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_USB_HOST_SUPPORT=y
+CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
@@ -21,6 +32,7 @@ CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_USB_SDP=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 1a148bf1a6..14d5cc3ddb 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -12,6 +12,7 @@
 #include <linux/sizes.h>
 #include "mx6_common.h"
 #include <asm/mach-imx/gpio.h>
+#include "imx6_spl.h"
 
 /* Network support */
 
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 03/13] pico-imx6ul: Add fastboot support
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 02/13] pico-imx6ul: Convert to SPL Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 04/13] pico-imx6ul: Add bmode support Otavio Salvador
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

fastboot tool is a convenient way to flash the eMMC, so
add support for it.

Examples of usages:

On the pico-imx6ul U-Boot prompt:

=> fastboot 0

On the Linux PC connected via USB:

1. Retrieving the U-Boot version

$ sudo fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2018.07-rc2-00130-g0881835-dirty
finished. total time: 0.000s

2. Resetting the board

$ sudo fastboot reboot -i 0x0525

(this causes the pico-imx6ul to reboot)

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 configs/pico-imx6ul_defconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index 589e67be96..cae7ded1fa 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -45,6 +45,12 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DFU_MMC=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x82000000
+CONFIG_FASTBOOT_BUF_SIZE=0x10000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FSL_ESDHC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
@@ -56,5 +62,4 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
-CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 04/13] pico-imx6ul: Add bmode support
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 02/13] pico-imx6ul: Convert to SPL Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 03/13] pico-imx6ul: Add fastboot support Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 05/13] pico-imx6ul: Add support for the 512MB module Otavio Salvador
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

The 'bmode' command is helpful for switching the boot media.

In the case of pico-imx6ul there are two possible boot media:
eMMC or USB.

To boot from eMMC:

=> bmode emmc

To boot from USB (via Serial Download Protocol):

=> bmode usb

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 configs/pico-imx6ul_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index cae7ded1fa..daa898fb22 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -9,7 +9,6 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
-# CONFIG_CMD_BMODE is not set
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 05/13] pico-imx6ul: Add support for the 512MB module
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (2 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 04/13] pico-imx6ul: Add bmode support Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file Otavio Salvador
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

Currently only the module with 256MB of RAM is supported.

Add support for the 512MB of RAM variant as well.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 board/technexion/pico-imx6ul/spl.c | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c
index 78c731fe7c..1819722024 100644
--- a/board/technexion/pico-imx6ul/spl.c
+++ b/board/technexion/pico-imx6ul/spl.c
@@ -70,7 +70,6 @@ static struct mx6_ddr3_cfg mem_ddr = {
 	.density = 2,
 	.width = 16,
 	.banks = 8,
-	.rowaddr = 14,
 	.coladdr = 10,
 	.pagesz = 2,
 	.trcd = 1350,
@@ -91,12 +90,34 @@ static void ccgr_init(void)
 	writel(0xFFFFFFFF, &ccm->CCGR6);
 }
 
-static void spl_dram_init(void)
+static void imx6ul_spl_dram_cfg_size(u32 ram_size)
 {
+	if (ram_size == SZ_256M)
+		mem_ddr.rowaddr = 14;
+	else
+		mem_ddr.rowaddr = 15;
+
 	mx6ul_dram_iocfg(mem_ddr.width, &mx6_ddr_ioregs, &mx6_grp_ioregs);
 	mx6_dram_cfg(&ddr_sysinfo, &mx6_mmcd_calib, &mem_ddr);
 }
 
+static void imx6ul_spl_dram_cfg(void)
+{
+	ulong ram_size_test, ram_size = 0;
+
+	for (ram_size = SZ_512M; ram_size >= SZ_256M; ram_size >>= 1) {
+		imx6ul_spl_dram_cfg_size(ram_size);
+		ram_size_test = get_ram_size((long int *)PHYS_SDRAM, ram_size);
+		if (ram_size_test == ram_size)
+			break;
+	}
+
+	if (ram_size < SZ_256M) {
+		puts("ERROR: DRAM size detection failed\n");
+		hang();
+	}
+}
+
 void board_init_f(ulong dummy)
 {
 	ccgr_init();
@@ -104,7 +125,7 @@ void board_init_f(ulong dummy)
 	board_early_init_f();
 	timer_init();
 	preloader_console_init();
-	spl_dram_init();
+	imx6ul_spl_dram_cfg();
 	memset(__bss_start, 0, __bss_end - __bss_start);
 	board_init_r(NULL, 0);
 }
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (3 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 05/13] pico-imx6ul: Add support for the 512MB module Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 14:05   ` Michael Nazzareno Trimarchi
  2018-09-06 13:45   ` [U-Boot] [U-Boot,v2,06/13] " Tom Rini
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 07/13] pico-imx6ul: " Otavio Salvador
                   ` (6 subsequent siblings)
  11 siblings, 2 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

Update the README file to take into accound the switch to SPL.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 board/technexion/pico-imx7d/README | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/board/technexion/pico-imx7d/README b/board/technexion/pico-imx7d/README
index aa9d72c5d1..24eb97e82c 100644
--- a/board/technexion/pico-imx7d/README
+++ b/board/technexion/pico-imx7d/README
@@ -11,7 +11,13 @@ $ make mrproper
 $ make pico-imx7d_defconfig
 $ make
 
-This generates the U-Boot binary called u-boot.imx.
+This generates the SPL and u-boot.img binaries.
+
+1. Loading U-Boot via USB Serial Download Protocol
+
+Note: This method is convenient for development purposes.
+If the eMMC has already a U-Boot flashed with DFU support then
+the user can go to step 2 below in order to update U-Boot.
 
 Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide
 page 3)
@@ -22,11 +28,15 @@ Connect a USB cable between the OTG pico port and the host PC.
 
 Open a terminal program such as minicom.
 
-Copy u-boot.imx to the imx_usb_loader folder.
+Copy SPL and u-boot.img to the imx_usb_loader folder.
+
+Load the SPL binary via USB:
 
-Load u-boot.imx via USB:
+$ sudo ./imx_usb SPL
 
-$ sudo ./imx_usb u-boot.imx
+Load the u-boot.img binary via USB:
+
+$ sudo ./imx_usb u-boot.img
 
 Then U-Boot starts and its messages appear in the console program.
 
@@ -35,16 +45,16 @@ Use the default environment variables:
 => env default -f -a
 => saveenv
 
+2. Flashing U-Boot into the eMMC
+
 Run the DFU agent so we can flash the new images using dfu-util tool:
 
 => dfu 0 mmc 0
 
-Flash SPL into the eMMC:
+Flash SPL and u-boot.img into the eMMC running the following commands on a PC:
 
 $ sudo dfu-util -D SPL -a spl
 
-Flash u-boot.img into the eMMC:
-
 $ sudo dfu-util -D u-boot.img -a u-boot
 
 Remove power from the pico board.
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 07/13] pico-imx6ul: Update the README file
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (4 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 08/13] pico-imx6ul: Sync defconfig with new changes Otavio Salvador
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

Update the README file to take into accound the switch to SPL.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 board/technexion/pico-imx6ul/README | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/board/technexion/pico-imx6ul/README b/board/technexion/pico-imx6ul/README
index 2f66095097..a5415714ee 100644
--- a/board/technexion/pico-imx6ul/README
+++ b/board/technexion/pico-imx6ul/README
@@ -13,7 +13,13 @@ $ make mrproper
 $ make pico-imx6ul_defconfig
 $ make
 
-This will generate the U-Boot binary called u-boot.imx.
+This generates the SPL and u-boot.img binaries.
+
+1. Loading U-Boot via USB Serial Download Protocol
+
+Note: This method is convenient for development purposes.
+If the eMMC has already a U-Boot flashed with DFU support then
+the user can go to step 2 below in order to update U-Boot.
 
 Put pico board in USB download mode (refer to the document
 http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf page 15)
@@ -24,11 +30,15 @@ Connect a USB cable between the OTG pico port and the host PC
 
 Open a terminal program such as minicom
 
-Copy u-boot.imx to the imx_usb_loader folder.
+Copy SPL and u-boot.img to the imx_usb_loader folder.
+
+Load the SPL binary via USB:
 
-Load u-boot.imx via USB:
+$ sudo ./imx_usb SPL
 
-$ sudo ./imx_usb u-boot.imx
+Load the u-boot.img binary via USB:
+
+$ sudo ./imx_usb u-boot.img
 
 Then U-Boot should start and its messages will appear in the console program.
 
@@ -37,12 +47,16 @@ Use the default environment variables:
 => env default -f -a
 => saveenv
 
+2. Flashing U-Boot into the eMMC
+
 Run the DFU command:
 => dfu 0 mmc 0
 
-Transfer u-boot.imx that will be flashed into the eMMC:
+Flash SPL and u-boot.img into the eMMC running the following commands on a PC:
+
+$ sudo dfu-util -D SPL -a spl
 
-$ sudo dfu-util -D u-boot.imx -a boot
+$ sudo dfu-util -D u-boot.img -a u-boot
 
 Then on the U-Boot prompt the following message should be seen after a
 successful upgrade:
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 08/13] pico-imx6ul: Sync defconfig with new changes
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (5 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 07/13] pico-imx6ul: " Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 09/13] pico-imx6ul: Add bootmenu to choose the baseboard Otavio Salvador
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

Due the changes in previous commits, we need to resync the defconfig
to reduce noise in next commits.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 configs/pico-imx6ul_defconfig | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index daa898fb22..56cb4810dc 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -9,43 +9,31 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
-CONFIG_NR_DRAM_BANKS=1
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_NR_DRAM_BANKS=1
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
+CONFIG_BOOTDELAY=3
 CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
+CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
+CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET_SUPPORT=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
-CONFIG_BOOTDELAY=3
-CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
-CONFIG_BOARD_EARLY_INIT_F=y
-CONFIG_HUSH_PARSER=y
-CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_SDP=y
 CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DFU_MMC=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
-CONFIG_FASTBOOT_BUF_ADDR=0x82000000
 CONFIG_FASTBOOT_BUF_SIZE=0x10000000
 CONFIG_FASTBOOT_FLASH=y
 CONFIG_FASTBOOT_FLASH_MMC_DEV=0
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 09/13] pico-imx6ul: Add bootmenu to choose the baseboard
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (6 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 08/13] pico-imx6ul: Sync defconfig with new changes Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 10/13] pico-imx6ul: Improve default DFU settings Otavio Salvador
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

Currently the baseboards do not offer a way to autodetect which one is
in use, so we ask the user if no value has been set.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 configs/pico-imx6ul_defconfig |  5 +++--
 include/configs/pico-imx6ul.h | 10 ++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index 56cb4810dc..3d4063b136 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -13,13 +13,14 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=3
-CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
-CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
+CONFIG_DEFAULT_FDT_FILE="ask"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET_SUPPORT=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_CMD_BOOTMENU=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FLASH is not set
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 14d5cc3ddb..2276f72bae 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -50,6 +50,10 @@
 		"/imx6ul-pico-hobbit.dtb ext4 0 1;" \
 		"rootfs part 0 2\0" \
 
+#define BOOTMENU_ENV \
+	"bootmenu_0=Boot using PICO-Hobbit baseboard=" \
+		"setenv fdtfile imx6ul-pico-hobbit.dtb\0" \
+
 #define CONFIG_SYS_MMC_IMG_LOAD_PART	1
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
@@ -59,6 +63,7 @@
 	"fdt_high=0xffffffff\0" \
 	"initrd_high=0xffffffff\0" \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+	BOOTMENU_ENV \
 	"fdt_addr=0x83000000\0" \
 	"fdt_addr_r=0x83000000\0" \
 	"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
@@ -67,6 +72,11 @@
 	"ramdiskaddr=0x83000000\0" \
 	"scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
 	CONFIG_DFU_ENV_SETTINGS \
+	"findfdt=" \
+		"if test $fdtfile = ask ; then " \
+			"bootmenu -1; fi;" \
+		"if test $fdtfile != ask ; then " \
+			"saveenv; fi;\0" \
 	"finduuid=part uuid mmc 0:1 uuid\0" \
 	"partitions=" \
 		"uuid_disk=${uuid_gpt_disk};" \
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 10/13] pico-imx6ul: Improve default DFU settings
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (7 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 09/13] pico-imx6ul: Add bootmenu to choose the baseboard Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 11/13] pico-imx6ul: Sync README with pico-imx7d Otavio Salvador
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

This rework the DFU settings so it supports the SPL and U-Boot image,
as well as the single partition layout we are using by default.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 include/configs/pico-imx6ul.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 2276f72bae..a510fd1554 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -44,11 +44,12 @@
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
 #define CONFIG_DFU_ENV_SETTINGS \
-	"dfu_alt_info=uboot raw 0x2 0x400 mmcpart 1;" \
-		"boot part 0 1;" \
-		"/zImage ext4 0 1;" \
-		"/imx6ul-pico-hobbit.dtb ext4 0 1;" \
-		"rootfs part 0 2\0" \
+	"dfu_alt_info=" \
+		"spl raw 0x2 0x400 mmcpart 1;" \
+		"u-boot raw 0x8a 0x400 mmcpart 1;" \
+		"/boot/zImage ext4 0 1;" \
+		"/boot/imx6ul-pico-hobbit.dtb ext4 0 1;" \
+		"rootfs part 0 1\0" \
 
 #define BOOTMENU_ENV \
 	"bootmenu_0=Boot using PICO-Hobbit baseboard=" \
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 11/13] pico-imx6ul: Sync README with pico-imx7d
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (8 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 10/13] pico-imx6ul: Improve default DFU settings Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 12/13] pico-imx6ul: Add new pico-hobbit config Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 13/13] pico-imx6ul: Remove CONFIG_FSL_USDHC from .h Otavio Salvador
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 board/technexion/pico-imx6ul/README | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/board/technexion/pico-imx6ul/README b/board/technexion/pico-imx6ul/README
index a5415714ee..66dc977d49 100644
--- a/board/technexion/pico-imx6ul/README
+++ b/board/technexion/pico-imx6ul/README
@@ -22,13 +22,14 @@ If the eMMC has already a U-Boot flashed with DFU support then
 the user can go to step 2 below in order to update U-Boot.
 
 Put pico board in USB download mode (refer to the document
-http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf page 15)
+http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf
+page 15).
 
-Connect a USB to serial adapter between the host PC and pico
+Connect a USB to serial adapter between the host PC and pico.
 
-Connect a USB cable between the OTG pico port and the host PC
+Connect a USB cable between the OTG pico port and the host PC.
 
-Open a terminal program such as minicom
+Open a terminal program such as minicom.
 
 Copy SPL and u-boot.img to the imx_usb_loader folder.
 
@@ -40,7 +41,7 @@ Load the u-boot.img binary via USB:
 
 $ sudo ./imx_usb u-boot.img
 
-Then U-Boot should start and its messages will appear in the console program.
+Then U-Boot starts and its messages appear in the console program.
 
 Use the default environment variables:
 
@@ -49,7 +50,8 @@ Use the default environment variables:
 
 2. Flashing U-Boot into the eMMC
 
-Run the DFU command:
+Run the DFU agent so we can flash the new images using dfu-util tool:
+
 => dfu 0 mmc 0
 
 Flash SPL and u-boot.img into the eMMC running the following commands on a PC:
@@ -58,14 +60,8 @@ $ sudo dfu-util -D SPL -a spl
 
 $ sudo dfu-util -D u-boot.img -a u-boot
 
-Then on the U-Boot prompt the following message should be seen after a
-successful upgrade:
-
-#DOWNLOAD ... OK
-Ctrl+C to exit ...
-
 Remove power from the pico board.
 
-Put pico board into normal boot mode
+Put pico board into normal boot mode.
 
 Power up the board and the new updated U-Boot should boot from eMMC.
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 12/13] pico-imx6ul: Add new pico-hobbit config
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (9 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 11/13] pico-imx6ul: Sync README with pico-imx7d Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 13/13] pico-imx6ul: Remove CONFIG_FSL_USDHC from .h Otavio Salvador
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

The new config skips the boot menu which asks which board is in
use. This is useful to allow direct booting of image without user
iteration.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 board/technexion/pico-imx6ul/MAINTAINERS |  5 +++
 configs/pico-hobbit-imx6ul_defconfig     | 53 ++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 configs/pico-hobbit-imx6ul_defconfig

diff --git a/board/technexion/pico-imx6ul/MAINTAINERS b/board/technexion/pico-imx6ul/MAINTAINERS
index 594a883d15..334847cf71 100644
--- a/board/technexion/pico-imx6ul/MAINTAINERS
+++ b/board/technexion/pico-imx6ul/MAINTAINERS
@@ -5,3 +5,8 @@ S:	Maintained
 F:	board/technexion/pico-imx6ul/
 F:	include/configs/pico-imx6ul.h
 F:	configs/pico-imx6ul_defconfig
+
+Technexion PICO-HOBBIT-IMX6UL
+M:	Otavio Salvador <otavio@ossystems.com.br>
+S:	Maintained
+F:	configs/pico-hobbit-imx6ul_defconfig
diff --git a/configs/pico-hobbit-imx6ul_defconfig b/configs/pico-hobbit-imx6ul_defconfig
new file mode 100644
index 0000000000..362c0a251d
--- /dev/null
+++ b/configs/pico-hobbit-imx6ul_defconfig
@@ -0,0 +1,53 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
+CONFIG_SYS_TEXT_BASE=0x87800000
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_PICO_IMX6UL=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL=y
+CONFIG_SPL_LIBDISK_SUPPORT=y
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
+CONFIG_BOOTDELAY=3
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
+CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_USB_HOST_SUPPORT=y
+CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_DFU=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DFU_MMC=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_SIZE=0x10000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_FSL_ESDHC=y
+CONFIG_PHYLIB=y
+CONFIG_PHY_MICREL=y
+CONFIG_MII=y
+CONFIG_USB=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
+CONFIG_CI_UDC=y
+CONFIG_OF_LIBFDT=y
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 13/13] pico-imx6ul: Remove CONFIG_FSL_USDHC from .h
  2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
                   ` (10 preceding siblings ...)
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 12/13] pico-imx6ul: Add new pico-hobbit config Otavio Salvador
@ 2018-09-04 13:23 ` Otavio Salvador
  11 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 13:23 UTC (permalink / raw)
  To: u-boot

The FSL_USDHC support is now handled by Kconfig and it is enabled on
the respective `defconfig` so the setting in .h is pointless.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 include/configs/pico-imx6ul.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index a510fd1554..94c14a7a43 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -28,7 +28,6 @@
 #define CONFIG_MXC_UART_BASE		UART6_BASE_ADDR
 
 /* MMC Configs */
-#define CONFIG_FSL_USDHC
 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC1_BASE_ADDR
 #define CONFIG_SUPPORT_EMMC_BOOT
 
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file Otavio Salvador
@ 2018-09-04 14:05   ` Michael Nazzareno Trimarchi
  2018-09-04 19:13     ` Otavio Salvador
  2018-09-06 13:45   ` [U-Boot] [U-Boot,v2,06/13] " Tom Rini
  1 sibling, 1 reply; 20+ messages in thread
From: Michael Nazzareno Trimarchi @ 2018-09-04 14:05 UTC (permalink / raw)
  To: u-boot

Hi

On Tue, Sep 4, 2018 at 3:28 PM Otavio Salvador <otavio@ossystems.com.br> wrote:
>
> From: Fabio Estevam <festevam@gmail.com>
>
> Update the README file to take into accound the switch to SPL.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>
> Changes in v2: None
>
>  board/technexion/pico-imx7d/README | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
>

Those change are about imx6ul and you update the readme of imx7d

Michael

> diff --git a/board/technexion/pico-imx7d/README b/board/technexion/pico-imx7d/README
> index aa9d72c5d1..24eb97e82c 100644
> --- a/board/technexion/pico-imx7d/README
> +++ b/board/technexion/pico-imx7d/README
> @@ -11,7 +11,13 @@ $ make mrproper
>  $ make pico-imx7d_defconfig
>  $ make
>
> -This generates the U-Boot binary called u-boot.imx.
> +This generates the SPL and u-boot.img binaries.
> +
> +1. Loading U-Boot via USB Serial Download Protocol
> +
> +Note: This method is convenient for development purposes.
> +If the eMMC has already a U-Boot flashed with DFU support then
> +the user can go to step 2 below in order to update U-Boot.
>
>  Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide
>  page 3)
> @@ -22,11 +28,15 @@ Connect a USB cable between the OTG pico port and the host PC.
>
>  Open a terminal program such as minicom.
>
> -Copy u-boot.imx to the imx_usb_loader folder.
> +Copy SPL and u-boot.img to the imx_usb_loader folder.
> +
> +Load the SPL binary via USB:
>
> -Load u-boot.imx via USB:
> +$ sudo ./imx_usb SPL
>
> -$ sudo ./imx_usb u-boot.imx
> +Load the u-boot.img binary via USB:
> +
> +$ sudo ./imx_usb u-boot.img
>
>  Then U-Boot starts and its messages appear in the console program.
>
> @@ -35,16 +45,16 @@ Use the default environment variables:
>  => env default -f -a
>  => saveenv
>
> +2. Flashing U-Boot into the eMMC
> +
>  Run the DFU agent so we can flash the new images using dfu-util tool:
>
>  => dfu 0 mmc 0
>
> -Flash SPL into the eMMC:
> +Flash SPL and u-boot.img into the eMMC running the following commands on a PC:
>
>  $ sudo dfu-util -D SPL -a spl
>
> -Flash u-boot.img into the eMMC:
> -
>  $ sudo dfu-util -D u-boot.img -a u-boot
>
>  Remove power from the pico board.
> --
> 2.18.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-04 14:05   ` Michael Nazzareno Trimarchi
@ 2018-09-04 19:13     ` Otavio Salvador
  2018-09-05 19:13       ` Otavio Salvador
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2018-09-04 19:13 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 4, 2018 at 11:06 AM Michael Nazzareno Trimarchi
<michael@amarulasolutions.com> wrote:
...
> Those change are about imx6ul and you update the readme of imx7d

Those put them on sync and it is part of our work. I see no reason for
another PR just for a single commit.
--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-04 19:13     ` Otavio Salvador
@ 2018-09-05 19:13       ` Otavio Salvador
  2018-09-06  9:54         ` Stefano Babic
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2018-09-05 19:13 UTC (permalink / raw)
  To: u-boot

Hello Tom and Stefano,

This should be applied for release as it puts the README aligned with
current use. Please consider it.

On Tue, Sep 4, 2018 at 4:13 PM Otavio Salvador <otavio@ossystems.com.br>
wrote:

> On Tue, Sep 4, 2018 at 11:06 AM Michael Nazzareno Trimarchi
> <michael@amarulasolutions.com> wrote:
> ...
> > Those change are about imx6ul and you update the readme of imx7d
>
> Those put them on sync and it is part of our work. I see no reason for
> another PR just for a single commit.
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
>


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-05 19:13       ` Otavio Salvador
@ 2018-09-06  9:54         ` Stefano Babic
  2018-09-06 12:17           ` Otavio Salvador
  0 siblings, 1 reply; 20+ messages in thread
From: Stefano Babic @ 2018-09-06  9:54 UTC (permalink / raw)
  To: u-boot

Hi Otavio,

On 05/09/2018 21:13, Otavio Salvador wrote:
> Hello Tom and Stefano,
> 
> This should be applied for release as it puts the README aligned with
> current use. Please consider it.
> 

You patches look good and I can confirm they are just related to the
pico board. I have no comments at all, and I do not see any reason you
need to change them.  I have set them to go into my (local) next branch.

But patches (V1) were sent after Window was closed (last week) and we
are a quite more restrictive as in the past, so I have not considered to
get them in before release. My last PR was already too late and raises
some new issues and I guess Tom is "quite" releasing. I want to avoid to
push him other stuff just some days before release if they are not
strict important fixes.

Best regards,
Stefano


> On Tue, Sep 4, 2018 at 4:13 PM Otavio Salvador <otavio@ossystems.com.br
> <mailto:otavio@ossystems.com.br>> wrote:
> 
>     On Tue, Sep 4, 2018 at 11:06 AM Michael Nazzareno Trimarchi
>     <michael at amarulasolutions.com <mailto:michael@amarulasolutions.com>>
>     wrote:
>     ...
>     > Those change are about imx6ul and you update the readme of imx7d
> 
>     Those put them on sync and it is part of our work. I see no reason for
>     another PR just for a single commit.
>     --
>     Otavio Salvador                             O.S. Systems
>     http://www.ossystems.com.br        http://code.ossystems.com.br
>     Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
> 
> 
> 
> -- 
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-06  9:54         ` Stefano Babic
@ 2018-09-06 12:17           ` Otavio Salvador
  2018-09-06 13:02             ` Stefano Babic
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2018-09-06 12:17 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 6, 2018 at 6:54 AM Stefano Babic <sbabic@denx.de> wrote:

> On 05/09/2018 21:13, Otavio Salvador wrote:
> > Hello Tom and Stefano,
> >
> > This should be applied for release as it puts the README aligned with
> > current use. Please consider it.
> >
>
> You patches look good and I can confirm they are just related to the
> pico board. I have no comments at all, and I do not see any reason you
> need to change them.  I have set them to go into my (local) next branch.
>

This README update is trivial and Tom can apply it directly.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file
  2018-09-06 12:17           ` Otavio Salvador
@ 2018-09-06 13:02             ` Stefano Babic
  0 siblings, 0 replies; 20+ messages in thread
From: Stefano Babic @ 2018-09-06 13:02 UTC (permalink / raw)
  To: u-boot

On 06/09/2018 14:17, Otavio Salvador wrote:
> 
> 
> On Thu, Sep 6, 2018 at 6:54 AM Stefano Babic <sbabic@denx.de
> <mailto:sbabic@denx.de>> wrote:
> 
>     On 05/09/2018 21:13, Otavio Salvador wrote:
>     > Hello Tom and Stefano,
>     >
>     > This should be applied for release as it puts the README aligned with
>     > current use. Please consider it.
>     >
> 
>     You patches look good and I can confirm they are just related to the
>     pico board. I have no comments at all, and I do not see any reason you
>     need to change them.  I have set them to go into my (local) next branch.
> 
> 
> This README update is trivial and Tom can apply it directly.


Sorry, I thought the whole patchset - of course, README can be applied
directly.

Regards,
Stefano


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [U-Boot,v2,06/13] pico-imx7d: Update the README file
  2018-09-04 13:23 ` [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file Otavio Salvador
  2018-09-04 14:05   ` Michael Nazzareno Trimarchi
@ 2018-09-06 13:45   ` Tom Rini
  1 sibling, 0 replies; 20+ messages in thread
From: Tom Rini @ 2018-09-06 13:45 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 04, 2018 at 10:23:12AM -0300, Otavio Salvador wrote:

> From: Fabio Estevam <festevam@gmail.com>
> 
> Update the README file to take into accound the switch to SPL.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180906/787cbf15/attachment.sig>

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-09-06 13:45 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 13:23 [U-Boot] [PATCH v2 01/13] pico-imx6ul: Convert to distro config Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 02/13] pico-imx6ul: Convert to SPL Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 03/13] pico-imx6ul: Add fastboot support Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 04/13] pico-imx6ul: Add bmode support Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 05/13] pico-imx6ul: Add support for the 512MB module Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 06/13] pico-imx7d: Update the README file Otavio Salvador
2018-09-04 14:05   ` Michael Nazzareno Trimarchi
2018-09-04 19:13     ` Otavio Salvador
2018-09-05 19:13       ` Otavio Salvador
2018-09-06  9:54         ` Stefano Babic
2018-09-06 12:17           ` Otavio Salvador
2018-09-06 13:02             ` Stefano Babic
2018-09-06 13:45   ` [U-Boot] [U-Boot,v2,06/13] " Tom Rini
2018-09-04 13:23 ` [U-Boot] [PATCH v2 07/13] pico-imx6ul: " Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 08/13] pico-imx6ul: Sync defconfig with new changes Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 09/13] pico-imx6ul: Add bootmenu to choose the baseboard Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 10/13] pico-imx6ul: Improve default DFU settings Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 11/13] pico-imx6ul: Sync README with pico-imx7d Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 12/13] pico-imx6ul: Add new pico-hobbit config Otavio Salvador
2018-09-04 13:23 ` [U-Boot] [PATCH v2 13/13] pico-imx6ul: Remove CONFIG_FSL_USDHC from .h Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.