summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-20imx: kontron-sl-mx8mm: Enable bootaux commandFrieder Schrempf
Enable the bootaux command in order to be able to load a binary into the M4 core when needed. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXTFrieder Schrempf
Move the environment from the board header to a separate text file and also drop those variables that are already set in env_default.h from the Kconfig options. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Enable environment in MMCFrieder Schrempf
In case we boot from SD card or eMMC, we also want to load the environment from the according boot device. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Add redundant environment and SPI NOR partitionsFrieder Schrempf
Enable the redundant environment feature to allow falling back in case of storage corruption. The partition layout for the SPI NOR device is added to the devicetree. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Enable MTD commandFrieder Schrempf
Enable the MTD command to be used for the SPI NOR on the SoM. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Increase CONFIG_SYS_CBSIZE to 2KFrieder Schrempf
This allows using the command line with longer lines like large scripts in env variables. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Remove custom board_boot_order() workaroundFrieder Schrempf
Nowadays detecting the SPI NOR as boot device from the ROMAPI is fixed and works even if the SPI NOR is used as fallback boot device. Therefore we don't need this workaround anymore. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPLFrieder Schrempf
This was initially enabled, but got accidentally dropped while migrating Kconfig options and resyncing the defconfig in: commit 9802154a94d6 ("configs: Resync with savedefconfig") Let's enable this again to be able to boot from SPI NOR. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: kontron-sl-mx8mm: Remove LVDS board type and devicetreesFrieder Schrempf
The display isn't and won't be used in U-Boot. Also the display setup is not yet supported in mainline Linux, so even for cases where the U-Boot devicetree is passed to the kernel there is currently no use for this configuration. Selecting the proper configuration in the kernel FIT image automatically depending on the detected hardware can be handled by a script in the environment. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-10-20imx: imx6ul: kontron-sl-mx6ul: Sync devicetreesFrieder Schrempf
Sync the devicetrees with Linux and adjust the board names. Signed-off-by: Frieder Schrempf <[email protected]>
2022-10-20imx: imx6ul: kontron-sl-mx6ul: Migrate to use CONFIG_EXTRA_ENV_TEXTFrieder Schrempf
Move the environment from the board header to a separate text file and also drop those variables that are already set in env_default.h from the Kconfig options or are not needed anymore. Signed-off-by: Frieder Schrempf <[email protected]>
2022-10-20imx: imx6ul: kontron-sl-mx6ul: Select correct boot and env deviceFrieder Schrempf
Instead of checking both, SPI NOR and MMC for loading U-Boot proper and the environment, implement a way to detect the actual boot device even if the BootROM doesn't report it and we can't rely solely on the fuse settings, as by default we use MMC as primary boot device and boot from SPI NOR via the secondary fallback device (EEPROM Recovery Mode). Signed-off-by: Frieder Schrempf <[email protected]>
2022-10-20imx: imx6ul: kontron-sl-mx6ul: Fix CONFIG_ENV_SPI_BUSFrieder Schrempf
The SPI NOR is on ECSPI1 so CONFIG_ENV_SPI_BUS should be 1 to detect the environment on the SPI NOR. Signed-off-by: Frieder Schrempf <[email protected]>
2022-10-20imx: imx6ul: kontron-sl-mx6ul: Enable migrated Kconfig optionsFrieder Schrempf
The board support was merged at the same time as some Kconfig options for SPL were migrated/renamed. As a result some essential features like serial output, MMC support, etc. are currently missing. Fix this by enabling the required options. Signed-off-by: Frieder Schrempf <[email protected]>
2022-10-20Makefile: Make flash.bin target available for all platformsFrieder Schrempf
There is no reason for restricting the use of the flash.bin target to the i.MX8 platform. Others can benefit from this as well. Signed-off-by: Frieder Schrempf <[email protected]>
2022-10-20board: gateworks: venice: rename eeprom_initTim Harvey
rename eeprom_init to avoid build failure when using CMD_EEPROM. Signed-off-by: Tim Harvey <[email protected]>
2022-10-20arm: dts: imx8mm-venice-gw7902: add LTE modem gpiosTim Harvey
Add missing LTE_PWR# and LTE_RST gpio pinmux. Signed-off-by: Tim Harvey <[email protected]> Acked-by: Peng Fan <[email protected]>
2022-10-20imx8*_venice_defconfig: configure default MMC env deviceTim Harvey
When booting from USB/SDP mmc_get_env_dev() returns CONFIG_SYS_MMC_ENV_DEV as the MMC env device (while booting from MMC will call board_mmc_get_env_dev() to get this). Configure CONFIG_SYS_MMC_ENV_DEV for SDHC3 (devno=2) as all Gateworks Venice boards use SDHC3 as eMMC so that persistent env works when booting from USB/SDP. Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2022-10-20Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
2022-10-20Merge tag 'clk-2023.01' of https://source.denx.de/u-boot/custodians/u-boot-clkTom Rini
Clock patches for 2023.01 This contains various fixes (some long overdue) for the next release.
2022-10-20Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
Beside some rather unexciting sync of the DTs from the kernel tree, and some Kconfig cleanup, there are some improvements for the ARMv5 Allwinner family, to support boards with the F1C200s (64MB DRAM) better. We will get actual board support as soon as the DTs have passed the Linux review process. There is also support for the X96 Mate TV Box, featuring the H616 SoC and a full 4GB of DRAM. Also we found the secret to enable SPI booting on the H616 (pin PC5 must be pulled to GND), so the SPI boot support patch is now good to go. Passed the gitlab CI, plus briefly tested on Pine64-LTS, LicheePi Nano, X96 Mate and OrangePi Zero.
2022-10-20riscv: ae350: Check firmware_fdt_addr headerRick Chen
Check firmware_fdt_addr header to see if it is a valid fdt blob. Signed-off-by: Rick Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2022-10-20riscv: andes_plic.c: use modified IPI schemeYu Chien Peter Lin
The IPI scheme in OpenSBI has been updated to support 8-core AE350 platform, the plicsw configuration needs to be modified accordingly. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-10-20riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+Bin Meng
Since OpenSBI commit bf3ef53bb7f5 ("firmware: Enable FW_PIC by default"), OpenSBI runs directly at the load address without any code movement. This causes the SPL version of QEMU 'virt' U-Boot does not boot Linux kernel anymore. In that case, OpenSBI is loaded and runs at 0x81000000, and it creates a 512KiB PMP window from that address. When booting the Linux kernel, moving kernel to its linking address 0x80200000 overlaps the PMP window, and a PMP access failure is raised. Update SPL_OPENSBI_LOAD_ADDR to load OpenSBI to a safe address. Reported-by: Yangjie Zhang <[email protected]> Signed-off-by: Bin Meng <[email protected]> Tested-by: Yangjie Zhang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-10-20k210: fix k210_pll_calc_config()Heinrich Schuchardt
The k210 driver is selected by sandbox_defconfig. Building the sandbox on 32bit systems fails with: test/dm/k210_pll.c: In function ‘dm_test_k210_pll_calc_config’: include/linux/bitops.h:11:38: warning: left shift count >= width of type [-Wshift-count-overflow] 11 | #define BIT(nr) (1UL << (nr)) | ^~ test/dm/k210_pll.c:36:54: note: in expansion of macro ‘BIT’ 36 | error = abs((error - BIT(32))) >> 16; | ^~~ Use the BIT_ULL() macro to create a u64 value. Replace abs() by abs64() to get correct results on 32bit system Apply the same for the unit test. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2022-10-20riscv: support building double-float modulesHeinrich Schuchardt
The riscv32 toolchain for GCC-12 provided by kernel.org contains libgcc.a compiled for double-float. To link to it we have to adjust how we build U-Boot. As U-Boot actually does not use floating point at all this should not make a significant difference for the produced binaries. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Rick Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2022-10-20cmd/sbi: user friendly short textsHeinrich Schuchardt
In the sbi command use the same short texts for the legacy extensions as the SBI specification 1.0.0. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-10-20cmd/sbi: error message for failure to get spec versionHeinrich Schuchardt
If calling 'Get SBI specification version' fails, write an error message and return CMD_RET_FAILURE. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-10-20cmd/sbi: format RustSBI version numberHeinrich Schuchardt
The SBI command can print out the version number of the SBI implementation. Choose the correct output format for RustSBI. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-10-19clk: update clk_clean_rate_cache to use private clk structPatrick Delaunay
In clk_clean_rate_cache, clk->rate should update the private clock struct, in particular when CCF is activated, to save the cached rate value. When clk_get_parent_rate is called, the cached information is read from pclk->rate, with pclk = clk_get_parent(clk). As the cached is read from private clk data, the update should be done also on it. Fixes: 6b7fd3128f7 ("clk: fix set_rate to clean up cached rates for the hierarchy") Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Link: https://lore.kernel.org/r/20220620153717.v2.1.Ifa06360115ffa3f3307372e6cdd98ec16759d6ba@changeid Link: https://lore.kernel.org/r/20220712142352.RESEND.v2.1.Ifa06360115ffa3f3307372e6cdd98ec16759d6ba@changeid/
2022-10-19rockchip: clk: pll: Fix constant typoMichal Suchanek
Fixes: bbda2ed584 ("rockchip: clk: pll: add common pll setting funcs") Signed-off-by: Michal Suchanek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-10-19clk: change return type of clk_get_parent_rate from long long to ulongMichal Suchanek
All functions getting and setting clock rate use ulong for rate, only clk_get_parent_rate is an exception. Change the return value to match other clock rate funcrions. Most users directly assign the rate to unsigned long anyway, and the few users that use u64 (not s64) multiply the rate so they may need the extra bits for the result in their use case. Fixes: 4aa78300a0 ("dm: clk: Define clk_get_parent_rate() for clk operations") Signed-off-by: Michal Suchanek <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-10-19suniv: add UART1 supportAndre Przywara
Some boards with the Allwinner F1C100s family SoCs use UART1 for its debug UART, so define the pins for the SPL and the pinmux name and mux value for U-Boot proper. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2022-10-19suniv: move SKIP_LOWLEVEL_INIT_ONLY into KconfigAndre Przywara
So far we stated the lack of a lowlevel() init function for the Allwinner F1C100s board by defining the respective SKIP_* symbol in the board's defconfig. However we don't expect any *board* to employ such low level code, so expect this to be never used for the ARMv5 Allwinner SoCs. Select the appropriate symbols in the Kconfig, so that we can remove them from the defconfig, and avoid putting them in future defconfigs for other boards. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2022-10-19sunxi: fix 32MB load address layoutAndre Przywara
The default load addresses for the various payloads (kernel, DT, ramdisk) on systems with just 32MB of DRAM have some issues: For a start the preceding comment doesn't match the actual values: apparently they were copied from the 64MB S3 layout, then halved, but since 0x5 is NOT the half of 0x10, they don't match up. Also those projected maximum sizes are quite restrictive: it's not easy to build a compressed kernel image with just 4MB. The only defconfig in mainline Linux that supports the F1C100s (the only 32MB user so far) creates a 6MB compressed / 15MB uncompressed kernel. Rearrange the default load addresses to accommodate such a kernel: we allow an 7MB/16MB kernel, and up to 5MB of ramdisk, stuffing the smaller binaries like the DTB towards the end, just before the relocated U-Boot. Shrink the size for DTB and scripts on the way, there is no need for allowing up to 512K for them. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2022-10-19sunxi: Kconfig: introduce SUNXI_MINIMUM_DRAM_MBAndre Przywara
Traditionally we assumed that every Allwinner board would come with at least 256 MB of DRAM, and set our DRAM layout accordingly. This affected both the default load addresses, but also U-Boot's own address expectations (like being loaded at 160 MB). Some SoCs come with co-packaged DRAM, but only provide 32 or 64MB. So far we special-cased those *chips*, as there was only one chip per DRAM size. However new chips force us to take a more general approach. Introduce a Kconfig symbol, which provides the minimum DRAM size of the board. If nothing else is specified, we use 256 MB, and default to smaller values for those co-packaged SoCs. Then select the different DRAM maps according to this new symbol, so that different SoCs with the same DRAM size can share those definitions. Inspired by an idea from Icenowy. This is just refactoring: compiled for all boards before and after this patch: the binaries were identical. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2022-10-19configs: sunxi: licheepi_nano: enable D-CacheIcenowy Zheng
As the compile error when D-Cache is enabled is gone, we can have D-Cache enabled now. Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-10-19sunxi: fix SUNIV build when enabling D-CacheIcenowy Zheng
The enable_caches function in architecture-specific board code is only necessary for V7A CPUs, code for both V8A and ARM926 have already declared this function. Only provide our implementation of enable_caches() for V7A CPUs. Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-10-19sunxi: defconfig: Add X96 Mate TV boxAndre Przywara
The X96 Mate TV box is a TV box with the Allwinner H616 SoC. It is available with up to 4GB of DRAM and 64GB eMMC. The DRAM chips require a different configuration when compared to the OrangePi Zero2, we must not use read/write training and write leveling. Add a defconfig for the box, so that we can easily build U-Boot for it. We synced the .dts file already from the kernel tree. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2022-10-19arm: dts: rockchip: rk356x: sync with Linux 6.0FUKAUMI Naoki
prepare for rk3566 based board Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: jerry: Enable RESET driverSimon Glass
At present the display does not work since it needs the reset driver to operate. Fix this by enabling it. Signed-off-by: Simon Glass <[email protected]> Fixes: cd529f7ad62 ("rockchip: video: edp: Add missing reset support") Fixes: 9749d2ea29e ("rockchip: video: vop: Add reset support") Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: migrate to u-boot-rockchip-spi.binQuentin Schulz
Now that a single binary containing TPL/SPL correctly formatted for SPI flashes and U-Boot proper, can be generated by binman, let's do it. Also update the documentation to tell the user to use this newly generated file instead of manually generating and flashing the binaries. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: migrate to u-boot-rockchip.binQuentin Schulz
The offset of the SPL payload on Puma is different than for other Rockchip devices in that it is stored at offset 256K instead of much further away in the MMC. Flashing one binary instead of two at different offsets is much more user friendly so let's migrate to it by modifying the offset in the Puma specific Device Tree. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: migrate to TPLQuentin Schulz
Depending on the toolchain used to compile the SPL for Puma RK3399-Q7 module, the board does not boot because the resulting binary is too big to fit in SRAM. Let's add a TPL so that there's no need to fiddle with or hack the defconfig to have a working bootloader. This follows what's been done for the majority of other RK3399-based boards. See the original commit for the first migrations: bdc00080111f "rockchip: rk3399: update defconfig for TPL" Unfortunately, the offset in SPI-NOR for U-Boot proper needs to be modified, since the move from SPL to TPL+SPL for idbloader.img (and the "only the first 2KB per 4KB blocks are written" "hack" for rkspi format) increased the size above 256KB. Let's move it to 512KB to, hopefully, be safe. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: remove useless CONFIG_SYS_SPI_U_BOOT_OFFSQuentin Schulz
The SPL payload offset when booting from SPI defaults to CONFIG_SYS_SPI_U_BOOT_OFFS but can be overridden by u-boot,spl-payload-offset. The Device Tree for Puma Haikou has this property so there's no need to have this one option in the defconfig, especially since they are not in sync and therefore confusing. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: load environment from same medium as one used to load ↵Quentin Schulz
U-Boot proper Chances are when one boots U-Boot proper from a given storage medium, they want the same medium to be used to load and store the environment. This basically allows to have completely separate U-Boot (TPL/SPL/U-Boot proper/environment) per storage medium which is convenient when working with recovery from SD-Card as one would just need to insert a properly configured SD-Card into the device to have access to their whole debug setup. No fallback mechanism is provided as to not dirty other storage medium environment by mistake. However, since arch_env_get_location() is called by env_init() which is part of the pre-relocation process, a valid, non-ENVL_UNKNOWN, value shall be returned otherwise the relocation fails with the following message: initcall sequence 00000000002866c0 failed at call 0000000000256b34 (err=-19) This valid, non-ENVL_UNKNOWN, value is ENVL_NOWHERE which requires to always select CONFIG_ENV_IS_NOWHERE otherwise this work-around does not work. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: allow loading environment from SPI-NOR flashQuentin Schulz
There's a SPI-NOR flash available from which SPL and U-Boot proper can be booted, it makes sense to also allow this medium to store U-Boot environment so let's enable it. The Device Tree advertises a max frequency of 50MHz so let's set the config option appropriately. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: load environment from same MMC as used for loading ↵Quentin Schulz
U-Boot proper Automatically detect which MMC device (SD-Card or eMMC) was used to load U-Boot proper and load the environment from that MMC device instead of a hardcoded one. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: remove unused default ENV_OFFSET for SPI flashesQuentin Schulz
CONFIG_ENV_OFFSET is set in the defconfig to a different value already so this isn't used. Let's remove it as to not confuse users. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-10-19rockchip: puma-rk3399: allow non-SD-Card-loaded SPL to load U-Boot proper ↵Quentin Schulz
from SD-Card Trying to load U-Boot proper from SPL when SPL was not loaded from SD-Card is currently not working because the SDMMC pins aren't muxed correctly. It is assumed the BootROM is doing this for us when booting from SD-Card hence why it's not needed when booting TPL/SPL from SD-Card. The pinctrl properties are removed from the SPL DT property removal list and the pinctrl configuration nodes made available in the SPL DT, in addition to the pull-up configurations to allow loading U-Boot proper from SD-Card as a fallback mechanism for SPI-NOR and eMMC. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>