Skip to contentSkip to conversation

imx6ul: Add Engicam Is.IoT MX6UL support

PATCH New Jagan Teki 2 participants 12 messages Feb 24, 2017 – Feb 26, 2017

Subsystems (2)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

v6 cover imx6ul: Add Engicam Is.IoT MX6UL support

From: Jagan Teki <[email protected]>

This patch set support Engicam Is.IoT MX6UL board support.

Changes for v6:
- Remove 'arm: dts: Add MAINTAINERS file' patch
- Rebase to master

Changes for v5:
- Update ccgr_init so-that it can enable required clocks
- Add new patch for dts files include under board MAINTAINERS
- Add new patch for arch/arm/dts/MAINTAINERS file
- Update 'Reviewed-by: Stefano Babic <[email protected]>' tag

Changes for v4:
- Rebase to master

Changes for v3:
- Rebase to master

Changes for v2:
- Skiped eMMC node patch
- Rebase to master

Jagan Teki (10):
configs: imx6: Don't define USDHC2_BASE_ADDR
arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support
arm: dts: imx6ul-isiot: Add I2C nodes
imx6: isiotmx6ul: Add I2C support
arm: dts: imx6ul-isiot: Add FEC node
imx6: isiotmx6ul: Add FEC support
imx6: isiotmx6ul: Add NAND support
imx6: isiotmx6ul: Add nandboot env support
imx6ul: isiotmx6ul: Enable I2C support
i.MX6: engicam: Include dts files under MAINTAINERS

 arch/arm/cpu/armv7/mx6/Kconfig        |  12 ++
 arch/arm/dts/Makefile                 |   4 +-
 arch/arm/dts/imx6ul-isiot-mmc.dts     |  50 ++++++
 arch/arm/dts/imx6ul-isiot-nand.dts    |  50 ++++++
 arch/arm/dts/imx6ul-isiot.dtsi        | 142 +++++++++++++++
 board/engicam/geam6ul/MAINTAINERS     |   1 +
 board/engicam/icorem6/MAINTAINERS     |   3 +
 board/engicam/icorem6_rqs/MAINTAINERS |   3 +
 board/engicam/isiotmx6ul/Kconfig      |  12 ++
 board/engicam/isiotmx6ul/MAINTAINERS  |  10 ++
 board/engicam/isiotmx6ul/Makefile     |   6 +
 board/engicam/isiotmx6ul/README       |  28 +++
 board/engicam/isiotmx6ul/isiotmx6ul.c | 315 ++++++++++++++++++++++++++++++++++
 configs/imx6ul_isiot_mmc_defconfig    |  41 +++++
 configs/imx6ul_isiot_nand_defconfig   |  42 +++++
 include/configs/imx6qdl_icore.h       |   2 +-
 include/configs/imx6ul_geam.h         |   2 +-
 include/configs/imx6ul_isiot.h        | 205 ++++++++++++++++++++++
 18 files changed, 925 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/dts/imx6ul-isiot-mmc.dts
 create mode 100644 arch/arm/dts/imx6ul-isiot-nand.dts
 create mode 100644 arch/arm/dts/imx6ul-isiot.dtsi
 create mode 100644 board/engicam/isiotmx6ul/Kconfig
 create mode 100644 board/engicam/isiotmx6ul/MAINTAINERS
 create mode 100644 board/engicam/isiotmx6ul/Makefile
 create mode 100644 board/engicam/isiotmx6ul/README
 create mode 100644 board/engicam/isiotmx6ul/isiotmx6ul.c
 create mode 100644 configs/imx6ul_isiot_mmc_defconfig
 create mode 100644 configs/imx6ul_isiot_nand_defconfig
 create mode 100644 include/configs/imx6ul_isiot.h
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v6 1/10 configs: imx6: Don't define USDHC2_BASE_ADDR

From: Jagan Teki <[email protected]>

USDHC base address will assigned by SPL using fsl_esdhc_initialize and u-boot with devicetree, hence no remove base address assignment in config files.

---
 include/configs/imx6qdl_icore.h | 2 +-
 include/configs/imx6ul_geam.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/configs/imx6qdl_icore.h +1 -1
index eb83d23..5a28b15 100644
@@ -147,7 +147,7 @@
 #ifdef CONFIG_FSL_USDHC
 # define CONFIG_SYS_MMC_ENV_DEV		0
 # define CONFIG_SYS_FSL_USDHC_NUM	1
-# define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC2_BASE_ADDR
+# define CONFIG_SYS_FSL_ESDHC_ADDR	0
 #endif
 
 /* NAND */
include/configs/imx6ul_geam.h +1 -1
index 23fa3ee..8bffacd 100644
@@ -145,7 +145,7 @@
 #ifdef CONFIG_FSL_USDHC
 # define CONFIG_SYS_MMC_ENV_DEV		0
 # define CONFIG_SYS_FSL_USDHC_NUM	1
-# define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC2_BASE_ADDR
+# define CONFIG_SYS_FSL_ESDHC_ADDR	0
 #endif
 
 /* NAND */
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH v6 2/10 arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Boot from MMC:
-------------
U-Boot SPL 2017.01-rc2-gba3c151-dirty (Jan 02 2017 - 16:59:33) Trying to boot from MMC1

U-Boot 2017.01-rc2-gba3c151-dirty (Jan 02 2017 - 16:59:33 +0100)

CPU:   Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 33C
Reset cause: POR
Model: Engicam Is.IoT MX6UL Starterkit
DRAM:  512 MiB
MMC:   FSL_SDHC: 0

*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   CPU Net Initialization Failed

No ethernet found.
Hit any key to stop autoboot: 0
isiotmx6ul>

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 arch/arm/cpu/armv7/mx6/Kconfig        |  10 ++
 arch/arm/dts/Makefile                 |   3 +-
 arch/arm/dts/imx6ul-isiot-mmc.dts     |  50 +++++++
 arch/arm/dts/imx6ul-isiot.dtsi        |  92 +++++++++++++
 board/engicam/isiotmx6ul/Kconfig      |  12 ++
 board/engicam/isiotmx6ul/MAINTAINERS  |   8 ++
 board/engicam/isiotmx6ul/Makefile     |   6 +
 board/engicam/isiotmx6ul/README       |  28 ++++
 board/engicam/isiotmx6ul/isiotmx6ul.c | 246 ++++++++++++++++++++++++++++++++++
 configs/imx6ul_isiot_mmc_defconfig    |  36 +++++
 include/configs/imx6ul_isiot.h        | 142 ++++++++++++++++++++
 11 files changed, 632 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6ul-isiot-mmc.dts
 create mode 100644 arch/arm/dts/imx6ul-isiot.dtsi
 create mode 100644 board/engicam/isiotmx6ul/Kconfig
 create mode 100644 board/engicam/isiotmx6ul/MAINTAINERS
 create mode 100644 board/engicam/isiotmx6ul/Makefile
 create mode 100644 board/engicam/isiotmx6ul/README
 create mode 100644 board/engicam/isiotmx6ul/isiotmx6ul.c
 create mode 100644 configs/imx6ul_isiot_mmc_defconfig
 create mode 100644 include/configs/imx6ul_isiot.h
arch/arm/cpu/armv7/mx6/Kconfig +10 -0
index 19cc1f6..08cd2d9 100644
@@ -237,6 +237,15 @@ config TARGET_MX6UL_GEAM
 	select DM_MMC
 	select DM_THERMAL
 	select SUPPORT_SPL
+config TARGET_MX6UL_ISIOT
+	bool "Support Engicam Is.IoT MX6UL"
+	select MX6UL
+	select OF_CONTROL
+	select DM
+	select DM_GPIO
+	select DM_MMC
+	select DM_THERMAL
+	select SUPPORT_SPL
 
 config TARGET_MX6ULL_14X14_EVK
 	bool "Support mx6ull_14x14_evk"
@@ -358,6 +367,7 @@ source "board/embest/mx6boards/Kconfig"
 source "board/engicam/geam6ul/Kconfig"
 source "board/engicam/icorem6/Kconfig"
 source "board/engicam/icorem6_rqs/Kconfig"
+source "board/engicam/isiotmx6ul/Kconfig"
 source "board/freescale/mx6qarm2/Kconfig"
 source "board/freescale/mx6qsabreauto/Kconfig"
 source "board/freescale/mx6sabresd/Kconfig"
arch/arm/dts/Makefile +2 -1
index eb68c20..fc30ac3 100644
@@ -316,7 +316,8 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
 	imx6q-icore.dtb \
 	imx6q-icore-rqs.dtb \
 	imx6sx-sabreauto.dtb \
-	imx6ul-geam-kit.dtb
+	imx6ul-geam-kit.dtb \
+	imx6ul-isiot-mmc.dtb
 
 dtb-$(CONFIG_MX7) += imx7-colibri.dtb
 
arch/arm/dts/imx6ul-isiot-mmc.dts new file +50 -0

50 lines not on this page · raw message

arch/arm/dts/imx6ul-isiot.dtsi new file +92 -0

92 lines not on this page · raw message

board/engicam/isiotmx6ul/Kconfig new file +12 -0
new file mode 100644
index 0000000..213ffad
@@ -0,0 +1,12 @@
+if TARGET_MX6UL_ISIOT
+
+config SYS_BOARD
+	default "isiotmx6ul"
+
+config SYS_VENDOR
+	default "engicam"
+
+config SYS_CONFIG_NAME
+	default "imx6ul_isiot"
+
+endif
board/engicam/isiotmx6ul/MAINTAINERS new file +8 -0
new file mode 100644
index 0000000..558e516
@@ -0,0 +1,8 @@
+ISIOTMX6UL BOARD
+M:	Jagan Teki <[email protected]>
+S:	Maintained
+F:	board/engicam/isiotmx6ul
+F:	include/configs/imx6ul_isiot.h
+F:	configs/imx6ul_isiot_mmc_defconfig
+F:	arch/arm/dts/imx6ul-isiot.dtsi
+F:	arch/arm/dts/imx6ul-isiot-mmc.dts
board/engicam/isiotmx6ul/Makefile new file +6 -0
new file mode 100644
index 0000000..f4f8c78
@@ -0,0 +1,6 @@
+# Copyright (C) 2016 Amarula Solutions B.V.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y  := isiotmx6ul.o
board/engicam/isiotmx6ul/README new file +28 -0
new file mode 100644
index 0000000..1d177ac
@@ -0,0 +1,28 @@
+How to use U-Boot on Engicam Is.IoT MX6UL Starter Kit:
+-----------------------------------------------------
+
+- Configure U-Boot for Engicam Is.IoT MX6UL
+
+$ make mrproper
+$ make imx6ul_isiot_mmc_defconfig
+$ make
+
+This will generate the SPL image called SPL and the u-boot-dtb.img.
+
+- Flash the SPL image into the micro SD card:
+
+sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync
+
+- Flash the u-boot-dtb.img image into the micro SD card:
+
+sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 bs=1k seek=69; sync
+
+- Jumper settings:
+
+MMC Boot: JM3 Closed
+
+- Connect the Serial cable between the Starter Kit and the PC for the console.
+(J28 is the Linux Serial console connector)
+
+- Insert the micro SD card in the board, power it up and U-Boot messages should
+come up.
board/engicam/isiotmx6ul/isiotmx6ul.c new file +246 -0

246 lines not on this page · raw message

configs/imx6ul_isiot_mmc_defconfig new file +36 -0
new file mode 100644
index 0000000..66eb59f
@@ -0,0 +1,36 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_MX6UL_ISIOT=y
+CONFIG_SPL_EXT_SUPPORT=y
+CONFIG_SPL_LIBDISK_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6ul-isiot-mmc"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC"
+CONFIG_BOOTDELAY=3
+CONFIG_DEFAULT_FDT_FILE="imx6ul-isiot-emmc.dtb"
+CONFIG_SPL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="isiotmx6ul> "
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_GPIO=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_BLK is not set
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
+CONFIG_MXC_UART=y
+CONFIG_IMX_THERMAL=y
include/configs/imx6ul_isiot.h new file +142 -0

142 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#3 lore raw

PATCH v6 3/10 arm: dts: imx6ul-isiot: Add I2C nodes

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Add I2C nodes for Engicam Is.IoT MX6UL module.

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 arch/arm/dts/imx6ul-isiot.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm/dts/imx6ul-isiot.dtsi +28 -0
index 6108a1a..1a474ca 100644
@@ -56,6 +56,20 @@
 	};
 };
 
+&i2c1 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "okay";
+};
+
+&i2c2 {
+	clock_frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+};
+
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
@@ -72,6 +86,20 @@
 };
 
 &iomuxc {
+	pinctrl_i2c1: i2c1grp {
+		fsl,pins = <
+			MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0
+			MX6UL_PAD_UART4_RX_DATA__I2C1_SDA 0x4001b8b0
+		>;
+	};
+
+	pinctrl_i2c2: i2c2grp {
+			fsl,pins = <
+			MX6UL_PAD_UART5_TX_DATA__I2C2_SCL 0x4001b8b0
+			MX6UL_PAD_UART5_RX_DATA__I2C2_SDA 0x4001b8b0
+		>;
+	};
+
 	pinctrl_uart1: uart1grp {
 		fsl,pins = <
 			MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH v6 4/10 imx6: isiotmx6ul: Add I2C support

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Add I2C support for Engicam Is.IoT MX6UL module.

isiotmx6ul> i2c bus

Bus 0:  i2c at 021a0000
Bus 1:  i2c at 021a4000

isiotmx6ul> i2c dev 0
Setting bus to 0
isiotmx6ul> i2c dev
Current bus is 0
isiotmx6ul> i2c speed 100000
Setting bus speed to 100000 Hz
isiotmx6ul> i2c probe
Valid chip addresses: 00 2C 44 78
isiotmx6ul> i2c md 2C 0xff
00ff: 00 00 00 00 0f f0 01 64 ff ff 00 00 00 00 00 00 .......d........

---
 arch/arm/cpu/armv7/mx6/Kconfig     | 1 +
 configs/imx6ul_isiot_mmc_defconfig | 2 ++
 2 files changed, 3 insertions(+)
arch/arm/cpu/armv7/mx6/Kconfig +1 -0
index 08cd2d9..e9f86e8 100644
@@ -243,6 +243,7 @@ config TARGET_MX6UL_ISIOT
 	select OF_CONTROL
 	select DM
 	select DM_GPIO
+	select DM_I2C
 	select DM_MMC
 	select DM_THERMAL
 	select SUPPORT_SPL
configs/imx6ul_isiot_mmc_defconfig +2 -0
index 66eb59f..7a7be23 100644
@@ -21,6 +21,7 @@ CONFIG_SYS_PROMPT="isiotmx6ul> "
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
@@ -29,6 +30,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 # CONFIG_BLK is not set
+CONFIG_SYS_I2C_MXC=y
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
Signature · 1 line
1.9.1
author
#5 lore raw

PATCH v6 5/10 arm: dts: imx6ul-isiot: Add FEC node

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Add FEC node for Engicam Is.IoT MX6UL module.

---
 arch/arm/dts/imx6ul-isiot.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/dts/imx6ul-isiot.dtsi +22 -0
index 1a474ca..346079a 100644
@@ -56,6 +56,13 @@
 	};
 };
 
+&fec1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_enet1>;
+	phy-mode = "rmii";
+	status = "okay";
+};
+
 &i2c1 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
@@ -86,6 +93,21 @@
 };
 
 &iomuxc {
+	pinctrl_enet1: enet1grp {
+		fsl,pins = <
+			MX6UL_PAD_ENET2_RX_DATA0__ENET1_MDIO    0x1b0b0
+			MX6UL_PAD_ENET2_RX_DATA1__ENET1_MDC     0x1b0b0
+			MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN      0x1b0b0
+			MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
+			MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
+			MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN      0x1b0b0
+			MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
+			MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
+			MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1  0x4001b031
+			MX6UL_PAD_ENET2_RX_EN__GPIO2_IO10       0x1b0b0
+		>;
+	};
+
 	pinctrl_i2c1: i2c1grp {
 		fsl,pins = <
 			MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0
Signature · 1 line
1.9.1
author
#6 lore raw

PATCH v6 6/10 imx6: isiotmx6ul: Add FEC support

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Add FEC support for Engicam Is.IoT MX6UL module.

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 arch/arm/cpu/armv7/mx6/Kconfig     |  1 +
 configs/imx6ul_isiot_mmc_defconfig |  3 +++
 include/configs/imx6ul_isiot.h     | 10 ++++++++++
 3 files changed, 14 insertions(+)
arch/arm/cpu/armv7/mx6/Kconfig +1 -0
index e9f86e8..714fa35 100644
@@ -242,6 +242,7 @@ config TARGET_MX6UL_ISIOT
 	select MX6UL
 	select OF_CONTROL
 	select DM
+	select DM_ETH
 	select DM_GPIO
 	select DM_I2C
 	select DM_MMC
configs/imx6ul_isiot_mmc_defconfig +3 -0
index 7a7be23..8ecdd8e 100644
@@ -23,6 +23,8 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
@@ -32,6 +34,7 @@ CONFIG_CMD_FS_GENERIC=y
 # CONFIG_BLK is not set
 CONFIG_SYS_I2C_MXC=y
 # CONFIG_DM_MMC_OPS is not set
+CONFIG_FEC_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
include/configs/imx6ul_isiot.h +10 -0
index aba43fc..5a3e05a 100644
@@ -128,6 +128,16 @@
 # define CONFIG_SYS_FSL_ESDHC_ADDR	0
 #endif
 
+/* Ethernet */
+#ifdef CONFIG_FEC_MXC
+# define CONFIG_FEC_MXC_PHYADDR		0
+# define CONFIG_FEC_XCV_TYPE		RMII
+
+# define CONFIG_MII
+# define CONFIG_PHYLIB
+# define CONFIG_PHY_SMSC
+#endif
+
 /* SPL */
 #ifdef CONFIG_SPL
 # define CONFIG_SPL_MMC_SUPPORT
Signature · 1 line
1.9.1
author
#7 lore raw

PATCH v6 7/10 imx6: isiotmx6ul: Add NAND support

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Add NAND support for Engicam Is.IoT MX6UL board.

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 arch/arm/dts/Makefile                 |  3 +-
 arch/arm/dts/imx6ul-isiot-nand.dts    | 50 +++++++++++++++++++++++++
 board/engicam/isiotmx6ul/MAINTAINERS  |  2 +
 board/engicam/isiotmx6ul/isiotmx6ul.c | 69 +++++++++++++++++++++++++++++++++++
 configs/imx6ul_isiot_nand_defconfig   | 39 ++++++++++++++++++++
 include/configs/imx6ul_isiot.h        | 25 ++++++++++++-
 6 files changed, 186 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/imx6ul-isiot-nand.dts
 create mode 100644 configs/imx6ul_isiot_nand_defconfig
arch/arm/dts/Makefile +2 -1
index fc30ac3..c5c8487 100644
@@ -317,7 +317,8 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
 	imx6q-icore-rqs.dtb \
 	imx6sx-sabreauto.dtb \
 	imx6ul-geam-kit.dtb \
-	imx6ul-isiot-mmc.dtb
+	imx6ul-isiot-mmc.dtb \
+	imx6ul-isiot-nand.dtb
 
 dtb-$(CONFIG_MX7) += imx7-colibri.dtb
 
arch/arm/dts/imx6ul-isiot-nand.dts new file +50 -0

50 lines not on this page · raw message

board/engicam/isiotmx6ul/MAINTAINERS +2 -0
index 558e516..f4dcfbd 100644
@@ -4,5 +4,7 @@ S:	Maintained
 F:	board/engicam/isiotmx6ul
 F:	include/configs/imx6ul_isiot.h
 F:	configs/imx6ul_isiot_mmc_defconfig
+F:	configs/imx6ul_isiot_nand_defconfig
 F:	arch/arm/dts/imx6ul-isiot.dtsi
 F:	arch/arm/dts/imx6ul-isiot-mmc.dts
+F:	arch/arm/dts/imx6ul-isiot-nand.dts
board/engicam/isiotmx6ul/isiotmx6ul.c +69 -0

80 lines not on this page · raw message

configs/imx6ul_isiot_nand_defconfig new file +39 -0
new file mode 100644
index 0000000..2af146f
@@ -0,0 +1,39 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_MX6UL_ISIOT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6ul-isiot-nand"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_NAND"
+CONFIG_BOOTDELAY=3
+CONFIG_DEFAULT_FDT_FILE="imx6ul-isiot-nand.dtb"
+CONFIG_SPL=y
+CONFIG_SPL_DMA_SUPPORT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="isiotmx6ul> "
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+# CONFIG_BLK is not set
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_NAND_MXS=y
+CONFIG_FEC_MXC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
+CONFIG_MXC_UART=y
+CONFIG_IMX_THERMAL=y
include/configs/imx6ul_isiot.h +24 -1
index 5a3e05a..b137848 100644
@@ -27,6 +27,10 @@
 /* Environment in MMC */
 # if defined(CONFIG_ENV_IS_IN_MMC)
 #  define CONFIG_ENV_OFFSET		0x100000
+/* Environment in NAND */
+# elif defined(CONFIG_ENV_IS_IN_NAND)
+#  define CONFIG_ENV_OFFSET		0x400000
+#  define CONFIG_ENV_SECT_SIZE		CONFIG_ENV_SIZE
 # endif
 #endif
 
@@ -128,6 +132,21 @@
 # define CONFIG_SYS_FSL_ESDHC_ADDR	0
 #endif
 
+/* NAND */
+#ifdef CONFIG_NAND_MXS
+# define CONFIG_SYS_MAX_NAND_DEVICE	1
+# define CONFIG_SYS_NAND_BASE		0x40000000
+# define CONFIG_SYS_NAND_5_ADDR_CYCLE
+# define CONFIG_SYS_NAND_ONFI_DETECTION
+# define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
+# define CONFIG_SYS_NAND_U_BOOT_OFFS	0x200000
+
+/* APBH DMA */
+# define CONFIG_APBH_DMA
+# define CONFIG_APBH_DMA_BURST
+# define CONFIG_APBH_DMA_BURST8
+#endif
+
 /* Ethernet */
 #ifdef CONFIG_FEC_MXC
 # define CONFIG_FEC_MXC_PHYADDR		0
@@ -140,7 +159,11 @@
 
 /* SPL */
 #ifdef CONFIG_SPL
-# define CONFIG_SPL_MMC_SUPPORT
+# ifdef CONFIG_NAND_MXS
+#  define CONFIG_SPL_NAND_SUPPORT
+# else
+#  define CONFIG_SPL_MMC_SUPPORT
+# endif
 
 # include "imx6_spl.h"
 # ifdef CONFIG_SPL_BUILD
Signature · 1 line
1.9.1
author
#8 lore raw

PATCH v6 8/10 imx6: isiotmx6ul: Add nandboot env support

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Add config options for booting Linux from NAND in UBI format.

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 configs/imx6ul_isiot_nand_defconfig |  1 +
 include/configs/imx6ul_isiot.h      | 32 +++++++++++++++++++++++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)
configs/imx6ul_isiot_nand_defconfig +1 -0
index 2af146f..d1a9fad 100644
@@ -21,6 +21,7 @@ CONFIG_SYS_PROMPT="isiotmx6ul> "
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
+CONFIG_CMD_UBI=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
include/configs/imx6ul_isiot.h +31 -1
index b137848..10311d0 100644
@@ -48,9 +48,12 @@
 	"mmcdev=0\0" \
 	"mmcpart=1\0" \
 	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
+	"nandroot=ubi0:rootfs rootfstype=ubifs\0" \
 	"mmcautodetect=yes\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=${mmcroot}\0" \
+	"ubiargs=setenv bootargs console=${console},${baudrate} " \
+		"ubi.mtd=5 root=${nandroot} ${mtdparts}\0" \
 	"loadbootscript=" \
 		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
@@ -75,8 +78,21 @@
 			"fi; " \
 		"else " \
 			"bootm; " \
-		"fi\0"
+		"fi\0" \
+	"nandboot=echo Booting from nand ...; " \
+		"if mtdparts; then " \
+			"echo Starting nand boot ...; " \
+		"else " \
+			"mtdparts default; " \
+		"fi; " \
+		"run ubiargs; " \
+		"nand read ${loadaddr} kernel 0x800000; " \
+		"nand read ${fdt_addr} dtb 0x100000; " \
+		"bootm ${loadaddr} - ${fdt_addr}\0"
 
+#ifdef CONFIG_NAND_MXS
+# define CONFIG_BOOTCOMMAND		"run nandboot"
+#else
 # define CONFIG_BOOTCOMMAND \
 	"if mmc rescan; then " \
 		"if run loadbootscript; then " \
@@ -91,6 +107,7 @@
 			"fi; " \
 		"fi; " \
 	"fi"
+#endif
 
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_MEMTEST_START	0x80000000
@@ -141,6 +158,19 @@
 # define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 # define CONFIG_SYS_NAND_U_BOOT_OFFS	0x200000
 
+/* MTD device */
+# define CONFIG_MTD_DEVICE
+# define CONFIG_CMD_MTDPARTS
+# define CONFIG_MTD_PARTITIONS
+# define MTDIDS_DEFAULT			"nand0=gpmi-nand"
+# define MTDPARTS_DEFAULT		"mtdparts=gpmi-nand:2m(spl),2m(uboot)," \
+					"1m(env),8m(kernel),1m(dtb),-(rootfs)"
+
+/* UBI */
+# define CONFIG_CMD_UBIFS
+# define CONFIG_RBTREE
+# define CONFIG_LZO
+
 /* APBH DMA */
 # define CONFIG_APBH_DMA
 # define CONFIG_APBH_DMA_BURST
Signature · 1 line
1.9.1
author
#9 lore raw

PATCH v6 9/10 imx6ul: isiotmx6ul: Enable I2C support

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

Enable I2C support for Engicam Is.IoT NAND module.

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 configs/imx6ul_isiot_nand_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/imx6ul_isiot_nand_defconfig +2 -0
index d1a9fad..6f1a054 100644
@@ -26,6 +26,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_I2C=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
@@ -36,5 +37,6 @@ CONFIG_NAND_MXS=y
 CONFIG_FEC_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_SYS_I2C_MXC=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
Signature · 1 line
1.9.1
author
#10 lore raw

PATCH v6 10/10 i.MX6: engicam: Include dts files under MAINTAINERS

In reply to Jagan Teki

From: Jagan Teki <[email protected]>

dts files related to i.MX6 engicam boards are maintined under board, so include them under board/engicam/*/MAINTAINERS

Cc Stefano Babic <[email protected]>
Cc Matteo Lisi <[email protected]>
Cc Michael Trimarchi <[email protected]>
---
 board/engicam/geam6ul/MAINTAINERS     | 1 +
 board/engicam/icorem6/MAINTAINERS     | 3 +++
 board/engicam/icorem6_rqs/MAINTAINERS | 3 +++
 3 files changed, 7 insertions(+)
board/engicam/geam6ul/MAINTAINERS +1 -0
index 079370c..1c31375 100644
@@ -5,3 +5,4 @@ F:	board/engicam/geam6ul
 F:	include/configs/imx6ul_geam.h
 F:	configs/imx6ul_geam_mmc_defconfig
 F:	configs/imx6ul_geam_nand_defconfig
+F:	arch/arm/dts/imx6ul-geam-kit.dts
board/engicam/icorem6/MAINTAINERS +3 -0
index 0ef3a2c..6116648 100644
@@ -7,3 +7,6 @@ F:	configs/imx6q_icore_mmc_defconfig
 F:	configs/imx6q_icore_nand_defconfig
 F:	configs/imx6dl_icore_mmc_defconfig
 F:	configs/imx6dl_icore_nand_defconfig
+F:	arch/arm/dts/imx6qdl-icore.dtsi
+F:	arch/arm/dts/imx6q-icore.dts
+F:	arch/arm/dts/imx6dl-icore.dts
board/engicam/icorem6_rqs/MAINTAINERS +3 -0
index 0556211..2d2295c 100644
@@ -5,3 +5,6 @@ F:	board/engicam/icorem6_rqs
 F:	include/configs/imx6qdl_icore_rqs.h
 F:	configs/imx6q_icore_rqs_mmc_defconfig
 F:	configs/imx6dl_icore_rqs_mmc_defconfig
+F:	arch/arm/dts/imx6qdl-icore-rqs.dtsi
+F:	arch/arm/dts/imx6q-icore-rqs.dts
+F:	arch/arm/dts/imx6dl-icore-rqs.dts
Signature · 1 line
1.9.1
#11 lore raw

v6 cover imx6ul: Add Engicam Is.IoT MX6UL support

In reply to Jagan Teki
Quoted 58 lines · Jagan Teki

From: Jagan Teki <[email protected]>

This patch set support Engicam Is.IoT MX6UL board support.

Changes for v6:
- Remove 'arm: dts: Add MAINTAINERS file' patch
- Rebase to master

Changes for v5:
- Update ccgr_init so-that it can enable required clocks
- Add new patch for dts files include under board MAINTAINERS
- Add new patch for arch/arm/dts/MAINTAINERS file
- Update 'Reviewed-by: Stefano Babic <[email protected]>' tag

Changes for v4:
- Rebase to master

Changes for v3:
- Rebase to master

Changes for v2:
- Skiped eMMC node patch
- Rebase to master

Jagan Teki (10):
configs: imx6: Don't define USDHC2_BASE_ADDR
arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support
arm: dts: imx6ul-isiot: Add I2C nodes
imx6: isiotmx6ul: Add I2C support
arm: dts: imx6ul-isiot: Add FEC node
imx6: isiotmx6ul: Add FEC support
imx6: isiotmx6ul: Add NAND support
imx6: isiotmx6ul: Add nandboot env support
imx6ul: isiotmx6ul: Enable I2C support
i.MX6: engicam: Include dts files under MAINTAINERS

 arch/arm/cpu/armv7/mx6/Kconfig        |  12 ++
 arch/arm/dts/Makefile                 |   4 +-
 arch/arm/dts/imx6ul-isiot-mmc.dts     |  50 ++++++
 arch/arm/dts/imx6ul-isiot-nand.dts    |  50 ++++++
 arch/arm/dts/imx6ul-isiot.dtsi        | 142 +++++++++++++++
 board/engicam/geam6ul/MAINTAINERS     |   1 +
 board/engicam/icorem6/MAINTAINERS     |   3 +
 board/engicam/icorem6_rqs/MAINTAINERS |   3 +
 board/engicam/isiotmx6ul/Kconfig      |  12 ++
 board/engicam/isiotmx6ul/MAINTAINERS  |  10 ++
 board/engicam/isiotmx6ul/Makefile     |   6 +
 board/engicam/isiotmx6ul/README       |  28 +++
 board/engicam/isiotmx6ul/isiotmx6ul.c | 315 ++++++++++++++++++++++++++++++++++
 configs/imx6ul_isiot_mmc_defconfig    |  41 +++++
 configs/imx6ul_isiot_nand_defconfig   |  42 +++++
 include/configs/imx6qdl_icore.h       |   2 +-
 include/configs/imx6ul_geam.h         |   2 +-
 include/configs/imx6ul_isiot.h        | 205 ++++++++++++++++++++++
 18 files changed, 925 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/dts/imx6ul-isiot-mmc.dts
 create mode 100644 arch/arm/dts/imx6ul-isiot-nand.dts
 create mode 100644 arch/arm/dts/imx6ul-isiot.dtsi
Quoted 9 lines
 create mode 100644 board/engicam/isiotmx6ul/Kconfig
 create mode 100644 board/engicam/isiotmx6ul/MAINTAINERS
 create mode 100644 board/engicam/isiotmx6ul/Makefile
 create mode 100644 board/engicam/isiotmx6ul/README
 create mode 100644 board/engicam/isiotmx6ul/isiotmx6ul.c
 create mode 100644 configs/imx6ul_isiot_mmc_defconfig
 create mode 100644 configs/imx6ul_isiot_nand_defconfig
 create mode 100644 include/configs/imx6ul_isiot.h

Applied to u-boot-imx, thanks !

Best regards,
Stefano

Signature · 8 lines
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=====================================================================
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
=====================================================================