Skip to contentSkip to conversation

Pending patches for Congatec QMX6 SPL support

PATCH New Otavio Salvador 3 participants 10 messages Sep 18, 2015 – Sep 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Pending patches for Congatec QMX6 SPL support

This patchset includes all changes we have pending for proper SPL support and board revamp.

Otavio Salvador (3):
cgtqmx6eval: Add fastboot support
cgtqmx6eval: Add SPL support
iomux-v3: Take MX6D in consideration for imx_iomux_v3_setup_pad()

 arch/arm/cpu/armv7/mx6/Kconfig                     |   3 +
 arch/arm/include/asm/imx-common/iomux-v3.h         |   2 +-
 board/congatec/cgtqmx6eval/README                  |  78 ++-
 board/congatec/cgtqmx6eval/cgtqmx6eval.c           | 573 +++++++++++++++++----
 board/congatec/cgtqmx6eval/imximage.cfg            | 143 -----
 ...gtqmx6qeval_defconfig => cgtqmx6eval_defconfig} |   5 +-
 include/configs/cgtqmx6eval.h                      |  27 +-
 7 files changed, 569 insertions(+), 262 deletions(-)
 delete mode 100644 board/congatec/cgtqmx6eval/imximage.cfg
 rename configs/{cgtqmx6qeval_defconfig => cgtqmx6eval_defconfig} (57%)
Signature · 1 line
2.5.2
#1 lore raw

PATCH 1/3 cgtqmx6eval: Add fastboot support

Tested basic fastboot commands, such as:

On the U-boot prompt:

=> fastboot 0

On the host PC:

$ fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2015.10-rc2-09654-g8f41d27
finished. total time: 0.000s
$ fastboot reboot -i 0x0525 --> board reboots fine.

---

 include/configs/cgtqmx6eval.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/configs/cgtqmx6eval.h +6 -0
index 613a4fb..45643d8 100644
@@ -89,6 +89,12 @@
 #define CONFIG_G_DNL_PRODUCT_NUM	0xa4a5
 #define CONFIG_G_DNL_MANUFACTURER	"Congatec"
 
+#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
+
 /* Framebuffer */
 #define CONFIG_VIDEO
 #define CONFIG_VIDEO_IPUV3
Signature · 1 line
2.5.2
reviewer
#2 lore raw

PATCH 1/3 cgtqmx6eval: Add fastboot support

Quoted 8 lines · Otavio Salvador

Tested basic fastboot commands, such as:

On the U-boot prompt:

=> fastboot 0

On the host PC:

Quoted 7 lines
$ fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2015.10-rc2-09654-g8f41d27
finished. total time: 0.000s
$ fastboot reboot -i 0x0525 --> board reboots fine.
#3 lore raw

PATCH 2/3 cgtqmx6eval: Add SPL support

In reply to Otavio Salvador

Congatec has several MX6 boards based on quad, dual, dual-lite and solo.

Add SPL support so that all the variants can be supported.

---

 arch/arm/cpu/armv7/mx6/Kconfig                     |   3 +
 board/congatec/cgtqmx6eval/README                  |  78 ++-
 board/congatec/cgtqmx6eval/cgtqmx6eval.c           | 573 +++++++++++++++++----
 board/congatec/cgtqmx6eval/imximage.cfg            | 143 -----
 ...gtqmx6qeval_defconfig => cgtqmx6eval_defconfig} |   5 +-
 include/configs/cgtqmx6eval.h                      |  21 +-
 6 files changed, 562 insertions(+), 261 deletions(-)
 delete mode 100644 board/congatec/cgtqmx6eval/imximage.cfg
 rename configs/{cgtqmx6qeval_defconfig => cgtqmx6eval_defconfig} (57%)
arch/arm/cpu/armv7/mx6/Kconfig +3 -0
index 0b02e9e..9ee509e 100644
@@ -44,6 +44,9 @@ config TARGET_ARISTAINETOS2B
 
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
+	select SUPPORT_SPL
+	select DM
+	select DM_THERMAL
 
 config TARGET_CM_FX6
 	bool "CM-FX6"
board/congatec/cgtqmx6eval/README +60 -18

88 lines not on this page · raw message

board/congatec/cgtqmx6eval/cgtqmx6eval.c +476 -97

692 lines not on this page · raw message

board/congatec/cgtqmx6eval/imximage.cfg deleted +0 -143

143 lines not on this page · raw message

configs/cgtqmx6eval_defconfig renamed from configs/cgtqmx6qeval_defconfig +3 -2
similarity index 57%
rename from configs/cgtqmx6qeval_defconfig
rename to configs/cgtqmx6eval_defconfig
index 0289a3f..2765aa2 100644
@@ -1,10 +1,11 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_CGTQMX6EVAL=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/congatec/cgtqmx6eval/imximage.cfg,MX6Q"
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6QDL"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SYS_PROMPT="CGT-QMX6-Quad U-Boot > "
+CONFIG_SYS_PROMPT="CGT-QMX6 U-Boot > "
 CONFIG_DM=y
 CONFIG_DM_THERMAL=y
include/configs/cgtqmx6eval.h +20 -1
index 45643d8..02344fe 100644
@@ -17,6 +17,16 @@
 
 #define CONFIG_MACH_TYPE	4122
 
+#ifdef CONFIG_SPL
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_MMC_SUPPORT
+#define CONFIG_SPL_SPI_SUPPORT
+#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SYS_SPI_U_BOOT_OFFS	(64 * 1024)
+#define CONFIG_SPL_SPI_LOAD
+#include "imx6_spl.h"
+#endif
+
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
 
@@ -144,10 +154,11 @@
 #define CONFIG_MMCROOT		"/dev/mmcblk0p2"
 #define CONFIG_SYS_MMC_ENV_DEV		0
 
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"script=boot.scr\0" \
 	"image=zImage\0" \
-	"fdtfile=imx6q-qmx6.dtb\0" \
+	"fdtfile=undefined\0" \
 	"fdt_addr_r=0x18000000\0" \
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
@@ -192,6 +203,13 @@
 		"else " \
 			"bootz; " \
 		"fi;\0" \
+	"findfdt="\
+		"if test $board_rev = MX6Q ; then " \
+			"setenv fdtfile imx6q-qmx6.dtb; fi; " \
+		"if test $board_rev = MX6DL ; then " \
+			"setenv fdtfile imx6dl-qmx6.dtb; fi; " \
+		"if test $fdtfile = undefined; then " \
+			"echo WARNING: Could not determine dtb to use; fi; \0" \
 	"netargs=setenv bootargs console=${console},${baudrate} " \
 		"root=/dev/nfs " \
 		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
@@ -218,6 +236,7 @@
 		"fi;\0" \
 
 #define CONFIG_BOOTCOMMAND \
+	"run findfdt; " \
 	"mmc dev ${mmcdev};" \
 	"if mmc rescan; then " \
 		"if run loadbootscript; then " \
Signature · 1 line
2.5.2
#5 lore raw

PATCH 2/3 cgtqmx6eval: Add SPL support

In reply to Otavio Salvador

Hi Otavio,

Quoted 7 lines · Otavio Salvador

Congatec has several MX6 boards based on quad, dual, dual-lite and solo.

Add SPL support so that all the variants can be supported.

---

Quoted 10 lines
 arch/arm/cpu/armv7/mx6/Kconfig                     |   3 +
 board/congatec/cgtqmx6eval/README                  |  78 ++-
 board/congatec/cgtqmx6eval/cgtqmx6eval.c           | 573 +++++++++++++++++----
 board/congatec/cgtqmx6eval/imximage.cfg            | 143 -----
 ...gtqmx6qeval_defconfig => cgtqmx6eval_defconfig} |   5 +-
 include/configs/cgtqmx6eval.h                      |  21 +-
 6 files changed, 562 insertions(+), 261 deletions(-)
 delete mode 100644 board/congatec/cgtqmx6eval/imximage.cfg
 rename configs/{cgtqmx6qeval_defconfig => cgtqmx6eval_defconfig} (57%)

It is waiting until SPI-NOR patches are applied by Jagan.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================
#6 lore raw

PATCH 3/3 iomux-v3: Take MX6D in consideration for imx_iomux_v3_setup_pad()

In reply to Otavio Salvador

We should also take MX6D option in consideration when defining imx_iomux_v3_setup_pad().

---

 arch/arm/include/asm/imx-common/iomux-v3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/imx-common/iomux-v3.h +1 -1
index 1a80a96..2e49968 100644
@@ -236,7 +236,7 @@ void imx_iomux_gpio_get_function(unsigned int gpio,
 #if defined(CONFIG_MX6QDL)
 #define IOMUX_PADS(x) (MX6Q_##x), (MX6DL_##x)
 #define SETUP_IOMUX_PAD(def)					\
-if (is_cpu_type(MXC_CPU_MX6Q)) {				\
+if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) {				\
 	imx_iomux_v3_setup_pad(MX6Q_##def);			\
 } else {							\
 	imx_iomux_v3_setup_pad(MX6DL_##def);			\
Signature · 1 line
2.5.2
#8 lore raw

cover Pending patches for Congatec QMX6 SPL support

In reply to Otavio Salvador

Hi Otavio,

Quoted 9 lines · Otavio Salvador

This patchset includes all changes we have pending for proper SPL support and board revamp.

Otavio Salvador (3):
cgtqmx6eval: Add fastboot support
cgtqmx6eval: Add SPL support
iomux-v3: Take MX6D in consideration for imx_iomux_v3_setup_pad()

Quoted 11 lines
 arch/arm/cpu/armv7/mx6/Kconfig                     |   3 +
 arch/arm/include/asm/imx-common/iomux-v3.h         |   2 +-
 board/congatec/cgtqmx6eval/README                  |  78 ++-
 board/congatec/cgtqmx6eval/cgtqmx6eval.c           | 573 +++++++++++++++++----
 board/congatec/cgtqmx6eval/imximage.cfg            | 143 -----
 ...gtqmx6qeval_defconfig => cgtqmx6eval_defconfig} |   5 +-
 include/configs/cgtqmx6eval.h                      |  27 +-
 7 files changed, 569 insertions(+), 262 deletions(-)
 delete mode 100644 board/congatec/cgtqmx6eval/imximage.cfg
 rename configs/{cgtqmx6qeval_defconfig => cgtqmx6eval_defconfig} (57%)

I am applying them. I have also noted that the board is "orphan". What do you mind to take over and set yourself as maintainer ?

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================
#9 lore raw

cover Pending patches for Congatec QMX6 SPL support

Quoted 24 lines · Stefano Babic

Hi Otavio,

Quoted 9 lines · Otavio Salvador

This patchset includes all changes we have pending for proper SPL support and board revamp.

Otavio Salvador (3):
cgtqmx6eval: Add fastboot support
cgtqmx6eval: Add SPL support
iomux-v3: Take MX6D in consideration for imx_iomux_v3_setup_pad()

Quoted 11 lines
 arch/arm/cpu/armv7/mx6/Kconfig                     |   3 +
 arch/arm/include/asm/imx-common/iomux-v3.h         |   2 +-
 board/congatec/cgtqmx6eval/README                  |  78 ++-
 board/congatec/cgtqmx6eval/cgtqmx6eval.c           | 573 +++++++++++++++++----
 board/congatec/cgtqmx6eval/imximage.cfg            | 143 -----
 ...gtqmx6qeval_defconfig => cgtqmx6eval_defconfig} |   5 +-
 include/configs/cgtqmx6eval.h                      |  27 +-
 7 files changed, 569 insertions(+), 262 deletions(-)
 delete mode 100644 board/congatec/cgtqmx6eval/imximage.cfg
 rename configs/{cgtqmx6qeval_defconfig => cgtqmx6eval_defconfig} (57%)
Quoted 2 lines

I am applying them. I have also noted that the board is "orphan". What do you mind to take over and set yourself as maintainer ?

Sorry for noise, I see you already posted a patch.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================