summaryrefslogtreecommitdiff
path: root/board/toradex
AgeCommit message (Collapse)Author
2022-02-14board: colibri_imx7_emmc: fix emmc detectionMarcel Ziswiler
Later Colibri iMX7D V1.1B modules are using a “new” SoC fusing. The difference has to do with whether or not we do enable the boot ROM to enable/use the eMMC reset signal. Depending on that SoC fuse, the boot ROM configures this pin as a GPIO output to actually be able to do/drive the reset signal. Our eMMC vs. NAND detection so far only sets that signal to a GPIO but without explicitly setting any direction as, of course, so far, by default, it was an input. As the boot ROM now sets it as an output we do get back a value of zero instead of a one which would indicate the pull-up being present on eMMC modules. Fix this by setting the SION bit which allows reading back the value even if it is set to be an output by the boot ROM. Note that with the new SoC fusing we now read back what the boot ROM drived rather than the real value caused by the pull-up resistor. However, if it would ever be driven low the eMMC would anyway permanently be reset. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-12-28board: colibri-imx6ull: fix detecting ethernet phyPhilippe Schenker
now that it is possible to use regulator-fixed-clock make use of it. This makes U-Boot detect the PHY on first cold-boot. This commit also adjusts the code in setup_fec and follows how it is done in mx6ullevk.c This commit also slows down the boot-process by about 150ms as it now waits for the regulator-fixed-clock voltage that drives the PHY to go up. If you rely on very fast boot-speeds and don't need ethernet for your boot-process you can safely revert the changes on imx6ull-colibri.dtsi Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-11-12board: colibri-imx6ull: Do not leave variant variable unsetPhilippe Schenker
Toradex uses the variable variant to distinguish between modules with eMMC, NAND with wifi and NAND without wifi. This variable is set on every boot. Set this variable also if we have a NAND module without wifi to prevent issues. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-11-12board: colibri_imx7: Set variant variable also for non-emmc variantsPhilippe Schenker
Toradex uses the variable variant to distinguish between eMMC or NAND modules. This variable is set on every boot. Set this variable also if we have a NAND module to prevent issues. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-11-04apalis-tk1: avoid save environment unaskedDenys Drozdov
U-boot should never save the environment unasked. Avoid storing broken ftd_module to flash Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-11-04apalis-imx6: avoid save environment unaskedDenys Drozdov
u-boot should never save the environment unasked. Avoid storing broken ftd_file to eMMC Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-10-12colibri-imx6ull: fix setup of nand gpmi clockPhilippe Schenker
NXP used to setup the gpmi clock root from gpmi_clk in early versions in their downstream BSP. [1] However on mainline the gpmi clock root was always setup from enfc since the beginning of the i.MX 6 series SoCs, which is still the same today. [2] NXP followed the mainline approach at some point and changed setup_gpmi_io_clk to setup gpmi clock root from enfc which left faulty code behind in our board file. [3] This commit follows the change of NXP as it improves the performance of the NAND from ~1.2 MiB/s to ~12 MiB/s. [3] This change was verified to work in recovery-mode and u-boot loaded from NAND on all four Colibri iMX6ULL SKUs from Toradex. The frequency used to read the NAND, measured on RE# (Read Enable): before this patch: 1.4 MHz after this patch: 22 MHz in Linux Kernel: 50 MHz [1] https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/cpu/armv7/mx6/clock.c?h=nxp/imx_v2016.03_4.1.15_2.0.0_ga#n62 [2] 23608e23fd65 (i.mx: add the initial support for freescale i.MX6Q processor) [3] https://source.codeaurora.org/external/imx/uboot-imx/commit/?id=7a82a19ceabfb04bbc1591a67c99751748781c7d Related-to: ELB-4176 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-09-06cfgblock: extend get_cfgblock_interactiveOleksii Bidnichenko
- Correct the hardware product id for the Colibri IMX7D (eMMC) module. - Exclude IT check since Colibri IMX7D (eMMC) is always IT. Related-to: ELB-4076 Signed-off-by: Oleksii Bidnichenko <oleksii.bidnichenko@toradex.com>
2021-08-20apalis-imx6: use dynamic DDR calibrationFrancesco Dolcini
Enable dynamic DDR calibration to have a reliable behavior on edge temperatures conditions. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2021-08-20colibri-imx6: use dynamic DDR calibrationFrancesco Dolcini
Enable dynamic DDR calibration to have a reliable behavior on edge temperatures conditions. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2021-08-12colibri-imx6ull: add tezi recovery configMax Krummenacher
This configuration creates an U-Boot which does not use any storage device, i.e. no eMMC or NAND. It is used to boot U-Boot over recovery aka. Serial Downloader without the need to know if the module uses eMMC or NAND for storage. It detects the storage device type and start the Toradex Easy Installer with the matching configuration. Note that for NAND devices the mtd partitioning is not patched into the device tree by U-Boot. It must be part of the provided device tree. Related-to: TEI-922 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-07-29toradex: tdx-cfg-block: add colibri imx6ull emmc variantMax Krummenacher
While at it complete the list of the known module product ids. Related-to: ELB-4056, ELB-4057 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-07-29toradex: tdx-cfg-block: fix verdin handlingMax Krummenacher
| #if !defined(CONFIG_TARGET_VERDIN_IMX8MM) || !defined(CONFIG_TARGET_VERDIN_IMX8MN) is never false. Fix that so that the condition is 'true' for any board but the two verdins. Fixes commit c0c3978cba3 ("toradex: tdx-cfg-block: add Verdin iMX8M Mini/Nano support"). Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-07-29colibri-imx6ull: add emmc variantMax Krummenacher
Add code to build the eMMC variant of the Colibri iMX6ULL, i.e. the 'Colibri iMX6ULL 1GB' which has a eMMC instead of the raw NAND used on other SKUs. Related-to: ELB-4056, ELB-4057 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-07-28colibri-imx6ull: imximage.cfg: integrate new 1GiB RAM variantPhilippe Schenker
Integrate new Toradex SKU 0062 Colibri iMX6ULL 1GB IT. This commit basically adjusts three parameters of the RAM settings: Increase density from 4Gb to 8Gb Increase ROW address from 15 to 16 Increase tRFC (refresh command time) from 260 to 350 This timing is valid for all Toradex Colibri iMX6ULL SKUs Related-to: ELB-4055, ELB-4057 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-06-23toradex: use TEZI distro boot scriptMarcel Ziswiler
The distro boot script in TEZI image is called boot-tezi.scr. Enable using this particular script name for u-boot images which are used as a part of TEZI. Related-to: TEI-791 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-06-14toradex: enable using another distro boot script for TEZIOleksandr Suvorov
The distro boot script for TEZI has another name to prevent u-boot of regular BSP trying to boot TEZI image. Expand the usage of TDX_EASY_INSTALLER Kconfig option to seek and use the TEZI-specific name of the script. Related-to: TEI-791 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-06-11toradex: add easy installer configurabilityMarcel Ziswiler
Allow setting Toradex Easy Installer aka Tezi specific configuration options like not enabling SATA, directly continuing with the SDP command upon recovery, distrobooting otherwise or not storing the environment. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 8b2f82e2aca52bac5b67fbeddccef2dd44f21444) Conflicts: board/toradex/common/Kconfig added it on the end of the file and reworded the Kconfig entry so it reflects what it is used for in this U-Boot. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-06-01apalis-tk1: launch toradex easy installer in usb recoveryMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-05-30colibri_imx6: add board_fit_config_name_match to support FIT in SPLMing Liu
Only one dtb is currently supported, so match with imx6-colibri. Related-to: TOR-1704 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-05-26colibri-imx7: full support of tezi-recovery imageOleksandr Suvorov
The recovery image needs to support both Colibri-iMX7 NAND and Colibri-iMX7 eMMC modules. Forward port the solution for this from u-boot 2016.11, originally developed by Stefan Agner <stefan.agner@toradex.com>. Related-to: TEI-775 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-05-19board: colibri_vf: fix compiling warningOleksandr Suvorov
This patch fixes the following compiler warning: ============= board/toradex/colibri_vf/colibri_vf.c: In function 'ft_board_setup': board/toradex/colibri_vf/colibri_vf.c:436:6: warning: unused variable 'ret' [-Wunused-variable] ============= Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-05-12toradex: make USB PID from config block optionalStefan Agner
If config block support is enabled, USB gadget modes unconditionally use Toradex Product ID as USB PID. Some applications might prefer a different and/or static USB PID. Add a Kconfig configuration option to descide whether to use USB PID from config block or the fallback config option CONFIG_G_DNL_PRODUCT_NUM. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Brandon Shibley <brandon.shibley@toradex.com> (cherry-picked from commit f72fe627c3e7a97008b8dd5d9ceb6df1dcd347ee) Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-05-12colibri_imx7: use SDP if USB serial downloader has been usedStefan Agner
In case USB serial downloader has been used to load U-Boot start the serial download protocol (SDP) emulation. This allows to download complete images such as Toradex Easy Installer over USB SDP as well. This code uses the boot ROM provided boot information to reliably detect USB serial downloader. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry-picked from a2e77a650a496e2be0b1630b874f531e9f394d47) Forward-ported to 2020.07: Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-04-01apalis_imx6: fix module revision in config blockDenys Drozdov
U-boot might display wrong module revision information for modules with an assembly version 'K'. "cfgblock create" does not takes into account all revision digits from PID8. This fix takes into account 6th,7th digits of PID8 to store module revision. Related-to: ELB-3893 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2020-08-28colibri_imx7: wrap video specific defines if DM_VIDEO ifdefsIgor Opaniuk
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-08-28toradex: drop legacy show_boot_logo function and use splashscreenIgor Opaniuk
Drop show_boot_logo legacy function, as splashscreen functionality can be used instead. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-08-28colibri_imx7: use splashcreen value instead of legacy functionIgor Opaniuk
Set proper splashscreen env value instead of calling legacy function to show embed boot logo. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-08-28colibri-imx6ull: use splashcreen value instead of legacy functionIgor Opaniuk
Set proper splashscreen env value instead of calling legacy function to show embed boot logo. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-20verdin-imx8mm: add EEPROM support for carrier boardIgor Opaniuk
Enable these Kconfig symbols: TDX_CFG_BLOCK_EXTRA=y TDX_HAVE_EEPROM_EXTRA=y Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-20toradex: tdx-cfg-block: add carrier board info printingIgor Opaniuk
Add carrier board info printing during boot time: U-Boot 2020.07-rc4-02435-g1756e05 (Jun 22 2020 - 22:43:59 +0300) CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz .... Carrier: Toradex Verdin Development Board V1.0A, Serial# 10622780 Verdin iMX8MM # Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-20toradex: tdx-cfg-clock: add migration routine from PID8Igor Opaniuk
Add migration routine from PID8 pre-stored values on EEPROM (including sane value checks). Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-20toradex: tdx-cfg-block: add support for EEPROMIgor Opaniuk
This introduces support for EEPROM as a storage for the main Toradex config block and additional config blocks on extra EEPROM chips (on carrier board or video adapters). To enable EEPROM as a storage for the main config block: TDX_HAVE_EEPROM=y. For additional EEPROMs please enable this Kconfig symbol: TDX_CFG_BLOCK_EXTRA=y. Information about existing EEPROM chips is provided via Device Tree using aliases. You can also write configuration for the carrier board using create_carrier subcommand for cfgblock. Example: Verdin iMX8MM # cfgblock create_carrier Supported carrier boards: UNKNOWN CARRIER = [0] Verdin Carrier Board = [1] Choose your carrier board (provide ID): 1 Enter carrier board version (e.g. V1.1B): V1.0A Enter carrier board serial number: 10622780 Also with barcode: Verdin iMX8MM # cfgblock create carrier -y 0156100010622780 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-20toradex: tdx-cfg-block: add carrier boards and display adaptersIgor Opaniuk
Add defines for supported carrier boards and display adapters. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-20toradex: tdx-cfg-block: add EEPROM read/store wrappersIgor Opaniuk
These functions wrap functionality for storing config blocks in EEPROM. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-15colibri-imx7: fix splash logo drawingIgor Opaniuk
1. Configure white on black for video console. 2. Enable printing bmp logo during late board init stage. 3. Use iomux configuration from device tree. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-15colibri-imx6ull: show boot logoIgor Opaniuk
1. Show boot logo embed in U-Boot blob. 2. Drop iomux configration for LCD, and use the one provided in device tree. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-15ARM: dts: imx7-colibri: multiple node updatesIgor Opaniuk
1. Move u-boot specific nodes to u-boot dts include: legacy lcdif node and aliases. 2. Add iomux configuration for LCD. 3. Drop un-needed u-boot,dm-pre-reloc for alias node. 4. Fix display-timings, use the one from Toradex downstream kernel [1] [1]: https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi?h=toradex_4.9-2.3.x-imx#n206 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-07-15toradex: common: show boot logoIgor Opaniuk
Add function for showing boot logo, embed into u-boot blob. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-06-18colibri_t20: change maintainerIgor Opaniuk
Take over maintainership for Colibri T20 module. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Acked-by: Lucas Stach <dev@lynxeye.de>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop image.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-01board: apalis_imx6: Add KSZ9131 phy skew settingsPhilippe Schenker
This patch adds skew register settings for KSZ9131. It checks first which phy is on the board and then applies the correct skew settings. Skew settings calculation for the KSZ9131: The i.MX6 SoC has an output skew tolerance of -100ps to 900ps. All PCB traces where routed exactly the same length so we can calculate the skew settings without taking the length into consideration. The traces are all length matched. RXC skew (PHY to MAC): - We use the 2ns DLL controlled delay on the PHY - We do not use the skew registers This results in the following values: RXC PHY fixed Delay 2000ps PHY Added Delay 0ps T_setup_R min 2.00ns T_setup_R typ 2.00ns T_setup_R max 2.00ns T_hold_R min 1.60ns T_hold_R typ 2.00ns T_hold_R max 2.40ns That means we are well within RGMII specs. TXC skew (MAC to PHY): - We use the 2ns DLL controlled delay on the PHY - We then subtract ~0.6ns with TXD[0:3] and TXC clock pad skew register in a resulting ~1.4ns delay. This results in the following values under consideration of the tolerances: TXC min TXC typ TXC max MAC min -100ps -100ps -100ps MAC max 900ps 900ps 900ps PHY fixed Delay 2000ps 2000ps 2000ps PHY added Delay -340ps -600ps -859ps T_setup_T min 1.56ns 1.30ns 1.04ns T_setup_T typ 2.06ns 1.80ns 1.54ns T_setup_T max 2.56ns 2.30ns 2.04ns T_hold_T min 1.04ns 1.30ns 1.56ns T_hold_T typ 1.94ns 2.20ns 2.46ns T_hold_T max 2.84ns 3.10ns 3.36ns This shows that T_hold_T min and T_setup_T min times are out of spec for RGMII timing. However the KSZ9131 has a minimal value for this time of 0.8ns which is met under all circumstances. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-05-01board: verdin-imx8mm: Add KSZ9131 phy skew settingsPhilippe Schenker
This patch determines which phy is placed on the board with the PHY ID then it sets the same settings for KSZ9031 as before but for KSZ9131 it enables both RXC and TXC delay lines in the PHY. This will compensate the missing delay from the MAC. Other skew settings are not needed as the traces on board are routed exactly the same length Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Tested-by: Igor Opaniuk <igor.opaniuk@toradex.com> Acked-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-05-01verdin-imx8mm: Change board phy skew values for our ksz9031Philippe Schenker
This patches uses the existing functions for interacting with the KSZ9031 and uses the values appropriate for our board. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Tested-by: Igor Opaniuk <igor.opaniuk@toradex.com> Acked-by: Igor Opaniuk <igor.opaniuk@toradex.com>