Skip to contentSkip to conversation

convert aristainetos board to DM

PATCH New Heiko Schocher 2 participants 59 messages Dec 1, 2019 – Dec 29, 2019

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

cover convert aristainetos board to DM

This series converts the aristainetos to DM / DTS support and get rid of the compile warnings:
===================== WARNING ====================== This board does not use CONFIG_DM. CONFIG_DM will be compulsory starting with the v2020.01 release.
Failure to update may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================
===================== WARNING ====================== This board does not use CONFIG_DM_MMC. Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ====================== This board does not use CONFIG_DM_USB. Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ====================== This board does not use CONFIG_WDT (DM watchdog support). Please update the board to use CONFIG_WDT before the v2019.10 release.
Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info.
====================================================

The not used aristainetos board is removed. The aristianetos board versions 2b is removed, for easier DM convertion, and at the end of this series again added.

Also we add the board versions 2b_csl and 2c in this series.

The series is based on mainline commit
4b19b89ca4: ("Merge tag 'rpi-next-2020.01' of https://github.com/mbgg/u-boot")

the following patches are needed for working correct on board, but without them build is also clean.

(gpio seach for gpio label)
http://patchwork.ozlabs.org/patch/1186638/
bdinfo:
http://patchwork.ozlabs.org/patch/1192363/
support Env in SPI NOR before relocation.
http://patchwork.ozlabs.org/patch/1195435/
http://patchwork.ozlabs.org/patch/1195436/

travis and azure uild:
https://travis-ci.org/hsdenx/u-boot-test/builds/619145300
https://dev.azure.com/hs0298/hs/_build/results?buildId=7

Heiko Schocher (29):
imx6: remove aristainetos board
video: lg4573: convert to DM
imx6: aristainetos: move defines to Kconfig
imx6: aristainetos: remove 2b version
imx6: aristainetos: disable gigabit support
imx6: aristainetos: add device tree from linux
imx6: aristainetos: add thumb build
imx6: aristainetos: remove aristainetos-v2.c
imx6: aristainetos: prepare dts for other board versions
imx6: aristainetos: add DM_SERIAL support
imx6: aristainetos: convert to DM_MMC
imx6: aristainetos: convert gpio pins to DM and DTS
imx6: aristainetos: convert to DM_USB
imx6: aristainetos: convert CONFIG_DM_SPI
imx6: aristainetos: enable DM_ETH
imx6: aristainetos: add DM_VIDEO support
imx6: aristainetos: add DM_I2C support
imx6: aristainetos: convert to DM_PWM/DM_BACKLIGHT
imx6: aristainetos: get rid of CONFIG_BOARDNAME
imx6: aristainetos: add i2c eeprom support
imx6: aristainetos: add AUTOBOOT_KEYED
imx6: aristainetos: add version variable
imx6: aristainetos: cleanup bootmode settings
imx6: aristainetos: WDT DM conversion enable WDT reset
imx6: aristainetos: cleanup default Environment
imx6: aristainetos: enable HAB boot
imx6: aristainetos: readd aristainetos 2b board
imx6: aristainetos: add aristainetos 2b csl
imx6: aristainetos: add support for rev C board

 arch/arm/dts/Makefile                         |   8 +
 .../dts/imx6dl-aristainetos2_4-u-boot.dtsi    |  13 +
 arch/arm/dts/imx6dl-aristainetos2_4.dts       |  51 ++
 arch/arm/dts/imx6dl-aristainetos2_4.dtsi      |  84 +++
 .../dts/imx6dl-aristainetos2_7-u-boot.dtsi    |  19 +
 arch/arm/dts/imx6dl-aristainetos2_7.dts       |  16 +
 arch/arm/dts/imx6dl-aristainetos2_7.dtsi      |  58 ++
 .../dts/imx6dl-aristainetos2b_4-u-boot.dtsi   |  13 +
 arch/arm/dts/imx6dl-aristainetos2b_4.dts      |  50 ++
 .../dts/imx6dl-aristainetos2b_7-u-boot.dtsi   |  19 +
 arch/arm/dts/imx6dl-aristainetos2b_7.dts      |  16 +
 .../imx6dl-aristainetos2b_csl_4-u-boot.dtsi   |  13 +
 arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts  |  50 ++
 .../imx6dl-aristainetos2b_csl_7-u-boot.dtsi   |  19 +
 arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts  |  16 +
 .../dts/imx6dl-aristainetos2c_4-u-boot.dtsi   |  13 +
 arch/arm/dts/imx6dl-aristainetos2c_4.dts      |  50 ++
 .../dts/imx6dl-aristainetos2c_7-u-boot.dtsi   |  19 +
 arch/arm/dts/imx6dl-aristainetos2c_7.dts      |  16 +
 .../arm/dts/imx6qdl-aristainetos2-common.dtsi | 492 +++++++++++++
 .../arm/dts/imx6qdl-aristainetos2-u-boot.dtsi | 101 +++
 arch/arm/dts/imx6qdl-aristainetos2.dtsi       | 244 +++++++
 .../dts/imx6qdl-aristainetos2b-u-boot.dtsi    |  77 ++
 arch/arm/dts/imx6qdl-aristainetos2b.dtsi      | 266 +++++++
 .../imx6qdl-aristainetos2b_csl-u-boot.dtsi    |  77 ++
 arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi  | 248 +++++++
 .../dts/imx6qdl-aristainetos2c-u-boot.dtsi    |  77 ++
 arch/arm/dts/imx6qdl-aristainetos2c.dtsi      | 228 ++++++
 arch/arm/mach-imx/mx6/Kconfig                 |  39 +-
 board/aristainetos/Kconfig                    |  34 +-
 board/aristainetos/MAINTAINERS                |  31 +-
 board/aristainetos/aristainetos-v1.c          | 278 -------
 board/aristainetos/aristainetos-v2.c          | 686 ------------------
 board/aristainetos/aristainetos.c             | 592 +++++++++++----
 board/aristainetos/aristainetos.cfg           |  32 -
 board/aristainetos/aristainetos2.cfg          |   3 +
 board/aristainetos/clocks.cfg                 |  23 -
 board/aristainetos/common/Kconfig             |  35 +
 board/aristainetos/ddr-setup.cfg              |  60 --
 board/aristainetos/mt41j128M.cfg              |  69 --
 configs/aristainetos2_defconfig               |  64 +-
 configs/aristainetos2b_defconfig              |  66 +-
 configs/aristainetos2bcsl_defconfig           | 115 +++
 configs/aristainetos2c_defconfig              | 115 +++
 configs/aristainetos_defconfig                |  68 --
 drivers/video/lg4573.c                        | 175 ++++-
 include/configs/aristainetos-common.h         | 195 -----
 include/configs/aristainetos.h                |  43 --
 include/configs/aristainetos2.h               | 445 +++++++++++-
 include/configs/aristainetos2b.h              |  50 --
 scripts/config_whitelist.txt                  |   3 -
 51 files changed, 3840 insertions(+), 1734 deletions(-)
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_4.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_7.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_7.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_7.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_7.dts
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2-common.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b_csl-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2c-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2c.dtsi
 delete mode 100644 board/aristainetos/aristainetos-v1.c
 delete mode 100644 board/aristainetos/aristainetos-v2.c
 delete mode 100644 board/aristainetos/aristainetos.cfg
 delete mode 100644 board/aristainetos/clocks.cfg
 create mode 100644 board/aristainetos/common/Kconfig
 delete mode 100644 board/aristainetos/ddr-setup.cfg
 delete mode 100644 board/aristainetos/mt41j128M.cfg
 create mode 100644 configs/aristainetos2bcsl_defconfig
 create mode 100644 configs/aristainetos2c_defconfig
 delete mode 100644 configs/aristainetos_defconfig
 delete mode 100644 include/configs/aristainetos-common.h
 delete mode 100644 include/configs/aristainetos.h
 delete mode 100644 include/configs/aristainetos2b.h
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/29 imx6: remove aristainetos board

remove not anymore used aristainetos board.

---

 arch/arm/mach-imx/mx6/Kconfig        |   3 -
 board/aristainetos/Kconfig           |  10 -
 board/aristainetos/MAINTAINERS       |   2 -
 board/aristainetos/aristainetos-v1.c | 278 ---------------------------
 board/aristainetos/aristainetos.c    |   4 +-
 board/aristainetos/aristainetos.cfg  |  32 ---
 board/aristainetos/clocks.cfg        |  23 ---
 board/aristainetos/ddr-setup.cfg     |  60 ------
 board/aristainetos/mt41j128M.cfg     |  69 -------
 configs/aristainetos_defconfig       |  68 -------
 include/configs/aristainetos.h       |  43 -----
 11 files changed, 1 insertion(+), 591 deletions(-)
 delete mode 100644 board/aristainetos/aristainetos-v1.c
 delete mode 100644 board/aristainetos/aristainetos.cfg
 delete mode 100644 board/aristainetos/clocks.cfg
 delete mode 100644 board/aristainetos/ddr-setup.cfg
 delete mode 100644 board/aristainetos/mt41j128M.cfg
 delete mode 100644 configs/aristainetos_defconfig
 delete mode 100644 include/configs/aristainetos.h
arch/arm/mach-imx/mx6/Kconfig +0 -3
index 607210520f..6c1a1120d8 100644
@@ -125,9 +125,6 @@ config TARGET_APALIS_IMX6
 	imply CMD_DM
 	imply CMD_SATA
 
-config TARGET_ARISTAINETOS
-	bool "aristainetos"
-
 config TARGET_ARISTAINETOS2
 	bool "aristainetos2"
 	select BOARD_LATE_INIT
board/aristainetos/Kconfig +0 -10
index e416c9ac0d..0341bdfb28 100644
@@ -1,13 +1,3 @@
-if TARGET_ARISTAINETOS
-
-config SYS_BOARD
-	default "aristainetos"
-
-config SYS_CONFIG_NAME
-	default "aristainetos"
-
-endif
-
 if TARGET_ARISTAINETOS2
 
 config SYS_BOARD
board/aristainetos/MAINTAINERS +0 -2
index b463f7b176..c9e05285df 100644
@@ -2,8 +2,6 @@ ARISTAINETOS BOARD
 M:	Heiko Schocher <[email protected]>
 S:	Maintained
 F:	board/aristainetos/
-F:	include/configs/aristainetos.h
-F:	configs/aristainetos_defconfig
 F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
 F:	configs/aristainetos2b_defconfig
board/aristainetos/aristainetos-v1.c deleted +0 -278

278 lines not on this page · raw message

board/aristainetos/aristainetos.c +1 -3
index 9f744b30b3..873b354db8 100644
@@ -58,9 +58,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define ECSPI4_CS1		IMX_GPIO_NR(5, 2)
 
-#if (CONFIG_SYS_BOARD_VERSION == 1)
-#include "./aristainetos-v1.c"
-#elif ((CONFIG_SYS_BOARD_VERSION == 2) || (CONFIG_SYS_BOARD_VERSION == 3))
+#if ((CONFIG_SYS_BOARD_VERSION == 2) || (CONFIG_SYS_BOARD_VERSION == 3))
 #include "./aristainetos-v2.c"
 #endif
 
board/aristainetos/aristainetos.cfg deleted +0 -32
deleted file mode 100644
index fb746782ac..0000000000
@@ -1,32 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2014
- * Heiko Schocher, DENX Software Engineering, hs at denx.de.
- *
- * Based on:
- * Copyright (C) 2013 Boundary Devices
- *
- * Refer doc/README.imximage for more details about how-to configure
- * and create imximage boot image
- *
- * The syntax is taken as close as possible with the kwbimage
- */
-
-/* image version */
-IMAGE_VERSION 2
-
-/*
- * Boot Device : one of
- * spi, sd
- */
-BOOT_FROM      spi
-
-#define __ASSEMBLY__
-#include <config.h>
-#include "asm/arch/mx6-ddr.h"
-#include "asm/arch/iomux.h"
-#include "asm/arch/crm_regs.h"
-
-#include "ddr-setup.cfg"
-#include "mt41j128M.cfg"
-#include "clocks.cfg"
board/aristainetos/clocks.cfg deleted +0 -23
deleted file mode 100644
index 58976e72b0..0000000000
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2013 Boundary Devices
- *
- * Device Configuration Data (DCD)
- *
- * Each entry must have the format:
- * Addr-type           Address        Value
- *
- * where:
- *      Addr-type register length (1,2 or 4 bytes)
- *      Address   absolute address of the register
- *      value     value to be stored in the register
- */
-
-/* set the default clock gate to save power */
-DATA 4, CCM_CCGR0, 0x00c03f3f
-DATA 4, CCM_CCGR1, 0x0030fcff
-DATA 4, CCM_CCGR2, 0x0fffcfc0
-DATA 4, CCM_CCGR3, 0x3ff0300f
-DATA 4, CCM_CCGR4, 0xfffff30c /* enable NAND/GPMI/BCH clocks */
-DATA 4, CCM_CCGR5, 0x0f0000c3
-DATA 4, CCM_CCGR6, 0x000003ff
board/aristainetos/ddr-setup.cfg deleted +0 -60

60 lines not on this page · raw message

board/aristainetos/mt41j128M.cfg deleted +0 -69

69 lines not on this page · raw message

configs/aristainetos_defconfig deleted +0 -68

68 lines not on this page · raw message

include/configs/aristainetos.h deleted +0 -43

43 lines not on this page · raw message

Signature · 1 line
2.21.0
#2 lore raw

PATCH 1/29 imx6: remove aristainetos board

Quoted 2 lines

remove not anymore used aristainetos board.

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
=====================================================================
#3 lore raw

PATCH 2/29 video: lg4573: convert to DM

In reply to Heiko Schocher

convert this driver to support DM.

---

 drivers/video/lg4573.c          | 175 +++++++++++++++++++++++++-------
 include/configs/aristainetos2.h |   2 -
 scripts/config_whitelist.txt    |   2 -
 3 files changed, 136 insertions(+), 43 deletions(-)
drivers/video/lg4573.c +136 -39
index 46d9ec83ce..997e854ef8 100644
@@ -5,36 +5,40 @@
  *
  */
 #include <common.h>
+#include <backlight.h>
+#include <display.h>
+#include <dm.h>
+#include <dm/read.h>
+#include <dm/uclass-internal.h>
 #include <errno.h>
 #include <spi.h>
+#include <asm/gpio.h>
 
 #define PWR_ON_DELAY_MSECS  120
 
-static int lb043wv_spi_write_u16(struct spi_slave *spi, u16 val)
+static int lb043wv_spi_write_u16(struct spi_slave *slave, u16 val)
 {
-	unsigned long flags = SPI_XFER_BEGIN;
 	unsigned short buf16 = htons(val);
 	int ret = 0;
 
-	flags |= SPI_XFER_END;
-
-	ret = spi_xfer(spi, 16, &buf16, NULL, flags);
+	ret = spi_xfer(slave, 16, &buf16, NULL,
+		       SPI_XFER_BEGIN | SPI_XFER_END);
 	if (ret)
 		debug("%s: Failed to send: %d\n", __func__, ret);
 
 	return ret;
 }
 
-static void lb043wv_spi_write_u16_array(struct spi_slave *spi, u16 *buff,
+static void lb043wv_spi_write_u16_array(struct spi_slave *slave, u16 *buff,
 					int size)
 {
 	int i;
 
 	for (i = 0; i < size; i++)
-		lb043wv_spi_write_u16(spi, buff[i]);
+		lb043wv_spi_write_u16(slave, buff[i]);
 }
 
-static void lb043wv_display_mode_settings(struct spi_slave *spi)
+static void lb043wv_display_mode_settings(struct spi_slave *slave)
 {
 	static u16 display_mode_settings[] = {
 	  0x703A,
@@ -72,11 +76,11 @@ static void lb043wv_display_mode_settings(struct spi_slave *spi)
 	};
 
 	debug("transfer display mode settings\n");
-	lb043wv_spi_write_u16_array(spi, display_mode_settings,
+	lb043wv_spi_write_u16_array(slave, display_mode_settings,
 				    ARRAY_SIZE(display_mode_settings));
 }
 
-static void lb043wv_power_settings(struct spi_slave *spi)
+static void lb043wv_power_settings(struct spi_slave *slave)
 {
 	static u16 power_settings[] = {
 	  0x70C0,
@@ -103,11 +107,11 @@ static void lb043wv_power_settings(struct spi_slave *spi)
 	};
 
 	debug("transfer power settings\n");
-	lb043wv_spi_write_u16_array(spi, power_settings,
+	lb043wv_spi_write_u16_array(slave, power_settings,
 				    ARRAY_SIZE(power_settings));
 }
 
-static void lb043wv_gamma_settings(struct spi_slave *spi)
+static void lb043wv_gamma_settings(struct spi_slave *slave)
 {
 	static u16 gamma_settings[] = {
 	  0x70D0,
@@ -173,54 +177,57 @@ static void lb043wv_gamma_settings(struct spi_slave *spi)
 	};
 
 	debug("transfer gamma settings\n");
-	lb043wv_spi_write_u16_array(spi, gamma_settings,
+	lb043wv_spi_write_u16_array(slave, gamma_settings,
 				    ARRAY_SIZE(gamma_settings));
 }
 
-static void lb043wv_display_on(struct spi_slave *spi)
+static void lb043wv_display_on(struct spi_slave *slave)
 {
 	static u16 sleep_out = 0x7011;
 	static u16 display_on = 0x7029;
 
-	lb043wv_spi_write_u16(spi, sleep_out);
+	lb043wv_spi_write_u16(slave, sleep_out);
 	mdelay(PWR_ON_DELAY_MSECS);
-	lb043wv_spi_write_u16(spi, display_on);
+	lb043wv_spi_write_u16(slave, display_on);
 }
 
-int lg4573_spi_startup(unsigned int bus, unsigned int cs,
-	unsigned int max_hz, unsigned int spi_mode)
+static int lg4573_spi_startup(struct spi_slave *slave)
 {
-	struct spi_slave *spi;
 	int ret;
 
-	spi = spi_setup_slave(bus, cs, max_hz, spi_mode);
-	if (!spi) {
-		debug("%s: Failed to set up slave\n", __func__);
-		return -1;
-	}
-
-	ret = spi_claim_bus(spi);
-	if (ret) {
-		debug("%s: Failed to claim SPI bus: %d\n", __func__, ret);
-		goto err_claim_bus;
-	}
+	ret = spi_claim_bus(slave);
+	if (ret)
+		return ret;
 
-	lb043wv_display_mode_settings(spi);
-	lb043wv_power_settings(spi);
-	lb043wv_gamma_settings(spi);
+	lb043wv_display_mode_settings(slave);
+	lb043wv_power_settings(slave);
+	lb043wv_gamma_settings(slave);
+	lb043wv_display_on(slave);
 
-	lb043wv_display_on(spi);
+	spi_release_bus(slave);
 	return 0;
-err_claim_bus:
-	spi_free_slave(spi);
-	return -1;
 }
 
 static int do_lgset(cmd_tbl_t *cmdtp, int flag, int argc,
 		       char * const argv[])
 {
-	lg4573_spi_startup(CONFIG_LG4573_BUS, CONFIG_LG4573_CS, 10000000,
-			   SPI_MODE_0);
+	struct spi_slave *slave;
+	struct udevice *dev;
+	int ret;
+
+	ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
+					  DM_GET_DRIVER(lg4573_lcd), &dev);
+	if (ret) {
+		printf("%s: Could not get lg4573 device\n", __func__);
+		return ret;
+	}
+	slave = dev_get_parent_priv(dev);
+	if (!slave) {
+		printf("%s: No slave data\n", __func__);
+		return -ENODEV;
+	}
+	lg4573_spi_startup(slave);
+
 	return 0;
 }
 
@@ -229,3 +236,93 @@ U_BOOT_CMD(
 	"set lgdisplay",
 	""
 );
+
+static int lg4573_bind(struct udevice *dev)
+{
+	return 0;
+}
+
+static int lg4573_probe(struct udevice *dev)
+{
+	return 0;
+}
+
+static const struct udevice_id lg4573_ids[] = {
+	{ .compatible = "lg,lg4573" },
+	{ }
+};
+
+struct lg4573_lcd_priv {
+	struct display_timing timing;
+	struct udevice *backlight;
+	struct gpio_desc enable;
+	int panel_bpp;
+	u32 power_on_delay;
+};
+
+static int lg4573_lcd_read_timing(struct udevice *dev,
+				  struct display_timing *timing)
+{
+	struct lg4573_lcd_priv *priv = dev_get_priv(dev);
+
+	memcpy(timing, &priv->timing, sizeof(struct display_timing));
+
+	return 0;
+}
+
+static int lg4573_lcd_enable(struct udevice *dev, int bpp,
+			     const struct display_timing *edid)
+{
+	struct spi_slave *slave = dev_get_parent_priv(dev);
+	struct lg4573_lcd_priv *priv = dev_get_priv(dev);
+	int ret = 0;
+
+	dm_gpio_set_value(&priv->enable, 1);
+	ret = backlight_enable(priv->backlight);
+
+	mdelay(priv->power_on_delay);
+	lg4573_spi_startup(slave);
+
+	return ret;
+};
+
+static const struct dm_display_ops lg4573_lcd_ops = {
+	.read_timing = lg4573_lcd_read_timing,
+	.enable = lg4573_lcd_enable,
+};
+
+static int lg4573_ofdata_to_platdata(struct udevice *dev)
+{
+	struct lg4573_lcd_priv *priv = dev_get_priv(dev);
+	int ret;
+
+	ret = uclass_get_device_by_phandle(UCLASS_PANEL_BACKLIGHT, dev,
+					   "backlight", &priv->backlight);
+	if (ret) {
+		debug("%s: Cannot get backlight: ret=%d\n", __func__, ret);
+		return log_ret(ret);
+	}
+	ret = gpio_request_by_name(dev, "enable-gpios", 0, &priv->enable,
+				   GPIOD_IS_OUT);
+	if (ret) {
+		debug("%s: Warning: cannot get enable GPIO: ret=%d\n",
+		      __func__, ret);
+		if (ret != -ENOENT)
+			return log_ret(ret);
+	}
+
+	priv->power_on_delay = dev_read_u32_default(dev, "power-on-delay", 10);
+
+	return 0;
+}
+
+U_BOOT_DRIVER(lg4573_lcd) = {
+	.name   = "lg4573",
+	.id     = UCLASS_DISPLAY,
+	.ops    = &lg4573_lcd_ops,
+	.ofdata_to_platdata	= lg4573_ofdata_to_platdata,
+	.of_match = lg4573_ids,
+	.bind   = lg4573_bind,
+	.probe  = lg4573_probe,
+	.priv_auto_alloc_size = sizeof(struct lg4573_lcd_priv),
+};
include/configs/aristainetos2.h +0 -2
index 361e6ac654..d8858559d8 100644
@@ -42,8 +42,6 @@
 /* Framebuffer */
 #define CONFIG_SYS_LDB_CLOCK 33246000
 #define CONFIG_LG4573
-#define CONFIG_LG4573_BUS 0
-#define CONFIG_LG4573_CS 0
 
 #include "aristainetos-common.h"
 
scripts/config_whitelist.txt +0 -2
index 7784922693..c8e5eebe00 100644
@@ -1021,8 +1021,6 @@ CONFIG_LD9040
 CONFIG_LEGACY
 CONFIG_LEGACY_BOOTCMD_ENV
 CONFIG_LG4573
-CONFIG_LG4573_BUS
-CONFIG_LG4573_CS
 CONFIG_LINUX
 CONFIG_LINUX_RESET_VEC
 CONFIG_LITTLETON_LCD
Signature · 1 line
2.21.0
#4 lore raw

PATCH 2/29 video: lg4573: convert to DM

Quoted 2 lines

convert this driver to support DM.

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
=====================================================================
#5 lore raw

PATCH 3/29 imx6: aristainetos: move defines to Kconfig

In reply to Heiko Schocher

move defines, which are already moved to Kconfig
out of board config.

---

 arch/arm/mach-imx/mx6/Kconfig         |  9 +++++++
 board/aristainetos/Kconfig            | 15 ++++++++++-
 board/aristainetos/common/Kconfig     | 38 +++++++++++++++++++++++++++
 configs/aristainetos2_defconfig       | 11 +++++---
 configs/aristainetos2b_defconfig      |  2 +-
 include/configs/aristainetos-common.h | 10 -------
 include/configs/aristainetos2.h       |  4 ---
 include/configs/aristainetos2b.h      |  4 ---
 8 files changed, 69 insertions(+), 24 deletions(-)
 create mode 100644 board/aristainetos/common/Kconfig
arch/arm/mach-imx/mx6/Kconfig +9 -0
index 6c1a1120d8..90dc31a8dc 100644
@@ -128,10 +128,19 @@ config TARGET_APALIS_IMX6
 config TARGET_ARISTAINETOS2
 	bool "aristainetos2"
 	select BOARD_LATE_INIT
+	select MX6DL
+	select SYS_I2C_MXC
+	select MXC_UART
+	select FEC_MXC
+	imply CMD_SATA
 
 config TARGET_ARISTAINETOS2B
 	bool "Support aristainetos2-revB"
 	select BOARD_LATE_INIT
+	select MX6DL
+	select SYS_I2C_MXC
+	select MXC_UART
+	select FEC_MXC
 
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
board/aristainetos/Kconfig +14 -1
index 0341bdfb28..60ad69fa5b 100644
@@ -1,19 +1,32 @@
 if TARGET_ARISTAINETOS2
 
+source "board/aristainetos/common/Kconfig"
+
 config SYS_BOARD
 	default "aristainetos"
 
-config SYS_CONFIG_NAME
+config SYS_BOARD_VERSION
+	default 2
+
+config BOARDNAME
 	default "aristainetos2"
 
 endif
 
 if TARGET_ARISTAINETOS2B
 
+source "board/aristainetos/common/Kconfig"
+
 config SYS_BOARD
 	default "aristainetos"
 
 config SYS_CONFIG_NAME
 	default "aristainetos2b"
 
+config SYS_BOARD_VERSION
+	default 3
+
+config BOARDNAME
+	default "aristainetos2-revB"
+
 endif
board/aristainetos/common/Kconfig new file +38 -0
new file mode 100644
index 0000000000..53a3f4d552
@@ -0,0 +1,38 @@
+config BOARDNAME
+	string "name of the board"
+	help
+	  set the name of the board.
+
+config SYS_BOARD_VERSION
+	int "select version of aristainetos board"
+	help
+	  version of aristainetos board version
+	  2 version 2
+	  3 version 2b
+
+config SYS_I2C_MXC_I2C1
+	default y
+
+config SYS_I2C_MXC_I2C2
+	default y
+
+config SYS_I2C_MXC_I2C3
+	default y
+
+config SYS_I2C_MXC_I2C4
+	default y
+
+config SYS_MALLOC_LEN
+	default 0x4000000
+
+config ENV_SIZE
+	default 0x3000
+
+config ENV_SECT_SIZE
+	default 0x10000
+
+config ENV_OFFSET
+	default 0xd0000
+
+config SYS_CONFIG_NAME
+	default "aristainetos2"
configs/aristainetos2_defconfig +7 -4
index 0c8958d57b..48e58e5be2 100644
@@ -7,7 +7,7 @@ CONFIG_ENV_OFFSET=0xD0000
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg,MX6DL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -17,12 +17,16 @@ CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
+# CONFIG_BOOTM_NETBSD is not set
+# CONFIG_BOOTM_PLAN9 is not set
+# CONFIG_BOOTM_RTEMS is not set
+# CONFIG_BOOTM_VXWORKS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND_TRIMFFS=y
-CONFIG_CMD_SF=y
+# CONFIG_CMD_SATA is not set
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
@@ -44,7 +48,6 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_FSL_USDHC=y
 CONFIG_NAND=y
 CONFIG_NAND_MXS=y
-CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_BUS=3
 CONFIG_SF_DEFAULT_CS=1
 CONFIG_SF_DEFAULT_MODE=0
@@ -66,4 +69,4 @@ CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_IMX_WATCHDOG=y
-CONFIG_OF_LIBFDT=y
+# CONFIG_EFI_LOADER is not set
configs/aristainetos2b_defconfig +1 -1
index c387009465..d64691df49 100644
@@ -7,7 +7,7 @@ CONFIG_ENV_OFFSET=0xD0000
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg,MX6DL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
include/configs/aristainetos-common.h +0 -10
index 1d84db5098..ab14a1a392 100644
@@ -17,15 +17,9 @@
 #define CONFIG_MACH_TYPE	4501
 #define CONFIG_MMCROOT		"/dev/mmcblk0p1"
 
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(64 * SZ_1M)
-
-#define CONFIG_MXC_UART
-
 /* MMC Configs */
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 
-#define CONFIG_FEC_MXC
 #define IMX_FEC_BASE			ENET_BASE_ADDR
 #define CONFIG_ETHPRIME			"FEC"
 #define CONFIG_FEC_MXC_PHYADDR		0
@@ -151,10 +145,6 @@
 
 /* I2C */
 #define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_MXC
-#define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
-#define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
-#define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
 #define CONFIG_SYS_I2C_SPEED		100000
 #define CONFIG_SYS_I2C_SLAVE		0x7f
 #define CONFIG_SYS_I2C_NOPROBES		{ {0, 0x00} }
include/configs/aristainetos2.h +0 -4
index d8858559d8..01998f0295 100644
@@ -11,9 +11,7 @@
 #ifndef __ARISTAINETOS2_CONFIG_H
 #define __ARISTAINETOS2_CONFIG_H
 
-#define CONFIG_SYS_BOARD_VERSION	2
 #define CONFIG_HOSTNAME		"aristainetos2"
-#define CONFIG_BOARDNAME	"aristainetos2"
 
 #define CONFIG_MXC_UART_BASE	UART2_BASE
 #define CONSOLE_DEV	"ttymxc1"
@@ -33,8 +31,6 @@
 		"ubifsload ${fit_addr_r} /boot/system.itb; " \
 		"imi ${fit_addr_r}\0 "
 
-#define CONFIG_SYS_I2C_MXC_I2C4		/* enable I2C bus 4 */
-
 #define ARISTAINETOS_USB_OTG_PWR	IMX_GPIO_NR(4, 15)
 #define ARISTAINETOS_USB_H1_PWR	IMX_GPIO_NR(1, 0)
 #define CONFIG_GPIO_ENABLE_SPI_FLASH	IMX_GPIO_NR(2, 15)
include/configs/aristainetos2b.h +0 -4
index cdeb7a3b03..a7ba48e315 100644
@@ -11,9 +11,7 @@
 #ifndef __ARISTAINETOS2B_CONFIG_H
 #define __ARISTAINETOS2B_CONFIG_H
 
-#define CONFIG_SYS_BOARD_VERSION	3
 #define CONFIG_HOSTNAME		"aristainetos2"
-#define CONFIG_BOARDNAME	"aristainetos2-revB"
 
 #define CONFIG_MXC_UART_BASE	UART2_BASE
 #define CONSOLE_DEV	"ttymxc1"
@@ -33,8 +31,6 @@
 		"ubifsload ${fit_addr_r} /boot/system.itb; " \
 		"imi ${fit_addr_r}\0 " \
 
-#define CONFIG_SYS_I2C_MXC_I2C4		/* enable I2C bus 4 */
-
 #define ARISTAINETOS_USB_OTG_PWR	IMX_GPIO_NR(4, 15)
 #define ARISTAINETOS_USB_H1_PWR	IMX_GPIO_NR(1, 0)
 #define CONFIG_GPIO_ENABLE_SPI_FLASH	IMX_GPIO_NR(2, 15)
Signature · 1 line
2.21.0
#6 lore raw

PATCH 3/29 imx6: aristainetos: move defines to Kconfig

Quoted 3 lines

move defines, which are already moved to Kconfig
out of board config.

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
=====================================================================
#7 lore raw

PATCH 4/29 imx6: aristainetos: remove 2b version

In reply to Heiko Schocher

remove 2b version of aristainetos board, as it
is easier to make the DM / DTS port and introduce
the 2b board version again (also some more board
version).

---

 arch/arm/mach-imx/mx6/Kconfig     |  8 ----
 board/aristainetos/Kconfig        | 18 ---------
 board/aristainetos/MAINTAINERS    |  1 -
 board/aristainetos/common/Kconfig |  1 -
 configs/aristainetos2b_defconfig  | 67 -------------------------------
 include/configs/aristainetos2b.h  | 46 ---------------------
 6 files changed, 141 deletions(-)
 delete mode 100644 configs/aristainetos2b_defconfig
 delete mode 100644 include/configs/aristainetos2b.h
arch/arm/mach-imx/mx6/Kconfig +0 -8
index 90dc31a8dc..3892d0a0e9 100644
@@ -134,14 +134,6 @@ config TARGET_ARISTAINETOS2
 	select FEC_MXC
 	imply CMD_SATA
 
-config TARGET_ARISTAINETOS2B
-	bool "Support aristainetos2-revB"
-	select BOARD_LATE_INIT
-	select MX6DL
-	select SYS_I2C_MXC
-	select MXC_UART
-	select FEC_MXC
-
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
 	select BOARD_LATE_INIT
board/aristainetos/Kconfig +0 -18
index 60ad69fa5b..2bb12fce75 100644
@@ -12,21 +12,3 @@ config BOARDNAME
 	default "aristainetos2"
 
 endif
-
-if TARGET_ARISTAINETOS2B
-
-source "board/aristainetos/common/Kconfig"
-
-config SYS_BOARD
-	default "aristainetos"
-
-config SYS_CONFIG_NAME
-	default "aristainetos2b"
-
-config SYS_BOARD_VERSION
-	default 3
-
-config BOARDNAME
-	default "aristainetos2-revB"
-
-endif
board/aristainetos/MAINTAINERS +0 -1
index c9e05285df..7e9f38d174 100644
@@ -4,4 +4,3 @@ S:	Maintained
 F:	board/aristainetos/
 F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
-F:	configs/aristainetos2b_defconfig
board/aristainetos/common/Kconfig +0 -1
index 53a3f4d552..16c1325889 100644
@@ -8,7 +8,6 @@ config SYS_BOARD_VERSION
 	help
 	  version of aristainetos board version
 	  2 version 2
-	  3 version 2b
 
 config SYS_I2C_MXC_I2C1
 	default y
configs/aristainetos2b_defconfig deleted +0 -67

67 lines not on this page · raw message

include/configs/aristainetos2b.h deleted +0 -46

46 lines not on this page · raw message

Signature · 1 line
2.21.0
#8 lore raw

PATCH 4/29 imx6: aristainetos: remove 2b version

Quoted 5 lines

remove 2b version of aristainetos board, as it
is easier to make the DM / DTS port and introduce
the 2b board version again (also some more board
version).

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
=====================================================================
#9 lore raw

PATCH 5/29 imx6: aristainetos: disable gigabit support

In reply to Heiko Schocher

gigabit support does not work on the aristainetos
board, so disable it.

---

 include/configs/aristainetos-common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/aristainetos-common.h +1 -0
index ab14a1a392..9a6c205c72 100644
@@ -27,6 +27,7 @@
 #define CONFIG_SYS_SPI_ST_ENABLE_WP_PIN
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"disable_giga=yes\0" \
 	"script=u-boot.scr\0" \
 	"fit_file=/boot/system.itb\0" \
 	"loadaddr=0x12000000\0" \
Signature · 1 line
2.21.0
#10 lore raw

PATCH 5/29 imx6: aristainetos: disable gigabit support

Quoted 3 lines

gigabit support does not work on the aristainetos
board, so disable it.

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
=====================================================================
#11 lore raw

PATCH 6/29 imx6: aristainetos: add device tree from linux

In reply to Heiko Schocher

Add device trees from Linux in preparation for driver model conversions.

device tree files taken from Linux:
71ae5fc87c34: "Merge tag 'linux-kselftest-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest"

and added SPDX license identifier.

---

 arch/arm/dts/Makefile                   |   2 +
 arch/arm/dts/imx6dl-aristainetos2_4.dts | 124 +++++
 arch/arm/dts/imx6dl-aristainetos2_7.dts |  64 +++
 arch/arm/dts/imx6qdl-aristainetos2.dtsi | 611 ++++++++++++++++++++++++
 board/aristainetos/MAINTAINERS          |   3 +
 5 files changed, 804 insertions(+)
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_7.dts
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2.dtsi
arch/arm/dts/Makefile +2 -0
index d8846df1bd..a2d673af4f 100644
@@ -574,6 +574,8 @@ dtb-$(CONFIG_MX53) += imx53-cx9020.dtb \
 
 ifneq ($(CONFIG_MX6DL)$(CONFIG_MX6QDL)$(CONFIG_MX6S),)
 dtb-y += \
+	imx6dl-aristainetos2_4.dtb \
+	imx6dl-aristainetos2_7.dtb \
 	imx6dl-brppt2.dtb \
 	imx6dl-dhcom-pdk2.dtb \
 	imx6dl-icore.dtb \
arch/arm/dts/imx6dl-aristainetos2_4.dts new file +124 -0

124 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2_7.dts new file +64 -0

64 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2.dtsi new file +611 -0

611 lines not on this page · raw message

board/aristainetos/MAINTAINERS +3 -0
index 7e9f38d174..91c8ae0738 100644
@@ -4,3 +4,6 @@ S:	Maintained
 F:	board/aristainetos/
 F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
+F:	arch/arm/dts/imx6dl-aristainetos2_4.dts
+F:	arch/arm/dts/imx6dl-aristainetos2_7.dts
+F:	arch/arm/dts/imx6qdl-aristainetos2.dtsi
Signature · 1 line
2.21.0
#12 lore raw

PATCH 6/29 imx6: aristainetos: add device tree from linux

Quoted 6 lines

Add device trees from Linux in preparation for driver model
conversions.
device tree files taken from Linux:
71ae5fc87c34: "Merge tag 'linux-kselftest-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest"
and added SPDX license identifier.

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
=====================================================================
#13 lore raw

PATCH 7/29 imx6: aristainetos: add thumb build

In reply to Heiko Schocher

add thumb build to aristainetos build to save
binary space.

---

 configs/aristainetos2_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/aristainetos2_defconfig +1 -0
index 48e58e5be2..4434d92e74 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_TARGET_ARISTAINETOS2=y
Signature · 1 line
2.21.0
#14 lore raw

PATCH 7/29 imx6: aristainetos: add thumb build

Quoted 3 lines

add thumb build to aristainetos build to save
binary space.

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
=====================================================================
#15 lore raw

PATCH 8/29 imx6: aristainetos: remove aristainetos-v2.c

In reply to Heiko Schocher

remove aristainetos-v2.c file, as we now want to switch to DM/DTS support and have all board specific code in one file. Goal is to setup differences through DT.

---

 board/aristainetos/aristainetos-v2.c  | 686 --------------------------
 board/aristainetos/aristainetos.c     | 648 +++++++++++++++++++++++-
 include/configs/aristainetos-common.h | 186 -------
 include/configs/aristainetos2.h       | 170 ++++++-
 4 files changed, 815 insertions(+), 875 deletions(-)
 delete mode 100644 board/aristainetos/aristainetos-v2.c
 delete mode 100644 include/configs/aristainetos-common.h
board/aristainetos/aristainetos-v2.c deleted +0 -686
deleted file mode 100644
index c0a2e41f02..0000000000
@@ -1,686 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2015
- * Heiko Schocher, DENX Software Engineering, hs at denx.de.
- *
- * Based on:
- * Copyright (C) 2012 Freescale Semiconductor, Inc.
- *
- * Author: Fabio Estevam <[email protected]>
- */
-
-#include <asm/arch/clock.h>
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/iomux.h>
-#include <asm/arch/mx6-pins.h>
-#include <env.h>
-#include <linux/errno.h>
-#include <asm/gpio.h>
-#include <asm/mach-imx/iomux-v3.h>
-#include <asm/mach-imx/boot_mode.h>
-#include <asm/mach-imx/mxc_i2c.h>
-#include <asm/mach-imx/video.h>
-#include <mmc.h>
-#include <fsl_esdhc_imx.h>
-#include <miiphy.h>
-#include <netdev.h>
-#include <asm/arch/mxc_hdmi.h>
-#include <asm/arch/crm_regs.h>
-#include <linux/fb.h>
-#include <ipu_pixfmt.h>
-#include <asm/io.h>
-#include <asm/arch/sys_proto.h>
-#include <pwm.h>
-#include <micrel.h>
-#include <spi.h>
-#include <video.h>
-#include <../drivers/video/imx/ipu.h>
-#if defined(CONFIG_VIDEO_BMP_LOGO)
-	#include <bmp_logo.h>
-#endif
-
-#define USDHC2_PAD_CTRL (PAD_CTL_SPEED_LOW |			\
-	PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
-
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	/* 4.3 display controller */
-	#define ECSPI1_CS0		IMX_GPIO_NR(4, 9)
-	#define ECSPI4_CS0		IMX_GPIO_NR(3, 29)
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	#define ECSPI1_CS0		IMX_GPIO_NR(2, 30)   /* NOR flash */
-	/* 4.3 display controller */
-	#define ECSPI1_CS1		IMX_GPIO_NR(4, 10)
-#endif
-
-#define SOFT_RESET_GPIO		IMX_GPIO_NR(7, 13)
-#define SD2_DRIVER_ENABLE	IMX_GPIO_NR(7, 8)
-
-struct i2c_pads_info i2c_pad_info3 = {
-	.scl = {
-		.i2c_mode = MX6_PAD_GPIO_5__I2C3_SCL | PC,
-		.gpio_mode = MX6_PAD_GPIO_5__GPIO1_IO05 | PC,
-		.gp = IMX_GPIO_NR(1, 5)
-	},
-	.sda = {
-		.i2c_mode = MX6_PAD_GPIO_6__I2C3_SDA | PC,
-		.gpio_mode = MX6_PAD_GPIO_6__GPIO1_IO06 | PC,
-		.gp = IMX_GPIO_NR(1, 6)
-	}
-};
-
-struct i2c_pads_info i2c_pad_info4 = {
-	.scl = {
-		.i2c_mode = MX6_PAD_GPIO_7__I2C4_SCL | PC,
-		.gpio_mode = MX6_PAD_GPIO_7__GPIO1_IO07 | PC,
-		.gp = IMX_GPIO_NR(1, 7)
-	},
-	.sda = {
-		.i2c_mode = MX6_PAD_GPIO_8__I2C4_SDA | PC,
-		.gpio_mode = MX6_PAD_GPIO_8__GPIO1_IO08 | PC,
-		.gp = IMX_GPIO_NR(1, 8)
-	}
-};
-
-iomux_v3_cfg_t const uart1_pads[] = {
-	MX6_PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_EIM_D19__UART1_CTS_B    | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_EIM_D20__UART1_RTS_B    | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
-iomux_v3_cfg_t const uart2_pads[] = {
-	MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
-iomux_v3_cfg_t const uart3_pads[] = {
-	MX6_PAD_EIM_D24__UART3_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_EIM_D25__UART3_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_EIM_D31__UART3_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_EIM_D23__UART3_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
-iomux_v3_cfg_t const uart4_pads[] = {
-	MX6_PAD_KEY_COL0__UART4_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_KEY_ROW0__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
-iomux_v3_cfg_t const gpio_pads[] = {
-	/* LED enable*/
-	MX6_PAD_ENET_CRS_DV__GPIO1_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LED yellow */
-	MX6_PAD_NANDF_CS3__GPIO6_IO16 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LED red */
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	MX6_PAD_EIM_EB0__GPIO2_IO28 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	MX6_PAD_EIM_WAIT__GPIO5_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#endif
-	/* LED green */
-	MX6_PAD_EIM_A24__GPIO5_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LED blue */
-	MX6_PAD_EIM_EB1__GPIO2_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* spi flash WP protect */
-	MX6_PAD_SD4_DAT7__GPIO2_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* spi CS 0 */
-	MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* spi bus #2 SS driver enable */
-	MX6_PAD_EIM_A23__GPIO6_IO06 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* RST_LOC# PHY reset input (has pull-down!)*/
-	MX6_PAD_GPIO_18__GPIO7_IO13 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD 2 level shifter output enable */
-	MX6_PAD_SD3_RST__GPIO7_IO08 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD1 card detect input */
-	MX6_PAD_ENET_RXD0__GPIO1_IO27 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD1 write protect input */
-	MX6_PAD_DI0_PIN4__GPIO4_IO20 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD2 card detect input */
-	MX6_PAD_GPIO_19__GPIO4_IO05 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD2 write protect input */
-	MX6_PAD_SD4_DAT2__GPIO2_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* Touchscreen IRQ */
-	MX6_PAD_SD4_DAT1__GPIO2_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const misc_pads[] = {
-	/* USB_OTG_ID = GPIO1_24*/
-	MX6_PAD_ENET_RX_ER__USB_OTG_ID		| MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* H1 Power enable = GPIO1_0*/
-	MX6_PAD_GPIO_0__USB_H1_PWR		| MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* OTG Power enable = GPIO4_15*/
-	MX6_PAD_KEY_ROW4__USB_OTG_PWR		| MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-iomux_v3_cfg_t const enet_pads[] = {
-	MX6_PAD_ENET_MDIO__ENET_MDIO		| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_ENET_MDC__ENET_MDC		| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TXC__RGMII_TXC	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD0__RGMII_TD0	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD1__RGMII_TD1	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD2__RGMII_TD2	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD3__RGMII_TD3	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_ENET_REF_CLK__ENET_TX_CLK	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RXC__RGMII_RXC	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD0__RGMII_RD0	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD1__RGMII_RD1	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD2__RGMII_RD2	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD3__RGMII_RD3	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const backlight_pads[] = {
-	/* backlight PWM brightness control */
-	MX6_PAD_GPIO_9__PWM1_OUT | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* backlight enable */
-	MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LCD power enable */
-	MX6_PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const ecspi1_pads[] = {
-	MX6_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),
-	MX6_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),
-	MX6_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(SPI_PAD_CTRL),
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	MX6_PAD_EIM_EB2__GPIO2_IO30  | MUX_PAD_CTRL(SPI_PAD_CTRL),
-	MX6_PAD_KEY_COL2__GPIO4_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#endif
-};
-
-static void setup_iomux_enet(void)
-{
-	imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
-}
-
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-iomux_v3_cfg_t const ecspi4_pads[] = {
-	MX6_PAD_EIM_D21__ECSPI4_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_D22__ECSPI4_MISO | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_D28__ECSPI4_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_A25__GPIO5_IO02  | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_D29__GPIO3_IO29  | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-#endif
-
-static iomux_v3_cfg_t const display_pads[] = {
-	MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(DISP_PAD_CTRL),
-	MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15,
-	MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02,
-	MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03,
-	MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
-	MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
-	MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
-	MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
-	MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
-	MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
-	MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
-	MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
-	MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
-	MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
-	MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
-	MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
-	MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
-	MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
-	MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
-	MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
-	MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
-	MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
-	MX6_PAD_DISP0_DAT18__IPU1_DISP0_DATA18,
-	MX6_PAD_DISP0_DAT19__IPU1_DISP0_DATA19,
-	MX6_PAD_DISP0_DAT20__IPU1_DISP0_DATA20,
-	MX6_PAD_DISP0_DAT21__IPU1_DISP0_DATA21,
-	MX6_PAD_DISP0_DAT22__IPU1_DISP0_DATA22,
-	MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23,
-};
-
-int board_spi_cs_gpio(unsigned bus, unsigned cs)
-{
-	if (bus == CONFIG_SF_DEFAULT_BUS && cs == CONFIG_SF_DEFAULT_CS)
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-		return IMX_GPIO_NR(5, 2);
-
-	if (bus == 0 && cs == 0)
-		return IMX_GPIO_NR(4, 9);
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-		return ECSPI1_CS0;
-
-	if (bus == 0 && cs == 1)
-		return ECSPI1_CS1;
-#endif
-	return -1;
-}
-
-static void setup_spi(void)
-{
-	int i;
-
-	imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
-
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	imx_iomux_v3_setup_multiple_pads(ecspi4_pads, ARRAY_SIZE(ecspi4_pads));
-#endif
-
-	for (i = 0; i < 4; i++)
-		enable_spi_clk(true, i);
-
-	gpio_direction_output(ECSPI1_CS0, 1);
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	gpio_direction_output(ECSPI4_CS1, 0);
-	/* set cs0 to high (second device on spi bus #4) */
-	gpio_direction_output(ECSPI4_CS0, 1);
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	gpio_direction_output(ECSPI1_CS1, 1);
-#endif
-}
-
-static void setup_iomux_uart(void)
-{
-	switch (CONFIG_MXC_UART_BASE) {
-	case UART1_BASE:
-		imx_iomux_v3_setup_multiple_pads(uart1_pads,
-						 ARRAY_SIZE(uart1_pads));
-		break;
-	case UART2_BASE:
-		imx_iomux_v3_setup_multiple_pads(uart2_pads,
-						 ARRAY_SIZE(uart2_pads));
-		break;
-	case UART3_BASE:
-		imx_iomux_v3_setup_multiple_pads(uart3_pads,
-						 ARRAY_SIZE(uart3_pads));
-		break;
-	case UART4_BASE:
-		imx_iomux_v3_setup_multiple_pads(uart4_pads,
-						 ARRAY_SIZE(uart4_pads));
-		break;
-	}
-}
-
-int board_phy_config(struct phy_device *phydev)
-{
-	/* control data pad skew - devaddr = 0x02, register = 0x04 */
-	ksz9031_phy_extended_write(phydev, 0x02,
-				   MII_KSZ9031_EXT_RGMII_CTRL_SIG_SKEW,
-				   MII_KSZ9031_MOD_DATA_NO_POST_INC, 0x0000);
-	/* rx data pad skew - devaddr = 0x02, register = 0x05 */
-	ksz9031_phy_extended_write(phydev, 0x02,
-				   MII_KSZ9031_EXT_RGMII_RX_DATA_SKEW,
-				   MII_KSZ9031_MOD_DATA_NO_POST_INC, 0x0000);
-	/* tx data pad skew - devaddr = 0x02, register = 0x06 */
-	ksz9031_phy_extended_write(phydev, 0x02,
-				   MII_KSZ9031_EXT_RGMII_TX_DATA_SKEW,
-				   MII_KSZ9031_MOD_DATA_NO_POST_INC, 0x0000);
-	/* gtx and rx clock pad skew - devaddr = 0x02, register = 0x08 */
-	ksz9031_phy_extended_write(phydev, 0x02,
-				   MII_KSZ9031_EXT_RGMII_CLOCK_SKEW,
-				   MII_KSZ9031_MOD_DATA_NO_POST_INC, 0x03FF);
-
-	if (phydev->drv->config)
-		phydev->drv->config(phydev);
-
-	return 0;
-}
-
-int board_eth_init(bd_t *bis)
-{
-	setup_iomux_enet();
-	return cpu_eth_init(bis);
-}
-
-static int rotate_logo_one(unsigned char *out, unsigned char *in)
-{
-	int   i, j;
-
-	for (i = 0; i < BMP_LOGO_WIDTH; i++)
-		for (j = 0; j < BMP_LOGO_HEIGHT; j++)
-			out[j * BMP_LOGO_WIDTH + BMP_LOGO_HEIGHT - 1 - i] =
-			in[i * BMP_LOGO_WIDTH + j];
-	return 0;
-}
-
-/*
- * Rotate the BMP_LOGO (only)
- * Will only work, if the logo is square, as
- * BMP_LOGO_HEIGHT and BMP_LOGO_WIDTH are defines, not variables
- */
-void rotate_logo(int rotations)
-{
-	unsigned char out_logo[BMP_LOGO_WIDTH * BMP_LOGO_HEIGHT];
-	unsigned char *in_logo;
-	int   i, j;
-
-	if (BMP_LOGO_WIDTH != BMP_LOGO_HEIGHT)
-		return;
-
-	in_logo = bmp_logo_bitmap;
-
-	/* one 90 degree rotation */
-	if (rotations == 1  ||  rotations == 2  ||  rotations == 3)
-		rotate_logo_one(out_logo, in_logo);
-
-	/* second 90 degree rotation */
-	if (rotations == 2  ||  rotations == 3)
-		rotate_logo_one(in_logo, out_logo);
-
-	/* third 90 degree rotation */
-	if (rotations == 3)
-		rotate_logo_one(out_logo, in_logo);
-
-	/* copy result back to original array */
-	if (rotations == 1  ||  rotations == 3)
-		for (i = 0; i < BMP_LOGO_WIDTH; i++)
-			for (j = 0; j < BMP_LOGO_HEIGHT; j++)
-				in_logo[i * BMP_LOGO_WIDTH + j] =
-				out_logo[i * BMP_LOGO_WIDTH + j];
-}
-
-static void enable_display_power(void)
-{
-	imx_iomux_v3_setup_multiple_pads(backlight_pads,
-					 ARRAY_SIZE(backlight_pads));
-
-	/* backlight enable */
-	gpio_direction_output(IMX_GPIO_NR(6, 31), 1);
-	/* LCD power enable */
-	gpio_direction_output(IMX_GPIO_NR(6, 15), 1);
-
-	/* enable backlight PWM 1 */
-	if (pwm_init(0, 0, 0))
-		goto error;
-	/* duty cycle 500ns, period: 3000ns */
-	if (pwm_config(0, 50000, 300000))
-		goto error;
-	if (pwm_enable(0))
-		goto error;
-	return;
-
-error:
-	puts("error init pwm for backlight\n");
-	return;
-}
-
-static void enable_lvds(struct display_info_t const *dev)
-{
-	struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
-	struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
-	int reg;
-	s32 timeout = 100000;
-
-	/* set PLL5 clock */
-	reg = readl(&ccm->analog_pll_video);
-	reg |= BM_ANADIG_PLL_VIDEO_POWERDOWN;
-	writel(reg, &ccm->analog_pll_video);
-
-	/* set PLL5 to 232720000Hz */
-	reg &= ~BM_ANADIG_PLL_VIDEO_DIV_SELECT;
-	reg |= BF_ANADIG_PLL_VIDEO_DIV_SELECT(0x26);
-	reg &= ~BM_ANADIG_PLL_VIDEO_POST_DIV_SELECT;
-	reg |= BF_ANADIG_PLL_VIDEO_POST_DIV_SELECT(0);
-	writel(reg, &ccm->analog_pll_video);
-
-	writel(BF_ANADIG_PLL_VIDEO_NUM_A(0xC0238),
-	       &ccm->analog_pll_video_num);
-	writel(BF_ANADIG_PLL_VIDEO_DENOM_B(0xF4240),
-	       &ccm->analog_pll_video_denom);
-
-	reg &= ~BM_ANADIG_PLL_VIDEO_POWERDOWN;
-	writel(reg, &ccm->analog_pll_video);
-
-	while (timeout--)
-		if (readl(&ccm->analog_pll_video) & BM_ANADIG_PLL_VIDEO_LOCK)
-			break;
-	if (timeout < 0)
-		printf("Warning: video pll lock timeout!\n");
-
-	reg = readl(&ccm->analog_pll_video);
-	reg |= BM_ANADIG_PLL_VIDEO_ENABLE;
-	reg &= ~BM_ANADIG_PLL_VIDEO_BYPASS;
-	writel(reg, &ccm->analog_pll_video);
-
-	/* set LDB0, LDB1 clk select to 000/000 (PLL5 clock) */
-	reg = readl(&ccm->cs2cdr);
-	reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK
-		 | MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK);
-	reg |= (0 << MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_OFFSET)
-		| (0 << MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);
-	writel(reg, &ccm->cs2cdr);
-
-	reg = readl(&ccm->cscmr2);
-	reg |= MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
-	writel(reg, &ccm->cscmr2);
-
-	reg = readl(&ccm->chsccdr);
-	reg |= (CHSCCDR_CLK_SEL_LDB_DI0
-		<< MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
-	writel(reg, &ccm->chsccdr);
-
-	reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES
-	      | IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH
-	      | IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_HIGH
-	      | IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG
-	      | IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT
-	      | IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED
-	      | IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0;
-	writel(reg, &iomux->gpr[2]);
-
-	reg = readl(&iomux->gpr[3]);
-	reg = (reg & ~IOMUXC_GPR3_LVDS0_MUX_CTL_MASK)
-	       | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0
-		  << IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET);
-	writel(reg, &iomux->gpr[3]);
-
-	return;
-}
-
-static void enable_spi_display(struct display_info_t const *dev)
-{
-	struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
-	struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
-	int reg;
-	s32 timeout = 100000;
-
-#if defined(CONFIG_VIDEO_BMP_LOGO)
-	rotate_logo(3);  /* portrait display in landscape mode */
-#endif
-
-	/*
-	 * set ldb clock to 28341000 Hz calculated through the formula:
-	 * (XRES + LEFT_M + RIGHT_M + HSYNC_LEN) *
-	 * (YRES + UPPER_M + LOWER_M + VSYNC_LEN) * REFRESH)
-	 * see:
-	 * https://community.freescale.com/thread/308170
-	 */
-	ipu_set_ldb_clock(28341000);
-
-	reg = readl(&ccm->cs2cdr);
-
-	/* select pll 5 clock */
-	reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK
-		| MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK);
-	writel(reg, &ccm->cs2cdr);
-
-	/* set PLL5 to 197994996Hz */
-	reg &= ~BM_ANADIG_PLL_VIDEO_DIV_SELECT;
-	reg |= BF_ANADIG_PLL_VIDEO_DIV_SELECT(0x21);
-	reg &= ~BM_ANADIG_PLL_VIDEO_POST_DIV_SELECT;
-	reg |= BF_ANADIG_PLL_VIDEO_POST_DIV_SELECT(0);
-	writel(reg, &ccm->analog_pll_video);
-
-	writel(BF_ANADIG_PLL_VIDEO_NUM_A(0xfbf4),
-	       &ccm->analog_pll_video_num);
-	writel(BF_ANADIG_PLL_VIDEO_DENOM_B(0xf4240),
-	       &ccm->analog_pll_video_denom);
-
-	reg &= ~BM_ANADIG_PLL_VIDEO_POWERDOWN;
-	writel(reg, &ccm->analog_pll_video);
-
-	while (timeout--)
-		if (readl(&ccm->analog_pll_video) & BM_ANADIG_PLL_VIDEO_LOCK)
-			break;
-	if (timeout < 0)
-		printf("Warning: video pll lock timeout!\n");
-
-	reg = readl(&ccm->analog_pll_video);
-	reg |= BM_ANADIG_PLL_VIDEO_ENABLE;
-	reg &= ~BM_ANADIG_PLL_VIDEO_BYPASS;
-	writel(reg, &ccm->analog_pll_video);
-
-	/* set LDB0, LDB1 clk select to 000/000 (PLL5 clock) */
-	reg = readl(&ccm->cs2cdr);
-	reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK
-		 | MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK);
-	reg |= (0 << MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_OFFSET)
-		| (0 << MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);
-	writel(reg, &ccm->cs2cdr);
-
-	reg = readl(&ccm->cscmr2);
-	reg |= MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
-	writel(reg, &ccm->cscmr2);
-
-	reg = readl(&ccm->chsccdr);
-	reg |= (CHSCCDR_CLK_SEL_LDB_DI0
-		<< MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
-	reg &= ~MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK;
-	reg |= (2 << MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET);
-	reg &= ~MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK;
-	reg |= (2 << MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET);
-	writel(reg, &ccm->chsccdr);
-
-	reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES
-	      | IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH
-	      | IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_HIGH
-	      | IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG
-	      | IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT
-	      | IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED
-	      | IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0;
-	writel(reg, &iomux->gpr[2]);
-
-	reg = readl(&iomux->gpr[3]);
-	reg = (reg & ~IOMUXC_GPR3_LVDS0_MUX_CTL_MASK)
-	       | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0
-		  << IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET);
-	writel(reg, &iomux->gpr[3]);
-
-	imx_iomux_v3_setup_multiple_pads(
-		display_pads,
-		 ARRAY_SIZE(display_pads));
-
-	return;
-}
-static void setup_display(void)
-{
-	enable_ipu_clock();
-	enable_display_power();
-}
-
-static void setup_iomux_gpio(void)
-{
-	imx_iomux_v3_setup_multiple_pads(gpio_pads, ARRAY_SIZE(gpio_pads));
-}
-
-static void set_gpr_register(void)
-{
-	struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
-
-	writel(IOMUXC_GPR1_APP_CLK_REQ_N | IOMUXC_GPR1_PCIE_RDY_L23 |
-	       IOMUXC_GPR1_EXC_MON_SLVE |
-	       (2 << IOMUXC_GPR1_ADDRS0_OFFSET) |
-	       IOMUXC_GPR1_ACT_CS0,
-	       &iomuxc_regs->gpr[1]);
-	writel(0x0, &iomuxc_regs->gpr[8]);
-	writel(IOMUXC_GPR12_ARMP_IPG_CLK_EN | IOMUXC_GPR12_ARMP_AHB_CLK_EN |
-	       IOMUXC_GPR12_ARMP_ATB_CLK_EN | IOMUXC_GPR12_ARMP_APB_CLK_EN,
-	       &iomuxc_regs->gpr[12]);
-}
-
-int board_early_init_f(void)
-{
-	setup_iomux_uart();
-	setup_iomux_gpio();
-
-	gpio_direction_output(SOFT_RESET_GPIO, 1);
-	gpio_direction_output(SD2_DRIVER_ENABLE, 1);
-	setup_display();
-	set_gpr_register();
-	return 0;
-}
-
-static void setup_i2c4(void)
-{
-	setup_i2c(3, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
-		  &i2c_pad_info4);
-}
-
-static void setup_board_gpio(void)
-{
-	/* enable all LEDs */
-	gpio_request(IMX_GPIO_NR(2, 13), "LED ena"); /* 25 */
-	gpio_direction_output(IMX_GPIO_NR(1, 25), 0);
-
-	/* switch off Status LEDs */
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	gpio_request(IMX_GPIO_NR(6, 16), "LED yellow"); /* 176 */
-	gpio_direction_output(IMX_GPIO_NR(6, 16), 1);
-	gpio_request(IMX_GPIO_NR(2, 28), "LED red"); /* 60 */
-	gpio_direction_output(IMX_GPIO_NR(2, 28), 1);
-	gpio_request(IMX_GPIO_NR(5, 4), "LED green"); /* 132 */
-	gpio_direction_output(IMX_GPIO_NR(5, 4), 1);
-	gpio_request(IMX_GPIO_NR(2, 29), "LED blue"); /* 61 */
-	gpio_direction_output(IMX_GPIO_NR(2, 29), 1);
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	gpio_request(IMX_GPIO_NR(6, 16), "LED yellow"); /* 176 */
-	gpio_direction_output(IMX_GPIO_NR(6, 16), 0);
-	gpio_request(IMX_GPIO_NR(5, 0), "LED red"); /* 128 */
-	gpio_direction_output(IMX_GPIO_NR(5, 0), 0);
-	gpio_request(IMX_GPIO_NR(5, 4), "LED green"); /* 132 */
-	gpio_direction_output(IMX_GPIO_NR(5, 4), 0);
-	gpio_request(IMX_GPIO_NR(2, 29), "LED blue"); /* 61 */
-	gpio_direction_output(IMX_GPIO_NR(2, 29), 0);
-#endif
-}
-
-static void setup_board_spi(void)
-{
-	/* enable spi bus #2 SS drivers (and spi bus #4 SS1 for rev2b) */
-	gpio_direction_output(IMX_GPIO_NR(6, 6), 1);
-}
-
-int board_late_init(void)
-{
-	char *my_bootdelay;
-	char bootmode = 0;
-	char const *panel = env_get("panel");
-
-	/*
-	 * Check the boot-source. If booting from NOR Flash,
-	 * disable bootdelay
-	 */
-	gpio_request(IMX_GPIO_NR(7, 6), "bootsel0");
-	gpio_direction_input(IMX_GPIO_NR(7, 6));
-	gpio_request(IMX_GPIO_NR(7, 7), "bootsel1");
-	gpio_direction_input(IMX_GPIO_NR(7, 7));
-	gpio_request(IMX_GPIO_NR(7, 1), "bootsel2");
-	gpio_direction_input(IMX_GPIO_NR(7, 1));
-	bootmode |= (gpio_get_value(IMX_GPIO_NR(7, 6)) ? 1 : 0) << 0;
-	bootmode |= (gpio_get_value(IMX_GPIO_NR(7, 7)) ? 1 : 0) << 1;
-	bootmode |= (gpio_get_value(IMX_GPIO_NR(7, 1)) ? 1 : 0) << 2;
-
-	if (bootmode == 7) {
-		my_bootdelay = env_get("nor_bootdelay");
-		if (my_bootdelay != NULL)
-			env_set("bootdelay", my_bootdelay);
-		else
-			env_set("bootdelay", "-2");
-	}
-
-	/* if we have the lg panel, we can initialze it now */
-	if (panel)
-		if (!strcmp(panel, displays[1].mode.name))
-			lg4573_spi_startup(CONFIG_LG4573_BUS,
-					   CONFIG_LG4573_CS,
-					   10000000, SPI_MODE_0);
-
-	return 0;
-}
board/aristainetos/aristainetos.c +646 -2

662 lines not on this page · raw message

include/configs/aristainetos-common.h deleted +0 -186

186 lines not on this page · raw message

include/configs/aristainetos2.h +169 -1

175 lines not on this page · raw message

Signature · 1 line
2.21.0
#16 lore raw

PATCH 8/29 imx6: aristainetos: remove aristainetos-v2.c

Quoted 5 lines

remove aristainetos-v2.c file, as we now want to switch to DM/DTS support and have all board specific code in one file. Goal is to setup differences through DT.

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
=====================================================================
#17 lore raw

PATCH 9/29 imx6: aristainetos: prepare dts for other board versions

In reply to Heiko Schocher

as we switch to support DM and DTS, rework the existing DTS trees. Change also Linux specific Device trees, goal is to push this changes to linux.

Collect U-Boot specific changes in separate "*u-boot*" dts files.

---

 .../dts/imx6dl-aristainetos2_4-u-boot.dtsi    |  13 +
 arch/arm/dts/imx6dl-aristainetos2_4.dts       |  79 +--
 arch/arm/dts/imx6dl-aristainetos2_4.dtsi      |  84 +++
 .../dts/imx6dl-aristainetos2_7-u-boot.dtsi    |  19 +
 arch/arm/dts/imx6dl-aristainetos2_7.dts       |  50 +-
 arch/arm/dts/imx6dl-aristainetos2_7.dtsi      |  58 +++
 .../arm/dts/imx6qdl-aristainetos2-common.dtsi | 492 ++++++++++++++++++
 .../arm/dts/imx6qdl-aristainetos2-u-boot.dtsi | 101 ++++
 arch/arm/dts/imx6qdl-aristainetos2.dtsi       | 487 +++--------------
 board/aristainetos/MAINTAINERS                |  10 +-
 board/aristainetos/aristainetos.c             |  68 +++
 configs/aristainetos2_defconfig               |   7 +
 12 files changed, 914 insertions(+), 554 deletions(-)
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_4.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2_7.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2-common.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi
arch/arm/dts/imx6dl-aristainetos2_4-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..ac7052c7b7
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2-u-boot.dtsi>
+
+&lcd_panel {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ipu_disp>;
+	enable-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+	backlight = <&backlight>;
+};
arch/arm/dts/imx6dl-aristainetos2_4.dts +3 -76

100 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2_4.dtsi new file +84 -0

84 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2_7-u-boot.dtsi new file +19 -0
new file mode 100644
index 0000000000..25bc562064
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2-u-boot.dtsi>
+/ {
+	vdd_panel_reg: regulator-panel {
+		compatible = "regulator-fixed";
+		regulator-name = "panel_regulator";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+};
+
+&panel0 {
+	power-supply = <&vdd_panel_reg>;
+};
arch/arm/dts/imx6dl-aristainetos2_7.dts +1 -49

59 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2_7.dtsi new file +58 -0

58 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2-common.dtsi new file +492 -0

492 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi new file +101 -0

101 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2.dtsi +60 -427

594 lines not on this page · raw message

board/aristainetos/MAINTAINERS +8 -2
index 91c8ae0738..2495cd4a37 100644
@@ -4,6 +4,12 @@ S:	Maintained
 F:	board/aristainetos/
 F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
-F:	arch/arm/dts/imx6dl-aristainetos2_4.dts
-F:	arch/arm/dts/imx6dl-aristainetos2_7.dts
 F:	arch/arm/dts/imx6qdl-aristainetos2.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2-common.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2_7.dts
+F:	arch/arm/dts/imx6dl-aristainetos2_7.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2_7-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2_4.dts
+F:	arch/arm/dts/imx6dl-aristainetos2_4.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2_4-u-boot.dtsi
board/aristainetos/aristainetos.c +68 -0

104 lines not on this page · raw message

configs/aristainetos2_defconfig +7 -0
index 4434d92e74..515f9a48a1 100644
@@ -15,6 +15,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_BOUNCE_BUFFER=y
+CONFIG_BOARD_TYPES=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
@@ -42,7 +43,13 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_UBI=y
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6dl-aristainetos2_4"
+CONFIG_OF_LIST="imx6dl-aristainetos2_4 imx6dl-aristainetos2_7"
+CONFIG_DTB_RESELECT=y
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_ENV_SPI_EARLY=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_OFFSET_REDUND=0xE0000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
Signature · 1 line
2.21.0
#18 lore raw

PATCH 9/29 imx6: aristainetos: prepare dts for other board versions

Quoted 6 lines

as we switch to support DM and DTS, rework the existing DTS trees. Change also Linux specific Device trees, goal is to push this changes to linux.
Collect U-Boot specific changes in separate "*u-boot*" dts files.

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
=====================================================================
#19 lore raw

PATCH 10/29 imx6: aristainetos: add DM_SERIAL support

In reply to Heiko Schocher

add DM_SERIAL support for the aristainetos board, and remove not used code from board code.

remove CONSOLE_OVERWRITE_ROUTINE.

---

 arch/arm/mach-imx/mx6/Kconfig     |  2 ++
 board/aristainetos/aristainetos.c | 60 -------------------------------
 configs/aristainetos2_defconfig   |  3 +-
 3 files changed, 4 insertions(+), 61 deletions(-)
arch/arm/mach-imx/mx6/Kconfig +2 -0
index 3892d0a0e9..ede5989502 100644
@@ -132,7 +132,9 @@ config TARGET_ARISTAINETOS2
 	select SYS_I2C_MXC
 	select MXC_UART
 	select FEC_MXC
+	select DM
 	imply CMD_SATA
+	imply CMD_DM
 
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
board/aristainetos/aristainetos.c +0 -60

90 lines not on this page · raw message

configs/aristainetos2_defconfig +2 -1
index 515f9a48a1..03be7f3f8f 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
+CONFIG_SYS_MALLOC_F_LEN=0xe000
 CONFIG_TARGET_ARISTAINETOS2=y
 CONFIG_ENV_SIZE=0x3000
 CONFIG_ENV_OFFSET=0xD0000
@@ -12,7 +13,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_TYPES=y
@@ -69,6 +69,7 @@ CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_MII=y
 CONFIG_PWM_IMX=y
+CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
Signature · 1 line
2.21.0
#20 lore raw

PATCH 10/29 imx6: aristainetos: add DM_SERIAL support

Quoted 4 lines

add DM_SERIAL support for the aristainetos board, and remove not used code from board code.
remove CONSOLE_OVERWRITE_ROUTINE.

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
=====================================================================
#21 lore raw

PATCH 11/29 imx6: aristainetos: convert to DM_MMC

In reply to Heiko Schocher

Enable DM_MMC support.

---

 board/aristainetos/aristainetos.c | 53 -------------------------------
 configs/aristainetos2_defconfig   |  1 +
 include/configs/aristainetos2.h   |  2 +-
 3 files changed, 2 insertions(+), 54 deletions(-)
board/aristainetos/aristainetos.c +0 -53
index 00ffac8eb6..6de71a46ed 100644
@@ -19,8 +19,6 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/video.h>
-#include <mmc.h>
-#include <fsl_esdhc_imx.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <asm/arch/mxc_hdmi.h>
@@ -43,10 +41,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP |			\
-	PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm |			\
-	PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
-
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |			\
 	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
@@ -63,9 +57,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define ECSPI4_CS1		IMX_GPIO_NR(5, 2)
 
-#define USDHC2_PAD_CTRL (PAD_CTL_SPEED_LOW |			\
-	PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
-
 #if (CONFIG_SYS_BOARD_VERSION == 2)
 	/* 4.3 display controller */
 	#define ECSPI1_CS0		IMX_GPIO_NR(4, 9)
@@ -706,15 +697,6 @@ struct i2c_pads_info i2c_pad_info2 = {
 	}
 };
 
-iomux_v3_cfg_t const usdhc1_pads[] = {
-	MX6_PAD_SD1_CLK__SD1_CLK	| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD1_CMD__SD1_CMD	| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD1_DAT0__SD1_DATA0	| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD1_DAT1__SD1_DATA1	| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD1_DAT2__SD1_DATA2	| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD1_DAT3__SD1_DATA3	| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
 int dram_init(void)
 {
 	gd->ram_size = imx_ddr_size();
@@ -722,41 +704,6 @@ int dram_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_FSL_ESDHC_IMX
-struct fsl_esdhc_cfg usdhc_cfg[2] = {
-	{USDHC1_BASE_ADDR},
-	{USDHC2_BASE_ADDR},
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
-	return 1;
-}
-
-int board_mmc_init(bd_t *bis)
-{
-	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-	imx_iomux_v3_setup_multiple_pads(usdhc1_pads, ARRAY_SIZE(usdhc1_pads));
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	/*
-	 * usdhc2 has a levelshifter on the carrier board Rev. DV1,
-	 * that will automatically detect the driving direction.
-	 * During initialisation this isn't working correctly,
-	 * which causes DAT3 to be driven low towards the SD-card.
-	 * This causes a SD-card enetring the SPI-Mode
-	 * and therefore getting inaccessible until next power cycle.
-	 * As workaround we drive the DAT3 line as GPIO and set it high.
-	 * This makes usdhc2 unusable in u-boot, but works for the
-	 * initialisation in Linux
-	 */
-	imx_iomux_v3_setup_pad(MX6_PAD_SD2_DAT3__GPIO1_IO12 |
-			       MUX_PAD_CTRL(NO_PAD_CTRL));
-	gpio_direction_output(IMX_GPIO_NR(1, 12) , 1);
-#endif
-	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-}
-#endif
-
 struct display_info_t const displays[] = {
 	{
 		.bus	= -1,
configs/aristainetos2_defconfig +1 -0
index 03be7f3f8f..02c64a947c 100644
@@ -53,6 +53,7 @@ CONFIG_ENV_SPI_EARLY=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_OFFSET_REDUND=0xE0000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MMC=y
 CONFIG_FSL_USDHC=y
 CONFIG_NAND=y
 CONFIG_NAND_MXS=y
include/configs/aristainetos2.h +1 -1
index 9291cfdffd..b008928c06 100644
@@ -45,7 +45,7 @@
 #define CONFIG_MMCROOT		"/dev/mmcblk0p1"
 
 /* MMC Configs */
-#define CONFIG_SYS_FSL_ESDHC_ADDR      0
+#define CONFIG_SYS_FSL_ESDHC_ADDR      USDHC1_BASE_ADDR
 
 #define IMX_FEC_BASE			ENET_BASE_ADDR
 #define CONFIG_ETHPRIME			"FEC"
Signature · 1 line
2.21.0
#22 lore raw

PATCH 11/29 imx6: aristainetos: convert to DM_MMC

Quoted 2 lines

Enable DM_MMC support.

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
=====================================================================
#23 lore raw

PATCH 12/29 imx6: aristainetos: convert gpio pins to DM and DTS

In reply to Heiko Schocher

Enable DM_GPIO, GPIO_HOG, LED and LED_GPIO as gpio and LEDs are now defined in DTS. Enable also here the pinctrl driver, so pinmux setup is also done.

---

 board/aristainetos/aristainetos.c | 134 ++++++++++++------------------
 configs/aristainetos2_defconfig   |   8 ++
 2 files changed, 61 insertions(+), 81 deletions(-)
board/aristainetos/aristainetos.c +53 -81
index 6de71a46ed..5639eefa15 100644
@@ -38,6 +38,7 @@
 #if defined(CONFIG_VIDEO_BMP_LOGO)
 	#include <bmp_logo.h>
 #endif
+#include <led.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -67,9 +68,6 @@ DECLARE_GLOBAL_DATA_PTR;
 	#define ECSPI1_CS1		IMX_GPIO_NR(4, 10)
 #endif
 
-#define SOFT_RESET_GPIO		IMX_GPIO_NR(7, 13)
-#define SD2_DRIVER_ENABLE	IMX_GPIO_NR(7, 8)
-
 enum {
 	BOARD_TYPE_4 = 4,
 	BOARD_TYPE_7 = 7,
@@ -104,43 +102,6 @@ struct i2c_pads_info i2c_pad_info4 = {
 	}
 };
 
-iomux_v3_cfg_t const gpio_pads[] = {
-	/* LED enable*/
-	MX6_PAD_ENET_CRS_DV__GPIO1_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LED yellow */
-	MX6_PAD_NANDF_CS3__GPIO6_IO16 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LED red */
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	MX6_PAD_EIM_EB0__GPIO2_IO28 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	MX6_PAD_EIM_WAIT__GPIO5_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#endif
-	/* LED green */
-	MX6_PAD_EIM_A24__GPIO5_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LED blue */
-	MX6_PAD_EIM_EB1__GPIO2_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* spi flash WP protect */
-	MX6_PAD_SD4_DAT7__GPIO2_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* spi CS 0 */
-	MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* spi bus #2 SS driver enable */
-	MX6_PAD_EIM_A23__GPIO6_IO06 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* RST_LOC# PHY reset input (has pull-down!)*/
-	MX6_PAD_GPIO_18__GPIO7_IO13 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD 2 level shifter output enable */
-	MX6_PAD_SD3_RST__GPIO7_IO08 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD1 card detect input */
-	MX6_PAD_ENET_RXD0__GPIO1_IO27 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD1 write protect input */
-	MX6_PAD_DI0_PIN4__GPIO4_IO20 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD2 card detect input */
-	MX6_PAD_GPIO_19__GPIO4_IO05 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* SD2 write protect input */
-	MX6_PAD_SD4_DAT2__GPIO2_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* Touchscreen IRQ */
-	MX6_PAD_SD4_DAT1__GPIO2_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const misc_pads[] = {
 	/* USB_OTG_ID = GPIO1_24*/
 	MX6_PAD_ENET_RX_ER__USB_OTG_ID		| MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -265,12 +226,16 @@ static void setup_spi(void)
 	for (i = 0; i < 4; i++)
 		enable_spi_clk(true, i);
 
+	gpio_request(ECSPI1_CS0, "spi1_cs0");
 	gpio_direction_output(ECSPI1_CS0, 1);
 #if (CONFIG_SYS_BOARD_VERSION == 2)
+	gpio_request(ECSPI4_CS1, "spi4_cs1");
 	gpio_direction_output(ECSPI4_CS1, 0);
 	/* set cs0 to high (second device on spi bus #4) */
+	gpio_request(ECSPI4_CS0, "spi4_cs0");
 	gpio_direction_output(ECSPI4_CS0, 1);
 #elif (CONFIG_SYS_BOARD_VERSION == 3)
+	gpio_request(ECSPI1_CS1, "spi1_cs1");
 	gpio_direction_output(ECSPI1_CS1, 1);
 #endif
 }
@@ -359,9 +324,13 @@ static void enable_display_power(void)
 					 ARRAY_SIZE(backlight_pads));
 
 	/* backlight enable */
+	gpio_request(IMX_GPIO_NR(6, 31), "backlight");
 	gpio_direction_output(IMX_GPIO_NR(6, 31), 1);
+	gpio_free(IMX_GPIO_NR(6, 31));
 	/* LCD power enable */
+	gpio_request(IMX_GPIO_NR(6, 15), "LCD_power_enable");
 	gpio_direction_output(IMX_GPIO_NR(6, 15), 1);
+	gpio_free(IMX_GPIO_NR(6, 15));
 
 	/* enable backlight PWM 1 */
 	if (pwm_init(0, 0, 0))
@@ -547,11 +516,6 @@ static void setup_display(void)
 	enable_display_power();
 }
 
-static void setup_iomux_gpio(void)
-{
-	imx_iomux_v3_setup_multiple_pads(gpio_pads, ARRAY_SIZE(gpio_pads));
-}
-
 static void set_gpr_register(void)
 {
 	struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
@@ -570,10 +534,6 @@ static void set_gpr_register(void)
 extern char __bss_start[], __bss_end[];
 int board_early_init_f(void)
 {
-	setup_iomux_gpio();
-
-	gpio_direction_output(SOFT_RESET_GPIO, 1);
-	gpio_direction_output(SD2_DRIVER_ENABLE, 1);
 	setup_display();
 	set_gpr_register();
 
@@ -593,37 +553,30 @@ static void setup_i2c4(void)
 		  &i2c_pad_info4);
 }
 
-static void setup_board_gpio(void)
+static void setup_one_led(char *label, int state)
 {
-	/* enable all LEDs */
-	gpio_request(IMX_GPIO_NR(2, 13), "LED ena"); /* 25 */
-	gpio_direction_output(IMX_GPIO_NR(1, 25), 0);
+	struct udevice *dev;
+	int ret;
 
+	ret = led_get_by_label(label, &dev);
+	if (ret == 0)
+		led_set_state(dev, state);
+}
+
+static void setup_board_gpio(void)
+{
+	setup_one_led("led_ena", LEDST_ON);
 	/* switch off Status LEDs */
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	gpio_request(IMX_GPIO_NR(6, 16), "LED yellow"); /* 176 */
-	gpio_direction_output(IMX_GPIO_NR(6, 16), 1);
-	gpio_request(IMX_GPIO_NR(2, 28), "LED red"); /* 60 */
-	gpio_direction_output(IMX_GPIO_NR(2, 28), 1);
-	gpio_request(IMX_GPIO_NR(5, 4), "LED green"); /* 132 */
-	gpio_direction_output(IMX_GPIO_NR(5, 4), 1);
-	gpio_request(IMX_GPIO_NR(2, 29), "LED blue"); /* 61 */
-	gpio_direction_output(IMX_GPIO_NR(2, 29), 1);
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	gpio_request(IMX_GPIO_NR(6, 16), "LED yellow"); /* 176 */
-	gpio_direction_output(IMX_GPIO_NR(6, 16), 0);
-	gpio_request(IMX_GPIO_NR(5, 0), "LED red"); /* 128 */
-	gpio_direction_output(IMX_GPIO_NR(5, 0), 0);
-	gpio_request(IMX_GPIO_NR(5, 4), "LED green"); /* 132 */
-	gpio_direction_output(IMX_GPIO_NR(5, 4), 0);
-	gpio_request(IMX_GPIO_NR(2, 29), "LED blue"); /* 61 */
-	gpio_direction_output(IMX_GPIO_NR(2, 29), 0);
-#endif
+	setup_one_led("led_yellow", LEDST_OFF);
+	setup_one_led("led_red", LEDST_OFF);
+	setup_one_led("led_green", LEDST_OFF);
+	setup_one_led("led_blue", LEDST_OFF);
 }
 
 static void setup_board_spi(void)
 {
 	/* enable spi bus #2 SS drivers (and spi bus #4 SS1 for rev2b) */
+	gpio_request(IMX_GPIO_NR(6, 6), "spi_ena");
 	gpio_direction_output(IMX_GPIO_NR(6, 6), 1);
 }
 
@@ -632,20 +585,23 @@ int board_late_init(void)
 	char *my_bootdelay;
 	char bootmode = 0;
 	char const *panel = env_get("panel");
+	struct gpio_desc *desc;
+	int ret;
 
+	led_default_state();
 	/*
 	 * Check the boot-source. If booting from NOR Flash,
 	 * disable bootdelay
 	 */
-	gpio_request(IMX_GPIO_NR(7, 6), "bootsel0");
-	gpio_direction_input(IMX_GPIO_NR(7, 6));
-	gpio_request(IMX_GPIO_NR(7, 7), "bootsel1");
-	gpio_direction_input(IMX_GPIO_NR(7, 7));
-	gpio_request(IMX_GPIO_NR(7, 1), "bootsel2");
-	gpio_direction_input(IMX_GPIO_NR(7, 1));
-	bootmode |= (gpio_get_value(IMX_GPIO_NR(7, 6)) ? 1 : 0) << 0;
-	bootmode |= (gpio_get_value(IMX_GPIO_NR(7, 7)) ? 1 : 0) << 1;
-	bootmode |= (gpio_get_value(IMX_GPIO_NR(7, 1)) ? 1 : 0) << 2;
+	desc = gpio_hog_lookup_name("bootsel0");
+	if (desc)
+		bootmode |= (dm_gpio_get_value(desc) ? 1 : 0) << 0;
+	desc = gpio_hog_lookup_name("bootsel1");
+	if (desc)
+		bootmode |= (dm_gpio_get_value(desc) ? 1 : 0) << 1;
+	desc = gpio_hog_lookup_name("bootsel2");
+	if (desc)
+		bootmode |= (dm_gpio_get_value(desc) ? 1 : 0) << 2;
 
 	if (bootmode == 7) {
 		my_bootdelay = env_get("nor_bootdelay");
@@ -655,6 +611,22 @@ int board_late_init(void)
 			env_set("bootdelay", "-2");
 	}
 
+	/* read out some jumper values*/
+	ret = gpio_hog_lookup_name("env_reset", &desc);
+	if (!ret) {
+		if (dm_gpio_get_value(desc)) {
+			printf("\nClear env (set back to defaults)\n");
+			run_command("run default_env; saveenv; saveenv", 0);
+		}
+	}
+	ret = gpio_hog_lookup_name("boot_rescue", &desc);
+	if (!ret) {
+		if (dm_gpio_get_value(desc)) {
+			aristainetos_run_rescue_command(16);
+			run_command("run rescue_xload_boot", 0);
+		}
+	}
+
 	/* if we have the lg panel, we can initialze it now */
 	if (panel)
 		if (!strcmp(panel, displays[1].mode.name))
configs/aristainetos2_defconfig +8 -0
index 02c64a947c..4253e4b562 100644
@@ -28,6 +28,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND_TRIMFFS=y
+# CONFIG_CMD_PINMUX is not set
 # CONFIG_CMD_SATA is not set
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
@@ -53,6 +54,11 @@ CONFIG_ENV_SPI_EARLY=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_OFFSET_REDUND=0xE0000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_GPIO=y
+CONFIG_GPIO_HOG=y
+CONFIG_DM_PCA953X=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_FSL_USDHC=y
 CONFIG_NAND=y
@@ -69,6 +75,8 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_MII=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
 CONFIG_PWM_IMX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
Signature · 1 line
2.21.0
#24 lore raw

PATCH 12/29 imx6: aristainetos: convert gpio pins to DM and DTS

Quoted 4 lines

Enable DM_GPIO, GPIO_HOG, LED and LED_GPIO as gpio and LEDs are now defined in DTS. Enable also here the pinctrl driver, so pinmux setup is also done.

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
=====================================================================
#25 lore raw

PATCH 13/29 imx6: aristainetos: convert to DM_USB

In reply to Heiko Schocher

Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB in defconfig.

---

 board/aristainetos/aristainetos.c | 35 -------------------------------
 configs/aristainetos2_defconfig   |  4 ++++
 include/configs/aristainetos2.h   |  3 ---
 3 files changed, 4 insertions(+), 38 deletions(-)
board/aristainetos/aristainetos.c +0 -35
index 5639eefa15..c2218cb5c2 100644
@@ -102,15 +102,6 @@ struct i2c_pads_info i2c_pad_info4 = {
 	}
 };
 
-static iomux_v3_cfg_t const misc_pads[] = {
-	/* USB_OTG_ID = GPIO1_24*/
-	MX6_PAD_ENET_RX_ER__USB_OTG_ID		| MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* H1 Power enable = GPIO1_0*/
-	MX6_PAD_GPIO_0__USB_H1_PWR		| MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* OTG Power enable = GPIO4_15*/
-	MX6_PAD_KEY_ROW4__USB_OTG_PWR		| MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 iomux_v3_cfg_t const enet_pads[] = {
 	MX6_PAD_ENET_MDIO__ENET_MDIO		| MUX_PAD_CTRL(ENET_PAD_CTRL),
 	MX6_PAD_ENET_MDC__ENET_MDC		| MUX_PAD_CTRL(ENET_PAD_CTRL),
@@ -815,7 +806,6 @@ int board_init(void)
 
 	/* GPIO_1 for USB_OTG_ID */
 	clrsetbits_le32(&iomux->gpr[1], IOMUXC_GPR1_USB_OTG_ID_SEL_MASK, 0);
-	imx_iomux_v3_setup_multiple_pads(misc_pads, ARRAY_SIZE(misc_pads));
 	return 0;
 }
 
@@ -825,31 +815,6 @@ int checkboard(void)
 	return 0;
 }
 
-#ifdef CONFIG_USB_EHCI_MX6
-int board_ehci_hcd_init(int port)
-{
-	int ret;
-
-	ret = gpio_request(ARISTAINETOS_USB_H1_PWR, "usb-h1-pwr");
-	if (!ret)
-		gpio_direction_output(ARISTAINETOS_USB_H1_PWR, 1);
-	ret = gpio_request(ARISTAINETOS_USB_OTG_PWR, "usb-OTG-pwr");
-	if (!ret)
-		gpio_direction_output(ARISTAINETOS_USB_OTG_PWR, 1);
-	return 0;
-}
-
-int board_ehci_power(int port, int on)
-{
-	if (port)
-		gpio_set_value(ARISTAINETOS_USB_OTG_PWR, on);
-	else
-		gpio_set_value(ARISTAINETOS_USB_H1_PWR, on);
-
-	return 0;
-}
-#endif
-
 int board_fit_config_name_match(const char *name)
 {
 	if (gd->board_type == BOARD_TYPE_4 &&
configs/aristainetos2_defconfig +4 -0
index 4253e4b562..05af602dc8 100644
@@ -77,11 +77,15 @@ CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_PWM_IMX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
include/configs/aristainetos2.h +0 -3
index b008928c06..269162eabf 100644
@@ -31,8 +31,6 @@
 		"ubifsload ${fit_addr_r} /boot/system.itb; " \
 		"imi ${fit_addr_r}\0 "
 
-#define ARISTAINETOS_USB_OTG_PWR	IMX_GPIO_NR(4, 15)
-#define ARISTAINETOS_USB_H1_PWR	IMX_GPIO_NR(1, 0)
 #define CONFIG_GPIO_ENABLE_SPI_FLASH	IMX_GPIO_NR(2, 15)
 
 /* Framebuffer */
@@ -189,7 +187,6 @@
 #define CONFIG_RTC_M41T11
 
 /* USB Configs */
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
Signature · 1 line
2.21.0
#26 lore raw

PATCH 13/29 imx6: aristainetos: convert to DM_USB

Quoted 3 lines

Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB in defconfig.

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
=====================================================================
#27 lore raw

PATCH 14/29 imx6: aristainetos: convert CONFIG_DM_SPI

In reply to Heiko Schocher

enable CONFIG_DM_SPI and CONFIG_DM_SPI_FLASH
and get rid of build removal warnings.

define CONFIG_GPIO_ENABLE_SPI_FLASH is not longer
needed, so remove it from config_whitelist.txt

---

 board/aristainetos/aristainetos.c | 97 -------------------------------
 configs/aristainetos2_defconfig   |  3 +
 include/configs/aristainetos2.h   |  2 -
 scripts/config_whitelist.txt      |  1 -
 4 files changed, 3 insertions(+), 100 deletions(-)
board/aristainetos/aristainetos.c +0 -97
index c2218cb5c2..5bb238b073 100644
@@ -32,7 +32,6 @@
 #include <dm/root.h>
 #include <env.h>
 #include <micrel.h>
-#include <spi.h>
 #include <video.h>
 #include <../drivers/video/imx/ipu.h>
 #if defined(CONFIG_VIDEO_BMP_LOGO)
@@ -45,9 +44,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |			\
 	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
-#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
-		      PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
-
 #define I2C_PAD_CTRL	(PAD_CTL_PUS_100K_UP |			\
 	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |	\
 	PAD_CTL_ODE | PAD_CTL_SRE_FAST)
@@ -56,18 +52,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define DISP_PAD_CTRL	(0x10)
 
-#define ECSPI4_CS1		IMX_GPIO_NR(5, 2)
-
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	/* 4.3 display controller */
-	#define ECSPI1_CS0		IMX_GPIO_NR(4, 9)
-	#define ECSPI4_CS0		IMX_GPIO_NR(3, 29)
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	#define ECSPI1_CS0		IMX_GPIO_NR(2, 30)   /* NOR flash */
-	/* 4.3 display controller */
-	#define ECSPI1_CS1		IMX_GPIO_NR(4, 10)
-#endif
-
 enum {
 	BOARD_TYPE_4 = 4,
 	BOARD_TYPE_7 = 7,
@@ -129,33 +113,11 @@ static iomux_v3_cfg_t const backlight_pads[] = {
 	MX6_PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const ecspi1_pads[] = {
-	MX6_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),
-	MX6_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),
-	MX6_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(SPI_PAD_CTRL),
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	MX6_PAD_EIM_EB2__GPIO2_IO30  | MUX_PAD_CTRL(SPI_PAD_CTRL),
-	MX6_PAD_KEY_COL2__GPIO4_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#endif
-};
-
 static void setup_iomux_enet(void)
 {
 	imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
 }
 
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-iomux_v3_cfg_t const ecspi4_pads[] = {
-	MX6_PAD_EIM_D21__ECSPI4_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_D22__ECSPI4_MISO | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_D28__ECSPI4_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_A25__GPIO5_IO02  | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_EIM_D29__GPIO3_IO29  | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-#endif
-
 static iomux_v3_cfg_t const display_pads[] = {
 	MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(DISP_PAD_CTRL),
 	MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15,
@@ -187,50 +149,6 @@ static iomux_v3_cfg_t const display_pads[] = {
 	MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23,
 };
 
-int board_spi_cs_gpio(unsigned int bus, unsigned int cs)
-{
-	if (bus == CONFIG_SF_DEFAULT_BUS && cs == CONFIG_SF_DEFAULT_CS)
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-		return IMX_GPIO_NR(5, 2);
-
-	if (bus == 0 && cs == 0)
-		return IMX_GPIO_NR(4, 9);
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-		return ECSPI1_CS0;
-
-	if (bus == 0 && cs == 1)
-		return ECSPI1_CS1;
-#endif
-	return -1;
-}
-
-static void setup_spi(void)
-{
-	int i;
-
-	imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
-
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	imx_iomux_v3_setup_multiple_pads(ecspi4_pads, ARRAY_SIZE(ecspi4_pads));
-#endif
-
-	for (i = 0; i < 4; i++)
-		enable_spi_clk(true, i);
-
-	gpio_request(ECSPI1_CS0, "spi1_cs0");
-	gpio_direction_output(ECSPI1_CS0, 1);
-#if (CONFIG_SYS_BOARD_VERSION == 2)
-	gpio_request(ECSPI4_CS1, "spi4_cs1");
-	gpio_direction_output(ECSPI4_CS1, 0);
-	/* set cs0 to high (second device on spi bus #4) */
-	gpio_request(ECSPI4_CS0, "spi4_cs0");
-	gpio_direction_output(ECSPI4_CS0, 1);
-#elif (CONFIG_SYS_BOARD_VERSION == 3)
-	gpio_request(ECSPI1_CS1, "spi1_cs1");
-	gpio_direction_output(ECSPI1_CS1, 1);
-#endif
-}
-
 int board_phy_config(struct phy_device *phydev)
 {
 	/* control data pad skew - devaddr = 0x02, register = 0x04 */
@@ -564,13 +482,6 @@ static void setup_board_gpio(void)
 	setup_one_led("led_blue", LEDST_OFF);
 }
 
-static void setup_board_spi(void)
-{
-	/* enable spi bus #2 SS drivers (and spi bus #4 SS1 for rev2b) */
-	gpio_request(IMX_GPIO_NR(6, 6), "spi_ena");
-	gpio_direction_output(IMX_GPIO_NR(6, 6), 1);
-}
-
 int board_late_init(void)
 {
 	char *my_bootdelay;
@@ -785,8 +696,6 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-	setup_spi();
-
 	setup_i2c(0, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
 		  &i2c_pad_info1);
 	setup_i2c(1, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
@@ -795,14 +704,8 @@ int board_init(void)
 		  &i2c_pad_info3);
 	setup_i2c4();
 
-	/* SPI NOR Flash read only */
-	gpio_request(CONFIG_GPIO_ENABLE_SPI_FLASH, "ena_spi_nor");
-	gpio_direction_output(CONFIG_GPIO_ENABLE_SPI_FLASH, 0);
-	gpio_free(CONFIG_GPIO_ENABLE_SPI_FLASH);
-
 	setup_board_gpio();
 	setup_gpmi_nand();
-	setup_board_spi();
 
 	/* GPIO_1 for USB_OTG_ID */
 	clrsetbits_le32(&iomux->gpr[1], IOMUXC_GPR1_USB_OTG_ID_SEL_MASK, 0);
configs/aristainetos2_defconfig +3 -0
index 05af602dc8..d89b99b53d 100644
@@ -61,8 +61,10 @@ CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_MXS=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_BUS=3
 CONFIG_SF_DEFAULT_CS=1
 CONFIG_SF_DEFAULT_MODE=0
@@ -83,6 +85,7 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_PWM_IMX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
+CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
include/configs/aristainetos2.h +0 -2
index 269162eabf..ced2bab2b5 100644
@@ -31,8 +31,6 @@
 		"ubifsload ${fit_addr_r} /boot/system.itb; " \
 		"imi ${fit_addr_r}\0 "
 
-#define CONFIG_GPIO_ENABLE_SPI_FLASH	IMX_GPIO_NR(2, 15)
-
 /* Framebuffer */
 #define CONFIG_SYS_LDB_CLOCK 33246000
 #define CONFIG_LG4573
scripts/config_whitelist.txt +0 -1
index c8e5eebe00..7a925187fe 100644
@@ -653,7 +653,6 @@ CONFIG_GLOBAL_DATA_NOT_REG10
 CONFIG_GLOBAL_TIMER
 CONFIG_GMII
 CONFIG_GPCNTRL
-CONFIG_GPIO_ENABLE_SPI_FLASH
 CONFIG_GPIO_LED_INVERTED_TABLE
 CONFIG_GPIO_LED_STUBS
 CONFIG_GREEN_LED
Signature · 1 line
2.21.0
#28 lore raw

PATCH 14/29 imx6: aristainetos: convert CONFIG_DM_SPI

Quoted 5 lines

enable CONFIG_DM_SPI and CONFIG_DM_SPI_FLASH and get rid of build removal warnings. define CONFIG_GPIO_ENABLE_SPI_FLASH is not longer needed, so remove it from config_whitelist.txt

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
=====================================================================
#29 lore raw

PATCH 15/29 imx6: aristainetos: enable DM_ETH

In reply to Heiko Schocher

enable DM_ETH and remove unneeded board code.

---

 board/aristainetos/aristainetos.c | 35 +------------------------------
 configs/aristainetos2_defconfig   |  2 ++
 2 files changed, 3 insertions(+), 34 deletions(-)
board/aristainetos/aristainetos.c +1 -34
index 5bb238b073..f08f09e17f 100644
@@ -19,8 +19,6 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/video.h>
-#include <miiphy.h>
-#include <netdev.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/crm_regs.h>
 #include <linux/fb.h>
@@ -32,6 +30,7 @@
 #include <dm/root.h>
 #include <env.h>
 #include <micrel.h>
+#include <miiphy.h>
 #include <video.h>
 #include <../drivers/video/imx/ipu.h>
 #if defined(CONFIG_VIDEO_BMP_LOGO)
@@ -41,9 +40,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |			\
-	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
-
 #define I2C_PAD_CTRL	(PAD_CTL_PUS_100K_UP |			\
 	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |	\
 	PAD_CTL_ODE | PAD_CTL_SRE_FAST)
@@ -86,24 +82,6 @@ struct i2c_pads_info i2c_pad_info4 = {
 	}
 };
 
-iomux_v3_cfg_t const enet_pads[] = {
-	MX6_PAD_ENET_MDIO__ENET_MDIO		| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_ENET_MDC__ENET_MDC		| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TXC__RGMII_TXC	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD0__RGMII_TD0	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD1__RGMII_TD1	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD2__RGMII_TD2	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD3__RGMII_TD3	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_ENET_REF_CLK__ENET_TX_CLK	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RXC__RGMII_RXC	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD0__RGMII_RD0	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD1__RGMII_RD1	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD2__RGMII_RD2	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD3__RGMII_RD3	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL	| MUX_PAD_CTRL(ENET_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const backlight_pads[] = {
 	/* backlight PWM brightness control */
 	MX6_PAD_GPIO_9__PWM1_OUT | MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -113,11 +91,6 @@ static iomux_v3_cfg_t const backlight_pads[] = {
 	MX6_PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-static void setup_iomux_enet(void)
-{
-	imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
-}
-
 static iomux_v3_cfg_t const display_pads[] = {
 	MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(DISP_PAD_CTRL),
 	MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15,
@@ -174,12 +147,6 @@ int board_phy_config(struct phy_device *phydev)
 	return 0;
 }
 
-int board_eth_init(bd_t *bis)
-{
-	setup_iomux_enet();
-	return cpu_eth_init(bis);
-}
-
 static int rotate_logo_one(unsigned char *out, unsigned char *in)
 {
 	int   i, j;
configs/aristainetos2_defconfig +2 -0
index d89b99b53d..47d1efca56 100644
@@ -76,7 +76,9 @@ CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
+CONFIG_PHY=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_PMIC=y
Signature · 1 line
2.21.0
#30 lore raw

PATCH 15/29 imx6: aristainetos: enable DM_ETH

Quoted 2 lines

enable DM_ETH and remove unneeded board code.

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
=====================================================================
#31 lore raw

PATCH 16/29 imx6: aristainetos: add DM_VIDEO support

In reply to Heiko Schocher

add DM_VIDEO support and remove now unneeded board code. As we show a bmp logo on boot, call now bmp_display() from board code and do not use cfb_console anymore.

---

 board/aristainetos/aristainetos.c | 111 ++++--------------------------
 configs/aristainetos2_defconfig   |   5 +-
 include/configs/aristainetos2.h   |   9 ++-
 3 files changed, 19 insertions(+), 106 deletions(-)
board/aristainetos/aristainetos.c +12 -99
index f08f09e17f..8d07edd3e0 100644
@@ -19,24 +19,19 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/video.h>
-#include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/crm_regs.h>
-#include <linux/fb.h>
-#include <ipu_pixfmt.h>
-#include <input.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
+#include <bmp_logo.h>
 #include <pwm.h>
 #include <dm/root.h>
 #include <env.h>
 #include <micrel.h>
 #include <miiphy.h>
-#include <video.h>
-#include <../drivers/video/imx/ipu.h>
-#if defined(CONFIG_VIDEO_BMP_LOGO)
-	#include <bmp_logo.h>
-#endif
+#include <lcd.h>
 #include <led.h>
+#include <splash.h>
+#include <video_fb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -46,8 +41,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
 
-#define DISP_PAD_CTRL	(0x10)
-
 enum {
 	BOARD_TYPE_4 = 4,
 	BOARD_TYPE_7 = 7,
@@ -91,37 +84,6 @@ static iomux_v3_cfg_t const backlight_pads[] = {
 	MX6_PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const display_pads[] = {
-	MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(DISP_PAD_CTRL),
-	MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15,
-	MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02,
-	MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03,
-	MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
-	MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
-	MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
-	MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
-	MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
-	MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
-	MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
-	MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
-	MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
-	MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
-	MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
-	MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
-	MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
-	MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
-	MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
-	MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
-	MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
-	MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
-	MX6_PAD_DISP0_DAT18__IPU1_DISP0_DATA18,
-	MX6_PAD_DISP0_DAT19__IPU1_DISP0_DATA19,
-	MX6_PAD_DISP0_DAT20__IPU1_DISP0_DATA20,
-	MX6_PAD_DISP0_DAT21__IPU1_DISP0_DATA21,
-	MX6_PAD_DISP0_DAT22__IPU1_DISP0_DATA22,
-	MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23,
-};
-
 int board_phy_config(struct phy_device *phydev)
 {
 	/* control data pad skew - devaddr = 0x02, register = 0x04 */
@@ -166,13 +128,15 @@ static int rotate_logo_one(unsigned char *out, unsigned char *in)
 void rotate_logo(int rotations)
 {
 	unsigned char out_logo[BMP_LOGO_WIDTH * BMP_LOGO_HEIGHT];
+	struct bmp_header *header;
 	unsigned char *in_logo;
 	int   i, j;
 
 	if (BMP_LOGO_WIDTH != BMP_LOGO_HEIGHT)
 		return;
 
-	in_logo = bmp_logo_bitmap;
+	header = (struct bmp_header *)bmp_logo_bitmap;
+	in_logo = bmp_logo_bitmap + header->data_offset;
 
 	/* one 90 degree rotation */
 	if (rotations == 1  ||  rotations == 2  ||  rotations == 3)
@@ -194,34 +158,6 @@ void rotate_logo(int rotations)
 				out_logo[i * BMP_LOGO_WIDTH + j];
 }
 
-static void enable_display_power(void)
-{
-	imx_iomux_v3_setup_multiple_pads(backlight_pads,
-					 ARRAY_SIZE(backlight_pads));
-
-	/* backlight enable */
-	gpio_request(IMX_GPIO_NR(6, 31), "backlight");
-	gpio_direction_output(IMX_GPIO_NR(6, 31), 1);
-	gpio_free(IMX_GPIO_NR(6, 31));
-	/* LCD power enable */
-	gpio_request(IMX_GPIO_NR(6, 15), "LCD_power_enable");
-	gpio_direction_output(IMX_GPIO_NR(6, 15), 1);
-	gpio_free(IMX_GPIO_NR(6, 15));
-
-	/* enable backlight PWM 1 */
-	if (pwm_init(0, 0, 0))
-		goto error;
-	/* duty cycle 500ns, period: 3000ns */
-	if (pwm_config(0, 50000, 300000))
-		goto error;
-	if (pwm_enable(0))
-		goto error;
-	return;
-
-error:
-	puts("error init pwm for backlight\n");
-}
-
 static void enable_lvds(struct display_info_t const *dev)
 {
 	struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
@@ -304,15 +240,6 @@ static void enable_spi_display(struct display_info_t const *dev)
 	rotate_logo(3);  /* portrait display in landscape mode */
 #endif
 
-	/*
-	 * set ldb clock to 28341000 Hz calculated through the formula:
-	 * (XRES + LEFT_M + RIGHT_M + HSYNC_LEN) *
-	 * (YRES + UPPER_M + LOWER_M + VSYNC_LEN) * REFRESH)
-	 * see:
-	 * https://community.freescale.com/thread/308170
-	 */
-	ipu_set_ldb_clock(28341000);
-
 	reg = readl(&ccm->cs2cdr);
 
 	/* select pll 5 clock */
@@ -381,15 +308,11 @@ static void enable_spi_display(struct display_info_t const *dev)
 	       | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0
 		  << IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET);
 	writel(reg, &iomux->gpr[3]);
-
-	imx_iomux_v3_setup_multiple_pads(display_pads,
-					 ARRAY_SIZE(display_pads));
 }
 
 static void setup_display(void)
 {
 	enable_ipu_clock();
-	enable_display_power();
 }
 
 static void set_gpr_register(void)
@@ -410,7 +333,7 @@ static void set_gpr_register(void)
 extern char __bss_start[], __bss_end[];
 int board_early_init_f(void)
 {
-	setup_display();
+	select_ldb_di_clock_source(MXC_PLL5_CLK);
 	set_gpr_register();
 
 	/*
@@ -453,11 +376,13 @@ int board_late_init(void)
 {
 	char *my_bootdelay;
 	char bootmode = 0;
-	char const *panel = env_get("panel");
 	struct gpio_desc *desc;
+	int x, y;
 	int ret;
 
 	led_default_state();
+	splash_get_pos(&x, &y);
+	bmp_display((ulong)&bmp_logo_bitmap[0], x, y);
 	/*
 	 * Check the boot-source. If booting from NOR Flash,
 	 * disable bootdelay
@@ -496,13 +421,6 @@ int board_late_init(void)
 		}
 	}
 
-	/* if we have the lg panel, we can initialze it now */
-	if (panel)
-		if (!strcmp(panel, displays[1].mode.name))
-			lg4573_spi_startup(CONFIG_LG4573_BUS,
-					   CONFIG_LG4573_CS,
-					   10000000, SPI_MODE_0);
-
 	/* set board_type */
 	if (gd->board_type == BOARD_TYPE_4)
 		env_set("board_type", ARI_BT_4);
@@ -596,12 +514,6 @@ struct display_info_t const displays[] = {
 };
 size_t display_count = ARRAY_SIZE(displays);
 
-/* no console on this board */
-int board_cfb_skip(void)
-{
-	return 1;
-}
-
 iomux_v3_cfg_t nfc_pads[] = {
 	MX6_PAD_NANDF_CLE__NAND_CLE		| MUX_PAD_CTRL(NO_PAD_CTRL),
 	MX6_PAD_NANDF_ALE__NAND_ALE		| MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -673,6 +585,7 @@ int board_init(void)
 
 	setup_board_gpio();
 	setup_gpmi_nand();
+	setup_display();
 
 	/* GPIO_1 for USB_OTG_ID */
 	clrsetbits_le32(&iomux->gpr[1], IOMUXC_GPR1_USB_OTG_ID_SEL_MASK, 0);
configs/aristainetos2_defconfig +3 -2
index 47d1efca56..d33eba7b8f 100644
@@ -92,8 +92,9 @@ CONFIG_MXC_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_DM_VIDEO=y
+CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
-CONFIG_VIDEO=y
-# CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
include/configs/aristainetos2.h +4 -5
index ced2bab2b5..45699dc614 100644
@@ -32,7 +32,7 @@
 		"imi ${fit_addr_r}\0 "
 
 /* Framebuffer */
-#define CONFIG_SYS_LDB_CLOCK 33246000
+#define CONFIG_SYS_LDB_CLOCK	28341000
 #define CONFIG_LG4573
 
 #include "mx6_common.h"
@@ -193,15 +193,14 @@
 
 /* Framebuffer */
 /* check this console not needed, after test remove it */
-#define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_SPLASH_SCREEN_ALIGN
-#define CONFIG_BMP_16BPP
+#define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
-#define CONFIG_IMX_VIDEO_SKIP
+#define CONFIG_BMP_16BPP
+#define CONFIG_VIDEO_BMP_RLE8
 
 #define CONFIG_IMX6_PWM_PER_CLK	66000000
 
-
 #endif                         /* __ARISTAINETOS2_CONFIG_H */
Signature · 1 line
2.21.0
#32 lore raw

PATCH 16/29 imx6: aristainetos: add DM_VIDEO support

Quoted 5 lines

add DM_VIDEO support and remove now unneeded board code. As we show a bmp logo on boot, call now bmp_display() from board code and do not use cfb_console anymore.

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
=====================================================================
#33 lore raw

PATCH 17/29 imx6: aristainetos: add DM_I2C support

In reply to Heiko Schocher

enable DM_I2C in defconfig and remove i2c specific board code.

---

 board/aristainetos/aristainetos.c | 73 -------------------------------
 configs/aristainetos2_defconfig   |  6 ++-
 include/configs/aristainetos2.h   | 11 -----
 3 files changed, 5 insertions(+), 85 deletions(-)
board/aristainetos/aristainetos.c +0 -73
index 8d07edd3e0..0d1c06da5d 100644
@@ -17,7 +17,6 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
-#include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/video.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/io.h>
@@ -35,12 +34,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define I2C_PAD_CTRL	(PAD_CTL_PUS_100K_UP |			\
-	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |	\
-	PAD_CTL_ODE | PAD_CTL_SRE_FAST)
-
-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
-
 enum {
 	BOARD_TYPE_4 = 4,
 	BOARD_TYPE_7 = 7,
@@ -49,32 +42,6 @@ enum {
 #define ARI_BT_4 "aristainetos2_4 at 2"
 #define ARI_BT_7 "aristainetos2_7 at 1"
 
-struct i2c_pads_info i2c_pad_info3 = {
-	.scl = {
-		.i2c_mode = MX6_PAD_GPIO_5__I2C3_SCL | PC,
-		.gpio_mode = MX6_PAD_GPIO_5__GPIO1_IO05 | PC,
-		.gp = IMX_GPIO_NR(1, 5)
-	},
-	.sda = {
-		.i2c_mode = MX6_PAD_GPIO_6__I2C3_SDA | PC,
-		.gpio_mode = MX6_PAD_GPIO_6__GPIO1_IO06 | PC,
-		.gp = IMX_GPIO_NR(1, 6)
-	}
-};
-
-struct i2c_pads_info i2c_pad_info4 = {
-	.scl = {
-		.i2c_mode = MX6_PAD_GPIO_7__I2C4_SCL | PC,
-		.gpio_mode = MX6_PAD_GPIO_7__GPIO1_IO07 | PC,
-		.gp = IMX_GPIO_NR(1, 7)
-	},
-	.sda = {
-		.i2c_mode = MX6_PAD_GPIO_8__I2C4_SDA | PC,
-		.gpio_mode = MX6_PAD_GPIO_8__GPIO1_IO08 | PC,
-		.gp = IMX_GPIO_NR(1, 8)
-	}
-};
-
 static iomux_v3_cfg_t const backlight_pads[] = {
 	/* backlight PWM brightness control */
 	MX6_PAD_GPIO_9__PWM1_OUT | MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -346,12 +313,6 @@ int board_early_init_f(void)
 	return 0;
 }
 
-static void setup_i2c4(void)
-{
-	setup_i2c(3, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
-		  &i2c_pad_info4);
-}
-
 static void setup_one_led(char *label, int state)
 {
 	struct udevice *dev;
@@ -430,32 +391,6 @@ int board_late_init(void)
 	return 0;
 }
 
-struct i2c_pads_info i2c_pad_info1 = {
-	.scl = {
-		.i2c_mode = MX6_PAD_CSI0_DAT9__I2C1_SCL | PC,
-		.gpio_mode = MX6_PAD_CSI0_DAT9__GPIO5_IO27 | PC,
-		.gp = IMX_GPIO_NR(5, 27)
-	},
-	.sda = {
-		.i2c_mode = MX6_PAD_CSI0_DAT8__I2C1_SDA | PC,
-		.gpio_mode = MX6_PAD_CSI0_DAT8__GPIO5_IO26 | PC,
-		.gp = IMX_GPIO_NR(5, 26)
-	}
-};
-
-struct i2c_pads_info i2c_pad_info2 = {
-	.scl = {
-		.i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | PC,
-		.gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | PC,
-		.gp = IMX_GPIO_NR(4, 12)
-	},
-	.sda = {
-		.i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | PC,
-		.gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | PC,
-		.gp = IMX_GPIO_NR(4, 13)
-	}
-};
-
 int dram_init(void)
 {
 	gd->ram_size = imx_ddr_size();
@@ -575,14 +510,6 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-	setup_i2c(0, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
-		  &i2c_pad_info1);
-	setup_i2c(1, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
-		  &i2c_pad_info2);
-	setup_i2c(2, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE,
-		  &i2c_pad_info3);
-	setup_i2c4();
-
 	setup_board_gpio();
 	setup_gpmi_nand();
 	setup_display();
configs/aristainetos2_defconfig +5 -1
index d33eba7b8f..07bdc006df 100644
@@ -36,7 +36,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
@@ -57,8 +56,11 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM_GPIO=y
 CONFIG_GPIO_HOG=y
 CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_DM_MMC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
@@ -85,6 +87,8 @@ CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_PWM_IMX=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_DS1307=y
 CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
include/configs/aristainetos2.h +0 -11
index 45699dc614..1999c5c616 100644
@@ -165,12 +165,6 @@
 
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 
-/* I2C */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		0x7f
-#define CONFIG_SYS_I2C_NOPROBES		{ {0, 0x00} }
-
 /* NAND stuff */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		0x40000000
@@ -179,11 +173,6 @@
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
 
-/* RTC */
-#define CONFIG_SYS_I2C_RTC_ADDR	0x68
-#define CONFIG_SYS_RTC_BUS_NUM	2
-#define CONFIG_RTC_M41T11
-
 /* USB Configs */
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
Signature · 1 line
2.21.0
#34 lore raw

PATCH 17/29 imx6: aristainetos: add DM_I2C support

Quoted 3 lines

enable DM_I2C in defconfig and remove i2c specific board code.

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
=====================================================================
#35 lore raw

PATCH 18/29 imx6: aristainetos: convert to DM_PWM/DM_BACKLIGHT

In reply to Heiko Schocher

use DM_PWM and DM_BLACKLIGHT support and remove
board code.

---

 board/aristainetos/aristainetos.c | 10 ----------
 configs/aristainetos2_defconfig   |  1 +
 2 files changed, 1 insertion(+), 10 deletions(-)
board/aristainetos/aristainetos.c +0 -10
index 0d1c06da5d..edaec5ee87 100644
@@ -22,7 +22,6 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <bmp_logo.h>
-#include <pwm.h>
 #include <dm/root.h>
 #include <env.h>
 #include <micrel.h>
@@ -42,15 +41,6 @@ enum {
 #define ARI_BT_4 "aristainetos2_4 at 2"
 #define ARI_BT_7 "aristainetos2_7 at 1"
 
-static iomux_v3_cfg_t const backlight_pads[] = {
-	/* backlight PWM brightness control */
-	MX6_PAD_GPIO_9__PWM1_OUT | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* backlight enable */
-	MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LCD power enable */
-	MX6_PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 int board_phy_config(struct phy_device *phydev)
 {
 	/* control data pad skew - devaddr = 0x02, register = 0x04 */
configs/aristainetos2_defconfig +1 -0
index 07bdc006df..c7416a936a 100644
@@ -86,6 +86,7 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_PWM=y
 CONFIG_PWM_IMX=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
Signature · 1 line
2.21.0
#36 lore raw

PATCH 18/29 imx6: aristainetos: convert to DM_PWM/DM_BACKLIGHT

Quoted 3 lines

use DM_PWM and DM_BLACKLIGHT support and remove
board code.

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
=====================================================================
#37 lore raw

PATCH 19/29 imx6: aristainetos: get rid of CONFIG_BOARDNAME

In reply to Heiko Schocher

CONFIG_BOARDNAME is not longer needed, as we use
the model information from DTS.

---

 board/aristainetos/Kconfig        | 3 ---
 board/aristainetos/aristainetos.c | 6 ------
 board/aristainetos/common/Kconfig | 5 -----
 3 files changed, 14 deletions(-)
board/aristainetos/Kconfig +0 -3
index 2bb12fce75..6700f517f1 100644
@@ -8,7 +8,4 @@ config SYS_BOARD
 config SYS_BOARD_VERSION
 	default 2
 
-config BOARDNAME
-	default "aristainetos2"
-
 endif
board/aristainetos/aristainetos.c +0 -6
index edaec5ee87..846a99804a 100644
@@ -509,12 +509,6 @@ int board_init(void)
 	return 0;
 }
 
-int checkboard(void)
-{
-	printf("Board: %s\n", CONFIG_BOARDNAME);
-	return 0;
-}
-
 int board_fit_config_name_match(const char *name)
 {
 	if (gd->board_type == BOARD_TYPE_4 &&
board/aristainetos/common/Kconfig +0 -5
index 16c1325889..8f2561415b 100644
@@ -1,8 +1,3 @@
-config BOARDNAME
-	string "name of the board"
-	help
-	  set the name of the board.
-
 config SYS_BOARD_VERSION
 	int "select version of aristainetos board"
 	help
Signature · 1 line
2.21.0
#38 lore raw

PATCH 19/29 imx6: aristainetos: get rid of CONFIG_BOARDNAME

Quoted 3 lines

CONFIG_BOARDNAME is not longer needed, as we use
the model information from DTS.

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
=====================================================================
#39 lore raw

PATCH 20/29 imx6: aristainetos: add i2c eeprom support

In reply to Heiko Schocher

add support for i2c eeprom and add parsing "Rescue" or "DefEnv" at offset 0x1ff0.

---

 board/aristainetos/aristainetos.c | 64 ++++++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)
board/aristainetos/aristainetos.c +63 -1
index 846a99804a..55d3ab6f44 100644
@@ -24,6 +24,8 @@
 #include <bmp_logo.h>
 #include <dm/root.h>
 #include <env.h>
+#include <i2c_eeprom.h>
+#include <i2c.h>
 #include <micrel.h>
 #include <miiphy.h>
 #include <lcd.h>
@@ -323,6 +325,64 @@ static void setup_board_gpio(void)
 	setup_one_led("led_blue", LEDST_OFF);
 }
 
+#define ARI_RESC_FMT "setenv rescue_reason setenv bootargs \\${bootargs}" \
+		" rescueReason=%d "
+
+static void aristainetos_run_rescue_command(int reason)
+{
+	char rescue_reason_command[80];
+
+	sprintf(rescue_reason_command, ARI_RESC_FMT, reason);
+	run_command(rescue_reason_command, 0);
+}
+
+static int aristainetos_eeprom(void)
+{
+	struct udevice *dev;
+	int off;
+	int ret;
+	u8 data[0x10];
+	u8 rescue_reason;
+
+	off = fdt_path_offset(gd->fdt_blob, "eeprom0");
+	if (off < 0) {
+		printf("%s: No eeprom0 path offset\n", __func__);
+		return off;
+	}
+
+	ret = uclass_get_device_by_of_offset(UCLASS_I2C_EEPROM, off, &dev);
+	if (ret) {
+		printf("%s: Could not find EEPROM\n", __func__);
+		return ret;
+	}
+
+	ret = i2c_set_chip_offset_len(dev, 2);
+	if (ret)
+		return ret;
+
+	ret = i2c_eeprom_read(dev, 0x1ff0, (uint8_t *)data, 6);
+	if (ret) {
+		printf("%s: Could not read EEPROM\n", __func__);
+		return ret;
+	}
+
+	if (strncmp((char *)&data[3], "ReScUe", 6) == 0) {
+		rescue_reason = *(uint8_t *)&data[9];
+		memset(&data[3], 0xff, 7);
+		i2c_eeprom_write(dev, 0x1ff0, (uint8_t *)&data[3], 7);
+		printf("\nBooting into Rescue System (EEPROM)\n");
+		aristainetos_run_rescue_command(rescue_reason);
+		run_command("run rescue_load_fit rescueboot", 0);
+	} else if (strncmp((char *)data, "DeF", 3) == 0) {
+		memset(data, 0xff, 3);
+		i2c_eeprom_write(dev, 0x1ff0, (uint8_t *)data, 3);
+		printf("\nClear u-boot environment (set back to defaults)\n");
+		run_command("run default_env; saveenv; saveenv", 0);
+	}
+
+	return 0;
+};
+
 int board_late_init(void)
 {
 	char *my_bootdelay;
@@ -372,12 +432,14 @@ int board_late_init(void)
 		}
 	}
 
+	/* eeprom work */
+	aristainetos_eeprom();
+
 	/* set board_type */
 	if (gd->board_type == BOARD_TYPE_4)
 		env_set("board_type", ARI_BT_4);
 	else
 		env_set("board_type", ARI_BT_7);
-
 	return 0;
 }
 
Signature · 1 line
2.21.0
#40 lore raw

PATCH 20/29 imx6: aristainetos: add i2c eeprom support

Quoted 3 lines

add support for i2c eeprom and add parsing "Rescue" or "DefEnv" at offset 0x1ff0.

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
=====================================================================
#41 lore raw

PATCH 21/29 imx6: aristainetos: add AUTOBOOT_KEYED

In reply to Heiko Schocher

add stop autobooting via SHA256 encrypted password.

---

 configs/aristainetos2_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/aristainetos2_defconfig +3 -0
index c7416a936a..11b9f2ab1d 100644
@@ -18,6 +18,9 @@ CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_TYPES=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_ENCRYPTION=y
+CONFIG_AUTOBOOT_STOP_STR_SHA256="30bb0bce5f77da71a6e8e436fe40af54bc823db9501ae170f77e9992499d88fb"
 CONFIG_CMD_BOOTZ=y
 # CONFIG_BOOTM_NETBSD is not set
 # CONFIG_BOOTM_PLAN9 is not set
Signature · 1 line
2.21.0
#42 lore raw

PATCH 21/29 imx6: aristainetos: add AUTOBOOT_KEYED

Quoted 2 lines

add stop autobooting via SHA256 encrypted password.

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
=====================================================================
#43 lore raw

PATCH 22/29 imx6: aristainetos: add version variable

In reply to Heiko Schocher

add VERSION_VARIABLE

---

 configs/aristainetos2_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/aristainetos2_defconfig +1 -0
index 11b9f2ab1d..82fe512098 100644
@@ -14,6 +14,7 @@ CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SUPPORT_RAW_INITRD=y
+CONFIG_VERSION_VARIABLE=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_TYPES=y
 CONFIG_BOARD_EARLY_INIT_F=y
Signature · 1 line
2.21.0
#44 lore raw

PATCH 22/29 imx6: aristainetos: add version variable

Quoted 2 lines

add VERSION_VARIABLE

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
=====================================================================
#45 lore raw

PATCH 23/29 imx6: aristainetos: cleanup bootmode settings

In reply to Heiko Schocher

on the aristainetos there are some jumpers for
changing behaviour setting up Environment. Clean
this up.

---

 board/aristainetos/aristainetos.c | 43 +++++++++++++++++++++----------
 1 file changed, 30 insertions(+), 13 deletions(-)
board/aristainetos/aristainetos.c +30 -13
index 55d3ab6f44..ca6155947b 100644
@@ -383,39 +383,44 @@ static int aristainetos_eeprom(void)
 	return 0;
 };
 
-int board_late_init(void)
+static void aristainetos_bootmode_settings(void)
 {
+	struct gpio_desc *desc;
+	struct src *psrc = (struct src *)SRC_BASE_ADDR;
+	unsigned int sbmr1 = readl(&psrc->sbmr1);
 	char *my_bootdelay;
 	char bootmode = 0;
-	struct gpio_desc *desc;
-	int x, y;
 	int ret;
 
-	led_default_state();
-	splash_get_pos(&x, &y);
-	bmp_display((ulong)&bmp_logo_bitmap[0], x, y);
 	/*
 	 * Check the boot-source. If booting from NOR Flash,
 	 * disable bootdelay
 	 */
-	desc = gpio_hog_lookup_name("bootsel0");
-	if (desc)
+	ret = gpio_hog_lookup_name("bootsel0", &desc);
+	if (!ret)
 		bootmode |= (dm_gpio_get_value(desc) ? 1 : 0) << 0;
-	desc = gpio_hog_lookup_name("bootsel1");
-	if (desc)
+	ret = gpio_hog_lookup_name("bootsel1", &desc);
+	if (!ret)
 		bootmode |= (dm_gpio_get_value(desc) ? 1 : 0) << 1;
-	desc = gpio_hog_lookup_name("bootsel2");
-	if (desc)
+	ret = gpio_hog_lookup_name("bootsel2", &desc);
+	if (!ret)
 		bootmode |= (dm_gpio_get_value(desc) ? 1 : 0) << 2;
 
 	if (bootmode == 7) {
 		my_bootdelay = env_get("nor_bootdelay");
-		if (my_bootdelay != NULL)
+		if (my_bootdelay)
 			env_set("bootdelay", my_bootdelay);
 		else
 			env_set("bootdelay", "-2");
 	}
 
+	if (sbmr1 & 0x40) {
+		env_set("bootmode", "1");
+		printf("SD bootmode jumper set!\n");
+	} else {
+		env_set("bootmode", "0");
+	}
+
 	/* read out some jumper values*/
 	ret = gpio_hog_lookup_name("env_reset", &desc);
 	if (!ret) {
@@ -431,6 +436,17 @@ int board_late_init(void)
 			run_command("run rescue_xload_boot", 0);
 		}
 	}
+}
+
+int board_late_init(void)
+{
+	int x, y;
+
+	led_default_state();
+	splash_get_pos(&x, &y);
+	bmp_display((ulong)&bmp_logo_bitmap[0], x, y);
+
+	aristainetos_bootmode_settings();
 
 	/* eeprom work */
 	aristainetos_eeprom();
@@ -440,6 +456,7 @@ int board_late_init(void)
 		env_set("board_type", ARI_BT_4);
 	else
 		env_set("board_type", ARI_BT_7);
+
 	return 0;
 }
 
Signature · 1 line
2.21.0
#46 lore raw

PATCH 23/29 imx6: aristainetos: cleanup bootmode settings

Quoted 4 lines

on the aristainetos there are some jumpers for
changing behaviour setting up Environment. Clean
this up.

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
=====================================================================
#47 lore raw

PATCH 24/29 imx6: aristainetos: WDT DM conversion enable WDT reset

In reply to Heiko Schocher

enable config symbols:
CONFIG_SYSRESET
CONFIG_SYSRESET_WATCHDOG

---

 configs/aristainetos2_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/aristainetos2_defconfig +2 -0
index 82fe512098..be5cec96fa 100644
@@ -98,6 +98,8 @@ CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
Signature · 1 line
2.21.0
#48 lore raw

PATCH 24/29 imx6: aristainetos: WDT DM conversion enable WDT reset

Quoted 4 lines

enable config symbols:
CONFIG_SYSRESET
CONFIG_SYSRESET_WATCHDOG

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
=====================================================================
#49 lore raw

PATCH 25/29 imx6: aristainetos: cleanup default Environment

In reply to Heiko Schocher

sync defaut Envoronment with customer changes.
Unfortunately they are not changeable, as already
board is in production mode.

Get rid of the big bootcommand and set bootcommand through Kconfig option.

---

 configs/aristainetos2_defconfig |   2 +
 include/configs/aristainetos2.h | 248 +++++++++++++++++++++++++-------
 2 files changed, 195 insertions(+), 55 deletions(-)
configs/aristainetos2_defconfig +2 -0
index be5cec96fa..7278ec9d13 100644
@@ -11,6 +11,8 @@ CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg"
 CONFIG_BOOTDELAY=3
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="run ari_boot"
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SUPPORT_RAW_INITRD=y
include/configs/aristainetos2.h +193 -55

311 lines not on this page · raw message

Signature · 1 line
2.21.0
#50 lore raw

PATCH 25/29 imx6: aristainetos: cleanup default Environment

Quoted 6 lines

sync defaut Envoronment with customer changes. Unfortunately they are not changeable, as already board is in production mode.
Get rid of the big bootcommand and set bootcommand through Kconfig option.

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
=====================================================================
#51 lore raw

PATCH 26/29 imx6: aristainetos: enable HAB boot

In reply to Heiko Schocher

enable IMX_HAB on aristianetos board

---

 board/aristainetos/aristainetos2.cfg |  3 ++
 configs/aristainetos2_defconfig      |  4 +++
 include/configs/aristainetos2.h      | 51 ++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+)
board/aristainetos/aristainetos2.cfg +3 -0
index fbbc2e5e6d..965ad64b49 100644
@@ -23,6 +23,9 @@ BOOT_FROM      spi
 
 #define __ASSEMBLY__
 #include <config.h>
+#ifdef CONFIG_IMX_HAB
+CSF CONFIG_CSF_SIZE
+#endif
 #include "asm/arch/mx6-ddr.h"
 #include "asm/arch/iomux.h"
 #include "asm/arch/crm_regs.h"
configs/aristainetos2_defconfig +4 -0
index 7278ec9d13..6c01eb6fff 100644
@@ -8,6 +8,9 @@ CONFIG_ENV_SIZE=0x3000
 CONFIG_ENV_OFFSET=0xD0000
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SECT_SIZE=0x10000
+CONFIG_IMX_HAB=y
+# CONFIG_CMD_DEKBLOB is not set
+# CONFIG_CMD_NANDBCB is not set
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg"
 CONFIG_BOOTDELAY=3
@@ -42,6 +45,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
+# CONFIG_CMD_HASH is not set
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
include/configs/aristainetos2.h +51 -0

63 lines not on this page · raw message

Signature · 1 line
2.21.0
#52 lore raw

PATCH 26/29 imx6: aristainetos: enable HAB boot

Quoted 2 lines

enable IMX_HAB on aristianetos board

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
=====================================================================
#53 lore raw

PATCH 27/29 imx6: aristainetos: readd aristainetos 2b board

In reply to Heiko Schocher

readd aristainetos 2b board.

---

 arch/arm/dts/Makefile                         |   2 +
 .../dts/imx6dl-aristainetos2b_4-u-boot.dtsi   |  13 +
 arch/arm/dts/imx6dl-aristainetos2b_4.dts      |  50 ++++
 .../dts/imx6dl-aristainetos2b_7-u-boot.dtsi   |  19 ++
 arch/arm/dts/imx6dl-aristainetos2b_7.dts      |  16 ++
 .../dts/imx6qdl-aristainetos2b-u-boot.dtsi    |  77 +++++
 arch/arm/dts/imx6qdl-aristainetos2b.dtsi      | 266 ++++++++++++++++++
 arch/arm/mach-imx/mx6/Kconfig                 |  11 +
 board/aristainetos/Kconfig                    |  12 +
 board/aristainetos/MAINTAINERS                |   7 +
 board/aristainetos/common/Kconfig             |   1 +
 configs/aristainetos2b_defconfig              | 115 ++++++++
 include/configs/aristainetos2.h               |  23 ++
 13 files changed, 612 insertions(+)
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_7.dts
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b.dtsi
 create mode 100644 configs/aristainetos2b_defconfig
arch/arm/dts/Makefile +2 -0
index a2d673af4f..1cd120a98e 100644
@@ -576,6 +576,8 @@ ifneq ($(CONFIG_MX6DL)$(CONFIG_MX6QDL)$(CONFIG_MX6S),)
 dtb-y += \
 	imx6dl-aristainetos2_4.dtb \
 	imx6dl-aristainetos2_7.dtb \
+	imx6dl-aristainetos2b_4.dtb \
+	imx6dl-aristainetos2b_7.dtb \
 	imx6dl-brppt2.dtb \
 	imx6dl-dhcom-pdk2.dtb \
 	imx6dl-icore.dtb \
arch/arm/dts/imx6dl-aristainetos2b_4-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..ee02df39c1
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2b-u-boot.dtsi>
+
+&lcd_panel {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ipu_disp>;
+	enable-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+	backlight = <&backlight>;
+};
arch/arm/dts/imx6dl-aristainetos2b_4.dts new file +50 -0

50 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2b_7-u-boot.dtsi new file +19 -0
new file mode 100644
index 0000000000..0cb4f1974b
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2b-u-boot.dtsi>
+/ {
+	vdd_panel_reg: regulator-panel {
+		compatible = "regulator-fixed";
+		regulator-name = "panel_regulator";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+};
+
+&panel0 {
+	power-supply = <&vdd_panel_reg>;
+};
arch/arm/dts/imx6dl-aristainetos2b_7.dts new file +16 -0
new file mode 100644
index 0000000000..f1496cbfdd
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0)
+/*
+ * support for the imx6 based aristainetos2 board
+ *
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ * Copyright (C) 2015 Heiko Schocher <[email protected]>
+ *
+ */
+/dts-v1/;
+#include "imx6dl-aristainetos2_7.dtsi"
+#include "imx6qdl-aristainetos2b.dtsi"
+
+/ {
+	model = "aristainetos2b i.MX6 Dual Lite Board 7";
+	compatible = "fsl,imx6dl";
+};
arch/arm/dts/imx6qdl-aristainetos2b-u-boot.dtsi new file +77 -0

77 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2b.dtsi new file +266 -0

266 lines not on this page · raw message

arch/arm/mach-imx/mx6/Kconfig +11 -0
index ede5989502..b3819d816d 100644
@@ -136,6 +136,17 @@ config TARGET_ARISTAINETOS2
 	imply CMD_SATA
 	imply CMD_DM
 
+config TARGET_ARISTAINETOS2B
+	bool "Support aristainetos2-revB"
+	select BOARD_LATE_INIT
+	select MX6DL
+	select SYS_I2C_MXC
+	select MXC_UART
+	select FEC_MXC
+	select DM
+	imply CMD_SATA
+	imply CMD_DM
+
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
 	select BOARD_LATE_INIT
board/aristainetos/Kconfig +12 -0
index 6700f517f1..2e1d84d412 100644
@@ -9,3 +9,15 @@ config SYS_BOARD_VERSION
 	default 2
 
 endif
+
+if TARGET_ARISTAINETOS2B
+
+source "board/aristainetos/common/Kconfig"
+
+config SYS_BOARD
+	default "aristainetos"
+
+config SYS_BOARD_VERSION
+	default 3
+
+endif
board/aristainetos/MAINTAINERS +7 -0
index 2495cd4a37..4fa0ad2e98 100644
@@ -4,6 +4,7 @@ S:	Maintained
 F:	board/aristainetos/
 F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
+F:	configs/aristainetos2b_defconfig
 F:	arch/arm/dts/imx6qdl-aristainetos2.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2-common.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi
@@ -13,3 +14,9 @@ F:	arch/arm/dts/imx6dl-aristainetos2_7-u-boot.dtsi
 F:	arch/arm/dts/imx6dl-aristainetos2_4.dts
 F:	arch/arm/dts/imx6dl-aristainetos2_4.dtsi
 F:	arch/arm/dts/imx6dl-aristainetos2_4-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2b_4.dts
+F:	arch/arm/dts/imx6dl-aristainetos2b_4-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2b_7.dts
+F:	arch/arm/dts/imx6dl-aristainetos2b_7-u-boot.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2b-u-boot.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2b.dtsi
board/aristainetos/common/Kconfig +1 -0
index 8f2561415b..a15993e2de 100644
@@ -3,6 +3,7 @@ config SYS_BOARD_VERSION
 	help
 	  version of aristainetos board version
 	  2 version 2
+	  3 version 2b
 
 config SYS_I2C_MXC_I2C1
 	default y
configs/aristainetos2b_defconfig new file +115 -0

115 lines not on this page · raw message

include/configs/aristainetos2.h +23 -0
index 48cea2b4d0..d2646d26da 100644
@@ -86,6 +86,28 @@
 	"enable_hab_check=0\0"
 #endif
 
+#if (CONFIG_SYS_BOARD_VERSION == 3)
+#define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
+	"dead=led led_red on\0" \
+	"mtdids=nand0=gpmi-nand,nor0=spi0.0\0" \
+	"mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \
+		"-(ubi-nor);gpmi-nand:-(ubi)\0" \
+	"addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \
+		"bootmode=${bootmode} mmcpart=${mmcpart}\0" \
+	"mainboot=echo Booting from SD-card ...; " \
+		"run mainargs addmtd addmisc;" \
+		"if test -n ${addmiscM}; then run addmiscM;fi;" \
+		"if test -n ${addmiscC}; then run addmiscC;fi;" \
+		"if test -n ${addmiscD}; then run addmiscD;fi;" \
+		"run boot_board_type;" \
+		"bootm ${fit_addr_r}\0" \
+	"mainargs=setenv bootargs console=${console},${baudrate} " \
+		"root=${mmcroot}\0" \
+	"main_load_fit=ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
+		"${fit_file}\0" \
+	"rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \
+		"${fit_addr_r} ${rescue_fit_file}\0"
+#else
 #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
 	"dead=led led_red on\0" \
 	"mtdids=nand0=gpmi-nand,nor0=spi3.1\0" \
@@ -106,6 +128,7 @@
 		"${fit_file}\0" \
 	"rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \
 		"${fit_addr_r} ${rescue_fit_file}\0"
+#endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"disable_giga=yes\0" \
Signature · 1 line
2.21.0
#54 lore raw

PATCH 27/29 imx6: aristainetos: readd aristainetos 2b board

Quoted 2 lines

readd aristainetos 2b board.

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
=====================================================================
#55 lore raw

PATCH 28/29 imx6: aristainetos: add aristainetos 2b csl

In reply to Heiko Schocher

add aristainetso board version CSL.

---

 arch/arm/dts/Makefile                         |   2 +
 .../imx6dl-aristainetos2b_csl_4-u-boot.dtsi   |  13 +
 arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts  |  50 ++++
 .../imx6dl-aristainetos2b_csl_7-u-boot.dtsi   |  19 ++
 arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts  |  16 ++
 .../imx6qdl-aristainetos2b_csl-u-boot.dtsi    |  77 ++++++
 arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi  | 248 ++++++++++++++++++
 arch/arm/mach-imx/mx6/Kconfig                 |  11 +
 board/aristainetos/Kconfig                    |  12 +
 board/aristainetos/MAINTAINERS                |   7 +
 board/aristainetos/aristainetos.c             |   4 +-
 board/aristainetos/common/Kconfig             |   1 +
 configs/aristainetos2bcsl_defconfig           | 115 ++++++++
 include/configs/aristainetos2.h               |  21 ++
 14 files changed, 595 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b_csl-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi
 create mode 100644 configs/aristainetos2bcsl_defconfig
arch/arm/dts/Makefile +2 -0
index 1cd120a98e..e7ae3e40f9 100644
@@ -578,6 +578,8 @@ dtb-y += \
 	imx6dl-aristainetos2_7.dtb \
 	imx6dl-aristainetos2b_4.dtb \
 	imx6dl-aristainetos2b_7.dtb \
+	imx6dl-aristainetos2b_csl_4.dtb \
+	imx6dl-aristainetos2b_csl_7.dtb \
 	imx6dl-brppt2.dtb \
 	imx6dl-dhcom-pdk2.dtb \
 	imx6dl-icore.dtb \
arch/arm/dts/imx6dl-aristainetos2b_csl_4-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..654ac122a1
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2b_csl-u-boot.dtsi>
+
+&lcd_panel {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ipu_disp>;
+	enable-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+	backlight = <&backlight>;
+};
arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts new file +50 -0

50 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2b_csl_7-u-boot.dtsi new file +19 -0
new file mode 100644
index 0000000000..70d195ecbf
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2b_csl-u-boot.dtsi>
+/ {
+	vdd_panel_reg: regulator-panel {
+		compatible = "regulator-fixed";
+		regulator-name = "panel_regulator";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+};
+
+&panel0 {
+	power-supply = <&vdd_panel_reg>;
+};
arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts new file +16 -0
new file mode 100644
index 0000000000..ecf767da6c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0)
+/*
+ * support for the imx6 based aristainetos2 board
+ *
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ * Copyright (C) 2015 Heiko Schocher <[email protected]>
+ *
+ */
+/dts-v1/;
+#include "imx6dl-aristainetos2_7.dtsi"
+#include "imx6qdl-aristainetos2b_csl.dtsi"
+
+/ {
+	model = "aristainetos2b csl i.MX6 Dual Lite Board 7";
+	compatible = "fsl,imx6dl";
+};
arch/arm/dts/imx6qdl-aristainetos2b_csl-u-boot.dtsi new file +77 -0

77 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi new file +248 -0

248 lines not on this page · raw message

arch/arm/mach-imx/mx6/Kconfig +11 -0
index b3819d816d..7787dbaf6d 100644
@@ -147,6 +147,17 @@ config TARGET_ARISTAINETOS2B
 	imply CMD_SATA
 	imply CMD_DM
 
+config TARGET_ARISTAINETOS2BCSL
+	bool "Support aristainetos2-revB CSL"
+	select BOARD_LATE_INIT
+	select MX6DL
+	select SYS_I2C_MXC
+	select MXC_UART
+	select FEC_MXC
+	select DM
+	imply CMD_SATA
+	imply CMD_DM
+
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
 	select BOARD_LATE_INIT
board/aristainetos/Kconfig +12 -0
index 2e1d84d412..9eb3c3b9d8 100644
@@ -21,3 +21,15 @@ config SYS_BOARD_VERSION
 	default 3
 
 endif
+
+if TARGET_ARISTAINETOS2BCSL
+
+source "board/aristainetos/common/Kconfig"
+
+config SYS_BOARD
+	default "aristainetos"
+
+config SYS_BOARD_VERSION
+	default 4
+
+endif
board/aristainetos/MAINTAINERS +7 -0
index 4fa0ad2e98..9685c032ab 100644
@@ -5,6 +5,7 @@ F:	board/aristainetos/
 F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
 F:	configs/aristainetos2b_defconfig
+F:	configs/aristainetos2bcsl_defconfig
 F:	arch/arm/dts/imx6qdl-aristainetos2.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2-common.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi
@@ -20,3 +21,9 @@ F:	arch/arm/dts/imx6dl-aristainetos2b_7.dts
 F:	arch/arm/dts/imx6dl-aristainetos2b_7-u-boot.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2b-u-boot.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2b.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2b_csl_4.dts
+F:	arch/arm/dts/imx6dl-aristainetos2b_csl_4-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts
+F:	arch/arm/dts/imx6dl-aristainetos2b_csl_7-u-boot.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2b_csl-u-boot.dtsi
board/aristainetos/aristainetos.c +3 -1
index ca6155947b..88090799a6 100644
@@ -490,7 +490,9 @@ struct display_info_t const displays[] = {
 			.vmode          = FB_VMODE_NONINTERLACED
 		}
 	}
-#if ((CONFIG_SYS_BOARD_VERSION == 2) || (CONFIG_SYS_BOARD_VERSION == 3))
+#if ((CONFIG_SYS_BOARD_VERSION == 2) || \
+	(CONFIG_SYS_BOARD_VERSION == 3) || \
+	(CONFIG_SYS_BOARD_VERSION == 4))
 	, {
 		.bus	= -1,
 		.addr	= 0,
board/aristainetos/common/Kconfig +1 -0
index a15993e2de..6f1c825d80 100644
@@ -4,6 +4,7 @@ config SYS_BOARD_VERSION
 	  version of aristainetos board version
 	  2 version 2
 	  3 version 2b
+	  4 version 2bcsl
 
 config SYS_I2C_MXC_I2C1
 	default y
configs/aristainetos2bcsl_defconfig new file +115 -0

115 lines not on this page · raw message

include/configs/aristainetos2.h +21 -0
index d2646d26da..64a819df13 100644
@@ -107,6 +107,27 @@
 		"${fit_file}\0" \
 	"rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \
 		"${fit_addr_r} ${rescue_fit_file}\0"
+#elif (CONFIG_SYS_BOARD_VERSION == 4)
+#define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
+	"dead=led led_red on;led led_red2 on;\0" \
+	"mtdids=nand0=gpmi-nand,nor0=spi0.0\0" \
+	"mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \
+		"-(ubi-nor);gpmi-nand:-(ubi)\0" \
+	"addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \
+		"bootmode=${bootmode} mmcpart=${mmcpart}\0" \
+	"mainboot=echo Booting from SD-card ...; " \
+		"run mainargs addmtd addmisc;" \
+		"if test -n ${addmiscM}; then run addmiscM;fi;" \
+		"if test -n ${addmiscC}; then run addmiscC;fi;" \
+		"if test -n ${addmiscD}; then run addmiscD;fi;" \
+		"run boot_board_type;" \
+		"bootm ${fit_addr_r}\0" \
+	"mainargs=setenv bootargs console=${console},${baudrate} " \
+		"root=${mmcroot}\0" \
+	"main_load_fit=ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
+		"${fit_file}\0" \
+	"rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \
+		"${fit_addr_r} ${rescue_fit_file}\0"
 #else
 #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
 	"dead=led led_red on\0" \
Signature · 1 line
2.21.0
#56 lore raw

PATCH 28/29 imx6: aristainetos: add aristainetos 2b csl

Quoted 2 lines

add aristainetso board version CSL.

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
=====================================================================
#57 lore raw

PATCH 29/29 imx6: aristainetos: add support for rev C board

In reply to Heiko Schocher

add support for revision C boards. This board has
no longer a NAND.

---

 arch/arm/dts/Makefile                         |   2 +
 .../dts/imx6dl-aristainetos2c_4-u-boot.dtsi   |  13 +
 arch/arm/dts/imx6dl-aristainetos2c_4.dts      |  50 ++++
 .../dts/imx6dl-aristainetos2c_7-u-boot.dtsi   |  19 ++
 arch/arm/dts/imx6dl-aristainetos2c_7.dts      |  16 ++
 .../dts/imx6qdl-aristainetos2c-u-boot.dtsi    |  77 ++++++
 arch/arm/dts/imx6qdl-aristainetos2c.dtsi      | 228 ++++++++++++++++++
 arch/arm/mach-imx/mx6/Kconfig                 |  11 +
 board/aristainetos/Kconfig                    |  12 +
 board/aristainetos/MAINTAINERS                |   7 +
 board/aristainetos/aristainetos.c             |   9 +-
 board/aristainetos/common/Kconfig             |   1 +
 configs/aristainetos2c_defconfig              | 115 +++++++++
 include/configs/aristainetos2.h               |  27 +++
 14 files changed, 586 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_4-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_4.dts
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_7-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-aristainetos2c_7.dts
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2c-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-aristainetos2c.dtsi
 create mode 100644 configs/aristainetos2c_defconfig
arch/arm/dts/Makefile +2 -0
index e7ae3e40f9..31579f0ba7 100644
@@ -580,6 +580,8 @@ dtb-y += \
 	imx6dl-aristainetos2b_7.dtb \
 	imx6dl-aristainetos2b_csl_4.dtb \
 	imx6dl-aristainetos2b_csl_7.dtb \
+	imx6dl-aristainetos2c_4.dtb \
+	imx6dl-aristainetos2c_7.dtb \
 	imx6dl-brppt2.dtb \
 	imx6dl-dhcom-pdk2.dtb \
 	imx6dl-icore.dtb \
arch/arm/dts/imx6dl-aristainetos2c_4-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..052d51852b
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2c-u-boot.dtsi>
+
+&lcd_panel {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ipu_disp>;
+	enable-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+	backlight = <&backlight>;
+};
arch/arm/dts/imx6dl-aristainetos2c_4.dts new file +50 -0

50 lines not on this page · raw message

arch/arm/dts/imx6dl-aristainetos2c_7-u-boot.dtsi new file +19 -0
new file mode 100644
index 0000000000..cb2181d9e2
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+ or X11
+/*
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ */
+
+#include <imx6qdl-aristainetos2c-u-boot.dtsi>
+/ {
+	vdd_panel_reg: regulator-panel {
+		compatible = "regulator-fixed";
+		regulator-name = "panel_regulator";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+};
+
+&panel0 {
+	power-supply = <&vdd_panel_reg>;
+};
arch/arm/dts/imx6dl-aristainetos2c_7.dts new file +16 -0
new file mode 100644
index 0000000000..35435e1c10
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0)
+/*
+ * support for the imx6 based aristainetos2c board
+ *
+ * Copyright (C) 2019 Heiko Schocher <[email protected]>
+ * Copyright (C) 2015 Heiko Schocher <[email protected]>
+ *
+ */
+/dts-v1/;
+#include "imx6dl-aristainetos2_7.dtsi"
+#include "imx6qdl-aristainetos2c.dtsi"
+
+/ {
+	model = "aristainetos2c i.MX6 Dual Lite Board 7";
+	compatible = "fsl,imx6dl";
+};
arch/arm/dts/imx6qdl-aristainetos2c-u-boot.dtsi new file +77 -0

77 lines not on this page · raw message

arch/arm/dts/imx6qdl-aristainetos2c.dtsi new file +228 -0

228 lines not on this page · raw message

arch/arm/mach-imx/mx6/Kconfig +11 -0
index 7787dbaf6d..e3beb818ce 100644
@@ -158,6 +158,17 @@ config TARGET_ARISTAINETOS2BCSL
 	imply CMD_SATA
 	imply CMD_DM
 
+config TARGET_ARISTAINETOS2C
+	bool "Support aristainetos2-revC"
+	select BOARD_LATE_INIT
+	select MX6DL
+	select SYS_I2C_MXC
+	select MXC_UART
+	select FEC_MXC
+	select DM
+	imply CMD_SATA
+	imply CMD_DM
+
 config TARGET_CGTQMX6EVAL
 	bool "cgtqmx6eval"
 	select BOARD_LATE_INIT
board/aristainetos/Kconfig +12 -0
index 9eb3c3b9d8..2ad3dbd56c 100644
@@ -33,3 +33,15 @@ config SYS_BOARD_VERSION
 	default 4
 
 endif
+
+if TARGET_ARISTAINETOS2C
+
+source "board/aristainetos/common/Kconfig"
+
+config SYS_BOARD
+	default "aristainetos"
+
+config SYS_BOARD_VERSION
+	default 5
+
+endif
board/aristainetos/MAINTAINERS +7 -0
index 9685c032ab..b4ca7abb9c 100644
@@ -6,6 +6,7 @@ F:	include/configs/aristainetos2.h
 F:	configs/aristainetos2_defconfig
 F:	configs/aristainetos2b_defconfig
 F:	configs/aristainetos2bcsl_defconfig
+F:	configs/aristainetos2c_defconfig
 F:	arch/arm/dts/imx6qdl-aristainetos2.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2-common.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2-u-boot.dtsi
@@ -27,3 +28,9 @@ F:	arch/arm/dts/imx6dl-aristainetos2b_csl_7.dts
 F:	arch/arm/dts/imx6dl-aristainetos2b_csl_7-u-boot.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2b_csl.dtsi
 F:	arch/arm/dts/imx6qdl-aristainetos2b_csl-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2c_4.dts
+F:	arch/arm/dts/imx6dl-aristainetos2c_4-u-boot.dtsi
+F:	arch/arm/dts/imx6dl-aristainetos2c_7.dts
+F:	arch/arm/dts/imx6dl-aristainetos2c_7-u-boot.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2c.dtsi
+F:	arch/arm/dts/imx6qdl-aristainetos2c-u-boot.dtsi
board/aristainetos/aristainetos.c +8 -1
index 88090799a6..c79ac1d339 100644
@@ -492,7 +492,8 @@ struct display_info_t const displays[] = {
 	}
 #if ((CONFIG_SYS_BOARD_VERSION == 2) || \
 	(CONFIG_SYS_BOARD_VERSION == 3) || \
-	(CONFIG_SYS_BOARD_VERSION == 4))
+	(CONFIG_SYS_BOARD_VERSION == 4) || \
+	(CONFIG_SYS_BOARD_VERSION == 5))
 	, {
 		.bus	= -1,
 		.addr	= 0,
@@ -520,6 +521,7 @@ struct display_info_t const displays[] = {
 };
 size_t display_count = ARRAY_SIZE(displays);
 
+#if defined(CONFIG_NAND)
 iomux_v3_cfg_t nfc_pads[] = {
 	MX6_PAD_NANDF_CLE__NAND_CLE		| MUX_PAD_CTRL(NO_PAD_CTRL),
 	MX6_PAD_NANDF_ALE__NAND_ALE		| MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -573,6 +575,11 @@ static void setup_gpmi_nand(void)
 	/* enable apbh clock gating */
 	setbits_le32(&mxc_ccm->CCGR0, MXC_CCM_CCGR0_APBHDMA_MASK);
 }
+#else
+static void setup_gpmi_nand(void)
+{
+}
+#endif
 
 int board_init(void)
 {
board/aristainetos/common/Kconfig +1 -0
index 6f1c825d80..e26de5144d 100644
@@ -5,6 +5,7 @@ config SYS_BOARD_VERSION
 	  2 version 2
 	  3 version 2b
 	  4 version 2bcsl
+	  5 version 2c
 
 config SYS_I2C_MXC_I2C1
 	default y
configs/aristainetos2c_defconfig new file +115 -0

115 lines not on this page · raw message

include/configs/aristainetos2.h +27 -0
index 64a819df13..5f4a4f854f 100644
@@ -128,6 +128,33 @@
 		"${fit_file}\0" \
 	"rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \
 		"${fit_addr_r} ${rescue_fit_file}\0"
+#elif (CONFIG_SYS_BOARD_VERSION == 5)
+#define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
+	"emmcpart=1\0" \
+	"emmc_rescue_part=3\0" \
+	"emmcdev=1\0" \
+	"emmcroot=/dev/mmcblk1p1 rootwait rw\0" \
+	"dead=led led_red on\0" \
+	"mtdids=nor0=spi0.0\0" \
+	"mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \
+		"-(ubi-nor)\0" \
+	"addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \
+		"bootmode=${bootmode} mmcpart=${mmcpart} " \
+		"emmcpart=${emmcpart}\0" \
+	"mainboot=echo Booting from eMMC ...; " \
+		"run mainargs addmtd addmisc;" \
+		"if test -n ${addmiscM}; then run addmiscM;fi;" \
+		"if test -n ${addmiscC}; then run addmiscC;fi;" \
+		"if test -n ${addmiscD}; then run addmiscD;fi;" \
+		"run boot_board_type;" \
+		"bootm ${fit_addr_r}\0" \
+	"mainargs=setenv bootargs console=${console},${baudrate} " \
+		"root=${emmcroot} rootfstype=ext4\0 " \
+	"main_load_fit=ext4load mmc ${emmcdev}:${emmcpart} ${fit_addr_r} " \
+		"${fit_file}; " \
+		"imi ${fit_addr_r}\0 " \
+	"rescue_load_fit=ext4load mmc ${emmcdev}:${emmc_rescue_part} " \
+		"${fit_addr_r} ${rescue_fit_file};imi ${fit_addr_r}\0"
 #else
 #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
 	"dead=led led_red on\0" \
Signature · 1 line
2.21.0
#58 lore raw

PATCH 29/29 imx6: aristainetos: add support for rev C board

Quoted 3 lines

add support for revision C boards. This board has
no longer a NAND.

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
=====================================================================