Commit Graph

62461 Commits

Author SHA1 Message Date
Fabio Estevam
32efcbc09f imx8mm_evk: Adjust the environment for booting a mainline kernel
Adjust the environment for booting a mainline kernel by default.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-01-07 10:26:57 +01:00
Igor Opaniuk
061b63b775 mach-imx: nandbcb: improve cmd help
Add info about supported i.MX7, improve details the usage of
bcbonly subcommand.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:57 +01:00
Fabio Estevam
08b72863d7 mx6slevk: Fix the pmic_get() parameter in the DM case
When pmic_get() is used with DM the first parameter must be
the complete node name plus the unit address, so fix it
accordingly.

Reported-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-01-07 10:26:57 +01:00
Fabio Estevam
94b293636f mx6sllevk: Fix the pmic_get() parameter in the DM case
When pmic_get() is used with DM the first parameter must be
the complete node name plus the unit address, so fix it
accordingly.

Reported-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-01-07 10:26:57 +01:00
Fabio Estevam
cb14a5bf66 mx7dsabresd: Fix the pmic_get() parameter in the DM case
When pmic_get() is used with DM the first parameter must be
the complete node name plus the unit address, so fix it
accordingly.

Reported-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-01-07 10:26:57 +01:00
Frieder Schrempf
83083febf5 ddr: imx8m: Return error values from LPDDR4 training
In cases when the same SPL should run on boards with i.MX8MM, that
differ in DDR configuration, it is necessary to try different
parameters and check if the training done by the firmware suceeds or
not.

Therefore we return the DDR training/initialization success to the
upper layer in order to be able to retry with different settings if
necessary.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2020-01-07 10:26:57 +01:00
Frieder Schrempf
162c72c804 tools: imx8m_image: Change source path for DDR firmware to build dir
The DDR firmware binaries are not part of the U-Boot source code, so
we should look for them in the build directory, where they need to be
copied to before building U-Boot.

The ATF binary is already fetched from the build directory, but the
README files for the i.MX8M EVKs claim that it needs to be copied to
the source directory (which is still true for in-tree builds, but not
in general). Therefore we also fix the READMEs to use the build
directory as the correct location for all additional binary files.

Sined-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2020-01-07 10:26:57 +01:00
Tom Rini
44ad496143 arm: imx: Default to SYS_THUMB_BUILD for i.MX6/7
In the case of i.MX6 and i.MX7 family SoCs it is safe (from an errata
point of view) to use thumb2 by default to save space.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-01-07 10:26:57 +01:00
Igor Opaniuk
c0f037f6a2 mach-imx: bootaux: elf firmware support
Currently imx-specific bootaux command doesn't support ELF format
firmware for Cortex-M4 core.

This patches introduces a PoC implementation of handling elf firmware
(load_elf_image_phdr() was copy-pasted from elf.c just for PoC).
ELF64 binaries isn't supported yet.

This has the advantage that the user does not need to know to which
address the binary has been linked to. However, in order to handle
and load the elf sections to the right address, we need to translate the
Cortex-M4 core memory addresses to primary/host CPU memory
addresses (Cortex A7/A9 cores).

This allows to boot firmwares from any location with just using
bootaux, e.g.:
> tftp ${loadaddr} hello_world.elf && bootaux ${loadaddr}

Similar translation table can be found in the Linux remoteproc
driver [1].

[1] https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/imx_rproc.c

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
ebabbf1169 colibri_imx7: migrate to DM_ETH
Migrate to DM_ETH and remove hardcoded pinmux configuration.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
45997eb6c0 ARM: dts: imx7: imx7_colibri: introduce fec node
Sync DTS with the mainline Linux and introduce fec node and
regulator configuration for rn5t567 PMU.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
a781ed271e apalis_imx6: migrate to DM_ETH
Migrate to DM_ETH and remove hardcoded pinmux configuration.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
f9be62a608 ARM: dts: imx6_apalis: introduce fec node
Sync DTS with the mainline Linux and introduce fec node.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
431cd76dd8 colibri_imx6: migrate to DM_ETH
Migrate to DM_ETH and remove hardcoded pinmux configuration.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
fbcd88095d ARM: dts: imx6_colibri: introduce fec node
Sync DTS with the mainline Linux and introduce fec node.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
2788063f51 MAINTAINERS: change colibri_imx6/imx6ull/t30/vf maintainers
Take over maintainership for colibri_imx6/imx6ull/t30/vf modules.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
b6ba18f414 MAINTAINERS: change apalis_imx6/colibri_imx6 maintainers
Take over maintainership for apalis_imx6 and colibri_imx6 modules.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-01-07 10:26:56 +01:00
Joris Offouga
87271ed8eb mx7dsabre: Remove warning about DM_SPI_FLASH
This defconfig doesn't need it.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
2020-01-07 10:26:56 +01:00
Joris Offouga
80e62e3a70 mx7dsabre: Convert to distroboot support
Signed-off-by: Joris Offouga <offougajoris@gmail.com>
2020-01-07 10:26:56 +01:00
Joris Offouga
0d52bab462 mx7dsabre: Enable DM_ETH
Also sync device tree with v5.5-rc1
Signed-off-by: Joris Offouga <offougajoris@gmail.com>
2020-01-07 10:26:56 +01:00
Fabio Estevam
0417ef17ac mx7ulp: Add support for Embedded Artists COM board
The Embedded Artists COM board is based on NXP i.MX7ULP.

It has a BD70528 PMIC from Rohm with discrete DCDC powering option and
improved current observability (compared to the existing NXP i.MX7ULP EVK).

Add the initial support for the board.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
97c4275771 colibri_vf: add update_uboot wrapper
Add universal update_uboot wrapper that helps to update
U-Boot image on internal storage.

Usage example:
> tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx
> run update_uboot

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
ba195a9487 colibri-imx6ull: add update_uboot wrapper
Add universal update_uboot wrapper that helps to update
U-Boot image on internal storage.

Usage example:
> tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx
> run update_uboot

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
16e33d35e9 colibri_imx6: add update_uboot wrapper
Add universal update_uboot wrapper that helps to update
U-Boot image on internal storage.

> tftpboot ${loadaddr} ${board_name}/u-boot.img
> run update_uboot
> tftpboot ${loadaddr} ${board_name}/SPL
> run update_spl

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
7cde0155a0 apalis_imx6: add update_uboot wrapper
Add universal update_uboot wrapper that helps to update
U-Boot image on internal storage.

Usage example:
> tftpboot ${loadaddr} ${board_name}/u-boot.img
> run update_uboot
> tftpboot ${loadaddr} ${board_name}/SPL
> run update_spl

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
9e286cb6ee colibri_imx7: add update_uboot wrapper
Add universal update_uboot wrapper that helps to update
U-Boot image on internal storage.

Usage example:
> tftpboot ${loadaddr} ${board_name}/u-boot-dtb.imx
> run update_uboot

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-01-07 10:26:56 +01:00
Steffen Dirkwinkel
943be15974 imx: cx9020: use distro boot
We switch from custom boot commands relying on uEnv.txt to distro boot.
This removes the automatic fpga bitstream loading in favor of loading
bitstreams via custom bootscripts (boot.scr) or after booting the
kernel.

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2020-01-07 10:26:56 +01:00
Steffen Dirkwinkel
dd7e7feb44 imx: cx9020: enable vidconsole by default
Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2020-01-07 10:26:56 +01:00
Steffen Dirkwinkel
ba1444eab6 imx: cx9020: migrate cx9020 to CONFIG_DM_USB
Note: gpio7_8 was never used for usb power regulator so we remove it here

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2020-01-07 10:26:56 +01:00
Steffen Dirkwinkel
9c2b1b0f03 imx: cx9020: migrate cx9020 to CONFIG_DM_ETH
Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2020-01-07 10:26:56 +01:00
Parthiban Nallathambi
d98929d636 imx: sync with kernel device tree for Phycore SoM
Sync the Linux Kernel 5.4-rc6 device tree for Phytec Phycore
SoM and Segin board based on imx6UL and imx6ULL.

Changes includes Phytec naming convention for the devicetree files.

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
89038264bb mach-imx: bootaux: add dcache flushing before enabling M4
This patch fixes the issue with broken bootaux command,
when M4 binary is loaded and data cache isn't flushed
before M4 core is enabled.

Reproducing:
> tftpboot ${loadaddr} ${board_name}/hello_world.bin
> cp.b ${loadaddr} 0x7F8000 $filesize
> bootaux 0x7F8000

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Igor Opaniuk
0ba1b4de0e mach-imx: bootaux: print stack pointer and reset vector
1. Change information printed about loaded M4 binary, print the stack
pointer and reset vector addressed.
2. Add sanity check for the address provided as param.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-01-07 10:26:56 +01:00
Marek Vasut
c5773ccdca pci: imx: Add iMX6SX compatible
The driver works fine with iMX6SX, add the missing compatible string.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2020-01-07 10:26:56 +01:00
Suniel Mahesh
1699f0e592 arm: imx6: cm_fx6: Enable DM SPI and SPI_FLASH, fix SPL build errors
Enable driver model for SPI and SPI_FLASH to remove the following
compile warning on CM-FX6 SOM:
===================== WARNING ======================
This board does not use CONFIG_DM_SPI_FLASH. Please update
the board to use CONFIG_SPI_FLASH before the v2019.07 release.
====================================================

This change introduced SPL build error as shown:

In file included from include/common.h:47:0,
                 from drivers/mtd/spi/sf_probe.c:10:
drivers/mtd/spi/sf_probe.c: In function 'spi_flash_std_probe':
drivers/mtd/spi/sf_probe.c:149:54: error: dereferencing pointer to incomplete type 'struct dm_spi_slave_platdata'
scripts/Makefile.build:278: recipe for target 'spl/drivers/mtd/spi/sf_probe.o' failed
make[3]: *** [spl/drivers/mtd/spi/sf_probe.o] Error 1
scripts/Makefile.build:432: recipe for target 'spl/drivers/mtd/spi' failed
make[2]: *** [spl/drivers/mtd/spi] Error 2

Disabling DM for SPI support(SPI and SF) in SPL resolves the issue.
Target was compile tested, build was clean.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
2020-01-07 10:26:56 +01:00
Suniel Mahesh
26d926d616 board: cm_fx6: Enable CONFIG_DM_ETH
Enable CONFIG_DM_ETH to remove compile warning on CM-FX6
SOM based target:

===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release.
====================================================

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
2020-01-07 10:26:56 +01:00
Suniel Mahesh
7f681b3d75 board: cm_fx6: Enable DM support for video, fix build error
Enable driver model for Video to remove the following
compile warning on CM-FX6 SOM based target:

===================== WARNING ======================
This board does not use CONFIG_DM_VIDEO Please update
the board to use CONFIG_DM_VIDEO before the v2019.07 release.
====================================================

This change introduced build error as shown:

LD      u-boot
drivers/built-in.o: In function ipu_displays_init'
arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509
Makefile:1621: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

The DM converted video driver calls ipu_displays_init
in its probe, which inturn calls relevant board_video_skip.
Defining ipu_displays_init in the board file fixes build error.
Target was compile tested, build was clean.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
2020-01-07 10:26:56 +01:00
Marek Vasut
c35b19531d ARM: mx6: ddr: Add support for iMX6SX
This patch adds support for iMX6SX MMDC into the DDR calibration
code. The only difference between MX6DQ and MX6SX is that the SX
has 2 SDQS registers, while the DQ has 8.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Eric Nelson <eric@nelint.com>
2020-01-07 10:26:56 +01:00
Marek Vasut
b314003fda ARM: mx6: ddr: Configure all SDQS pullups using loop
Instead of explicitly setting up each SDQS register, use a loop.
No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Eric Nelson <eric@nelint.com>
2020-01-07 10:26:56 +01:00
Marek Vasut
7ec0e39ec4 ARM: mx6: ddr: Factor out SDQS configuration code
Pull out the code turning SDQS pullups on and off into a separate
function, since it is replicated in two places in the code and it
is the single place in the entire function which is SoC dependent.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Eric Nelson <eric@nelint.com>
2020-01-07 10:26:56 +01:00
Marek Vasut
736b491f31 ARM: mx6: ddr: Make debug prints work with tiny printf
The %08X format returns just zeroes with tiny printf, which is
horribly confusing, especially when debugging DRAM calibration
problems. Change the format to %08x (with lowercase x), which
behaves correctly with either implementation of printf in SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Eric Nelson <eric@nelint.com>
2020-01-07 10:26:56 +01:00
Claudius Heine
04886b36eb ARM: imx6: DHCOM i.MX6 PDK: Enable sysreset driver and wdt command
The SPL does not have DM enabled and therefor still needs to use the
hardware watchdog interface provided by the imx-watchdog driver.

Fixes: broken reset command after f2929d11a6 ("watchdog: imx: Use
       immediate reset bits for expire_now")

Signed-off-by: Claudius Heine <ch@denx.de>
2020-01-07 10:26:56 +01:00
Claudius Heine
f8420d7c0f ARM: dts: dh-imx6: add u-boot specific wdt-reboot node
The wdt-reboot node is needed for the sysreset_watchdog driver to
register a watchdog as a reset handler in case 'CONFIG_SYSRESET' is
enabled.

Signed-off-by: Claudius Heine <ch@denx.de>
2020-01-07 10:26:56 +01:00
Baruch Siach
eb9124f574 mx6cuboxi: enable OF_CONTROL with DM_MMC and DM_USB
Make first step in DT/DM migration. Enable OF_CONTROL only for the main
U-Boot image for now.

Remove mmc_init_main() because board_mmc_init() is not called when
DM_MMC is enabled.

DM_MMC requires DM_GPIO for card-detect to work. That in turn makes gpio
request mandatory. Add code to request/free gpios in platform code.

MMC devices are now numbered according to DT. The SD card is 1, and eMMC
is 2. Account for that in board_mmc_get_env_dev(), BOOT_TARGET_DEVICES,
and has_emmc().

DM_MMC requires BLK. However, the (BLK && !DM_USB) combination disables
USB_STORAGE. Enable DM_USB to preserve USB functionality. Add also
DM_REGULATORS for the USB power controller. This allows us to drop
board_ehci_hcd_init() and setup_usb().

Runtime selection of DT is necessary because of the i.MX6QD vs i.MX6SDL
incompatibility. DT selection does not rely on GPIOs, since DM_GPIO
depends on DT. Instead, we take one "fully featured" DT of each variant.
That should be enough to boot from both SD card and eMMC.

Since we don't select the exact DT, override the generic
show_board_info() that shows the selected DT 'model' field.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-01-07 10:26:56 +01:00
Baruch Siach
281d5e435b arm: dts: hummingboard: add cubox/hummingboard DT (part 2 of 2)
These DT files are copied from kernel v5.3 with no changes.

This is part 2 of 2 commits. Included are DT files for SOM rev 1.5, and
Hummingboard2 Gate/Edge.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-01-07 10:26:56 +01:00
Baruch Siach
730e6a0ca1 arm: dts: hummingboard: add cubox/hummingboard DT (part 1 of 2)
These DT files are copied from kernel v5.3 with no changes.

This is part 1 of 2 commits. Included are DT files for the original
Cubox-i and Hummingboard Base/Pro.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-01-07 10:26:56 +01:00
Baruch Siach
e01030767e dt-bindings: add imx-audmux macro definitions
Import fsl-imx-audmux.h from Linux as of v5.4-rc6. The header is
unchanged since v4.18.

That would make it easier to import DT files that depend on imx-audmux
definitions from the kernel tree.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-01-07 10:26:56 +01:00
Robert Beckett
7915e150d6 board: ge: mx53ppd: use imx wdt
Enable DM imx WDT
Enable SYSRESET_WATCHDOG to maintain WDT based reset ability

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-01-07 10:26:56 +01:00
Robert Beckett
d494aeca46 board: ge: bx50v3: use imx wdt
Enable DM imx WDT
Enable SYSRESET_WATCHDOG to maintain WDT based reset ability

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-01-07 10:26:56 +01:00
Ian Ray
b186cfa1a3 board: ge: pass rtc_status via device tree
Pass rtc_status via the device tree, instead of on kernel command line.
Additionally, the 2038 mitigation is reported, if applied successfully.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-01-07 10:26:56 +01:00