Parthiban Nallathambi [Thu, 26 Sep 2019 13:47:08 +0000 (15:47 +0200)]
ARM: dts: pcl063: add usdhc reset pin of eMMC
pcl063 phycore SoM with eMMC also got usdhc reset pin,
add reset pin to pinmux.
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Fabio Estevam [Fri, 4 Oct 2019 11:05:58 +0000 (08:05 -0300)]
imx: mxs: Fix location for the elftosb tool
The Denx FTP location is no longer reachable.
Switch to the Timesys repository instead.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Fabio Estevam [Fri, 4 Oct 2019 11:05:57 +0000 (08:05 -0300)]
mx28evk: README: Fix location for the generic mxs README
doc/README.mxs no longer exists. It has been renamed doc/imx/common/mxs.txt,
so fix the mx28evk README accordingly.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Anatolij Gustschin [Fri, 20 Sep 2019 20:49:06 +0000 (22:49 +0200)]
imx: wandboard: convert FEC support to DM_ETH
Remove CONFIG_DM_ETH conversion warning to avoid board removal.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:55:01 +0000 (09:55 +0200)]
spi: Add support for SPL_OF_PLATDATA to mxs_gpio.c driver
After this patch the mxs_gpio.c DM/DTS driver can be used at early SPL to
read states of gpio pins (and for example alter the boot flow).
It was necessary to adjust its name to 'fsl_imx_2{38}_gpio' to match
requirements for SPL_OF_PLATDATA usage.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:55:00 +0000 (09:55 +0200)]
mmc: Replace printf with debug call for timeouts in the i.MX28 mxs driver
This change replaces printf() with debug() for the notification about
commands timeouts.
This is done on purpose (also other drivers use such approach - dw_mmc.c,
mvebu_mmc.c), as the mmc core code (mmc.c) uses timeouts to assess if one
is using sd card or eMMC device.
In such situation timeout is a some kind of a "normal" behavior and there
shall not be any output to the console.
There is no impact on boot time for boards using this driver (even in SPL)
when two extra timeouts are returned (no SD card present, only eMMC
available).
Boot time tested with grabserial:
sudo grabserial -b 115200 -d /dev/ttyUSB1 -e 30 -t -m "^U-Boot SPL*"
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:59 +0000 (09:54 +0200)]
mmc: Convert mxsmmc eMMC driver for i.MX2{38} to DM/DTS
This patch converts the mxsmmc driver to support DM/DTS.
Moreover, it is also possible to use it in early SPL with
SPL_OF_PLATDATA enabled.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:58 +0000 (09:54 +0200)]
spi: Add support for SPL_OF_PLATDATA to mxs_spi.c driver
After this patch the mxs_spi.c DM/DTS driver can be used at early SPL to
read payload from SPI-NOR memories.
It was necessary to adjust its name to 'fsl_imx_2{38}_spi' to match
requirements for SPL_OF_PLATDATA usage.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:57 +0000 (09:54 +0200)]
spi: fix: Call mxs_reset_block() during DM/DTS probe
Without this change the DM/DTS version of mxs_spi driver doesn't reset the
SPI IP block in probe.
As a result this driver (when used solely on U-Boot proper) relies on reset
performed by mxs spi driver in SPL.
In the use case where eMMC is used in SPL as a boot primary device, the
mxs_reset_block() is not called at all and DM/DTS aware SPI driver in
U-Boot proper is malfunctioning.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:56 +0000 (09:54 +0200)]
spl: Init proper struct driver member (platdata_auto_alloc_size) for mxs_spi
This change initializes proper member of struct driver -
platdata_auto_alloc_size instead of priv_auto_alloc_size, which is setup
twice.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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