aboutsummaryrefslogtreecommitdiff
path: root/board/liebherr
AgeCommit message (Collapse)AuthorFilesLines
2024-03-30arm: xea: Add support for reading SoM (CPU) board HW revisionLukasz Majewski2-0/+60
The XEA board now has several HW revisions for SoM boards. This patch provides support for reading this revision ID values in early u-boot proper as production devices boot via falcon boot with correct DTB flashed at production (so there is no need to alter SPL). Additionally, the maximal SPL size (~55KiB) constraint is not allowing having even simplified FIT support in it. As a result it was necessary to handle reading GPIOs values solely in u-boot proper as one configuration (i.e. 'single binary' - imx28_xea_sb_defconfig) is not using SPL framework. Moreover, the 'board_som_rev' environment variable will be used to point correct configuration from the Linux FIT file. Additionally, as now XEA has its second HW revision - this information is printed when u-boot proper starts. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-03-30arm: spl: Add definition for PHY reset GPIO for XEA HW rev. 2Lukasz Majewski1-1/+2
The imx287 based XEA board's revision 2 uses GPIO_3_21 for PHY reset It is safe to keep the GPIO_2_13 as well, as in the SPL SPI1 is not used for transmission. This simplifies the code, as the proper configuration is performed either in falcon boot's read DTB or in u-boot proper (with correct FIT configuration chosen). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-03-30arm: spl: xea: Remove I2S pins configuration from early initializationLukasz Majewski1-7/+0
XEA is not supporting and using I2S codec, so there is no need to configure pins for it. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-01-15arm: xea: Add support for boot image source descriptor in SPLAnatolij Gustschin2-0/+112
We load two boot image source descriptor structures from last two sectors in the SPI NOR flash and determine the boot source for loading the kernel/DTB images, then adjust the boot order for loading image from eMMC boot0 or boot1 partition. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-01-15arm: xea: Move XEA's environment variables from xea.h to xea.envLukasz Majewski1-0/+139
The default set of environment variables from CFG_EXTRA_ENV_SETTINGS has been moved to a separate file - board/liebherr/xea/xea.env Adjustments done: - fitImage support - SPI-NOR layout re-organization Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-08-09treewide: rework linker symbol declarations in sections headerShiji Yang1-0/+1
1. Convert all linker symbols to char[] type so that we can get the corresponding address by calling array name 'var' or its address '&var'. In this way, we can avoid some potential issues[1]. 2. Remove unused symbol '_TEXT_BASE'. It has been abandoned and has not been referenced by any source code. 3. Move '__data_end' to the arch x86's own sections header as it's only used by x86 arch. 4. Remove some duplicate declared linker symbols. Now we use the standard header file to declare them. [1] This patch fixes the boot failure on MIPS target. Error log: SPL: Image overlaps SPL Fixes: 1b8a1be1a1f1 ("spl: spl_legacy: Fix spl_end address") Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-07-11arm: xea: Call spl_early_init() before DM serial console is enabled in SPLLukasz Majewski1-0/+1
The in-spl enabled DM serial console requires the board setup to be able to parse SPL_OF_PLATDATA based serial driver (pl01x) for the imx28 based XEA board. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-07-11spl: xea: Provide stub DM driver for imx28 clocksLukasz Majewski1-1/+18
This code fixes following WARNING: DTOC spl/dts/dt-plat.c fsl_imx28_clkctrl: WARNING: the driver fsl_imx28_clkctrl was not found in the driver list As imx28 doesn't yet support common clock framework, this prevents from DTOC warnings during SPL build. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-11-10global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespaceTom Rini1-2/+2
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-09-18cyclic: Use schedule() instead of WATCHDOG_RESET()Stefan Roese1-1/+1
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-02-05arm: xea: config: Provide special defconfig for a single binary u-bootLukasz Majewski1-0/+1
The new configs/imx28_xea_sb_defconfig is introduced to facilitate building the single binary u-boot.sb fox XEA board. The biggest distinction from "normal" XEA imx28_xea_sb_defconfig is support for USB mass storage devices (pen drives). To achieve that, the CONFIG_DM_USB is enabled and supported. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-02-05arm: xea: Modify board code to generate single binary u-bootLukasz Majewski2-1/+8
This change provides the possibility to build XEA (imx287 based) board U-Boot as a single binary (without support for CONFIG_SPL_FRAMEWORK). The generated u-boot.sb can be used in the factory environment to for example perform initial setup or HW testing. It can be used with 'uuu' utility (SDPS: boot -f /srv/tftp/xea/u-boot.sb) In the configs/imx28_xea_defconfig one needs to disable following configs: # CONFIG_SPL_BLK is not set # CONFIG_SPL_FRAMEWORK is not set The board_init_ll() is used in arch/arm/cpu/arm926ejs/mxs/start.S, which is utilized when CONFIG_SPL_FRAMEWORK is disabled. However, when it is enabled - the arch/arm/cpu/arm926ejs/start.S is used, which requires the lowlevel_init() function. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2021-12-27Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to KconfigTom Rini1-0/+2
Because of how these symbols work, and the remaining board config.h file uses, we need to do these at the same time. In some cases we just get to move rather directly to the defconfigs. A few cases require manual intervention. For the case of the eb_cpu5282 we need to select HW_WATCHDOG for the target, given how it's implemented. For the cases of m53menlo, dh_imx6, display5, and display5_factory we disable SPL watchdog support as the particular combination of options they want would require either more symbols or enabling SPL_DM. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-04spi: Rename SPI_SUPPORT to SPISimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-09-04mmc: Rename MMC_SUPPORT to MMCSimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> [trini: Fixup some incorrect renames] 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 Glass4-0/+4
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-08xea: spl: Disable pull UP for GPIO0_2{35}Lukasz Majewski1-1/+1
On the imx287 pin GPMI_WRN (GPIO0_25) no PullUP is available that can be enabled. To get the same behavior for both boot select pins (i.e. GPIO0_2{35}) disable pull UPs on both. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-08-03liebherr: Drop duplicate dm.h inclusionSimon Glass1-1/+0
We only need to include this header once. Drop the duplicate. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada4-4/+4
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-07-16arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28)Lukasz Majewski1-0/+1
This commit enables imx28 based XEA board's u-boot.sb (SPL) to download u-boot proper (u-boot.img) via Ymodem protocol. This is extremely useful in the recovery scenario where u-boot.sb is downloaded via uuu utility to SDRAM [*], and then one can upload u-boot proper via serial console to fully debrick the device. Note - debricking procedure of imx28 devices: - NXP's original USB based tools (like mxsldr or uuu) expect single u-boot.sb which is a relic of the old U-Boot (~2013) without SPL and U-Boot proper distinction. [*] On Host: ------------ cat << EOF > imx28_xea.lst uuu_version 1.3.0 SDPS: boot -f /srv/tftp/xea/u-boot.sb SDPU: done EOF Please start picocom: sudo picocom -b 115200 -s "sz -vv" /dev/ttyUSB1 sudo ./uuu/uuu -V imx28_xea.lst On the U-boot console one shall see: Trying to boot from UART CCC Then please press CTRL+A, S and type u-boot.img Signed-off-by: Lukasz Majewski <lukma@denx.de> Acked-by: Peng Fan <peng.fan@nxp.com>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass4-0/+4
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 Glass3-0/+3
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass4-0/+4
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 Glass4-0/+4
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-02-09arm: xea: spl: Add GPIO0_0 setup on spl_board_initLukasz Majewski1-1/+16
Explicitly configure GPIO0_0 in SPL, which controlls 3V3 voltage on the XEA board (it also supplies TIVAs). This code would enable TIVAs power supply early (also when board uses the falcon boot). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-02-09arm: xea: Provide function to set L2 switch 'local-mac-address' propertyLukasz Majewski1-0/+32
The 'local-mac-address' property needs to be adjusted to the MAC address value stored in U-Boot's 'ethaddr' env variable. Signed-off-by: Lukasz Majewski <lukma@denx.de>
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-07imx: Add support for i.MX28 based XEA boardLukasz Majewski6-0/+561
This patch introduces support for i.MX28 based XEA board. This board supports DM/DTS in U-Boot proper as well as DM aware drivers in SPL (u-boot.sb) by using OF_PLATDATA. More detailed information regarding usage of it can be found in ./board/liebherr/xea/README file. U-Boot SPL 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200) Trying to boot from MMC1 MMC0: Command 8 timeout (status 0xf0344020) mmc_load_image_raw_sector: mmc block read error U-Boot 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200) CPU: Freescale i.MX28 rev1.2 at 454 MHz BOOT: SSP SPI #3, master, 3V3 NOR Model: Liebherr (LWE) XEA i.MX28 Board DRAM: 128 MiB MMC: MXS MMC: 0 Loading Environment from SPI Flash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 64 KiB, total 16 MiB OK In: serial Out: serial Err: serial Net: Warning: ethernet@800f0000 (eth0) using random MAC address - ce:e1:9e:46:f3:a2 eth0: ethernet@800f0000 Hit any key to stop autoboot: 0 Signed-off-by: Lukasz Majewski <lukma@denx.de>
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-12-02common: Move serial functions out of common.hSimon Glass3-0/+3
These functions belong in serial.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-03ARM: imx: Convert mccmon6 to use fitImage instead of uImage+DTBLukasz Majewski1-0/+7
This commit enabled support for fitImage on mccmon6 when we switch to DT/DTS (including falcon mode). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03ARM: imx: Decouple mccmon6's SPL and u-boot proper codeLukasz Majewski3-290/+276
The mccmon6 has been used a "mixed" approach between SPL and U-Boot proper sources. This commit decoupes SPL and u-boot proper, which allows clear distinction between those two code bases and facilitates conversion to DM/DTS on this particular board. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03ARM: imx: Convert mccmon6 to use DM/DTS in the u-boot properLukasz Majewski1-161/+0
This commit converts mccmon6's u-boot proper (in a single commit to avoid build breaks) to use solely DM/DTS. The DTS description of the mccmon6 has been ported from Linux kernel (v4.20, SHA1: 8fe28cb58bcb235034b64cbbb7550a8a43fd88be) Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08imx: Rewrite display5 get_board_id() function to use dm_gpio_* APILukasz Majewski1-32/+21
The get_board_id() function was using the old gpio_* compatibility layer to read HW and SW ID numbers encoded on the PCB board. After this change the new dm_gpio* API is used for this purpose. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08imx: Convert emergency pad of display5 to use dm_gpio* functionsLukasz Majewski1-5/+7
After this change the display5's emergency gpio use dm_gpio* functions instead of legacy ones (gpio*) to read its state. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08ARM: display5: Remove common.c file (after DM/DTS U-Boot proper conversion)Lukasz Majewski4-90/+76
The common.c file content can be safely moved to spl.c file after performing the DM/DTS conversion for the U-Boot proper. It contains the non DM/DTS setup code, which now is only used by SPL. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08ARM: display5: Remove UART initialization code after DM/DTS conversion ↵Lukasz Majewski3-16/+0
(non-console) This UART is not used in U-Boot, so there is no need to initialize it. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08DM: SPI: Convert display5 to use SPI with DM/DTS (but no in SPL)Lukasz Majewski3-44/+12
The DM/DTS support for SPI is disabled on purpose for SPL, as it is not supported as of time of this conversion. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08DM: eth: Switch display5 board to use DM_ETHLukasz Majewski1-104/+30
After this commit the display5 device would use FEC driver supporting driver model (DM_ETH). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08DM: mmc: Switch display5 board to use DM_MMC and BLK (USDHC)Lukasz Majewski3-29/+0
After this commit the display5 device would use eMMC driver supporting driver model (DM_MMC and BLK). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08DM: I2C: Switch display5 board to use DM_I2CLukasz Majewski1-48/+0
After this commit the display5 device would use I2C driver supporting driver model (DM_I2C). The 'i2c' and 'eeprom' commands now use DM I2C drivers and initialize on-bus devices according to device tree description. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-08-11env: Drop environment.h header file where not neededSimon Glass2-2/+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-08-11env: Move env_init() to env.hSimon Glass1-0/+1
Move env_init() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-11env: Move env_get_f() to env.hSimon Glass1-0/+1
Move this function over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-19ARM: display5: Remove U_BOOT_DEVICE definition of serial_mxcLukasz Majewski1-9/+0
Before the wide DM/DTS adoption in the U-Boot proper, the display5 has been using only DM_SERIAL to provide serial console in pre-relocation. After moving to full DM/DTS adoption in the U-Boot proper the U_BOOT_DEVICE definition is not needed anymore, as it has been replaced with udevice creation from provided DTS description. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-19ARM: display5: Fix CS check after moving some SPI related CONFIGs to KconfigLukasz Majewski1-1/+1
After commit 14453fbfadc2 ("Convert CONFIG_SF_DEFAULT_* to Kconfig") and commit abe66b1b5dec ("Convert CONFIG_ENV_SPI_* to Kconfig") ,which moved some SPI related CONFIG_* defines to Kconfig the display5 board has become unbootable as the SPI CS check condition had wrong value. This commit fixes this check and allows proper SPI NOR flash operation in SPL. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-06-23Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu5-7/+7
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>