aboutsummaryrefslogtreecommitdiff
path: root/board/toradex/apalis_imx6
AgeCommit message (Collapse)AuthorFilesLines
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini1-1/+1
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 Rini1-1/+1
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-25apalis_imx6: synchronise device tree with linuxMarcel Ziswiler1-2/+4
Synchronise device tree with linux-next 20220706. 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 Apalis Evaluation (carrier) board (e.g. imx6q-apalis-eval.dtb rather than the previous imx6-apalis.dtb). Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-06-28board: apalis_imx6: DDR init using mx6_dram_cfg()Francesco Dolcini1-255/+187
Do DDR initialization using the procedural mx6_dram_cfg() instead of programming the MMDC using a raw list of register/value pairs, this solves some rare boot failures on specific "bad" modules. Calibration values, DDR geometry are unchanged, memory timings are updated according to the relevant memory datasheet, no changes on the power consumption. For IT temperature range SKUs CL is decreased from 8 to 7 and tFAW value is increased, for commercial temperature range SKUs some changes on ODT parameters. This change was validated over a range of different apalis-imx6 SoM, on the whole working temperature range with weeks of continuous testing. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-06-28toradex: apalis/colibri_imx6: Fix CLKO1/CLKO2 outputFrancesco Dolcini1-5/+9
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>
2022-04-21configs: tdx: apalis_imx6: drop hw v1.0 supportMarcel Ziswiler1-36/+2
Drop optional support for the ancient Apalis iMX6 V1.0 hardware which had the UART wired as DCE rather than DTE. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-04-12apalis-imx6: avoid save environment unaskedDenys Drozdov1-3/+0
U-Boot should never save the environment unasked. This also avoids storing broken ftd_file to eMMC. Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-10-20toradex: take over maintainershipMarcel Ziswiler1-1/+1
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-19apalis-imx6: use dynamic DDR calibrationFrancesco Dolcini1-0/+19
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 Rini1-3/+2
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-31Kconfig: Remove all default n/no optionsMichal Simek1-1/+0
default n/no doesn't need to be specified. It is default option anyway. Signed-off-by: Michal Simek <michal.simek@xilinx.com> [trini: Rework FSP_USE_UPD portion] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler1-1/+1
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 Glass1-0/+1
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 nextWIP/05Jan2021-nextTom Rini1-1/+1
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 Rini1-1/+1
Prepare v2021.01-rc5 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass1-1/+1
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 Opaniuk1-1/+1
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 Glass1-1/+1
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 Glass1-1/+1
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 Yamada1-2/+2
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 Glass1-0/+1
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 Glass2-0/+2
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 Glass2-6/+8
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 image.h from common headerSimon Glass1-0/+1
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 Glass1-0/+1
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 Schenker1-16/+73
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-01-17common: Move reset_cpu() to the CPU headerSimon Glass1-0/+1
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-07apalis_imx6: migrate to DM_ETHIgor Opaniuk1-51/+0
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 Opaniuk1-1/+1
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-02common: Move some board functions out of common.hSimon Glass1-0/+1
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-10-08apalis_imx6: fix broken fsl_esdhc_imx conversionRicardo Salveti1-2/+2
Commit e37ac717d796 ("Convert to use fsl_esdhc_imx for i.MX platforms") converted FSL_ESDHC to FSL_ESDHC_IMX, but the config check for apalis_imx6 wasn't updated accordantly. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Peng Fan <peng.fan@nxp.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-10-08apalis_imx6: add board_fit_config_name_match to support FIT in SPLRicardo Salveti1-0/+10
Only one dtb is currently supported, so match with imx6-apalis. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Peng Fan <peng.fan@nxp.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass1-1/+0
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_set() to env.hSimon Glass1-0/+1
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-06-23Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu1-3/+3
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-06-11ARM: imx: apalis_imx6: Drop ad-hoc SATA bindingMarek Vasut1-49/+0
Drop the ad-hoc AHCI binding code, this is superseded by CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Cc: Stefan Agner <stefan.agner@toradex.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13board: apalis_imx6: check for and report ecc errors in fusesGerard Salvatella2-1/+107
The PMIC on Apalis iMX6 may have ECC errors in fuses that will prevent correct settings. Up to one bit error per fuse bank may 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-13apalis_imx6: use SDP if USB serial downloader has been usedStefan Agner1-0/+8
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-13apalis_imx6: revert fuse value set in mfgr_fuseMax Krummenacher1-1/+1
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 BSP 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 achieved 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-13apalis_imx6: disable ri and dcd irq in uartsMax Krummenacher1-1/+9
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-13apalis_imx6: pf0100: reorder and cleanup message printingMarcel Ziswiler1-54/+56
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-13apalis_imx6: unify sd/mmc drive strength with linux kernel settingsMax Krummenacher1-10/+14
In the Linux device tree we use 40Ohm drive strength. 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-13apalis_imx6: drop CONFIG_OF_SYSTEM_SETUPMarcel Ziswiler1-7/+0
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-13apalis_imx6: migrate usb to using driver modelMarcel Ziswiler1-22/+0
Migrate USB to using driver model. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13apalis_imx6: migrate mmc and sata to using driver modelMarcel Ziswiler1-40/+58
Migrate MMC and SATA to using driver model. While at it also enable SCSI driver model. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13apalis_imx6: migrate i2c to using driver modelMarcel Ziswiler3-118/+31
Migrate I2C to using driver model. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13apalis_imx6: clean-up and migrate gpios to using driver modelMarcel Ziswiler1-38/+52
Migrate GPIOs to using driver model, properly request backlight, Ethernet PHY reset, MMC/SD card detect and USB power GPIOs and also enable SION bit in pin muxing for Apalis, backlight, eMMC reset, Ethernet PHY reset 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-13apalis_imx6: migrate to using device treeMarcel Ziswiler1-0/+2
Migrate to using device tree required for further driver model integration. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-13apalis_imx6: get rid of obsolete nospl configurationsMarcel Ziswiler6-266/+0
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 Salvatella1-0/+9
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>