Skip to contentSkip to conversation

imx: Add support for i.MX28 based XEA board

PATCH New Lukasz Majewski 2 participants 2 messages Dec 8, 2019 – Dec 29, 2019

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

PATCH v6 1/1 imx: Add support for i.MX28 based XEA board

This patch introduces support for i.MX28 based XEA board.

This board supports DM/DTS in U-Boot proper as well as DM aware drivers in SPL (u-boot.sb) by using OF_PLATDATA.
More detailed information regarding usage of it can be found in ./board/liebherr/xea/README file.

U-Boot SPL 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200) Trying to boot from MMC1
MMC0: Command 8 timeout (status 0xf0344020)
mmc_load_image_raw_sector: mmc block read error

U-Boot 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200)

CPU:   Freescale i.MX28 rev1.2 at 454 MHz
BOOT:  SSP SPI #3, master, 3V3 NOR
Model: Liebherr (LWE) XEA i.MX28 Board
DRAM:  128 MiB
MMC:   MXS MMC: 0
Loading Environment from SPI Flash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
OK
In:    serial
Out:   serial
Err:   serial

Net:
Warning: ethernet at 800f0000 (eth0) using random MAC address - ce:e1:9e:46:f3:a2
eth0: ethernet at 800f0000
Hit any key to stop autoboot: 0

---

Changes in v6:
- Use SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG in the imx28_xea_defconfig
- Add missing #include <serial.h> to boards/liebherr/xea/xea.c to avoid gcc build warning (and finally the error as all warnings are treated as errors) for version > 6.4.x (e.g. 7.x.y).

Changes in v5:
- Define SPL_FORCE_MMC_BOOT in imx28_xea_defconfig

Changes in v4:
- Remove non needed imx28_xea_defconfig defines after introducing SPL_DM_SPI
- Update dependencies list after introducing SPL_DM_SPI
- Fix problem with 'mtd' command

Changes in v3:
- Use Kconfig defined option (CONFIG_FS_EXT4) instead of the one defined in xea.h
- Use Kconfig defined option (CONFIG_SYS_SPI_U_BOOT_OFFS) instead of the one defined in xea.h
- Provide correct SDPX header for xea.h

Changes in v2:
- Adjust config to match dependent patches
- Increase malloc size to allow booting the board with GPIO DM/DTS support
- Add support for GPIO driver in SPL (with DM + OF_PLATDATA)
- Adjust spl_xea.c to support bootmode pins
- Add patches to set in Kconfig default boot HW partition for eMMC

Applied on top of -master branch:
SHA1: d79ae6aa3087a6434b5ecdb51d20dca20c8e1596

Travis-CI: https://travis-ci.org/lmajewski/u-boot-dfu/jobs/622226547

(No extra dependencies - everything needed is in -master now)

---
 arch/arm/dts/Makefile              |   3 +
 arch/arm/dts/imx28-xea-u-boot.dtsi |  46 +++++
 arch/arm/dts/imx28-xea.dts         | 110 +++++++++++
 arch/arm/mach-imx/mxs/Kconfig      |   4 +
 board/liebherr/xea/Kconfig         |  24 +++
 board/liebherr/xea/MAINTAINERS     |   6 +
 board/liebherr/xea/Makefile        |  12 ++
 board/liebherr/xea/README          |  63 ++++++
 board/liebherr/xea/spl_xea.c       | 303 +++++++++++++++++++++++++++++
 board/liebherr/xea/xea.c           | 153 +++++++++++++++
 configs/imx28_xea_defconfig        | 108 ++++++++++
 include/configs/xea.h              | 196 +++++++++++++++++++
 12 files changed, 1028 insertions(+)
 create mode 100644 arch/arm/dts/imx28-xea-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx28-xea.dts
 create mode 100644 board/liebherr/xea/Kconfig
 create mode 100644 board/liebherr/xea/MAINTAINERS
 create mode 100644 board/liebherr/xea/Makefile
 create mode 100644 board/liebherr/xea/README
 create mode 100644 board/liebherr/xea/spl_xea.c
 create mode 100644 board/liebherr/xea/xea.c
 create mode 100644 configs/imx28_xea_defconfig
 create mode 100644 include/configs/xea.h
arch/arm/dts/Makefile +3 -0
index 3dc9c4d41c..cc39129556 100644
@@ -568,6 +568,9 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
 	vf610-pcm052.dtb \
 	vf610-bk4r1.dtb
 
+dtb-$(CONFIG_MX28) += \
+	imx28-xea.dtb
+
 dtb-$(CONFIG_MX53) += imx53-cx9020.dtb \
 	imx53-kp.dtb \
 	imx53-m53menlo.dtb
arch/arm/dts/imx28-xea-u-boot.dtsi new file +46 -0

46 lines not on this page · raw message

arch/arm/dts/imx28-xea.dts new file +110 -0

110 lines not on this page · raw message

arch/arm/mach-imx/mxs/Kconfig +4 -0
index 68072d5a1f..b90d7b6e41 100644
@@ -60,6 +60,9 @@ config TARGET_SC_SPS_1
 config TARGET_TS4600
 	bool "Support TS4600"
 
+config TARGET_XEA
+	bool "Support XEA"
+
 endchoice
 
 config SYS_SOC
@@ -67,6 +70,7 @@ config SYS_SOC
 
 source "board/bluegiga/apx4devkit/Kconfig"
 source "board/freescale/mx28evk/Kconfig"
+source "board/liebherr/xea/Kconfig"
 source "board/ppcag/bg0900/Kconfig"
 source "board/schulercontrol/sc_sps_1/Kconfig"
 source "board/technologic/ts4600/Kconfig"
board/liebherr/xea/Kconfig new file +24 -0
new file mode 100644
index 0000000000..5428de4646
@@ -0,0 +1,24 @@
+if TARGET_XEA
+
+config SYS_BOARD
+	default "xea"
+
+config SYS_VENDOR
+	default "liebherr"
+
+config SYS_SOC
+	default "mxs"
+
+config SYS_CONFIG_NAME
+	default "xea"
+
+config ENV_SIZE
+	default 0x2000
+
+config ENV_SECT_SIZE
+	default 0x10000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET
+	default 0x80000 if ENV_IS_IN_SPI_FLASH
+
+endif
board/liebherr/xea/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..623184d0f8
@@ -0,0 +1,6 @@
+XEA BOARD
+M:	Lukasz Majewski <[email protected]>
+S:	Maintained
+F:	board/liebherr/xea/
+F:	include/configs/xea.h
+F:	configs/imx28_xea_defconfig
board/liebherr/xea/Makefile new file +12 -0
new file mode 100644
index 0000000000..abf500857f
@@ -0,0 +1,12 @@
+#
+# (C) Copyright 2019
+# Lukasz Majewski, DENX Software Engineering, lukma at denx.de.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= xea.o
+
+ifdef	CONFIG_SPL_BUILD
+obj-y	+= spl_xea.o
+endif
board/liebherr/xea/README new file +63 -0

63 lines not on this page · raw message

board/liebherr/xea/spl_xea.c new file +303 -0

303 lines not on this page · raw message

board/liebherr/xea/xea.c new file +153 -0

153 lines not on this page · raw message

configs/imx28_xea_defconfig new file +108 -0

108 lines not on this page · raw message

include/configs/xea.h new file +196 -0

196 lines not on this page · raw message

Signature · 1 line
2.20.1
#1 lore raw

PATCH v6 1/1 imx: Add support for i.MX28 based XEA board

Quoted 20 lines

This patch introduces support for i.MX28 based XEA board. This board supports DM/DTS in U-Boot proper as well as DM aware drivers in SPL (u-boot.sb) by using OF_PLATDATA.
More detailed information regarding usage of it can be found in ./board/liebherr/xea/README file.
U-Boot SPL 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200) Trying to boot from MMC1
MMC0: Command 8 timeout (status 0xf0344020)
mmc_load_image_raw_sector: mmc block read error
U-Boot 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200)

CPU:   Freescale i.MX28 rev1.2 at 454 MHz
BOOT:  SSP SPI #3, master, 3V3 NOR
Model: Liebherr (LWE) XEA i.MX28 Board
DRAM:  128 MiB
MMC:   MXS MMC: 0
Loading Environment from SPI Flash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
OK
In:    serial
Out:   serial
Err:   serial
Quoted 5 lines

Net:
Warning: ethernet at 800f0000 (eth0) using random MAC address - ce:e1:9e:46:f3:a2
eth0: ethernet at 800f0000
Hit any key to stop autoboot: 0

Applied to u-boot-imx, -next, 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: sbabic at denx.de
=====================================================================