]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 years agodts: imx28: Remove #include "imx28.dtsi" from imx28-u-boot.dtsi file
Lukasz Majewski [Thu, 5 Sep 2019 07:54:55 +0000 (09:54 +0200)]
dts: imx28: Remove #include "imx28.dtsi" from imx28-u-boot.dtsi file

After this change it is possible to use imx28-<board>-u-boot.dtsi with
the imx28-u-boot.dtsi explicitly included without breaking setup from
imx28-<board>.dts file.

The problem is that the imx28.dtsi included in a wrong place overrides the
changes made in imx28-<board>.dts. As a result some devices are "disabled"
in the final DTB.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: Introduce CONFIG_SPL_FORCE_MMC_BOOT to force MMC boot on falcon mode
Lukasz Majewski [Mon, 9 Sep 2019 13:32:13 +0000 (15:32 +0200)]
imx: Introduce CONFIG_SPL_FORCE_MMC_BOOT to force MMC boot on falcon mode

This change tries to fix the following problem:

- The board boots (to be more precise - ROM loads SPL) from a slow SPI-NOR
  memory.
  As a result the spl_boot_device() will return SPI-NOR as a boot device
  (which is correct).

- The problem is that in 'falcon boot' the eMMC is used as a boot medium to
  load kernel from its partition.
  Calling spl_boot_device() will break things as it returns SPI-NOR device.

To fix this issue the new CONFIG_SPL_FORCE_MMC_BOOT Kconfig flag is
introduced to handle this special use case. By default it is not defined,
so there is no change in the legacy code flow.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: Rewrite display5 get_board_id() function to use dm_gpio_* API
Lukasz Majewski [Tue, 3 Sep 2019 14:38:50 +0000 (16:38 +0200)]
imx: Rewrite display5 get_board_id() function to use dm_gpio_* API

The get_board_id() function was using the old gpio_* compatibility layer
to read HW and SW ID numbers encoded on the PCB board.

After this change the new dm_gpio* API is used for this purpose.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: Convert emergency pad of display5 to use dm_gpio* functions
Lukasz Majewski [Tue, 3 Sep 2019 14:38:49 +0000 (16:38 +0200)]
imx: Convert emergency pad of display5 to use dm_gpio* functions

After this change the display5's emergency gpio use dm_gpio* functions
instead of legacy ones (gpio*) to read its state.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: Update display5_factory_defconfig after switch to DM/DTS and uuu utility
Lukasz Majewski [Tue, 3 Sep 2019 14:38:47 +0000 (16:38 +0200)]
ARM: Update display5_factory_defconfig after switch to DM/DTS and uuu utility

This commit updates the display5_factory_defconfig file after the switch
to DM/DTS for this board.

Moreover, the VID and PID for SPL running SDP gadget have been updated to
allow seamless work with 'uuu' utility from NXP (the imx_usb doesn't work
properly after embedding the u-boot proper into fitImage - problem with IVT
embedding in FIT).

Example to use 'uuu' session:

cat << EOF > display5_recovery.lst
uuu_version 1.2.135
SDP: boot -f /srv/tftp/SPL
SDPU: write -f /srv/tftp/u-boot-dtb.img -addr 0x10000000
SDPU: jump -addr 0x10000000
SDPU: done
EOF

sudo ./uuu/uuu display5_recovery.lst

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: display5: Remove common.c file (after DM/DTS U-Boot proper conversion)
Lukasz Majewski [Tue, 3 Sep 2019 14:38:46 +0000 (16:38 +0200)]
ARM: display5: Remove common.c file (after DM/DTS U-Boot proper conversion)

The common.c file content can be safely moved to spl.c file after
performing the DM/DTS conversion for the U-Boot proper.

It contains the non DM/DTS setup code, which now is only used by SPL.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoDM: WDT: Convert WDT driver to use DM/DTS (including SYSRESET)
Lukasz Majewski [Tue, 3 Sep 2019 14:38:45 +0000 (16:38 +0200)]
DM: WDT: Convert WDT driver to use DM/DTS (including SYSRESET)

This commit enables support for CONFIG_WDT in the U-Boot proper. Moreover,
the SYSRESET_WATCHDOG driver is used to support 'reset' command.

As SPL is not yet ready for DM conversion, the CONFIG_HW_WATCHDOG is
enabled for it. This allows the legacy SPL code to work properly.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: display5: Remove UART initialization code after DM/DTS conversion (non-console)
Lukasz Majewski [Tue, 3 Sep 2019 14:38:44 +0000 (16:38 +0200)]
ARM: display5: Remove UART initialization code after DM/DTS conversion (non-console)

This UART is not used in U-Boot, so there is no need to initialize it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoDM: SPI: Convert display5 to use SPI with DM/DTS (but no in SPL)
Lukasz Majewski [Tue, 3 Sep 2019 14:38:43 +0000 (16:38 +0200)]
DM: SPI: Convert display5 to use SPI with DM/DTS (but no in SPL)

The DM/DTS support for SPI is disabled on purpose for SPL, as it is not
supported as of time of this conversion.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoDM: eth: Switch display5 board to use DM_ETH
Lukasz Majewski [Tue, 3 Sep 2019 14:38:42 +0000 (16:38 +0200)]
DM: eth: Switch display5 board to use DM_ETH

After this commit the display5 device would use FEC driver supporting
driver model (DM_ETH).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoDM: mmc: Switch display5 board to use DM_MMC and BLK (USDHC)
Lukasz Majewski [Tue, 3 Sep 2019 14:38:41 +0000 (16:38 +0200)]
DM: mmc: Switch display5 board to use DM_MMC and BLK (USDHC)

After this commit the display5 device would use eMMC driver supporting
driver model (DM_MMC and BLK).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: imx: defconfig: Enable 'regulator' and 'pmic' commands on display5
Lukasz Majewski [Tue, 3 Sep 2019 14:38:40 +0000 (16:38 +0200)]
ARM: imx: defconfig: Enable 'regulator' and 'pmic' commands on display5

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoDM: I2C: Switch display5 board to use DM_I2C
Lukasz Majewski [Tue, 3 Sep 2019 14:38:39 +0000 (16:38 +0200)]
DM: I2C: Switch display5 board to use DM_I2C

After this commit the display5 device would use I2C driver supporting
driver model (DM_I2C).

The 'i2c' and 'eeprom' commands now use DM I2C drivers and initialize
on-bus devices according to device tree description.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: imx: defconfig: Enable CONFIG_PINCTRL{_IMX6} on display5's defconfig
Lukasz Majewski [Tue, 3 Sep 2019 14:38:38 +0000 (16:38 +0200)]
ARM: imx: defconfig: Enable CONFIG_PINCTRL{_IMX6} on display5's defconfig

Enable PINCTRL for i.MX6 soc based display5 after DM/DTS conversion.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agofix: defconfig: Enable OF_CONTROL for display5_factory
Lukasz Majewski [Tue, 3 Sep 2019 14:38:37 +0000 (16:38 +0200)]
fix: defconfig: Enable OF_CONTROL for display5_factory

This change fixes issue with building display5 "factory" U-Boot variant
when the display5 board gains DM/DTS support.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: bk4: Print proper HW revision of VF610's BK4 board
Lukasz Majewski [Sat, 27 Jul 2019 22:17:05 +0000 (00:17 +0200)]
imx: bk4: Print proper HW revision of VF610's BK4 board

This code uses HW difference on the USB_RESET pin (added PULL UP resistor
on the L333 rev) to distinguish between two BK4 HW revisions.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopico-imx6: Add Falcon mode
Fabio Estevam [Wed, 18 Sep 2019 01:04:57 +0000 (22:04 -0300)]
pico-imx6: Add Falcon mode

Add Falcon mode support, which allows the SPL to load and
jump to the Linux kernel directly, without the need of loading
U-Boot proper.

CONFIG_SPL_OS_BOOT=y needs to be passed in the defconfig
in order to use Falcon mode.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6: Add splashscreen support
Fabio Estevam [Tue, 17 Sep 2019 17:17:07 +0000 (14:17 -0300)]
pico-imx6: Add splashscreen support

Add splashscreen support. Tested with the parallel
FT5x06-WVGA panel.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6: Add Ethernet support
Fabio Estevam [Mon, 16 Sep 2019 17:15:00 +0000 (14:15 -0300)]
pico-imx6: Add Ethernet support

Add Ethernet support.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6: Fix bootmenu handling
Otavio Salvador [Wed, 19 Jun 2019 18:03:44 +0000 (15:03 -0300)]
pico-imx6: Fix bootmenu handling

We should use a common script to allow booting the U-Boot console as
fallback so we ended using a 'default_boot' and 'base_boot'
environment scripts to accomplish that.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6: Add initial support
Fabio Estevam [Tue, 11 Jun 2019 01:24:12 +0000 (22:24 -0300)]
pico-imx6: Add initial support

Add the initial support for the pico-imx6 variants.

DDR initialization is based on the TechNexion's U-Boot code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agomx6: clock: Allow enable_ipu_clock() to be built for SPL code
Fabio Estevam [Fri, 12 Jul 2019 12:10:35 +0000 (09:10 -0300)]
mx6: clock: Allow enable_ipu_clock() to be built for SPL code

Allow enable_ipu_clock() to be built for SPL code. This is done
in preparation for configuring the NoC registers on i.MX6QP in SPL.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agomx53loco: Fix U-Boot corruption after saving the environment
Fabio Estevam [Fri, 30 Aug 2019 16:58:29 +0000 (13:58 -0300)]
mx53loco: Fix U-Boot corruption after saving the environment

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.

Running "saveenv" causes U-Boot to hang because of this overlap.

Fix this problem by increasing the CONFIG_ENV_OFFSET size.

Also, in order to prevent this same problem in the future, use
CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.

CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoboard: imx6dl_mamoj: set the value for CSF size
Stefano Babic [Fri, 20 Sep 2019 06:51:29 +0000 (08:51 +0200)]
board: imx6dl_mamoj: set the value for CSF size

Default value is too high and it covers the worst case. SPL for
imx6dl_mamoj becomes too big and cannot fit into the OCRAM, but CSF size
can be reduced.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Jagan Teki <jagan@amarulasolutions.com>
CC: Breno Lima <breno.lima@nxp.com>
5 years agoconfigs: Sync all baseboard specific pico-imx7d
Otavio Salvador [Mon, 16 Sep 2019 11:14:48 +0000 (08:14 -0300)]
configs: Sync all baseboard specific pico-imx7d

This syncs all baseboard specific defconfig using the
pico-imx7d_defconfig as base. It changes:

 - pico-dwarf-imx7d_defconfig
 - pico-hobbit-imx7d_defconfig
 - pico-nymph-imx7d_defconfig
 - pico-pi-imx7d_defconfig

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoconfigs: pico-imx7d: Convert to DM_VIDEO
Joris Offouga [Fri, 30 Aug 2019 12:44:36 +0000 (14:44 +0200)]
configs: pico-imx7d: Convert to DM_VIDEO

This commit convert all pico-imx7d to DM_VIDEO

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
5 years agoARM: dts: pico-imx7d: sync device tree with v5.3-rc6
Joris Offouga [Fri, 30 Aug 2019 12:42:59 +0000 (14:42 +0200)]
ARM: dts: pico-imx7d: sync device tree with v5.3-rc6

Synchronize device tree with v5.3-rc6 label

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
5 years agoARM: dts: pico-imx7d: Add u-boot.dtsi for uboot specific dts change
Joris Offouga [Fri, 30 Aug 2019 12:39:49 +0000 (14:39 +0200)]
ARM: dts: pico-imx7d: Add u-boot.dtsi for uboot specific dts change

This commit introduce u-boot.dtsi

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Suggested-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: fix missing MAINTAINERS pico boards
Stefano Babic [Mon, 16 Sep 2019 06:36:23 +0000 (08:36 +0200)]
imx: fix missing MAINTAINERS pico boards

Add missing files pico-nymph-imx7d_defconfig and
c>onfigs/pico-dwarf-imx7d_defconfig

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
CC: Fabio Estevam <festevam@gmail.com>
CC: Otavio Salvador <otavio@ossystems.com.br>
5 years agoimx: sksimx6_defconfig: remove SPL misc option to fix build error
Anatolij Gustschin [Sat, 14 Sep 2019 11:30:49 +0000 (13:30 +0200)]
imx: sksimx6_defconfig: remove SPL misc option to fix build error

Remove CONFIG_SPL_DRIVERS_MISC_SUPPORT since it is already defined
in include/configs/mx6_common.h for SPL builds. When this option
is in defconfig, we get build warnings (or errors when building
with -Werror).

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agopico: Convert to CONFIG_FSL_USDHC
Fabio Estevam [Sat, 14 Sep 2019 12:14:19 +0000 (09:14 -0300)]
pico: Convert to CONFIG_FSL_USDHC

The eSDHC config symbol has been converted to CONFIG_FSL_USDHC, so
adjust it accordingly in order to fix the build errors:

https://travis-ci.org/sbabic/u-boot-imx/jobs/584781580#L1287

Reported-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agologos: Add the TechNexion's logo
Fabio Estevam [Tue, 11 Dec 2018 02:06:49 +0000 (00:06 -0200)]
logos: Add the TechNexion's logo

Add the TechNexion's logo from their internal U-Boot tree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx7d: Provide a way to escape the Falcon mode
Fabio Estevam [Wed, 11 Sep 2019 17:30:28 +0000 (14:30 -0300)]
pico-imx7d: Provide a way to escape the Falcon mode

When CONFIG_SPL_OS_BOOT is selected, it is still convenient to be able
to escape from Falcon mode and boot to U-Boot proper.

Add a mechanism that allows booting in U-Boot proper when the
key 'c' is entered on console at boot time.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx7d: Add instructions for booting in Falcon mode
Fabio Estevam [Wed, 11 Sep 2019 17:29:52 +0000 (14:29 -0300)]
pico-imx7d: Add instructions for booting in Falcon mode

Improve the README by adding instructions on how to boot using
Falcon mode, which allows the SPL to load the kernel directly,
without using U-Boot proper.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx7d: Add NYMPH baseboard support
Otavio Salvador [Thu, 11 Apr 2019 12:19:42 +0000 (09:19 -0300)]
pico-imx7d: Add NYMPH baseboard support

This add the boot menu option for the NYMPH baseboard as well as a
specific config file for users which wish to use it as a pre-defined
board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx7d: Add DWARF baseboard support
Otavio Salvador [Thu, 11 Apr 2019 12:17:48 +0000 (09:17 -0300)]
pico-imx7d: Add DWARF baseboard support

This add the boot menu option for the DWARF baseboard as well as a
specific config file for users which wish to use it as a pre-defined
board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx7d: Sync pico-hobbit-imx7d_defconfig
Fabio Berton [Fri, 23 Aug 2019 18:01:00 +0000 (15:01 -0300)]
pico-imx7d: Sync pico-hobbit-imx7d_defconfig

Update pico-hobbit-imx7d_defconfig using pico-imx7d_defconfig as base
to fix device tree file generation. With this all pico-imx7d are
creating u-boot-dtb.img files.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
5 years agopico-imx6ul: Provide a way to escape the Falcon mode
Fabio Estevam [Wed, 11 Sep 2019 17:33:44 +0000 (14:33 -0300)]
pico-imx6ul: Provide a way to escape the Falcon mode

When CONFIG_SPL_OS_BOOT is selected, it is still convenient to be able
to escape from Falcon mode and boot to U-Boot proper.

Add a mechanism that allows booting in U-Boot proper when the
key 'c' is entered on console at boot time.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Update the Falcon mode instructions
Fabio Estevam [Wed, 11 Sep 2019 17:32:29 +0000 (14:32 -0300)]
pico-imx6ul: Update the Falcon mode instructions

Sync the Falcon mode instructions with the ones fro pico-imx7d.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Add LCD support
Fabio Estevam [Tue, 10 Sep 2019 01:23:39 +0000 (22:23 -0300)]
pico-imx6ul: Add LCD support

Add support for the VXT VL050-8048NT-C01 panel connected through
the 24 bit parallel LCDIF interface.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Increase the CONFIG_ENV_OFFSET size
Fabio Estevam [Thu, 12 Sep 2019 14:15:54 +0000 (11:15 -0300)]
pico-imx6ul: Increase the CONFIG_ENV_OFFSET size

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.

Running "saveenv" causes U-Boot to hang because of this overlap.

Fix this problem by increasing the CONFIG_ENV_OFFSET size.

Also, in order to prevent this same problem in the future, use
CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.

CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Add DWARF baseboard support
Otavio Salvador [Sun, 7 Apr 2019 19:43:02 +0000 (16:43 -0300)]
pico-imx6ul: Add DWARF baseboard support

This add the boot menu option for the DWARF baseboard as well as a
specific config file for users which wish to use it as a pre-defined
board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoRevert "habv4: tools: Avoid hardcoded CSF size for SPL targets"
Stefano Babic [Fri, 13 Sep 2019 16:53:03 +0000 (18:53 +0200)]
Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets"

This reverts commit 62a52f3f85bf33e286632e99f0d39b2c166af0c4.

5 years agohabv4: tools: Avoid hardcoded CSF size for SPL targets
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:15 +0000 (12:34 +0000)]
habv4: tools: Avoid hardcoded CSF size for SPL targets

Currently it's not possible to authenticate the U-Boot proper of
mx6ul_14x14_evk_defconfig target:

Authenticate image from DDR location 0x877fffc0...
bad magic magic=0x0 length=0x00 version=0x3
bad length magic=0x0 length=0x00 version=0x3
bad version magic=0x0 length=0x00 version=0x3
spl: ERROR:  image authentication fail

Commit 0633e134784a ("imx: hab: Increase CSF_SIZE for i.MX6 and
i.MX7 devices") has increased CSF_SIZE to avoid a possible issue
when booting encrypted boot images.

Commit d21bd69b6e95 ("tools: mkimage: add firmware-ivt image type
for HAB verification") is hardcoding the CSF and IVT sizes, the
new CSF size is not being considered and u-boot-ivt.img fails to
boot.

Avoid hardcoded CSF and IVT size to fix this issue.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoimx8: cpu: fix mac fuse word for i.MX8QM
Peng Fan [Mon, 26 Aug 2019 08:12:23 +0000 (08:12 +0000)]
imx8: cpu: fix mac fuse word for i.MX8QM

i.MX8QM does not share same FUSE MAC word index, so update the word
index for i.MX8QM.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: move i.MX8 cpu desc code to drivers/cpu/imx8_cpu.c
Peng Fan [Mon, 26 Aug 2019 08:12:19 +0000 (08:12 +0000)]
imx8: move i.MX8 cpu desc code to drivers/cpu/imx8_cpu.c

Move cpu desc code to cpu driver directory and name it imx8_cpu.c
No functional change.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: scu_api: add sc_pm_is_partition_started
Peng Fan [Mon, 26 Aug 2019 08:12:16 +0000 (08:12 +0000)]
imx: scu_api: add sc_pm_is_partition_started

Add sc_pm_is_partition_started to check whether a partition
has been started. This will be used to detect M4 partition booted up or
not, then we could choose which dtb to use. If M4 is up, we need
use dtb, such as imx8qm-mek-rpmsg.dtb.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: fdt: add optee node
Peng Fan [Mon, 26 Aug 2019 08:12:13 +0000 (08:12 +0000)]
imx8: fdt: add optee node

Add OP-TEE device tree node for Linux according to args passed from ATF.
If ATF has been built with OP-TEE running, boot_pointer[1] will indicate
that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: save args passed from ATF
Peng Fan [Mon, 26 Aug 2019 08:12:09 +0000 (08:12 +0000)]
imx8: save args passed from ATF

We use information from ATF to know whether OP-TEE is running or not.
So save args passed from ATF.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: fdt: configure sid for masters
Peng Fan [Mon, 26 Aug 2019 08:12:06 +0000 (08:12 +0000)]
imx8: fdt: configure sid for masters

On i.MX8QM, sid is programmable, so we could program sid according the
value encoded in device tree.

This patch support legacy bindings which are still being used by XEN
and new bindings used by Linux Kernel.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: scu_api: add sc_rm_set_master_sid
Peng Fan [Mon, 26 Aug 2019 08:12:03 +0000 (08:12 +0000)]
imx: scu_api: add sc_rm_set_master_sid

Add sc_rm_set_master_sid to set stream sid of masters to make
sure they could use smmu.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoconfigs: imx8qm/qxp_mek: enable CONFIG_OF_SYSTEM_SETUP
Peng Fan [Mon, 26 Aug 2019 08:12:00 +0000 (08:12 +0000)]
configs: imx8qm/qxp_mek: enable CONFIG_OF_SYSTEM_SETUP

Enable CONFIG_OF_SYSTEM_SETUP to let U-Boot could disable
device tree nodes that could not be used by Linux.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: disable node when the resource is not owned
Peng Fan [Mon, 26 Aug 2019 08:11:56 +0000 (08:11 +0000)]
imx8: disable node when the resource is not owned

When resource is not assigned to non-secure Linux, if linux continue
to use the node, linux may crash or hang. So need to set the node
status to disabled for not owned resources.

The resource id is in the power-domains property in device tree,
so parse the power-domains property to get the resource id and
use scfw api to check whether it is owned by current partition.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qm: correct fdt_file
Peng Fan [Mon, 26 Aug 2019 08:11:53 +0000 (08:11 +0000)]
imx8qm: correct fdt_file

imx8qm-mek.dtb is the correct fdt file, not fsl-imx8qxp-mek.dtb

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qm: power up SMMU
Peng Fan [Mon, 26 Aug 2019 08:11:49 +0000 (08:11 +0000)]
imx8qm: power up SMMU

There is SMMU in i.MX8QM. To use SMMU in Linux, need power up it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: sys_proto: add is_imx8qm helper
Peng Fan [Mon, 26 Aug 2019 08:11:46 +0000 (08:11 +0000)]
imx: sys_proto: add is_imx8qm helper

Add is_imx8qm helper which could be used by SoC and Driver code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: Probe the SCU driver by using uclass function
Ye Li [Mon, 26 Aug 2019 08:11:42 +0000 (08:11 +0000)]
imx8: Probe the SCU driver by using uclass function

Since SCU MU driver has been bound in dm_init, so we don't need to
bind it again. Just replace by using uclass function to probe it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agodoc: imx: mkimage: introduce i.MX8 image format
Peng Fan [Thu, 22 Aug 2019 07:42:49 +0000 (07:42 +0000)]
doc: imx: mkimage: introduce i.MX8 image format

Introduce i.MX8 container set configuration file and add example

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qm_mek: switch to use container image
Peng Fan [Thu, 22 Aug 2019 07:42:46 +0000 (07:42 +0000)]
imx8qm_mek: switch to use container image

Because FIT could not be used for AHAB secure boot on i.MX8,
so switch to use container image that could let SPL verify
ATF and U-Boot with AHAB.

Enable HUSH_PARSER in defconfig to make run netboot could work.

Note: The AHAB related code has not been added.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp_mek: switch to use container image
Peng Fan [Thu, 22 Aug 2019 07:42:43 +0000 (07:42 +0000)]
imx8qxp_mek: switch to use container image

Because FIT could not be used for AHAB secure boot on i.MX8,
so switch to use container image that could let SPL verify
ATF and U-Boot with AHAB.

Note: The AHAB related code has not been added.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: add container target
Peng Fan [Thu, 22 Aug 2019 07:42:41 +0000 (07:42 +0000)]
imx: add container target

To support SPL loading container file, add a new Makefile target,
and introduce a new Kconfig file to source the cfg file which
will be parsed by mkimage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agospl: mmc: support loading i.MX container format file
Peng Fan [Thu, 22 Aug 2019 07:42:38 +0000 (07:42 +0000)]
spl: mmc: support loading i.MX container format file

i.MX8 only support AHAB secure boot with Container format image,
we could not use FIT to support secure boot, so introduce container
support to let SPL could load container images.

Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: support parsing i.MX8 Container file
Peng Fan [Thu, 22 Aug 2019 07:42:33 +0000 (07:42 +0000)]
imx8: support parsing i.MX8 Container file

Add parsing i.MX8 Container file support, this is to let
SPL could load images in a container file to destination address.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8qxp_mek: fix CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
Peng Fan [Wed, 21 Aug 2019 08:28:15 +0000 (08:28 +0000)]
imx: imx8qxp_mek: fix CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR

The first stage of flash.bin is larger than 584 * 512, so when
writting u-boot.itb, some data will be override. Enlarge the
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to fix boot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx6qdl: dtsi: move U-Boot specific change to u-boot.dtsi
Peng Fan [Wed, 14 Aug 2019 09:27:06 +0000 (09:27 +0000)]
imx: imx6qdl: dtsi: move U-Boot specific change to u-boot.dtsi

The changes were added by following patch:
commit <9002e735e717> ("imx: mx6sabresd: fix boot hang with video")
commit <f45ec8fcfb86> ("imx6: dts: add 'u-boot, dm-pre-reloc' to soc and ipu nodes")

Let's move the U-Boot specific change to imx6qdl-u-boot.dtsi

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: mx6sabresd: fix usb start when DM enabled
Peng Fan [Wed, 14 Aug 2019 09:13:04 +0000 (09:13 +0000)]
imx: mx6sabresd: fix usb start when DM enabled

Enable CONFIG_DM_REGULATOR_FIXED to let vbus regulator work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: configs: Cleanup CONFIG_SECURE_BOOT comments
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:30 +0000 (12:34 +0000)]
imx: configs: Cleanup CONFIG_SECURE_BOOT comments

Since commit 6e1f4d2652e7 ("arm: imx-common: add SECURE_BOOT option
to Kconfig") the SECURE_BOOT option is selected through Kconfig.

Cleanup comments in code to align with this change.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoimx6: spl: Reduce SPL limit size in case CONFIG_SECURE_BOOT is enabled
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:23 +0000 (12:34 +0000)]
imx6: spl: Reduce SPL limit size in case CONFIG_SECURE_BOOT is enabled

In case CONFIG_SECURE_BOOT is enabled we need to limit the SPL size to
avoid a possible HAB failure event:

--------- HAB Event 1 -----------------
event data:
        0xdb 0x00 0x14 0x42 0x33 0x22 0x33 0x00
        0x00 0x00 0x00 0x0f 0x00 0x90 0x70 0x00
        0x00 0x01 0x10 0x00
STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ADDRESS (0x22)
CTX = HAB_CTX_TARGET (0x33)
ENG = HAB_ENG_ANY (0x00)

As explained in Commit 23612534fe0f ("spl: imx6: Provide a SPL_SIZE_LIMIT
default") the i.MX6 SPL size limit is 68KB.

The ROM code is copying the image size defined in boot data to its
respective load address, in case we exceed the OCRAM free region a
HAB invalid address failure event is generated.

The maximum CSF size is defined in CONFIG_CSF_SIZE, reduce SPL size
limit based on this configuration.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoKconfig: Migrate CONFIG_CSF_SIZE to Kconfig
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:08 +0000 (12:34 +0000)]
Kconfig: Migrate CONFIG_CSF_SIZE to Kconfig

Move CONFIG_CSF_SIZE to Kconfig and define default value as 0x4000.

mx8mqevk requires 0x2000 add this configuration in imx8mq_evk_defconfig
file.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agomx6sabresd: Reduce overall SPL size
Fabio Estevam [Tue, 23 Jul 2019 15:20:46 +0000 (12:20 -0300)]
mx6sabresd: Reduce overall SPL size

Currently the SPL binary is 67 kB, which leaves only 1 kB of free
internal RAM space.

The following options can be safely removed to save some precious
SPL space:

- CONFIG_SPL_FS_EXT4: u-boot-dtb.img is stored in raw sector via dd
command (at offset 69 kB)
- CONFIG_SPL_I2C_SUPPORT: I2C is not used during SPL
- CONFIG_SPL_OS_BOOT: no need to make Falcon mode supported
by default

After this change the SPL binary size gets down to 51 kB.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Change clock rate calculation for NIC1 BUS and EXT
Ye Li [Mon, 22 Jul 2019 01:25:10 +0000 (01:25 +0000)]
i.MX7ULP: Change clock rate calculation for NIC1 BUS and EXT

On i.MX7ULP B0, there is change in NIC clock dividers architecture.
On A0, the NIC1 BUS and EXT dividers were in a chain with NIC1 DIV, but
on B0 they are parallel with NIC1 DIV. So now the dividers are independent.
This patch modifies the scg_nic_get_rate function according to this change.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Set A7 core frequency to 500Mhz for B0 chip
Ye Li [Mon, 22 Jul 2019 01:25:08 +0000 (01:25 +0000)]
i.MX7ULP: Set A7 core frequency to 500Mhz for B0 chip

The normal target frequency for ULP A7 core is 500Mhz, but now ROM
set the core frequency to 413Mhz. So change it to 500Mhz in u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Add CPU revision check for B0
Peng Fan [Mon, 22 Jul 2019 01:25:05 +0000 (01:25 +0000)]
i.MX7ULP: Add CPU revision check for B0

Since there is no register for CPU revision, we use ROM version to
check the A0 or B0 chip.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Workaround APLL PFD2 to 345.6Mhz
Ye Li [Mon, 22 Jul 2019 01:25:03 +0000 (01:25 +0000)]
i.MX7ULP: Workaround APLL PFD2 to 345.6Mhz

The GPU uses APLL PFD2 as its clock parent (483.84Mhz) with divider
set to 1. This frequecy is out of ULP A0 spec. The MAX rate for GPU
is 350Mhz. So we simply configure the APLL PFD2 to 345.6Mhz (FRAC=28)
to workaround the problem. The correct fix should let GPU handle the
clock rate in kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Fix SPLL/APLL clock rate calculation issue
Ye Li [Mon, 22 Jul 2019 01:25:00 +0000 (01:25 +0000)]
i.MX7ULP: Fix SPLL/APLL clock rate calculation issue

The num/denom is a float value, but in the calculation it is convert
to integer 0, and cause the result wrong.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: evk: Enable fuse comamnd
Peng Fan [Mon, 22 Jul 2019 01:24:57 +0000 (01:24 +0000)]
i.MX7ULP: evk: Enable fuse comamnd

Enable fuse command

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agomisc: Kconfig: make i.MX7ULP could use MXC_OCOTP
Peng Fan [Mon, 22 Jul 2019 01:24:55 +0000 (01:24 +0000)]
misc: Kconfig: make i.MX7ULP could use MXC_OCOTP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Fix wrong i2c configuration name
Ye Li [Mon, 22 Jul 2019 01:24:53 +0000 (01:24 +0000)]
i.MX7ULP: Fix wrong i2c configuration name

Wrong I2c driver configuration name is used in codes, so I2c driver is
not built. Correct it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Add CONFIG_MX7ULP to kconfig
Ye Li [Mon, 22 Jul 2019 01:24:50 +0000 (01:24 +0000)]
i.MX7ULP: Add CONFIG_MX7ULP to kconfig

Since many drivers need this CONFIG_MX7ULP to distiguish the settings
for i.MX7ULP only. Add this entry to cpu's kconfig.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Fix PCC register bits mask and offset issue
Ye Li [Mon, 22 Jul 2019 01:24:47 +0000 (01:24 +0000)]
i.MX7ULP: Fix PCC register bits mask and offset issue

The offset for FRAC and the mask for PCD are not correct.
If we set FRAC, we can't get the right frequency. Fix them
to correct value.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Correct the clock index
Bai Ping [Mon, 22 Jul 2019 01:24:45 +0000 (01:24 +0000)]
i.MX7ULP: Correct the clock index

On i.MX7ULP, value zero is reserved in SCG1 RCCR register,
so the val should be decreased by 1 to get the correct clock
source index.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: Fix system reset after a7 rtc alarm expired.
Bai Ping [Mon, 22 Jul 2019 01:24:42 +0000 (01:24 +0000)]
i.MX7ULP: Fix system reset after a7 rtc alarm expired.

The board will reboot if A7 core enter mem mode by rtc, then M4 core
enter VLLS mode after the RTC alarm expired. Enable the dumb PMIC mode
to fix this issue.
Since i.MX7ULP B0 moves the SNVS LP into M4 domain, A core can't access
it. So check the CPU rev and not apply the settings for B0.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoi.MX7ULP: evk: Modify FDT file to disable SD3.0 for usb boot
Peng Fan [Mon, 22 Jul 2019 01:24:39 +0000 (01:24 +0000)]
i.MX7ULP: evk: Modify FDT file to disable SD3.0 for usb boot

Since the SD3.0 kernel driver needs M4 image support, this causes
problem for usb boot booting into kernel.  To decouple the relationship,
we modify the FDT file in u-boot to disable SD3.0.
So the kernel won't depend on M4 image.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: i.MX7ULP: add get_boot_device
Peng Fan [Mon, 22 Jul 2019 01:24:37 +0000 (01:24 +0000)]
imx: i.MX7ULP: add get_boot_device

Add get_boot_device for i.MX7ULP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
5 years agoconfigs: nitrogen6x: Add DM_SPI/DM_SPI_FLASH support
Troy Kisky [Mon, 29 Jul 2019 19:15:58 +0000 (12:15 -0700)]
configs: nitrogen6x: Add DM_SPI/DM_SPI_FLASH support

Add CONFIG_DM_SPI/CONFIG_DM_SPI_FLASH to all defconfigs whose board is
    nitrogen6x.

    mx6qsabrelite_defconfig
    nitrogen6dl2g_defconfig
    nitrogen6dl_defconfig
    nitrogen6q2g_defconfig
    nitrogen6q_defconfig
    nitrogen6s1g_defconfig

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
5 years agoconfigs: nitrogen6x: Add DM_GPIO support
Troy Kisky [Mon, 29 Jul 2019 19:15:57 +0000 (12:15 -0700)]
configs: nitrogen6x: Add DM_GPIO support

Add CONFIG_DM_GPIO to all defconfigs whose board is
nitrogen6x.

mx6qsabrelite_defconfig
nitrogen6dl2g_defconfig
nitrogen6dl_defconfig
nitrogen6q2g_defconfig
nitrogen6q_defconfig
nitrogen6s1g_defconfig

This is in preparation for adding CONFIG_DM_SPI.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
5 years agonitrogen6x: reserve used gpios
Troy Kisky [Mon, 29 Jul 2019 19:15:56 +0000 (12:15 -0700)]
nitrogen6x: reserve used gpios

This prevents messages like
gpio@20a0000: get_value: error: gpio GPIO2_2 not reserved

when CONFIG_DM_GPIO is enabled.

Also, when CONFIG_DM_GPIO is enabled, checkboard is too
early to use gpio_get_value, so read it directly on failure.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
5 years agoconfigs: nitrogen6x: Add DM_MMC/DM_USB/AHCI support
Troy Kisky [Mon, 29 Jul 2019 19:15:55 +0000 (12:15 -0700)]
configs: nitrogen6x: Add DM_MMC/DM_USB/AHCI support

Add DM_MMC to all defconfigs whose board is
nitrogen6x.

mx6qsabrelite_defconfig
nitrogen6dl2g_defconfig
nitrogen6dl_defconfig
nitrogen6q2g_defconfig
nitrogen6q_defconfig
nitrogen6s1g_defconfig

This commit is adding multiple configs, but
seems to be the minimum change to not lose features
and still compile fine.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
5 years agonitrogen6x: migrate to using device tree
Troy Kisky [Mon, 29 Jul 2019 19:15:54 +0000 (12:15 -0700)]
nitrogen6x: migrate to using device tree

Migrate to using device tree required for further driver model
integration.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
5 years agoARM: imx: Support larger SPL size on IMX6DQ
Robert Hancock [Thu, 8 Aug 2019 18:14:39 +0000 (12:14 -0600)]
ARM: imx: Support larger SPL size on IMX6DQ

Previously the SPL size on all iMX6 platforms was restricted to 68KB
because the OCRAM size on iMX6SL/DL parts is only 128KB. However, the
other iMX6 variants have 256KB of OCRAM. Add an option
CONFIG_MX6_OCRAM_256KB which allows using the full size on boards which
don't need to support the SL/DL variants. This allows for an SPL size of
196KB, which makes it much easier to use configurations such as SPL with
driver model and FDT control.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Tested-by: Adam Ford <aford173@gmail.com> #imx6q_logic
5 years agospl: imx: only use HAB if spl fit signature is not enabled
Ricardo Salveti [Mon, 2 Sep 2019 21:18:52 +0000 (18:18 -0300)]
spl: imx: only use HAB if spl fit signature is not enabled

There is no need to use HAB for FIT signature validation when
SPL_FIT_SIGNATURE is also enabled, as that will be validated via the
normal U-Boot signed FIT image flow.

This allows having SPL validated by HAB and the payloads to follow
being validated with FIT signatures only.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: apalis_imx6: select MX6Q via Kconfig
Ricardo Salveti [Mon, 2 Sep 2019 21:26:15 +0000 (18:26 -0300)]
imx: apalis_imx6: select MX6Q via Kconfig

Toradex Apalis iMX6 modules are available in the iMX6D and iMX6Q
variants, which are quite similar and already managed via only one
dtb in u-boot (imx6-apalis.dtb). Select MX6Q via Kconfig by default in
order to automatically enable the HAS_CAAM and MX6_SMP features.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoapalis_imx6: fix broken fsl_esdhc_imx conversion
Ricardo Salveti [Mon, 2 Sep 2019 21:12:02 +0000 (18:12 -0300)]
apalis_imx6: fix broken fsl_esdhc_imx conversion

Commit e37ac717d796 ("Convert to use fsl_esdhc_imx for i.MX platforms")
converted FSL_ESDHC to FSL_ESDHC_IMX, but the config check for
apalis_imx6 wasn't updated accordantly.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoapalis_imx6: add board_fit_config_name_match to support FIT in SPL
Ricardo Salveti [Mon, 2 Sep 2019 21:23:27 +0000 (18:23 -0300)]
apalis_imx6: add board_fit_config_name_match to support FIT in SPL

Only one dtb is currently supported, so match with imx6-apalis.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoarm: dts: imx: fsl-imx8qm.dtsi: add gpio aliases to fix gpio command
Peng Fan [Wed, 24 Jul 2019 08:53:08 +0000 (08:53 +0000)]
arm: dts: imx: fsl-imx8qm.dtsi: add gpio aliases to fix gpio command

The gpio command currently uses equal bank names "GPIO0_"
for all existing gpio banks, i. e.:

U-Boot# gpio status -a
Bank GPIO0_:
GPIO0_0: input: 0 [ ]
GPIO0_1: input: 0 [ ]
...

Bank GPIO0_:
GPIO0_0: input: 0 [ ]
GPIO0_1: input: 0 [ ]
    ...

So the command is broken, it is not possible to address
a desired bank. Add gpio aliases to fix this.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agospl: pass args to board_return_to_bootrom
Peng Fan [Wed, 7 Aug 2019 06:40:53 +0000 (06:40 +0000)]
spl: pass args to board_return_to_bootrom

Pass spl_image and bootdev to board_return_bootrom.
i.MX8MN needs the args to let ROM to load images

Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agoserial: Kconfig: make MXC_UART usable for MX7 and IMX8M
Peng Fan [Wed, 7 Aug 2019 06:49:39 +0000 (06:49 +0000)]
serial: Kconfig: make MXC_UART usable for MX7 and IMX8M

i.MX7 and i.MX8M use mxc uart driver, so let's make the SoC could
use MXC_UART kconfig.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
5 years agotools: imx8mimage: fix HDMI/FIT parsing
Peng Fan [Tue, 6 Aug 2019 10:07:26 +0000 (10:07 +0000)]
tools: imx8mimage: fix HDMI/FIT parsing

Add missed break for HDMI entry.
And moving FIT parsing earlier, because it does not have parameter,
it will not runs into CFG_REG_SIZE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agopinctrl: imx: use devfdt_get_addr_size_index
Peng Fan [Tue, 6 Aug 2019 10:05:48 +0000 (10:05 +0000)]
pinctrl: imx: use devfdt_get_addr_size_index

fdtdec_get_addr_size could not parse addr/size correctly is
using address-cells 2 and size-cells 2 on an ARM32 SoC.
So switch to use devfdt_get_addr_size_index.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: mx6slevk: enable DM_SPI and DM_SPI_FLASH
Peng Fan [Wed, 31 Jul 2019 08:30:02 +0000 (08:30 +0000)]
imx: mx6slevk: enable DM_SPI and DM_SPI_FLASH

With DM_SPI and DM_SPI_FLASH enabled, we could get:

spi          0  [   ]   mxc_spi               |   |   |   `-- ecspi@02008000
spi_flash    0  [   ]   spi_flash_std         |   |   |       `-- m25p80@0

Signed-off-by: Peng Fan <peng.fan@nxp.com>