toradex,apalis_imx6q-ixora-v1.1)
ubootenv_add_uci_config $(bootdev_from_uuid)boot0 -0x2200 0x2000 0x200 10
;;
+toradex,colibri-imx6ull-aster)
+ ubootenv_add_uci_config /dev/mtd3 0 0x00020000 0x20000
+ ;;
wand,imx6dl-wandboard)
ubootenv_add_uci_config "/dev/mmcblk0" "0x60000" "0x2000" "0x2000"
;;
BUILD_DEVICES:=toradex_apalis
endef
+define U-Boot/colibri-imx6ull
+ NAME:=Toradex Colibri iMX6ULL
+ UBOOT_IMAGE:=u-boot-nand.imx
+ UBOOT_MAKE_FLAGS+=u-boot-nand.imx CONFIG_IMX_NAND=y
+ BUILD_SUBTARGET:=cortexa7
+ BUILD_DEVICES:=colibri-imx6ull
+endef
+
define U-Boot/mx6cuboxi
NAME:=SolidRun Cubox-i boards
UBOOT_IMAGE:=SPL u-boot-dtb.img
UBOOT_TARGETS := \
apalis_imx6 \
+ colibri-imx6ull \
mx6cuboxi \
pico-pi-imx7d \
wandboard
--- /dev/null
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
+Date: Thu, 13 May 2021 23:09:35 +0300
+Subject: [PATCH] Makefile: add u-boot-nand.imx target
+
+NAND modules (Colibri Vybrid, iMX7, iMX6ULL) require the images with
+1024 prepending bytes.
+Add the u-boot-nand.imx target which enables with CONFIG_IMX_NAND
+option.
+
+Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
+---
+ Makefile | 4 ++++
+ arch/arm/config.mk | 4 ++++
+ arch/arm/mach-imx/Makefile | 8 ++++++++
+ 3 files changed, 16 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 7b526f4f5a88..3e3e6ff9ffab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1166,6 +1166,10 @@ ifeq ($(CONFIG_MULTI_DTB_FIT),y)
+ IMX_DEPS = u-boot-fit-dtb.bin
+ endif
+
++u-boot-nand.imx: u-boot.imx
++ $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
++ $(BOARD_SIZE_CHECK)
++
+ %.imx: $(IMX_DEPS) %.bin
+ $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+ $(BOARD_SIZE_CHECK)
+diff --git a/arch/arm/config.mk b/arch/arm/config.mk
+index 4153f7e37130..5993827cdd66 100644
+--- a/arch/arm/config.mk
++++ b/arch/arm/config.mk
+@@ -157,12 +157,16 @@ ifndef CONFIG_SPL_BUILD
+ INPUTS-y += SPL
+ endif
+ else
++ifeq ($(CONFIG_IMX_NAND),y)
++ALL-y += u-boot-nand.imx
++else
+ ifeq ($(CONFIG_OF_SEPARATE),y)
+ INPUTS-y += u-boot-dtb.imx
+ else
+ INPUTS-y += u-boot.imx
+ endif
+ endif
++endif
+ ifneq ($(CONFIG_VF610),)
+ INPUTS-y += u-boot.vyb
+ endif
+diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
+index e6b4654cd358..a2fdbdd6387c 100644
+--- a/arch/arm/mach-imx/Makefile
++++ b/arch/arm/mach-imx/Makefile
+@@ -121,6 +121,14 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log
+ u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE
+ $(call if_changed,mkimage)
+
++ifeq ($(CONFIG_IMX_NAND),y)
++cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | \
++ cat - $< > $@
++
++u-boot-nand.imx: u-boot.imx FORCE
++ $(call if_changed,u-boot-nand_imx)
++endif
++
+ ifeq ($(CONFIG_MULTI_DTB_FIT),y)
+ MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \
+ -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE)
ARCH:=arm
BOARD:=imx
BOARDNAME:=NXP i.MX
-FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part
+FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part separate_ramdisk
SUBTARGETS:=cortexa7 cortexa9
KERNEL_PATCHVER:=5.15
board_config_update
case "$board" in
-technexion,imx7d-pico-pi)
+technexion,imx7d-pico-pi|\
+toradex,colibri-imx6ull-aster)
ucidef_set_interface_lan "eth0"
;;
*)
enable_image_metadata_check() {
case "$(board_name)" in
- technexion,imx7d-pico-pi)
+ technexion,imx7d-pico-pi|\
+ toradex,colibri-imx6ull-aster)
REQUIRE_IMAGE_METADATA=1
;;
esac
local board=$(board_name)
case "$board" in
- technexion,imx7d-pico-pi)
+ technexion,imx7d-pico-pi|\
+ toradex,colibri-imx6ull-aster)
return 0
;;
esac
technexion,imx7d-pico-pi)
imx_sdcard_do_upgrade "$1"
;;
+ toradex,colibri-imx6ull-aster)
+ nand_do_upgrade "$1"
+ ;;
esac
}
CONFIG_KCMP=y
CONFIG_LEDS_GPIO=y
CONFIG_MEMORY_ISOLATION=y
+CONFIG_MICREL_PHY=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_FIT_FW=y
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += technexion_imx7d-pico-pi
+
+define Device/toradex_colibri-imx6ull-aster
+ DEVICE_VENDOR := Toradex
+ DEVICE_MODEL := Colibri iMX6ULL Aster
+ DEVICE_DTS := imx6ull-colibri-aster
+ DEVICE_PACKAGES := \
+ kmod-can kmod-can-flexcan kmod-can-raw \
+ kmod-leds-gpio kmod-gpio-button-hotplug \
+ kmod-pps-gpio kmod-rtc-ds1307
+ FILESYSTEMS := squashfs
+ KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+ KERNEL_SUFFIX := -fit-zImage.itb
+ KERNEL_INITRAMFS := kernel-bin | gzip | \
+ fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb with-initrd
+ PAGESIZE := 2048
+ BLOCKSIZE := 128k
+ KERNEL_SIZE := 4096k
+ KERNEL_IN_UBI := 1
+ IMAGES := factory.bin sysupgrade.tar
+ IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
+ IMAGE/factory.bin := append-ubi
+ SUPPORTED_DEVICES := toradex,colibri-imx6ull-aster
+endef
+TARGET_DEVICES += toradex_colibri-imx6ull-aster
--- /dev/null
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
+Date: Wed, 2 Jun 2021 15:00:52 +0200
+Subject: [PATCH] ARM: dts: imx6ull: add support for Toradex Aster carrier
+ board
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add support for iMX6ULL SoM attached to Toradex Aster carrier board.
+
+Signed-off-by: Petr Štetiar <ynezz@true.cz>
+---
+ arch/arm/boot/dts/Makefile | 1 +
+ arch/arm/boot/dts/imx6ull-colibri-aster.dts | 14 ++
+ arch/arm/boot/dts/imx6ull-colibri-aster.dtsi | 132 +++++++++++++++++++
+ 3 files changed, 147 insertions(+)
+ create mode 100644 arch/arm/boot/dts/imx6ull-colibri-aster.dts
+ create mode 100644 arch/arm/boot/dts/imx6ull-colibri-aster.dtsi
+
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index ce66ffd5a1bb..2ea850a50f60 100644
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -627,6 +627,7 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
+ imx6ul-tx6ul-0011.dtb \
+ imx6ul-tx6ul-mainboard.dtb \
+ imx6ull-14x14-evk.dtb \
++ imx6ull-colibri-aster.dtb \
+ imx6ull-colibri-eval-v3.dtb \
+ imx6ull-colibri-wifi-eval-v3.dtb \
+ imx6ull-myir-mys-6ulx-eval.dtb \
+diff --git a/arch/arm/boot/dts/imx6ull-colibri-aster.dts b/arch/arm/boot/dts/imx6ull-colibri-aster.dts
+new file mode 100644
+index 000000000000..0a314af5a728
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6ull-colibri-aster.dts
+@@ -0,0 +1,14 @@
++// SPDX-License-Identifier: (GPL-2.0 OR MIT)
++/*
++ * Copyright 2017-2020 Toradex AG
++ *
++ */
++
++/dts-v1/;
++#include "imx6ull-colibri-nonwifi.dtsi"
++#include "imx6ull-colibri-aster.dtsi"
++
++/ {
++ model = "Toradex Colibri iMX6ULL 256MB on Aster Carrier board";
++ compatible = "toradex,colibri-imx6ull-aster", "fsl,imx6ull";
++};
+diff --git a/arch/arm/boot/dts/imx6ull-colibri-aster.dtsi b/arch/arm/boot/dts/imx6ull-colibri-aster.dtsi
+new file mode 100644
+index 000000000000..9ccbb330d528
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6ull-colibri-aster.dtsi
+@@ -0,0 +1,132 @@
++// SPDX-License-Identifier: (GPL-2.0 OR MIT)
++/*
++ * Copyright 2018 Toradex AG
++
++ */
++
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/pwm/pwm.h>
++
++/ {
++ chosen {
++ bootargs = "console=ttymxc0,115200";
++ };
++
++ gpio-keys {
++ compatible = "gpio-keys";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_snvs_gpiokeys>;
++
++ power {
++ label = "Wake-Up";
++ gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
++ linux,code = <KEY_WAKEUP>;
++ debounce-interval = <10>;
++ gpio-key,wakeup;
++ };
++ };
++
++ extcon_usbc_det: usbc_det {
++ compatible = "linux,extcon-usb-gpio";
++ debounce = <25>;
++ id-gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_snvs_usbc_det>;
++ };
++
++ reg_3v3: regulator-3v3 {
++ compatible = "regulator-fixed";
++ regulator-name = "3.3V";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-always-on;
++ };
++
++ reg_5v0: regulator-5v0 {
++ compatible = "regulator-fixed";
++ regulator-name = "5V";
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ };
++
++ reg_usbh_vbus: regulator-usbh-vbus {
++ compatible = "regulator-fixed";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usbh_reg>;
++ regulator-name = "VCC_USB[1-4]";
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
++ vin-supply = <®_5v0>;
++ };
++};
++
++&adc1 {
++ status = "okay";
++};
++
++&i2c1 {
++ pinctrl-names = "default", "gpio";
++ pinctrl-0 = <&pinctrl_i2c1>;
++ pinctrl-1 = <&pinctrl_i2c1_gpio>;
++ sda-gpios = <&gpio1 29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
++ scl-gpios = <&gpio1 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
++ status = "okay";
++
++ /* M41T0M6 real time clock on carrier board */
++ rtc: m41t0m6@68 {
++ compatible = "st,m41t0";
++ reg = <0x68>;
++ };
++};
++
++&pwm4 {
++ status = "okay";
++};
++
++&pwm5 {
++ status = "okay";
++};
++
++&pwm6 {
++ status = "okay";
++};
++
++&pwm7 {
++ status = "okay";
++};
++
++&uart1 {
++ status = "okay";
++};
++
++&uart2 {
++ status = "okay";
++};
++
++&uart5 {
++ status = "okay";
++};
++
++&usbotg1 {
++ status = "okay";
++ extcon = <&extcon_usbc_det &extcon_usbc_det>;
++ vbus-supply = <®_usbh_vbus>;
++};
++
++&usbotg2 {
++ status = "okay";
++ vbus-supply = <®_usbh_vbus>;
++};
++
++&usdhc1 {
++ status = "okay";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_snvs_usdhc1_cd>;
++ no-1-8-v;
++ cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
++ disable-wp;
++ enable-sdio-wakeup;
++ keep-power-in-suspend;
++ vmmc-supply = <®_3v3>;
++};