summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_imx6
AgeCommit message (Collapse)Author
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-10global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespaceTom Rini
Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-07-25colibri_imx6: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux-next next-20220708. Please note that this also means that instead of the previous "generic" U-Boot specific carrier board agnostic device tree we are now using the regular one for the Colibri Evaluation (carrier) board V3 (e.g. imx6dl-colibri-eval-v3.dtb rather than the previous imx6-colibri.dtb). Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-06-28toradex: apalis/colibri_imx6: Fix CLKO1/CLKO2 outputFrancesco Dolcini
Set CLK01 and CLK02 to 24MHz and enable it in CCM_CCOSR register. This clock is used by both the audio codec (CLKO1) and by the CSI camera (CLKO2) and is expected to be 24MHz. Despite the wrong 16.5MHz there was no real issue because of the wrong frequency since Linux reconfigures the clocks afterward, however this was triggering an issue with noise coming from the SGTL5000 audio codec. The problem is that the SGTL5000 does not have a reset pin and after it is configured if the input MCLK clock is disabled it produces a constant noise on its output, this was happening on software reboot. Forcing the clock to be enabled in U-Boot prevent the problem by making sure that the clock is always available, without this change as soon as Linux was changing the clock tree (setting clk_out_sel=1 without setting clko2_en=1) the noise would start till the actual clock was enabled (clko2_en=1) during the SGTL5000 driver probe. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2021-10-20toradex: take over maintainershipMarcel Ziswiler
Also take over maintainership of remaining Toradex SoMs as Oleksandr has left our company. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> CC: Oleksandr Suvorov <cryosay@gmail.com>
2021-10-19colibri-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-09-07arm: Disable ATAGs supportTom Rini
With the exceptions of ds109, ds414, icnova-a20-swac, nokia_rx51 and stemmy, disable ATAG support. A large number of platforms had enabled support but never supported a kernel so old as to require it. Further, some platforms are old enough to support both, but are well supported by devicetree booting, and have been for a number of years. This is because some of the ATAGs related functions have been re-used to provide the same kind of information, but for devicetree or just generally to inform the user. When needed still, rename these functions to get_board_revision() instead, to avoid conflicts. In other cases, these functions were simply unused, so drop them. Cc: Andre Przywara <andre.przywara@arm.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Phil Sutter <phil@nwl.cc> Cc: Stefan Bosch <stefan_b@posteo.net> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-09board: colibri_imx6: add board_fit_config_name_match to support FIT in SPLMing Liu
Only one dtb is currently supported, so match with imx6-colibri. Signed-off-by: Ming Liu <ming.liu@toradex.com> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler
Historically, the reset_cpu() function had an `addr` parameter which was meant to pass in an address of the reset vector location, where the CPU should reset to. This feature is no longer used anywhere in U-Boot as all reset_cpu() implementations now ignore the passed value. Generic code has been added which always calls reset_cpu() with `0` which means this feature can no longer be used easily anyway. Over time, many implementations seem to have "misunderstood" the existence of this parameter as a way to customize/parameterize the reset (e.g. COLD vs WARM resets). As this is not properly supported, the code will almost always not do what it is intended to (because all call-sites just call reset_cpu() with 0). To avoid confusion and to clean up the codebase from unused left-overs of the past, remove the `addr` parameter entirely. Code which intends to support different kinds of resets should be rewritten as a sysreset driver instead. This transformation was done with the following coccinelle patch: @@ expression argvalue; @@ - reset_cpu(argvalue) + reset_cpu() @@ identifier argname; type argtype; @@ - reset_cpu(argtype argname) + reset_cpu(void) { ... } Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into nextTom Rini
Driver model: make some udevice fields private Driver model: Rename U_BOOT_DEVICE et al. dtoc: Tidy up and add more tests ns16550 code clean-up x86 and sandbox minor fixes for of-platdata dtoc prepration for adding build-time instantiation
2021-01-05Merge tag 'v2021.01-rc5' into nextTom Rini
Prepare v2021.01-rc5 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass
The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-26toradex: hand over maintainershipIgor Opaniuk
Hand over maintainership of Toradex SoMs (that I was responsible of) to Oleksandr because of my resignation from Toradex, as such I will have no immediate involvement with these modules and as a result not able to continue maintaining these boards. CC: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
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-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 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-04-07colibri_imx6: set gpr1 ENET_CLK_SELIgor Opaniuk
This fixes the issue when PHY auto negotiation never completes. Fixes: 431cd76dd8("colibri_imx6: migrate to DM_ETH") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
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_imx6: 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>
2020-01-07MAINTAINERS: change apalis_imx6/colibri_imx6 maintainersIgor Opaniuk
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>
2019-12-27colibri_imx6: fix broken fsl_esdhc_imx conversionIgor Opaniuk
Not all CONFIG_FSL_ESDHC defines were properly replaced with CONFIG_FSL_ESDHC_IMX, which broke U-boot proper booting on Colibri iMX6 SoMs. U-boot is stuck after this message: Commercial temperature grade DDR3 timings, 64bit bus width. Trying to boot from MMC1 Fixes: e37ac717d7("Convert to use fsl_esdhc_imx for i.MX platforms") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-12-03board: Remove unnecessary inclusion of micrel.h from boardsJames Byrne
Several boards still unnecessarily included micrel.h but no longer require it since the switch to Device Tree configuration. Signed-off-by: James Byrne <james.byrne@origamienergy.com>
2019-12-02common: Move some board functions out of common.hSimon Glass
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass
This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_get_ulong() to env.hSimon Glass
Move env_get_ulong() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.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-04-13board: colibri_imx6: check for and report ecc errors in fusesGerard Salvatella
The PMIC on the Colibri iMX6 may have ECC errors in fuses that will prevent correct settings. Up to one bit error per fuse bank can be reported and corrected by the ECC logic. Two bit errors can only be reported. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: added nreset gpio on rebootGerard Salvatella
RGMII_RD1 pin (active high, GPIO6_IO27) is triggered on reboot during the SPL phase. This asserts (active low) nReset_Out from the PMIC. Only V1.1 and later Colibri iMX6 modules implement this in hw. Previous versions do not use this pin, so it is safe to leave it enabled at all times. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: 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>
2019-04-13toradex: colibri_imx6: overwrite CMA memory set in device treeBhuvanchandra DV
Make sure CMA memory is not greater than 50% of available physical memory. Allow user to change the CMA memory via 'cma-size' U-Boot environment variable. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: revert fuse value set in mfgr_fuseMax Krummenacher
We have two commands to change the bootmode fuses: mfgr_fuse which set fuse 0/5 and 0/6 and updt_fuse which burns bit 4 of 0/5. Before Image 2.6 we fused in mfgr_fuse 0x5062, which boots from the user partition of the eMMC. To workaround certain hangs we moved to fastboot mode and using the first bootpartition of the eMMC requiring a fuse value of 0x5072 which could be achived by the then added updt_fuse command. At the same time the mfgr_fuse command was changed to also fuse 0x5072, revert that second change so that one can fuse both values, one with just mfgr_fuse and the later with mfgr_fuse;updt_fuse. Note that the mfgr_fuse command is only needed at module production time, a customer might need to use updt_fuse when upgrading an older module to be compatible with a newer image. The command is integrated into the image update scripts. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: change pmic fusing according to hw 1.1 requirementsMax Krummenacher
Colibri iMX6 V1.1 HW can use the PMIC GEN3 to power the NVCC_SD1. Change the settings fused into the PMIC's OTP to powerup with GEN3 set to output 3.3V. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri imx6: disable ri and dcd irq in uartsMax Krummenacher
If the UART is used in DTE mode the RI and DCD bits in UCR3 become irq enable bits. Both are set to enabled after reset and both likely are pending. Disable the bits also on UARTs not used in the boot loader to prevent an interrupt storm when Linux enables the UART interrupts. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri imx6: pf0100: reorder and cleanup message printingMax Krummenacher
Keep debug code at the end of the function. Use a one line informational message for the PMIC only. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: unify sd/mmc drive strenght with linux kernel settingsMax Krummenacher
In the linux device tree we use 40Ohm drive strenght. So use the same value in U-Boot. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: print also 64-bit ITMax Krummenacher
Print also for Colibri iMX6 512MB IT with 64-bit RAM bus. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: drop CONFIG_OF_SYSTEM_SETUPMax Krummenacher
This doesn't do anything anymore, probably never did. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: migrate usb to using driver modelMarcel Ziswiler
Migrate USB to using driver model. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: migrate mmc to using driver modelMarcel Ziswiler
Migrate MMC to using driver model. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: migrate i2c to using driver modelMarcel Ziswiler
Migrate I2C to using driver model. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: clean-up and migrate gpios to using driver modelMarcel Ziswiler
Migrate GPIOs to using driver model, properly request backlight, MMC/SD card detect and USB power enable GPIOs and also enable SION bit in pin muxing for auxiliary, backlight and USB power enable GPIOs. While at it also update copyright year, clean-up/re-order includes, add some comments clarifying ifdef scope and do some white-space clean-up. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: migrate to using device treeMarcel Ziswiler
Migrate to using device tree required for further driver model integration. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13colibri_imx6: get rid of obsolete nospl configurationsMarcel Ziswiler
Now with SPL long since being in place even for recovery using SDP finally get rid of those nospl configurations. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.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>
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>