summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_imx7/colibri_imx7.c
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-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-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-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>
2020-08-28colibri_imx7: wrap video specific defines if DM_VIDEO ifdefsIgor Opaniuk
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-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-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 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-01-17common: Move RAM-sizing functions to init.hSimon Glass
These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move reset_cpu() to the CPU headerSimon Glass
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-07colibri_imx7: migrate to DM_ETHIgor Opaniuk
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>
2019-12-06board: colibri_imx7: reserve DDR memory for Cortex-M4Igor Opaniuk
i.MX 7's Cortex-M4 core can run from DDR and uses DDR memory for the rpmsg communication. Both use cases need a fixed location of memory reserved. For the rpmsg use case the reserved area needs to be in sync with the kernel's hardcoded vring descriptor location. Use the linux,usable-memory property to carve out 1MB of memory in case the M4 core is running. Also make sure that the i.MX 7 specific rpmsg driver does not get loaded in case we do not carve out memory. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-10-13colibri_imx7: provide proper node name to pmic_getIgor Opaniuk
Implementation of pmic_get() uses uclass_find_device_by_name(), which behaviour was changed in 4213609cc7 ("drivers: core: use strcmp when find device by name"). Now we have to supply full node name with unit address. Fixes boot issue: U-Boot 2019.07-00788-g0ef6e69a1e-dirty (Jul 19 2019 - 15:27:02 +0300) CPU: Freescale i.MX7D rev1.3 1000 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) at 41C Reset cause: POR DRAM: 512 MiB initcall sequence 9ffd3a4c failed at call 87803c61 (err=-19) ERROR Please RESET the board Fixes: 4213609cc7("drivers: core: use strcmp when find device by name") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-06-23Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu
Converted to use fsl_esdhc_imx for i.MX platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Acked-by: Jason Liu <Jason.hui.liu@nxp.com>
2019-02-20board: toradex: turn off lcd backlight before OS handoverGerard Salvatella
U-Boot typically tears down the display controller before handing control over to Linux. On LCD displays disabling pixel clock leads to a fading out effect with vertical/horizontal lines. Make sure to disable back light before booting Linux. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-01-28colibri_imx7: drop legacy usdhc supportStefan Agner
Drop legacy pinmux/usdhc board configuration. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-10-09colibri_imx7: prime get_ram_size() using imx_ddr_size()Fabio Estevam
Rather than passing a hardcoded maxsize to the generic get_ram_size() function use the i.MX 7 specific imx_ddr_size() function, which extracts the memory size at runtime by reading the DDR controller registers. This is a purely cosmetic change as the generic get_ram_size() function already took care of properly automatically detecting 256MB, 512MB or 1GB modules. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
2018-09-04colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module supportStefan Agner
This commit adds support for the Toradex Colibri iMX7D 1GB Computer on Module. The module is very similar to the Colibri iMX7D 512MB but uses eMMC instead of raw NAND. This patch introduces a new board specific Kconfig symbol to select between the two flash options. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-07-25board: constify struct node_info arrayMasahiro Yamada
Add 'const' (also 'static' in some places) to struct node_info arrays to save memory footprint. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-23colibri_imx7: add compatible string used in vanilla LinuxStefan Agner
Device trees from vanilla Linux do not specify a i.MX 7 specific compatible string. Make sure to set partitions also when booting upstream Linux. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-07-23mx7: Remove BMODE supportFabio Estevam
i.MX7 does not support BMODE due to the erratum e10574 ("Watchdog: A watchdog timeout or software trigger will not reset the SOC"), so remove its support. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.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-18imx: imx7d: remove CamelCase from ENET_xMHz macrosEric Nelson
Update these macros to use all upper-case to avoid checkpatch warnings: ENET_25MHz, ENET_50MHz, ENET_125MHz, Signed-off-by: Eric Nelson <eric@nelint.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-07-12imx: reorganize IMX code as other SOCsStefano Babic
Change is consistent with other SOCs and it is in preparation for adding SOMs. SOC's related files are moved from cpu/ to mach-imx/<SOC>. This change is also coherent with the structure in kernel. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@nxp.com> CC: Akshay Bhat <akshaybhat@timesys.com> CC: Ken Lin <Ken.Lin@advantech.com.tw> CC: Marek Vasut <marek.vasut@gmail.com> CC: Heiko Schocher <hs@denx.de> CC: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> CC: Christian Gmeiner <christian.gmeiner@gmail.com> CC: Stefan Roese <sr@denx.de> CC: Patrick Bruenn <p.bruenn@beckhoff.com> CC: Troy Kisky <troy.kisky@boundarydevices.com> CC: Nikita Kiryanov <nikita@compulab.co.il> CC: Otavio Salvador <otavio@ossystems.com.br> CC: "Eric Bénard" <eric@eukrea.com> CC: Jagan Teki <jagan@amarulasolutions.com> CC: Ye Li <ye.li@nxp.com> CC: Peng Fan <peng.fan@nxp.com> CC: Adrian Alonso <adrian.alonso@nxp.com> CC: Alison Wang <b18965@freescale.com> CC: Tim Harvey <tharvey@gateworks.com> CC: Martin Donnelly <martin.donnelly@ge.com> CC: Marcin Niestroj <m.niestroj@grinn-global.com> CC: Lukasz Majewski <lukma@denx.de> CC: Adam Ford <aford173@gmail.com> CC: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr> CC: Boris Brezillon <boris.brezillon@free-electrons.com> CC: Soeren Moch <smoch@web.de> CC: Richard Hu <richard.hu@technexion.com> CC: Wig Cheng <wig.cheng@technexion.com> CC: Vanessa Maegima <vanessa.maegima@nxp.com> CC: Max Krummenacher <max.krummenacher@toradex.com> CC: Stefan Agner <stefan.agner@toradex.com> CC: Markus Niebel <Markus.Niebel@tq-group.com> CC: Breno Lima <breno.lima@nxp.com> CC: Francesco Montefoschi <francesco.montefoschi@udoo.org> CC: Jaehoon Chung <jh80.chung@samsung.com> CC: Scott Wood <oss@buserror.net> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Anatolij Gustschin <agust@denx.de> CC: Simon Glass <sjg@chromium.org> CC: "Andrew F. Davis" <afd@ti.com> CC: "Łukasz Majewski" <l.majewski@samsung.com> CC: Patrice Chotard <patrice.chotard@st.com> CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Hans de Goede <hdegoede@redhat.com> CC: Masahiro Yamada <yamada.masahiro@socionext.com> CC: Stephen Warren <swarren@nvidia.com> CC: Andre Przywara <andre.przywara@arm.com> CC: "Álvaro Fernández Rojas" <noltari@gmail.com> CC: York Sun <york.sun@nxp.com> CC: Xiaoliang Yang <xiaoliang.yang@nxp.com> CC: Chen-Yu Tsai <wens@csie.org> CC: George McCollister <george.mccollister@gmail.com> CC: Sven Ebenfeld <sven.ebenfeld@gmail.com> CC: Filip Brozovic <fbrozovic@gmail.com> CC: Petr Kulhavy <brain@jikos.cz> CC: Eric Nelson <eric@nelint.com> CC: Bai Ping <ping.bai@nxp.com> CC: Anson Huang <Anson.Huang@nxp.com> CC: Sanchayan Maity <maitysanchayan@gmail.com> CC: Lokesh Vutla <lokeshvutla@ti.com> CC: Patrick Delaunay <patrick.delaunay@st.com> CC: Gary Bisson <gary.bisson@boundarydevices.com> CC: Alexander Graf <agraf@suse.de> CC: u-boot@lists.denx.de Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-05-12colibri_imx7: Fix unused variable warningTom Rini
The variable usdhc3_emmc_pads is never referenced, drop. Cc: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-19colibri_imx7: use device-tree for MTD partitionsStefan Agner
Use device-tree fixup to communicate the MTD partitions to the kernel. Remove mtdparts from the kernel command line. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-19colibri_imx7: setup PMIC sleep mode configurationStefan Agner
Disable 3.3V Ethernet and ARM rail when entering sleep mode. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-19colibri_imx7: implement board level USB PHY modeStefan Agner
Implement board level USB PHY mode callback. On USB OTG Port 1 the Colibri standard foresees GPIO USBC_DET to decide whether the port should run in Host or Device mode. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-12-16toradex: allow custom fdt board setup in board fileStefan Agner
The config block support currently uses the ft_board_setup function to patch the device tree with config block information. However, this does not allow to patch the device tree with board specific information. Rename the common setup function to ft_common_board_setup and use the call it from the board files directly. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-10-07colibri_imx7: use Ricoh RN5T567 to reboot the boardStefan Agner
Use the external PMIC Ricoh RN5T567 to reliably restart the system. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-10-07colibri_imx7: remove legancy UART platform dataStefan Agner
We now use device tree to provide SoC data to the UART driver, there is no need for the legancy UART platform data. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-10-07colibri_imx7: remove legancy I2C supportStefan Agner
Remove legancy I2C config and code in favor of upcomming DM/DT enable I2C support. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-07-28colibri_imx7: add Colibri iMX7S/iMX7D module supportStefan Agner
This commit adds support for the Toradex Computer on Modules Colibri iMX7S/iMX7D. The two modules/SoC's are very similar hence can be easily supported by one board. The board code detects RAM size at runtime which is one of the differences between the two boards. The board also uses the UART's in DTE mode, hence making use of the new DTE support via serial DM. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>