summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-07-14bootstd: Add a separate log category for expoSimon Glass5-1/+8
This feature is different enough from bootstd that it probably deserves its own log category. It cannot use a uclass since it is not a device. Add a new category. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14fdt: Allow more general use of livetreeSimon Glass5-5/+66
At present livetree can only be used for the control FDT. It is useful to be able to use the ofnode API for other FDTs, e.g. those used by the upcoming configuration editor. We already have most of the support present, and tests can be marked with the UT_TESTF_OTHER_FDT flag to use another FDT as a special case. But with this change, the functionality becomes more generally available. Plumb in the require support. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14fdt: Clarify the fdt pre-relocation warningSimon Glass1-1/+1
Reword this so it is easier to understand. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14fdt: Align the start of the livetreeSimon Glass3-1/+32
Ensure that the block of memory used by live tree is aligned according to the default for structures. This ensures that the root node appears at the start of the block, so it can be used with free(), rather than being 4 bytes later in some cases. This corrects a rather obscure bug in unflatten_device_tree(). Fixes: 8b50d526ea5 ("dm: Add a function to create a 'live' device tree") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14cat: Update command to use fs_load_alloc()Simon Glass1-30/+17
Use this new function since it implements the required functionality and reduces duplicated code. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14fs: Create functions to load and allocate a fileSimon Glass3-28/+98
This functionality current sits in bootstd, but it is more generally useful. Add a function to load a file into memory, allocating it as needed. Adjust bootstd to use this version. Note: Tests are added in the subsequent patch which converts the 'cat' command to use this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Rename exp_set_text_mode()Simon Glass4-5/+5
Rename this function to match its peers, using the full "expo' prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14console: Correct truetype spacing errorSimon Glass2-4/+4
The putc_xy() method is supposed to return the amount of space used. The existing implementation erroneously adds the previous sub-pixel position to the returned value. This spaces out the characters very slightly more than it should. It is seldom noticeable but it does make accurate measurement of the text impossible. Fix this minor but long-standing bug. Fixes: a29b012037c ("video: Add a console driver that uses TrueType fonts") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Avoid automatically arranging the sceneSimon Glass5-18/+21
This should ideally be done once after all scene changes have been made. Require an explicit call when everything is ready. Always arrange after a key it sent, just for convenience. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Store the console in the expoSimon Glass3-8/+13
Rather than finding this each time, keep a pointer to it. This simplifies the code a little. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14video: Provide a way to clear part of the consoleSimon Glass3-69/+71
This is useful when the background colour must be written before text is updated, to avoid strange display artifacts. Add a function for this, using the existing code from the truetype console. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14video: Drop #ifdefs from console_truetypeSimon Glass1-56/+56
Use if() instead to reduce the number of build paths. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14dm: core: Avoid registering an inaccessible treeSimon Glass1-0/+9
At present there are various restrictions on the use of livetree: - It is only available once the tree is unflattened, i.e. after relocation - It is designed to be used with the control FDT - It can (in principle) be used with other FDTs, but only if they are unflattened first; this is not supported Add a few checks to make sure that any tree that is created is actually valid. Otherwise it can be confusing when nodes and properties cannot actually be accessed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14gpio: Avoid using an invalid ofnodeSimon Glass1-1/+1
Devices do not necessarily have nodes attached to them, since they can be created from platdata. In SPL a devicetree may in fact not exist at all. Check the node before using it. This avoids failure when OF_CHECKS is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 5fc7cf8c8e2 ("gpio: add gpio-hog support") Reviewed-by: Heiko Schocher <hs@denx.de>
2023-07-14test: Restore test behaviour on failureSimon Glass1-18/+18
A recent change makes test continue to run after failure. This results in a lot of useless output and may lead to a segfault. Fix this by adding back the 'return' statement. Fixes: fa847bb409d ("test: Wrap assert macros in ({ ... }) and fix") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14sandbox: Fix quiting when the LCD window is closedSimon Glass1-1/+2
With recent changes to how sandbox handles reset, closing the window currently just restarts sandbox. Use the correct sysreset type to tell it to shut down. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Convert to using a string ID for the scene titleSimon Glass3-20/+17
This is easier to deal with if it uses the existing string handling, since we will be able to use translations, etc. in the future. Update it to use an ID instead of a string. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Correct some header-file commentsSimon Glass1-3/+5
The use of Returns instead of @return still confuses me. Fix some problems that have crept in. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14binman: Correct coverage gap in controlSimon Glass1-1/+1
Add a pragma to deal with the code-coverage gap which drops binman down to 90% coverage. Fixes: de65b122a25 (tools: Fall back to importlib_resources on Python 3.6) Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14bdinfo: Correct use of assertionsSimon Glass1-30/+49
This test was written for the incorrect use of assertions. Update it to build with the previous approach, where tests fail at the first assertion. All assertion functions return 0 on success and non-zero on failure. They can be nested into functions simply by declaring a function that returns an int and using ut_assertok() to call it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2023-07-14Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spiTom Rini12-75/+932
- Add xtxtech spi-nor chip parts (Bruce Suen) - Add bcm63xx-hsspi driver fixes (William Zhang)
2023-07-14Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini14-118/+514
- mvebu: Thecus: Misc enhancement and cleanup (Tony) - mvebu: Add AC5X Allied Telesis x240 board support incl NAND controller enhancements for this SoC (Chris)
2023-07-14Merge tag 'u-boot-imx-20230713' of ↵Tom Rini162-2076/+5926
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20230713 ------------------- Merge for 2023.10. CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/16888
2023-07-13arm: mvebu: Remove unused alias from RC AC5X dtsChris Packham1-1/+0
The sar-reg0 alias was left over from an earlier iteration of the patches adding support for this board. Remove the unused alias. Fixes: 6cc8b5db40 ("arm: mvebu: Add RD-AC5X board") Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-07-13arm: mvebu: Add Allied Telesis x240 boardChris Packham8-1/+370
The x240 and SE240 are a series of L2+ switches from Allied Telesis. There are a number of them in the range but as far as U-Boot is concerned all the CPU block components are the same so there's only one board defined. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-07-13mx7dsabresd: Retrieve the second MAC address from fusesFabio Estevam1-0/+6
Currently, a random MAC address is assigned to eth1 in Linux. Fix this behavor by retrieving the second MAC address from the fuses. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13arm64: imx: imx8mp-beacon: Enable LTOAdam Ford1-0/+1
With LTO enabled, SPL shrinks about 10K and U-Boot shrinks about 30K. Signed-off-by: Adam Ford <aford173@gmail.com>
2023-07-13config: xea: Disable support for FAT file systemLukasz Majewski1-1/+0
On the XEA (imx287) system the FAT file system is not used neither in SPL nor u-boot proper. Hence, to save ~6KiB of u-boot.img size - it has been disabled. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-07-13config: xea: Disable support for boot methods EXTLINUX and VBELukasz Majewski1-0/+2
The XEA system (imx287 based) is not using support for EXTLINUX and VBE. As those configuration options have been enabled by default with modern Kconfig it is safe to explicitly disable them. After that change the u-boot.img size has been reduced by ~16 KiB. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-07-13mx23_olinuxino: Convert to CONFIG_DM_SERIALFabio Estevam3-1/+2
The conversion to CONFIG_DM_SERIAL is mandatory, so select this option. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13mx23evk: Convert to CONFIG_DM_SERIALFabio Estevam3-1/+3
The conversion to CONFIG_DM_SERIAL is mandatory, so select this option. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13mx28evk: Convert to CONFIG_DM_SERIALFabio Estevam3-2/+2
The conversion to CONFIG_DM_SERIAL is mandatory, so select this option. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13arm64: dts: verdin-imx8mp: add ctrl_sleep_moci# hogAndrejs Cainikovs1-0/+8
Drive CTRL_SLEEP_MOCI# high at boot (SPL) using a GPIO hog, this signal may be used to control some power-rails on the carrier board, therefore it should be set to high when the module is booting. To do this as early as possible is generally a good idea and the issue was noticed on the Yavia carrier board where it is needed to power the I2C EEPROM on the carrier board. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13configs: verdin-imx8mp: enable spl_gpio_hogAndrejs Cainikovs1-0/+1
Enable CONFIG_SPL_GPIO_HOG option to be able to control GPIO hogs from SPL. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13arm64: dts: verdin-imx8mm: add ctrl_sleep_moci# hogAndrejs Cainikovs1-0/+8
Drive CTRL_SLEEP_MOCI# high at boot (SPL) using a GPIO hog, this signal may be used to control some power-rails on the carrier board, therefore it should be set to high when the module is booting. To do this as early as possible is generally a good idea and the issue was noticed on the Yavia carrier board where it is needed to power the I2C EEPROM on the carrier board. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13configs: verdin-imx8mm: enable spl_gpio_hogAndrejs Cainikovs1-0/+1
Enable CONFIG_SPL_GPIO_HOG option to be able to control GPIO hogs from SPL. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13verdin-imx8mm/verdin-imx8mp: synchronise device trees with linuxMarcel Ziswiler10-337/+309
Synchronise device trees with linux v6.5-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13arm: dts: imx8mp-beacon-kit: Enable USB Power domainsAdam Ford1-2/+0
The USB Power domains should not have been removed as it causes the board to hang if the USB is started. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-07-13arm: dts: imx8mp: Sync the DT with kernel 6.4-rc4Adam Ford2-119/+386
Several changes have been made to the device tree in the kernel, so update that as well as the corresponding imx8mp-u-boot.dtsi files to prevent breaking the booting. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-07-13clk: imx8mp: Update clocks based on kernel 6.4-RC4Adam Ford2-3/+14
There are some newer clocks added to the kernel recently, so to fix prepare for resycing the device trees, update the clock list. Since there are some minor changes to the USB clocks, update which USB clocks are enabled to match with the upstream kernel as well. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx
2023-07-13board: colibri-imx8x: initialize snvsAndrejs Cainikovs1-0/+8
Initialize Secure Non-Volatile Storage, aka SNVS. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-07-13imx8mn-var-som: adjust PHY reset gpios according to hardware configurationHugo Villeneuve3-4/+82
For SOM with the EC configuration, the ethernet PHY is located on the SOM itself, and connected to the CPU ethernet controller. It has a reset line controlled via GPIO1_IO9. In this configuration, the PHY located on the carrier board is not connected to anything and is therefore not used. For SOM without EC configuration, the ethernet PHY on the carrier board is connected to the CPU ethernet controller. It has a reset line controlled via the GPIO expander PCA9534_IO5. The hardware configuration (EC) is determined at runtime by reading from the SOM EEPROM. To support both hardware configurations (EC and non-EC), adjust/fix the PHY reset gpios according to the hardware configuration read at runtime from the SOM EEPROM. This adjustement is done in U-Boot (OF_BOARD_FIXUP) and kernel (OF_BOARD_SETUP) device trees. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2023-07-13ARM: dts: imx: Fix eMMC boot on Data Modul i.MX8M Plus eDM SBCMarek Vasut1-0/+14
In case the i.MX8M Plus starts from eMMC BOOT1/BOOT2 HW partitions, the flash.bin container is stored at offset 0 from the start, that means the fitImage itb is at offset 0x2c0 instead of 0x300 sectors from the start. Handle this difference in custom spl_mmc_get_uboot_raw_sector() . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-07-13imx93_evk: defconfig: add adc supportLuca Ellero1-0/+1
iMX93 ADC features: - 4 channels - 12 bit resolution Signed-off-by: Luca Ellero <l.ellero@asem.it>
2023-07-13dm: adc: add iMX93 ADC supportLuca Ellero3-0/+299
This commit adds driver for iMX93 ADC. The driver is implemented using driver model and provides ADC uclass's methods for ADC single channel operations: - adc_start_channel() - adc_channel_data() - adc_stop() ADC features: - channels: 4 - resolution: 12-bit Signed-off-by: Luca Ellero <l.ellero@asem.it> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
2023-07-13ARM: imx: romapi: Fix signed integer bitwise ops misuseMarek Vasut1-11/+21
Bitwise operations on signed integers are not defined, replace them with per-call checks. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-07-13configs: imx8m: Prepare imx8m-venice boards for HAB supportTim Harvey5-0/+17
In order to enable HAB, FSL_CAAM, ARCH_MISC_INIT and SPL_CRYPTO should be enabled in Kconfig like other i.MX8M boards. This also needs to occur in the SPL so enable CONFIG_SPL_BOARD_INIT and add a void spl_board_init function which calls arch_misc_init to probe the CAAM driver. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-13board: gateworks: venice: switch to 2-bank dram configTim Harvey4-13/+16
Switch to a 2-bank dram config to properly support 4GiB. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-13board: phytec: phycore_imx8mm: Update lpddr4_timingCem Tenruh1-744/+742
Update RAM Timings for 2GB RAM based on DDR Controller Configuration Spreadsheet revision 22. Including the update of the refresh rate to workaround errata ERR050805. Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
2023-07-13mx8m: csf.sh: use vars for keys to avoid file edits when signingTim Harvey4-12/+43
The csf_spl.txt and csf_fit.txt templates contain file paths which must be edited for the location of your NXP CST generated key files. Streamline the process of signing an image by assigning unique var names to these which can be expended from env variables in the csf.sh script. The following vars are used: SRK_TABLE - full path to SRK_1_2_3_4_table.bin CSF_KEY - full path to the CSF Key CSF1_1_sha256_4096_65537_v3_usr_crt.pem IMG_KEY - full path to the IMG Key IMG1_1_sha256_4096_65537_v3_usr_crt.pem Additionally provide an example of running the csf.sh script. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>