Commit graph

84198 commits

Author SHA1 Message Date
Manoj Sai
945c118409 configs: imx8mp_evk: revert to old ram settings
The 'commit 864ac2cf38 ("board: imx8mp: Add Engicam
i.Core MX8M Plus EDIMM2.2 Starter Kit")' has changed the imx8mp evk ram
settings from 6GB ram to 2GB.

This changeset reverts the above change.

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Reported-by  : Peter Bergin <peter@berginkonsult.se>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 19:44:23 +01:00
Arnaud Ferraris
a437d14fc8 imx8mq_pins: fix configuration for UART4 on ECSPI2 pads
When routing UART4 using the ECSPI2 pads, register
IOMUXC_UART4_RXD_SELECT_INPUT (offset 0x050C) should be changed only
when dealing with RX, as its name suggests.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 19:44:23 +01:00
Ye Li
7246ec1934 imx8: scu_api: sync sc_rm_is_pad_owned api change
SCFW has fixed a overflow issue in sc_rm_is_pad_owned API. This
requires u-boot to update API implementation, since it will cause
compatible issue. Otherwise all pad checking will have problem and
cause pad setting not continue.

Due to the compatible issue, the new u-boot only works with new
SCFW (API version: 1.21 and later).

old scfw + old u-boot: API overflow issue
old scfw + new u-boot, or new scfw + old u-boot: API compatible issue
new scfw + new u-boot: Working

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Jason Liu <Jason.hui.liu@nxp.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-01-31 19:44:23 +01:00
Michael Trimarchi
6dac63adca engicam: imx6: migrate to DM_SERIAL
Add the needed DT overrides and configs to enable UART in SPL.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 19:44:23 +01:00
Adam Ford
4aae15d383 configs: imx8mn_beacon_fspi: Add config for booting from QSPI
The imx8mn-beacon SOM has a QSPI part on it connected to the
FlexSPI controller.  Add a defconfig option which supports
booting from the QSPI NOR flash instead of sd/mmc.

Signed-off-by: Adam Ford <aford173@gmail.com>
2023-01-31 19:44:23 +01:00
Adam Ford
b1d4037e65 configs: imx8m: Prepare imx8m-beacon boards for HAB support
In order to enable HAB, FSL_CAAM, ARCH_MISC_INIT and
SPL_CRYPTO should be enabled in Kconfig like other i.MX8M
boards.

Signed-off-by: Adam Ford <aford173@gmail.com>
2023-01-31 18:08:23 +01:00
Tim Harvey
3041e094e4 board: gateworks: venice: poll I2C lines to wait for GSC firmware
In some situations the GSC firmware where the EEPROM containing the
model and DRAM configuration may not be ready by the time the SoC
is ready to talk to it over I2C.

Instead of a hard delay, poll the I2C lines to wait until they are
released to avoid the I2C drivers 'Arbitation lost' error message.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 18:08:23 +01:00
Tim Harvey
a4dc847b60 arm: dts: imx8m*-venice-*: add I2C GPIO bus recovery support
Add I2C GPIO bus recovery support by adding scl-gpios and sda-gpios for the
various I2C busses on Gateworks Venice boards.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 18:08:23 +01:00
Tim Harvey
4e2e2f8984 arm64: dts: imx8m{m, n}-venice-gw7902: add gpio pins for new board revision
Add gpio pins present on new board revision:
 * LTE modem support (imx8mm-gw7902 only)
  - lte_pwr#
  - lte_rst
  - lte_int
 * M2 power enable
  - m2_pwr_en
 * off-board 4.0V supply
  - vdd_4p0_en

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-01-31 18:08:23 +01:00
Peng Fan
57d48522c9 imx: mx6sabresd: convert to DM_I2C
Convert to DM_I2C

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 18:08:23 +01:00
Peng Fan
ea993cc26a imx: mx6sabreauto: convert to DM_I2C
Convert to DM_I2C

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 18:08:23 +01:00
Fabio Estevam
f0f461287e imx: Suggest the NXP ATF github repo
As explained in the text at the bottom of the page
https://source.codeaurora.org/external/imx/imx-atf:

"QUIC repositories on this site will not receive any updates after
March 31, 2022, and will be deleted on March 31, 2023."

Point to the NXP ATF github repo instead.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Oliver Graute <oliver.graute@kococonnector.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2023-01-31 16:02:05 +01:00
Peter Robinson
e64bfd7b71 include/configs: mx6/mx7: drop dangling comments
Cleanup some dangling comments left by automated migration
processes that are no longer value.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 16:02:05 +01:00
Max Krummenacher
d3655bbb13 ARM: arm: colibri-imx6ull-emmc: fix emmc access
Synchronizing the device tree with linux introduced a regression.
The U-Boot specific dtsi mustn't override the alias settings for
the eMMC/SD interfaces.

Without this U-Boot cannot access the eMMC and boot the kernel.

Fixes: c21b61bff1 ("colibri-imx6ull/-emmc: synchronise device tree with linux")
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-01-31 16:02:05 +01:00
Andrejs Cainikovs
0cf91115ed board: apalis-imx8: add 2nd ethernet address
All Apalis iMX8 variants have 2nd RGMII on SoC, so add the address
for 2nd ethernet.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-01-31 15:46:40 +01:00
Marek Vasut
ed50f82ceb arm: imx: imx8m: Add basic PSCI provider implementation
Implement basic PSCI provider to let OS turn CPU cores off and on,
power off and restart the system and determine PSCI version. This
is sufficient to remove the need for the ATF BL31 blob altogether.

To make use of this functionality, active the following Kconfig options:
  # CONFIG_PSCI_RESET is not set
  CONFIG_ARMV8_MULTIENTRY=y
  CONFIG_ARMV8_SET_SMPEN=y
  CONFIG_ARMV8_SPL_EXCEPTION_VECTORS=y
  CONFIG_ARMV8_EA_EL3_FIRST=y
  CONFIG_ARMV8_PSCI=y
  CONFIG_ARMV8_PSCI_CPUS_PER_CLUSTER=4
  CONFIG_ARMV8_SECURE_BASE=0x970000
  CONFIG_ARM_SMCCC=y
  CONFIG_SYS_HAS_ARMV8_SECURE_BASE=y

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:40 +01:00
Marek Vasut
58552ab81b arm: imx: imx8m: Program CSU and TZASC if PSCI provider
In case U-Boot is the PSCI provider, it is necessary to correctly
program CSU and TZASC registers. Those are poorly documented, so
push in the correct values.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:40 +01:00
Marek Vasut
191937134b arm: imx: imx8m: Define trampoline location if PSCI provider
The common code used to bring up secondary cores requires a final
jump location to be stored in some sort of memory location, define
this memory location to be the start of OCRAM, since it is available.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:40 +01:00
Marek Vasut
1434f93ee0 arm: imx: imx8m: Map RAM as NS if PSCI provider
In case U-Boot is a PSCI provider, map RAM explicitly as NS,
otherwise secondary cores crash with SError when attempting
to access RAM mapped as secure in EL2.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Marek Vasut
68c0ce8a5c arm: imx: imx8m: Enable GICv3 support if PSCI provider
In case U-Boot is a PSCI provider, enable GICv3 support as this
is necessary to bring up secondary cores.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Marek Vasut
45dd377e36 arm: imx: imx8m: Only use ROM pointers if not PSCI provider
The ROM pointers are in fact populated by the ATF BL31 blob, in case
U-Boot itself if the PSCI provider, there is no ATF BL31 blob, hence
ignore the ROM pointers.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Marek Vasut
9694c0532a arm: dts: imx8m: Require ATF BL31 blob only if not PSCI provider
In case U-Boot itself if the PSCI provider on i.MX8M, do not
require the ATF BL31 blob, as at that point the blob is useless
and would interfere with U-Boot operation.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Marek Vasut
ae237b1e62 arm: imx: Drop custom lowlevel_init
The custom lowlevel_init implementation is no longer necessary, since
it is responsible for routing and trapping SErrors in U-Boot in EL2,
which is implemented in common code since commit:
6c7691edd5 ("armv8: Always unmask SErrors")

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Marek Vasut
11a1a3b73d arm: psci: Fix RESET2 hook
The RESET2 hook is a PSCI v1.1 functionality, rename the macro accordinly.
Add missing handler for the RESET2 hook, so it can be implemented by U-Boot.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Marek Vasut
46dcb31065 arm: psci: Add PSCI v1.1 macro
Add macro representing the PSCI v1.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 15:46:39 +01:00
Detlev Casanova
0b32bc4831 imx6q-sabrelite: Re-add mmc aliases
In commit d0399a46e7, the device tree was
synchronized from linux and the aliases were dropped.

They need to be kept so that the mmc cards are in the right order.
Without the aliases, u-boot reports:
MMC:   FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC:   FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than
u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3).
Because this board has been using different aliases in u-boot
and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be
automatically included in imx6q-sabrelite.dts.

This way, linux and u-boot each keep their own aliases and there
is no breakage on current installations.

This should never be done for new boards as we want to keep linux and
u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 15:46:39 +01:00
Frieder Schrempf
747c2e613b imx: imx6ul: kontron-sl-mx6ul: Disable CONFIG_FSL_QSPI_AHB_FULL_MAP to fix SPI NAND read access
The introduction of CONFIG_FSL_QSPI_AHB_FULL_MAP as default in:

def88bce09 ("spi: fsl_qspi: Support to use full AHB space on i.MX")

broke the SPI NAND read access on the Kontron SL i.MX6UL/ULL boards.
Reading data from the flash returns garbage instead of the actual
content. Fix this for now by disabling the introduced option.

In the long run this should be fixed globally.

Fixes: def88bce09 ("spi: fsl_qspi: Support to use full AHB space on i.MX")
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-31 15:46:39 +01:00
Peng Fan
0c49f68915 imx: mx6sabreauto_defconfig: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
beb403f9e5 imx: mx6sabresd: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
1224dd8b15 imx: mx6sxsabreauto: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
388ccbe1fe imx: mx6ul_evk: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
02fe5cda96 imx: mx6slevk: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
2108db6c92 imx: mx6sllevk: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
59bae6f58d imx: mx6sllevk: correct pmic name
The prefix 0 has been dropped in dts, so correct in board file

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:34 +01:00
Peng Fan
3a6d7ef389 imx: mx6ull/z_14x14_evk: clean up UART iomux
After DM_SERIAL, and set pinctrl_uart1 as pre-reloc, no need initialize
iomux at board file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:33 +01:00
Peng Fan
ad58df7295 imx: mx6ulz: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:33 +01:00
Peng Fan
ac68737ebd imx: mx6ull_14x14_evk: select DM_SERIAL
Select DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-01-31 12:11:33 +01:00
Fabio Estevam
ab79811c9f pico-imx7d: Convert to DM_I2C and DM_PMIC
The conversion to DM_I2C is mandatory, so convert to it
and also to DM_PMIC.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-01-31 08:36:52 +01:00
Fabio Estevam
a7db74a4de pico-imx7d: Convert to CONFIG_DM_SERIAL
The conversion to CONFIG_DM_SERIAL is mandatory, so select
this option.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-01-31 08:36:52 +01:00
Marek Vasut
5aa348d2bb arm64: imx8mp: Enable SMSC LAN87xx PHY driver on i.MX8MP DHCOM
These SoMs may ship with SMSC LAN8740Ai PHYs, enable the SMSC PHY driver.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 08:36:52 +01:00
Marek Vasut
0a0e3db0d2 arm64: imx8mp: Disable Atheros PHY driver on i.MX8MP DHCOM
These SoMs never ship with Atheros PHYs, disable the Atheros PHY driver.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-31 08:36:52 +01:00
Ye Li
0e28622779 ARM: dts: imx8ulp-evk: Fix iomuxc issue
The property fsl,mux_mask is deleted by commit ed7bda5 (imx8ulp:
synchronise device tree with linux). This causes the pinctrl
driver not work on 8ULP, so fail to print any log.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-01-30 23:23:02 +01:00
Ying-Chun Liu (PaulLiu)
624c9dea92 dts: imx8mp-rsb3720: modify configrations to load fip into memory
The changes of commit 6a21c69521 ("arm: dts: imx8mp: add of-list
support to common imx8mp-u-boot.dtsi") breaks the loading of the fip.
This commit fixes the break by modify the configuration properly.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00
Ying-Chun Liu (PaulLiu)
8b7036e6aa dts: imx8mp: assign binman_configuration label to config-SEQ
assign a label for config-SEQ so that the board dts can modify
the configuration more easily.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00
Fabio Estevam
5d4db6cf6b mx53loco: Select CONFIG_CMD_EXT4
Select the CONFIG_CMD_EXT4 option so that files can be loaded
from an ext4 partition.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00
Loic Poulain
ad725073d1 serial: mxc: Speed-up character transmission
Instead of waiting for empty FIFO condition before writing a
character, wait for non-full FIFO condition.

This helps in saving several tens of milliseconds during boot
(depending verbosity).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00
Loic Poulain
7150f56a85 serial: mxc: Wait for TX completion before reset
The u-boot console may show some corrupted characters when
printing in board_init() due to reset or baudrate change
of the UART (probe) before the TX FIFO has been completely
drained.

To fix this issue, and in case UART is still running, we now
try to flush the FIFO before proceeding to UART reinitialization.
For this we're waiting for Transmitter Complete bit, indicating
that the FIFO and the shift register are empty.

flushing has a 4ms timeout guard, which is normally more than
enough to consume the FIFO @ low baudrate (9600bps).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00
Fabio Estevam
068027b1a0 pico-imx7d: Add support for the 2GB variant
Add the board detection mechanism to be able to support
the 2GB variant.

Based on the code from TechNexion U-Boot downstream tree.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00
Fabio Estevam
d12618b927 imx8mm-phg: Add board support
Add the board support for the i.MX8MM Cloos PHG board.

This board uses a imx8mm-tqma8mqml SoM from TQ-Group.

imx8mm-phg.dts and imx8mm-tqma8mqml.dtsi are taken
directly from Linux 6.2-rc3.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-30 23:23:02 +01:00
Frieder Schrempf
6e91c06a73 arm64: dts: imx8mm-kontron: Add RTC aliases
Add aliases for the RTCs on the board and on the SoC. This ensures that
the primary RTC is always the one on the board that has a buffered supply
and maximum accuracy.

This is a direct port of the pending commit from linux-next.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-30 23:23:02 +01:00