summaryrefslogtreecommitdiff
path: root/board/toradex/common/tdx-cfg-block.c
AgeCommit message (Collapse)Author
2024-05-28toradex: tdx-cfg-block: add verdin i.mx8m mini 0090 pid4toradex_imx_v2020.04_5.4.70_2.3.0Emanuele Ghidoli
Add new PID4 0090 Verdin iMX8M Mini Quad 4GB WB ET to support the new hardware variant. Upstream-Status: Submitted [https://lore.kernel.org/all/20240528095941.872693-1-ghidoliemanuele@gmail.com/] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2024-05-28toradex: tdx-cfg-block: add verdin imx95 sku 0089 pid4Emanuele Ghidoli
Add new PID4 0089 Verdin iMX95 Hexa 16GB WB IT to config block handling. Upstream-Status: Submitted [https://lore.kernel.org/all/20240528095941.872693-1-ghidoliemanuele@gmail.com/] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2024-05-28toradex: tdx-cfg-block: add aquila am69 sku 0088 pid4Emanuele Ghidoli
Add new PID4 0088 Aquila AM69 Octa 32GB WB IT to config block handling. Upstream-Status: Submitted [https://lore.kernel.org/all/20240528095941.872693-1-ghidoliemanuele@gmail.com/] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2024-03-08toradex: tdx-cfg-block: add 0087 i.mx8m mini product variantJoao Paulo Goncalves
Add new product id 0087 Verdin iMX8M Mini Quad 2GB IT. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20240308141801.49081-1-jpaulo.silvagoncalves@gmail.com/] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2024-01-31toradex: tdx-cfg-block: add 0086 i.mx8m mini skuJoao Paulo Goncalves
Add new product id 0086 Verdin iMX8M Mini DualLite 2GB IT. Upstream-Status: Submitted [https://lore.kernel.org/u-boot/20240131173204.100407-1-jpaulo.silvagoncalves@gmail.com/] Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-05-15toradex: tdx-cfg-block: add 0070 verdin i.mx 8m plus quad skuEmanuele Ghidoli
Add new i.MX 8M Plus Quad SKU to ConfigBlock handling. 0070: Verdin iMX8M Plus Quad 8GB WB IT This SKU is identical to 0066 but with Industrial Temperature Grade SoC. Upstream-Status: Submitted [https://lore.kernel.org/all/20230515130641.26028-1-francesco@dolcini.it/] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2022-07-06toradex: tdx-cfg-block: add 0068 i.mx 8m mini skuPhilippe Schenker
[ backported from https://lore.kernel.org/u-boot/20220706121505.448579-1-dev@pschenker.ch/T/#u ] Add new i.MX 8M Mini SKU to ConfigBlock handling. 0068: Verdin iMX8M Mini Quad 2GB WB IT No CAN This SKU is identical to 0055 but without CAN. Mention this in the name so those modules can be distinguished. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-06-20toradex: tdx-cfg-block: add new toradex oui rangePhilippe Schenker
[ backported from https://lists.denx.de/pipermail/u-boot/2022-June/486993.html ] Add new Toradex MAC OUI (8c:06:cb), to the config block. With this change we extend the possible serial-numbers as follows: For serial-numbers 00000000-16777215 OUI 00:14:2d is taken For serial-numbers 16777216-33554431 OUI 8c:06:cb is taken Lower 24-bit of the serial number are used in the NIC part of the MAC address, the complete serial number can be calculated using the OUI. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> [ps: use kdiff3 to autoresolve conflicts]
2022-06-14toradex: tdx-cfg-block: extend assembly versionPhilippe Schenker
[ backport https://lists.denx.de/pipermail/u-boot/2022-June/486350.html ] There are two decimal digits reserved to encode the module version and revision. This code so far implemented A-Z which used 0-25 of this range. This commit extends the range to make use of all 99 numbers. After capital letters the form with a hashtag and number (e.g. #26) is used. Examples: If the assembly version is between zero and 25 the numbering is as follows, as it also has been before this commit: 0: V0.0A 1: V0.0B ... 25: V0.0Z New numbering of assembly version: If the number is between 26 and 99 the new assembly version name is: 26: V0.0#26 27: V0.0#27 ... 99: V0.0#99 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> [ps: backport: replace dectoul() with simple_strtoul()]
2022-05-09toradex: tdx-cfg-block: add new 8gb apalis-imx8Philippe Schenker
0067: Apalis iMX8 QuadMax 8GB Wi-Fi / BT IT This module is identical to its 4GB counterpart 0037: Apalis iMX8 QuadMax 4GB Wi-Fi / BT IT except for the RAM size. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2021-11-10apalis-imx8x: Drop support for Apalis iMX8XDenys Drozdov
Drop Apalis iMX8X platform as no longer supported. Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-05-19toradex: tdx-cfg-clock: add new i.mx 6ull and 8m plus skusMarcel Ziswiler
Add new i.MX 6ULL and 8M Plus SKUs to ConfigBlock handling: 0062: Colibri iMX6ULL 1GB IT (eMMC) 0063: Verdin iMX8M Plus Quad 4GB IT 0064: Verdin iMX8M Plus Quad 2GB Wi-Fi / BT IT 0065: Verdin iMX8M Plus QuadLite 1GB IT 0066: Verdin iMX8M Plus Quad 8GB Wi-Fi / BT Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-04-07toradex: configblock: 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>
2021-01-27toradex: configblock: fix interactive mode it handlingDenys Drozdov
Restore "Is the module an IT version? [y/N]" for "cfgblock create" interactive mode command, which was leading to invalid detection of 0051 Colibri iMX8DX 1GB WB module; Fixes: c0c3978cba34 ("toradex: tdx-cfg-block: add Verdin iMX8M Mini/Nano support") Fixes: 7780d4ec8ee3 ("toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus") Related-to: ELB-3482 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-01-08toradex: tdx-cfg-clock: fix i.mx 8m mini interactiveMarcel Ziswiler
Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-01-08toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skusMarcel Ziswiler
Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling: 0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT 0059: Verdin iMX8M Mini Quad 2GB IT 0060: Verdin iMX8M Mini DualLite 1GB WB IT 0061: Verdin iMX8M Plus Quad 2GB Related-to: ELB-3128 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-01-08toradex: 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> (cherry picked from commit 1da2138819aa573b3d53f06bede90ccd6509bb82)
2021-01-08toradex: 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> (cherry picked from commit d3eedd52f8e244cc036db522bfff9549397a75ed)
2021-01-08toradex: 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> (cherry picked from commit 65b107bd845a0df51d52acfdfaeda76934e0dd40)
2021-01-08tdx-cfg-block: change verdin imx8m nano namingPhilippe Schenker
This changes the define from VERDIN_IMX8MNSL to VERDIN_IMX8MNQ_WIFI_BT in order to have a related naming to VERDIN_IMX8MMQ_WIFI_BT_IT and also have the information in for wifi bluetooth. This as well changes to the final decided naming. Related-to: ELB-2642 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit 7d872c04cc4d6da4e7f322c9591e79939661f368)
2020-02-09toradex: tdx-cfg-block: add Verdin iMX8M Mini/Nano supportMarcel Ziswiler
Add support for storing configuration for Verdin iMX8M Mini and Nano SoMs in Toradex config block. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-02-09toradex: tdx-cfg-block: add Apalis iMX8X supportMarcel Ziswiler
Add support for storing configuration for Apalis iMX8X SoM in Toradex config block. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-08-11env: Move env_get() to env.hSimon Glass
Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-19toradex: configblock: avoid line continuationsMarcel Ziswiler
Fix issue as reported by checkpatch.pl. Leave long lines as line continuation in text output is not recommended. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-19toradex: configblock: fix apalis imx8 targetMarcel Ziswiler
The Apalis iMX8 was missing the interactive part should a customer have bricked his module and want to re-create the configuration block. Fix this. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-19toradex: configblock: fix colibri imx8x targetMarcel Ziswiler
The Colibri iMX8X target got re-named late in the cycle which we forgot to reflect here. Furthermore, it was missing the interactive part should a customer have bricked his module and want to re-create the configuration block. Fix this. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-19toradex: configblock: generic wi-fi/bt handlingMarcel Ziswiler
Make the interactive Wi-Fi/BT handling generic by pulling it out of the Colibri iMX6ULL interactive part to be re-used for Apalis iMX8 and Colibri iMX8X. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-19toradex: configblock: initialize MMC before switching partitionStefan Agner
If the module is in serial downloader mode, we do no longer read the environment from eMMC. Therefor, the eMMC is unitialized when trying to read the config block. Use mmc_init to initialize the selected MMC device before using it. Note: In case the MMC has already been initialized, the mmc_init detects that and returns immediately. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-04-25board: toradex: tdx-cfg-block: add new skusMarcel Ziswiler
Add all the latest new SKUs: - Apalis iMX8 QuadXPlus 2GB Wi-Fi / BT IT - Apalis iMX8 QuadMax 4GB IT - Apalis iMX8 QuadPlus 2GB Wi-Fi / BT - Apalis iMX8 QuadPlus 2GB", - Colibri iMX8 QuadXPlus 2GB IT - Colibri iMX8 DualX 1GB Wi-Fi / Bluetooth - Colibri iMX8 DualX 1GB Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-04-25board: toradex: tdx-cfg-block: clean-up sku handlingMarcel Ziswiler
Clean-up handling of several SKUs. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-04-25tdx-cfg-block: simplify i.MX 6 module detectionStefan Agner
Use CONFIG_TARGET_... at compile time to differentiate between Apalis iMX6, Colibri iMX6 and Colibri iMX6ULL. Avoid code duplication by moving question about Wi-Fi / Bluetooth before IT/non-IT decision. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-04-25tdx-cfg-block: add support for new colibri iMX6ull skusGerard Salvatella
Add support for new Colibri iMX6ULL SKUs. While at it also checkpatch fix the whole files. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-04-13tdx-cfg-block: fix off by one issueMarcel Ziswiler
Fix toradex_modules array off by one issue potentially leading to spurious printout during boot e.g. Model: Toradex V1.2A, instead of Model: Toradex UNKNOWN MODULE V1.2A. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-04-13toradex: configblock: add an -y parameter to 'cfgblock create’Dominik Sliwa
Add an optional -y parameter to 'cfgblock create’ to simplify automation. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2018-09-04board: toradex: common: fail gracefully on missing NAND chipStefan Agner
If the NAND chip is missing get_nand_dev_by_index() returns NULL. Fail gracefully in this case. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-07-23board: toradex: add new and upcoming SKUsStefan Agner
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-15blk: Remove various places that do flush cache after readBin Meng
All these places seem to inherit the codes from the MMC driver where a FIXME was put in the comment. However the correct operation after read should be cache invalidate, not flush. The underlying drivers should be responsible for the cache operation. Remove these codes completely. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: York Sun <york.sun@nxp.com>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-11board: toradex: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-06-05arm: Add explicit include of <asm/mach-types.h>Simon Glass
Rather than relying on common.h to provide this include, which is going away at some point, include it explicitly in each file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-06-01tegra: Convert MMC to use driver model for operationsSimon Glass
Enable CONFIG_DM_MMC_OPS and CONFIG_BLK for all Tegra devices. This moves Tegra to use driver model fully for MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-28toradex: config block handlingMarcel Ziswiler
Add Toradex factory configuration block handling. The config block is a data structure which gets stored to flash during production testing. The structure holds such information as board resp. hardware revision, product ID and serial number which is used as the NIC part of the Ethernet MAC address as well. The config block will be read upon boot by the show_board_info() function, displayed as part of the board information and passed to Linux via device tree or ATAGs. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>