Skip to contentSkip to conversation

board: toradex: prepare and add colibri imx6ull 1gb (emmc) support

PATCH New Marcel Ziswiler 2 participants 11 messages Oct 6, 2021 – Oct 20, 2021

Subsystems (3)

v2 of 4 New Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover board: toradex: prepare and add colibri imx6ull 1gb (emmc) support

From: Marcel Ziswiler <[email protected]>

Some preparatory steps concerning tdx-cfg-block including a fix for the interactive mode IT handling and adding them new SKUs and then adding initial support for the Toradex Colibri iMX6ULL 1GB (eMMC) V1.1A module. They are now strapped to boot from eFuses which are factory fused to properly boot from their on-module eMMC.

Functionality wise the following is known to be working:
- 4-bit MMC/SD card slot
- 8-bit eMMC (fused default boot)
- bmode usb (imx_usb or uuu e.g. as used by the Toradex Easy Installer)
- Ethernet
- GPIOs
- I2C
- parallel RGB display
- USB device (e.g. for ums)
- USB host (e.g. for storage devices)

U-Boot 2021.10-rc1-00128-g4877bdab7e6 (Aug 16 2021 - 13:59:21 +0200)

CPU:   Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 59C
Reset cause: WDOG
DRAM:  1 GiB
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6ULL 1GB IT (eMMC) V1.1A, Serial# 06906494
Net:   eth1: ethernet@20b4000
Hit any key to stop autoboot:  0

Colibri iMX6ULL #

Changes in v2:
- Re-based.

Denys Drozdov (1):
toradex: configblock: fix interactive mode it handling

Marcel Ziswiler (2):
toradex: take over maintainership
toradex: tdx-cfg-block: add new i.mx 6ull and 8m plus skus

Max Krummenacher (1):
colibri-imx6ull: add emmc variant

Philippe Schenker (1):
colibri-imx6ull: imximage.cfg: integrate new 1GiB RAM variant

 arch/arm/dts/Makefile                         |  1 +
 arch/arm/dts/imx6ull-colibri-emmc.dts         | 49 +++++++++++
 arch/arm/dts/imx6ull-colibri.dts              | 34 ++++++-
 arch/arm/dts/imx6ull-colibri.dtsi             | 32 +------
 board/toradex/apalis-imx8x/MAINTAINERS        |  2 +-
 board/toradex/apalis_imx6/MAINTAINERS         |  2 +-
 board/toradex/colibri-imx6ull/Kconfig         | 48 +++++++++-
 board/toradex/colibri-imx6ull/MAINTAINERS     |  6 +-
 .../toradex/colibri-imx6ull/colibri-imx6ull.c | 29 +++++-
 board/toradex/colibri-imx6ull/imximage.cfg    | 13 ++-
 board/toradex/colibri_imx6/MAINTAINERS        |  2 +-
 board/toradex/colibri_imx7/MAINTAINERS        |  2 +-
 board/toradex/colibri_t20/MAINTAINERS         |  2 +-
 board/toradex/colibri_t30/MAINTAINERS         |  2 +-
 board/toradex/colibri_vf/MAINTAINERS          |  2 +-
 board/toradex/common/tdx-cfg-block.c          | 34 +++++--
 board/toradex/common/tdx-cfg-block.h          |  5 ++
 board/toradex/verdin-imx8mm/MAINTAINERS       |  2 +-
 configs/colibri-imx6ull-emmc_defconfig        | 88 +++++++++++++++++++
 configs/colibri-imx6ull_defconfig             |  2 +-
 include/configs/colibri-imx6ull.h             | 53 ++++++++---
 21 files changed, 339 insertions(+), 71 deletions(-)
 create mode 100644 arch/arm/dts/imx6ull-colibri-emmc.dts
 create mode 100644 configs/colibri-imx6ull-emmc_defconfig
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 1/5 toradex: take over maintainership

From: Marcel Ziswiler <[email protected]>

Also take over maintainership of remaining Toradex SoMs as Oleksandr has left our company.

CC Oleksandr Suvorov <[email protected]>

---

(no changes since v1)

 board/toradex/apalis-imx8x/MAINTAINERS    | 2 +-
 board/toradex/apalis_imx6/MAINTAINERS     | 2 +-
 board/toradex/colibri-imx6ull/MAINTAINERS | 2 +-
 board/toradex/colibri_imx6/MAINTAINERS    | 2 +-
 board/toradex/colibri_imx7/MAINTAINERS    | 2 +-
 board/toradex/colibri_t20/MAINTAINERS     | 2 +-
 board/toradex/colibri_t30/MAINTAINERS     | 2 +-
 board/toradex/colibri_vf/MAINTAINERS      | 2 +-
 board/toradex/verdin-imx8mm/MAINTAINERS   | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
board/toradex/apalis-imx8x/MAINTAINERS +1 -1
index 52721544476..93d6cdd4742 100644
@@ -1,5 +1,5 @@
 Apalis iMX8X
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	http://developer.toradex.com/software/linux/linux-software
 S:	Maintained
 F:	arch/arm/dts/fsl-imx8x-apalis.dts
board/toradex/apalis_imx6/MAINTAINERS +1 -1
index fde4d92dc3d..2685457013e 100644
@@ -1,5 +1,5 @@
 Apalis iMX6
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	http://developer.toradex.com/software/linux/linux-software
 W:      https://www.toradex.com/community
 S:	Maintained
board/toradex/colibri-imx6ull/MAINTAINERS +1 -1
index 899b1ff555c..eb491c273d2 100644
@@ -1,5 +1,5 @@
 Colibri iMX6ULL
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	http://developer.toradex.com/software/linux/linux-software
 W:	https://www.toradex.com/community
 S:	Maintained
board/toradex/colibri_imx6/MAINTAINERS +1 -1
index 2cbf65433da..d2ed4147e94 100644
@@ -1,5 +1,5 @@
 Colibri iMX6
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	http://developer.toradex.com/software/linux/linux-software
 W:      https://www.toradex.com/community
 S:	Maintained
board/toradex/colibri_imx7/MAINTAINERS +1 -1
index 3d7d010d8a6..24bec3ef14e 100644
@@ -1,5 +1,5 @@
 Colibri iMX7
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	http://developer.toradex.com/software/linux/linux-software
 W:	https://www.toradex.com/community
 S:	Maintained
board/toradex/colibri_t20/MAINTAINERS +1 -1
index 61fbd2c1e0d..77c2fc39e61 100644
@@ -1,5 +1,5 @@
 COLIBRI_T20
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 S:	Maintained
 F:	board/toradex/colibri_t20/
 F:	include/configs/colibri_t20.h
board/toradex/colibri_t30/MAINTAINERS +1 -1
index ded9e28295f..c2d6587ed02 100644
@@ -1,5 +1,5 @@
 Colibri T30
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 S:	Maintained
 F:	board/toradex/colibri_t30/
 F:	include/configs/colibri_t30.h
board/toradex/colibri_vf/MAINTAINERS +1 -1
index c6627654a25..9f18b9a39d4 100644
@@ -1,5 +1,5 @@
 Colibri VFxx
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	http://developer.toradex.com/software/linux/linux-software
 W:	https://www.toradex.com/community
 S:	Maintained
board/toradex/verdin-imx8mm/MAINTAINERS +1 -1
index 08c370178cc..7965975d0bf 100644
@@ -1,5 +1,5 @@
 Verdin iMX8M Mini
-M:	Oleksandr Suvorov <[email protected]>
+M:	Marcel Ziswiler <[email protected]>
 W:	https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-mini
 S:	Maintained
 F:	arch/arm/dts/imx8mm-verdin.dts
Signature · 1 line
2.26.2
#2 lore raw

PATCH v2 1/5 toradex: take over maintainership

Quoted 5 lines

From: Marcel Ziswiler <[email protected]>
Also take over maintainership of remaining Toradex SoMs as Oleksandr has left our company.

CC Oleksandr Suvorov <[email protected]>

Applied to u-boot-imx, master, thanks !

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: [email protected]
=====================================================================
#3 lore raw

PATCH v2 2/5 toradex: configblock: fix interactive mode it handling

In reply to Marcel Ziswiler

From: Denys Drozdov <[email protected]>

Restore "Is the module an IT version? [y/N]" for "cfgblock create" interactive mode command, which was leading to invalid detection of 0051 Colibri iMX8DX 1GB WB module;

Fixes a5b5ad4d859b ("toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus")

Related-to: ELB-3482

---

(no changes since v1)

 board/toradex/common/tdx-cfg-block.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
board/toradex/common/tdx-cfg-block.c +4 -1
index fe47cddad80..ad267812267 100644
@@ -368,7 +368,10 @@ static int get_cfgblock_interactive(void)
 	if (cpu_is_pxa27x())
 		sprintf(message, "Is the module the 312 MHz version? [y/N] ");
 	else
-		it = 'y';
+		sprintf(message, "Is the module an IT version? [y/N] ");
+
+	len = cli_readline(message);
+	it = console_buffer[0];
 
 #if defined(CONFIG_TARGET_APALIS_IMX8) || \
 		defined(CONFIG_TARGET_APALIS_IMX8X) || \
Signature · 1 line
2.26.2
#4 lore raw

PATCH v2 2/5 toradex: configblock: fix interactive mode it handling

Quoted 8 lines

From: Denys Drozdov <[email protected]>
Restore "Is the module an IT version? [y/N]" for "cfgblock create" interactive mode command, which was leading to invalid detection of 0051 Colibri iMX8DX 1GB WB module;

Fixes a5b5ad4d859b ("toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus")

Related-to: ELB-3482

Applied to u-boot-imx, master, thanks !

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: [email protected]
=====================================================================
#5 lore raw

PATCH v2 3/5 toradex: tdx-cfg-block: add new i.mx 6ull and 8m plus skus

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Add new i.MX 6ULL and 8M Plus SKUs to ConfigBlock handling:

0062: Colibri iMX6ULL 1GB IT (eMMC)

0063: Verdin iMX8M Plus Quad 4GB IT

0064: Verdin iMX8M Plus Quad 2GB Wi-Fi / BT IT

0065: Verdin iMX8M Plus QuadLite 1GB IT

0066: Verdin iMX8M Plus Quad 8GB Wi-Fi / BT

---

(no changes since v1)

 board/toradex/common/tdx-cfg-block.c | 29 ++++++++++++++++++++++++----
 board/toradex/common/tdx-cfg-block.h |  5 +++++
 2 files changed, 30 insertions(+), 4 deletions(-)
board/toradex/common/tdx-cfg-block.c +25 -4
index ad267812267..7cadd05c0a7 100644
@@ -145,6 +145,11 @@ const char * const toradex_modules[] = {
 	[59] = "Verdin iMX8M Mini Quad 2GB IT",
 	[60] = "Verdin iMX8M Mini DualLite 1GB WB IT",
 	[61] = "Verdin iMX8M Plus Quad 2GB",
+	[62] = "Colibri iMX6ULL 1GB IT (eMMC)",
+	[63] = "Verdin iMX8M Plus Quad 4GB IT",
+	[64] = "Verdin iMX8M Plus Quad 2GB Wi-Fi / BT IT",
+	[65] = "Verdin iMX8M Plus QuadLite 1GB IT",
+	[66] = "Verdin iMX8M Plus Quad 8GB Wi-Fi / BT",
 };
 
 const char * const toradex_carrier_boards[] = {
@@ -415,7 +420,10 @@ static int get_cfgblock_interactive(void)
 			if (wb == 'y' || wb == 'Y')
 				tdx_hw_tag.prodid = COLIBRI_IMX6ULL_WIFI_BT_IT;
 			else
-				tdx_hw_tag.prodid = COLIBRI_IMX6ULL_IT;
+				if (gd->ram_size == 0x20000000)
+					tdx_hw_tag.prodid = COLIBRI_IMX6ULL_IT;
+				else
+					tdx_hw_tag.prodid = COLIBRI_IMX6ULL_IT_EMMC;
 		} else {
 			if (wb == 'y' || wb == 'Y')
 				tdx_hw_tag.prodid = COLIBRI_IMX6ULL_WIFI_BT;
@@ -424,7 +432,10 @@ static int get_cfgblock_interactive(void)
 		}
 #endif
 	} else if (!strcmp("imx7d", soc))
-		tdx_hw_tag.prodid = COLIBRI_IMX7D;
+		if (gd->ram_size == 0x20000000)
+			tdx_hw_tag.prodid = COLIBRI_IMX7D;
+		else
+			tdx_hw_tag.prodid = COLIBRI_IMX7D_EMMC;
 	else if (!strcmp("imx7s", soc))
 		tdx_hw_tag.prodid = COLIBRI_IMX7S;
 	else if (is_cpu_type(MXC_CPU_IMX8QM)) {
@@ -474,11 +485,21 @@ static int get_cfgblock_interactive(void)
 			tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
 	} else if (is_cpu_type(MXC_CPU_IMX8MN)) {
 		tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
+	} else if (is_cpu_type(MXC_CPU_IMX8MPL)) {
+		tdx_hw_tag.prodid = VERDIN_IMX8MPQL_IT;
 	} else if (is_cpu_type(MXC_CPU_IMX8MP)) {
 		if (wb == 'y' || wb == 'Y')
-			tdx_hw_tag.prodid = VERDIN_IMX8MPQ_WIFI_BT_IT;
+			if (gd->ram_size == 0x80000000)
+				tdx_hw_tag.prodid = VERDIN_IMX8MPQ_2GB_WIFI_BT_IT;
+			else if (gd->ram_size == 0x200000000)
+				tdx_hw_tag.prodid = VERDIN_IMX8MPQ_8GB_WIFI_BT;
+			else
+				tdx_hw_tag.prodid = VERDIN_IMX8MPQ_WIFI_BT_IT;
 		else
-			tdx_hw_tag.prodid = VERDIN_IMX8MPQ;
+			if (it == 'y' || it == 'Y')
+				tdx_hw_tag.prodid = VERDIN_IMX8MPQ_IT;
+			else
+				tdx_hw_tag.prodid = VERDIN_IMX8MPQ;
 	} else if (!strcmp("tegra20", soc)) {
 		if (it == 'y' || it == 'Y')
 			if (gd->ram_size == 0x10000000)
board/toradex/common/tdx-cfg-block.h +5 -0
index 9debd5f0462..ddcf6997480 100644
@@ -82,6 +82,11 @@ enum {
 	VERDIN_IMX8MMQ_IT,
 	VERDIN_IMX8MMDL_WIFI_BT_IT, /* 60 */
 	VERDIN_IMX8MPQ,
+	COLIBRI_IMX6ULL_IT_EMMC,
+	VERDIN_IMX8MPQ_IT,
+	VERDIN_IMX8MPQ_2GB_WIFI_BT_IT,
+	VERDIN_IMX8MPQL_IT, /* 65 */
+	VERDIN_IMX8MPQ_8GB_WIFI_BT,
 };
 
 enum {
Signature · 1 line
2.26.2
#6 lore raw

PATCH v2 3/5 toradex: tdx-cfg-block: add new i.mx 6ull and 8m plus skus

Quoted 8 lines

From: Marcel Ziswiler <[email protected]> Add new i.MX 6ULL and 8M Plus SKUs to ConfigBlock handling:
0062: Colibri iMX6ULL 1GB IT (eMMC)
0063: Verdin iMX8M Plus Quad 4GB IT
0064: Verdin iMX8M Plus Quad 2GB Wi-Fi / BT IT 0065: Verdin iMX8M Plus QuadLite 1GB IT
0066: Verdin iMX8M Plus Quad 8GB Wi-Fi / BT

Applied to u-boot-imx, master, thanks !

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: [email protected]
=====================================================================
#7 lore raw

PATCH v2 4/5 colibri-imx6ull: imximage.cfg: integrate new 1GiB RAM variant

In reply to Marcel Ziswiler

From: Philippe Schenker <[email protected]>

Integrate new Toradex SKU 0062 Colibri iMX6ULL 1GB IT. This commit basically adjusts three parameters of the RAM settings:

Increase density from 4Gb to 8Gb
Increase ROW address from 15 to 16
Increase tRFC (refresh command time) from 260 to 350

This timing is valid for all Toradex Colibri iMX6ULL SKUs

Related-to: ELB-4055, ELB-4057

---

(no changes since v1)

 board/toradex/colibri-imx6ull/imximage.cfg | 13 +++++--------
 include/configs/colibri-imx6ull.h          |  2 +-
 2 files changed, 6 insertions(+), 9 deletions(-)
board/toradex/colibri-imx6ull/imximage.cfg +5 -8
index 8d869d9f79e..e162cff90f0 100644
@@ -83,16 +83,14 @@ DATA 4 0x021B08C0 0x00944009
 DATA 4 0x021B08b8 0x00000800
 DATA 4 0x021B0004 0x0002002D
 DATA 4 0x021B0008 0x1B333030
-DATA 4 0x021B000C 0x676B52F3
+DATA 4 0x021B000C 0x8B8F52F3
 DATA 4 0x021B0010 0xB66D0B63
 DATA 4 0x021B0014 0x01FF00DB
 DATA 4 0x021B0018 0x00201740
-DATA 4 0x021B001C 0x00008000
 DATA 4 0x021B002C 0x000026D2
-DATA 4 0x021B0030 0x006B1023
-DATA 4 0x021B0040 0x0000004F
-DATA 4 0x021B0000 0x84180000
-DATA 4 0x021B0890 0x00400000
+DATA 4 0x021B0030 0x008F1023
+DATA 4 0x021B0040 0x0000005F
+DATA 4 0x021B0000 0x85180000
 DATA 4 0x021B001C 0x02008032
 DATA 4 0x021B001C 0x00008033
 DATA 4 0x021B001C 0x00048031
@@ -100,7 +98,6 @@ DATA 4 0x021B001C 0x15208030
 DATA 4 0x021B001C 0x04008040
 DATA 4 0x021B0020 0x00000800
 DATA 4 0x021B0818 0x00000227
-DATA 4 0x021B0004 0x0002552D
+DATA 4 0x021B0004 0x0002556D
 DATA 4 0x021B0404 0x00011006
 DATA 4 0x021B001C 0x00000000
-
include/configs/colibri-imx6ull.h +1 -1
index d95c838eeb9..5aa42928bce 100644
@@ -13,7 +13,7 @@
 #include "mx6_common.h"
 #define CONFIG_IOMUX_LPSR
 
-#define PHYS_SDRAM_SIZE			SZ_512M
+#define PHYS_SDRAM_SIZE			SZ_1G
 
 /* ENET1 */
 #define IMX_FEC_BASE			ENET2_BASE_ADDR
Signature · 1 line
2.26.2
#8 lore raw

PATCH v2 4/5 colibri-imx6ull: imximage.cfg: integrate new 1GiB RAM variant

Quoted 10 lines

From: Philippe Schenker <[email protected]> Integrate new Toradex SKU 0062 Colibri iMX6ULL 1GB IT. This commit basically adjusts three parameters of the RAM settings:
Increase density from 4Gb to 8Gb
Increase ROW address from 15 to 16
Increase tRFC (refresh command time) from 260 to 350 This timing is valid for all Toradex Colibri iMX6ULL SKUs
Related-to: ELB-4055, ELB-4057

Applied to u-boot-imx, master, thanks !

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: [email protected]
=====================================================================
#9 lore raw

PATCH v2 5/5 colibri-imx6ull: add emmc variant

In reply to Marcel Ziswiler

From: Max Krummenacher <[email protected]>

Add code to build the eMMC variant of the Colibri iMX6ULL, i.e. the 'Colibri iMX6ULL 1GB' which has a eMMC instead of the raw NAND used on other SKUs.

Related-to: ELB-4056, ELB-4057

---

Changes in v2:
- Re-based.

 arch/arm/dts/Makefile                         |  1 +
 arch/arm/dts/imx6ull-colibri-emmc.dts         | 49 +++++++++++
 arch/arm/dts/imx6ull-colibri.dts              | 34 ++++++-
 arch/arm/dts/imx6ull-colibri.dtsi             | 32 +------
 board/toradex/colibri-imx6ull/Kconfig         | 48 +++++++++-
 board/toradex/colibri-imx6ull/MAINTAINERS     |  4 +-
 .../toradex/colibri-imx6ull/colibri-imx6ull.c | 29 +++++-
 configs/colibri-imx6ull-emmc_defconfig        | 88 +++++++++++++++++++
 configs/colibri-imx6ull_defconfig             |  2 +-
 include/configs/colibri-imx6ull.h             | 51 ++++++++---
 10 files changed, 290 insertions(+), 48 deletions(-)
 create mode 100644 arch/arm/dts/imx6ull-colibri-emmc.dts
 create mode 100644 configs/colibri-imx6ull-emmc_defconfig
arch/arm/dts/Makefile +1 -0
index 9438bf735aa..ab0340ccd5d 100644
@@ -820,6 +820,7 @@ dtb-$(CONFIG_MX6UL) += \
 dtb-$(CONFIG_MX6ULL) += \
 	imx6ull-14x14-evk.dtb \
 	imx6ull-colibri.dtb \
+	imx6ull-colibri-emmc.dtb \
 	imx6ull-myir-mys-6ulx-eval.dtb \
 	imx6ull-seeed-npi-imx6ull-dev-board.dtb \
 	imx6ull-phytec-segin-ff-rdk-emmc.dtb \
arch/arm/dts/imx6ull-colibri-emmc.dts new file +49 -0

49 lines not on this page · raw message

arch/arm/dts/imx6ull-colibri.dts +33 -1
index 15338a1ae3d..dbe3e0206e5 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Copyright 2018-2019 Toradex AG
+ * Copyright 2018-2021 Toradex AG
  */
 
 #include "imx6ull-colibri.dtsi"
@@ -10,3 +10,35 @@
 	model = "Toradex Colibri iMX6ULL";
 	compatible = "toradex,colibri-imx6ull", "fsl,imx6ull";
 };
+
+/* NAND */
+&gpmi {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl_gpmi_nand: gpmi-nand-grp {
+		fsl,pins = <
+			MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00	0x100a9
+			MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01	0x100a9
+			MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02	0x100a9
+			MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03	0x100a9
+			MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04	0x100a9
+			MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05	0x100a9
+			MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06	0x100a9
+			MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07	0x100a9
+			MX6UL_PAD_NAND_CLE__RAWNAND_CLE		0x100a9
+			MX6UL_PAD_NAND_ALE__RAWNAND_ALE		0x100a9
+			MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B	0x100a9
+			MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B	0x100a9
+			MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B	0x100a9
+			MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B	0x100a9
+		>;
+	};
+};
arch/arm/dts/imx6ull-colibri.dtsi +1 -31
index b7bf79f28cb..1fa9d10412e 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Copyright 2019 Toradex AG
+ * Copyright 2019-2021 Toradex AG
  */
 
 /dts-v1/;
@@ -92,17 +92,6 @@
 	};
 };
 
-/* NAND */
-&gpmi {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_gpmi_nand>;
-	nand-on-flash-bbt;
-	nand-ecc-mode = "hw";
-	nand-ecc-strength = <8>;
-	nand-ecc-step-size = <512>;
-	status = "okay";
-};
-
 /*
  * I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board)
  */
@@ -340,25 +329,6 @@
 		>;
 	};
 
-	pinctrl_gpmi_nand: gpmi-nand-grp {
-		fsl,pins = <
-			MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00	0x100a9
-			MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01	0x100a9
-			MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02	0x100a9
-			MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03	0x100a9
-			MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04	0x100a9
-			MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05	0x100a9
-			MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06	0x100a9
-			MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07	0x100a9
-			MX6UL_PAD_NAND_CLE__RAWNAND_CLE		0x100a9
-			MX6UL_PAD_NAND_ALE__RAWNAND_ALE		0x100a9
-			MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B	0x100a9
-			MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B	0x100a9
-			MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B	0x100a9
-			MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B	0x100a9
-		>;
-	};
-
 	pinctrl_i2c1: i2c1-grp {
 		fsl,pins = <
 			MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0
board/toradex/colibri-imx6ull/Kconfig +47 -1

69 lines not on this page · raw message

board/toradex/colibri-imx6ull/MAINTAINERS +3 -1
index eb491c273d2..500c787b8e5 100644
@@ -4,8 +4,10 @@ W:	http://developer.toradex.com/software/linux/linux-software
 W:	https://www.toradex.com/community
 S:	Maintained
 F:	arch/arm/dts/imx6ull-colibri.dts
-F:	arch/arm/dts/imx6ull-colibri-u-boot.dtsi
 F:	arch/arm/dts/imx6ull-colibri.dtsi
+F:	arch/arm/dts/imx6ull-colibri-emmc.dts
+F:	arch/arm/dts/imx6ull-colibri-u-boot.dtsi
 F:	board/toradex/colibri-imx6ull/
 F:	configs/colibri-imx6ull_defconfig
+F:	configs/colibri-imx6ull-emmc_defconfig
 F:	include/configs/colibri-imx6ull.h
board/toradex/colibri-imx6ull/colibri-imx6ull.c +27 -2
index 01f5561596e..954498d5e95 100644
@@ -43,6 +43,14 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define NAND_PAD_READY0_CTRL (PAD_CTL_DSE_48ohm | PAD_CTL_PUS_22K_UP)
 
+#define FLASH_DETECTION_CTRL (PAD_CTL_HYS | PAD_CTL_PUE)
+#define FLASH_DET_GPIO	IMX_GPIO_NR(4, 1)
+static const iomux_v3_cfg_t flash_detection_pads[] = {
+	MX6_PAD_NAND_WE_B__GPIO4_IO01 | MUX_PAD_CTRL(FLASH_DETECTION_CTRL),
+};
+
+static bool is_emmc;
+
 int dram_init(void)
 {
 	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -59,7 +67,7 @@ static void setup_gpmi_nand(void)
 #endif /* CONFIG_NAND_MXS */
 
 #ifdef CONFIG_DM_VIDEO
-static iomux_v3_cfg_t const backlight_pads[] = {
+static const iomux_v3_cfg_t backlight_pads[] = {
 	/* Backlight On */
 	MX6_PAD_JTAG_TMS__GPIO1_IO11		| MUX_PAD_CTRL(NO_PAD_CTRL),
 	/* Backlight PWM<A> (multiplexed pin) */
@@ -120,6 +128,16 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
+	/*
+	 * Enable GPIO on NAND_WE_B/eMMC_RST with 100k pull-down. eMMC_RST
+	 * is pulled high with 4.7k for eMMC devices. This allows to reliably
+	 * detect eMMC/NAND flash
+	 */
+	imx_iomux_v3_setup_multiple_pads(flash_detection_pads, ARRAY_SIZE(flash_detection_pads));
+	gpio_request(FLASH_DET_GPIO, "flash-detection-gpio");
+	is_emmc = gpio_get_value(FLASH_DET_GPIO);
+	gpio_free(FLASH_DET_GPIO);
+
 #ifdef CONFIG_FEC_MXC
 	setup_fec();
 #endif
@@ -148,8 +166,15 @@ int board_late_init(void)
 	 * Wi-Fi/Bluetooth make sure we use the -wifi device tree.
 	 */
 	if (tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT_IT ||
-	    tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT)
+	    tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT) {
 		env_set("variant", "-wifi");
+	} else {
+		if (is_emmc)
+			env_set("variant", "-emmc");
+	}
+#else
+	if (is_emmc)
+		env_set("variant", "-emmc");
 #endif
 
 	/*
configs/colibri-imx6ull-emmc_defconfig new file +88 -0

88 lines not on this page · raw message

configs/colibri-imx6ull_defconfig +1 -1
index f5fd4815d45..ec75c1dede3 100644
@@ -10,6 +10,7 @@ CONFIG_MX6ULL=y
 CONFIG_TARGET_COLIBRI_IMX6ULL=y
 CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_DM_GPIO=y
+CONFIG_TARGET_COLIBRI_IMX6ULL_NAND=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6ull-colibri"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
@@ -71,7 +72,6 @@ CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
-CONFIG_NAND_MXS=y
 CONFIG_NAND_MXS_DT=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_PHYLIB=y
include/configs/colibri-imx6ull.h +40 -11

104 lines not on this page · raw message

Signature · 1 line
2.26.2
#10 lore raw

PATCH v2 5/5 colibri-imx6ull: add emmc variant

Quoted 7 lines

From: Max Krummenacher <[email protected]> Add code to build the eMMC variant of the Colibri iMX6ULL, i.e. the 'Colibri iMX6ULL 1GB' which has a eMMC instead of the raw NAND used on other SKUs.
Related-to: ELB-4056, ELB-4057

Applied to u-boot-imx, master, thanks !

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: [email protected]
=====================================================================