summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-12rockchip: rk356x-u-boot: Set max-frequency prop in sdhci nodeJonas Karlman
Most board device trees for RK356x set max-frequency = <200000000> in the sdhci node, some boards like Quartz64 do not. This result in an error message due to sdhci driver trying to set a clock rate of 0 instead of the max-frequency value. rockchip_sdhci_probe clk set rate fail! Fix this by setting a common max-frequency in rk356x-u-boot.dtsi. A patch to set default max-frequency of sdhci node in linux is planned. Also remove the forced status = "okay" for the sdhci and sdmmc0 nodes, boards already set correct state for these nodes. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12clk: rockchip: rk3568: Add dummy support for GMAC speed clocksJonas Karlman
Pine64 Quartz64 boards DT reference SCLK_GMAC1_RGMII_SPEED in the assigned-clocks property of the gmac1 node. This result in a ENOENT error when driver core tries to set a parent for this clock. The clock speed in rgmii/rmii mode is changed using clk_set_rate of the tx_rx clock and not using clk_set_parent of the speed clock. Add dummy support for SCLK_GMAC1_RGMII_SPEED and similar clocks to clk driver to allow a driver for gmac node to probe. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12clk: rockchip: rk3568: Include UART clocks in SPLJonas Karlman
The clock driver for RK3568 does not include support for UART clocks in SPL. This result in the following message with high enough loglevel. ns16550_serial serial@fe660000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 Fix this by including support for UART clocks in SPL. Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver") Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Eugen Hristev <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12clk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_divJonas Karlman
The field for clk_cpll_div_25m_div in CRU_CLKSEL_CON81 is 6 bits wide, not 5 bits wide as currently defined in CPLL_25M_DIV_MASK. Fix this and the assert so that CPLL_25M can be assigned a 25 MHz rate. Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver") Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12clk: rockchip: rk3568: Fix clk selection in rk3568_pwm_get_clkDamon Ding
Fix use of wrong clk selection for CLK_PWM1 on RK3568. Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver") Signed-off-by: Damon Ding <[email protected]> Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: cru: Enable cpu info support for rk3568Anton
Add cru structure definition in head file to support cpu_info driver. Series-version: 2 Series-changes: 2 Format the patch header, add commit message and signature. Signed-off-by: Anton <[email protected]> Signed-off-by: Kever Yang <[email protected]>
2023-08-12video: avoid build failure on veyron boardAlvaro Fernando García
533ad9dc avoided an overflow but causes compilation failure on 32bit boards (eg. veyron speedy) this commit uses div_u64 which has a fallback codepath for 32bit platforms Signed-off-by: Alvaro Fernando García <[email protected]> Tested-by: Simon Glass <[email protected]> # chromebook_jerry Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: rk3568: Add EmbedFire Lubancat 2 supportAndy Yan
LubanCat2 is a rk3568 based SBC from EmbedFire. Specification: - Rockchip rk3568 - LPDDR4/4X 1/2/4/8 GB - TF scard slot - eMMC 8/32/64/128 GB - Gigabit ethernet x 2 - HDMI out - USB 2.0 Host x 1 - USB 2.0 Type-C OTG x 1 - USB 3.0 Host x 1 - Mini PCIE interface for WIFI/BT module - M.2 key for 2280 NVME - 40 pin header The dts file is sync from linux mainline. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: rv1126: Enable fdtoverlay supportJagan Teki
Add fdtoverlay_addr_r and enable OF_LIBFDT_OVERLAY for the use of DT overlay in RV1126. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: dts: rk3328: rock64: Align spi flash entryPeter Robinson
Align the SPI flash entry with upstream. There's no need to diverge here. Signed-off-by: Peter Robinson <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: dts: rk3328: Add rng details to u-boot.dtsiPeter Robinson
Add the rk3328 rng details to the u-boot.dtsi and enable the RNG on the Rock64 to be able to provide a random seed via UEFI. Signed-off-by: Peter Robinson <[email protected]> (Fix typo message) Signed-off-by: Kever Yang <[email protected]>
2023-08-12config: rock64: enable efuse for stable mac addrPeter Robinson
Enable the rockchip efuse driver on the Rock64 to provide a stable ethernet address on the device. Signed-off-by: Peter Robinson <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12pci: rockchip: Release resources on failing probeJonas Karlman
The PCIe driver for RK3399 is affected by a similar issue that was fixed for RK35xx in the commit e04b67a7f4c1 ("pci: pcie_dw_rockchip: release resources on failing probe"). Resources are not released on failing probe, e.g. regulators may be left enabled and the ep-gpio may be left in a requested state. Change to use regulator_set_enable_if_allowed and disable regulators after failure to keep regulator enable count balanced, ep-gpio is also released on regulator failure. Also add support for the vpcie12v-supply, remove unused include and check return value from dev_read_addr_name. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: rk3399: remove duplicate call to regulators_enable_boot_onQuentin Schulz
An earlier commit makes the common SPL code call regulators_enable_boot_on and regulators_enable_boot_off before iterating over possible boot media for U-Boot proper. There is therefore no need to do this in the rk3399-specific code, so let's remove it. Cc: Quentin Schulz <[email protected]> Tested-by: Xavier Drudis Ferran <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Jagan Teki <[email protected]>
2023-08-11bootstd: cros: Add ARM supportSimon Glass
Support booting ChromiumOS on ARM devices using FIT. Add an entry into the boot implementation which does not require a command line. This can be expanded over time as the bootm code is refactored. Signed-off-by: Simon Glass <[email protected]>
2023-08-11bootstd: Add a command to read all files for a bootflowSimon Glass
Some bootflows (such as EFI and ChromiumOS) delay reading the kernel until it is needed to boot. This saves time when scanning and avoids needing to allocate memory for something that may never be used. To permit reading of these files, add a new 'bootflow read' command. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: Allow display of the x86 setup informationSimon Glass
Provide an option to dump this information if available. Move the funciion prototype to the common x86 header. Allow the command line to be left out since 'bootflow info' show this itself and it is not in the correct place in memory until the kernel is actually booted. Fix a badly aligned heading while we are here. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Split up reading info and kernelSimon Glass
Use the two new functions to separate reading of the ChromiumOS info from the partition from actually reading the kernel and booting it. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Add a function to read a kernelSimon Glass
The code to read the ChromiumOS information from the partition is currently all in one function. Create a new function which reads the kernel, assuming that the metadata has been parsed. For now this function is not used. Future work will plumb it in. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Add a function to read info from partitionSimon Glass
The code to read the ChromiumOS information from the partition is currently all in one function. It reads the entire kernel, which is unnecessary unless it is to be booted. Create a new function which reads just the minimum required data from the disk, then obtains what it needs from there. For now this function is not used. Future work will plumb it in. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: Add private bootmeth data to the bootflowSimon Glass
Some bootmeths need to store their own information related to the bootflow, in addition to the generic information in struct bootflow. Add a pointer for this. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Add private info for ChromiumOSSimon Glass
Create a new private structure to hold information gleaned from the disk. This will allow separation between reading of the bootflow information and (later) reading the whole kernel. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Add docs for the kernel layoutSimon Glass
Provide brief documentation about the ChromiumOS kernel layout. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: Move common zimage functions to bootm.hSimon Glass
We want to avoid using #ifdefs around header files and in the code. It makes sense to collect the various functions used for loading images into a single header which can be included by all architectures. The best place for this is the arch-neutral bootm.h header, so use that. Move some zimage functions into this bootm.h header. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Simplify setup and cmdline expressionsSimon Glass
Create a common base from which the other parts are offset and make all of the offsets related to that. This makes the code a little easier to read. Use X86_ prefixes for the two values which are x86-specific. Drop OFFSET_BASE since it is available in a header field. Drop the unnecessary 'start' variable too. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Decode some kernel preamble fieldsSimon Glass
Decode the kernel start and size using the structures provided. This accesses the same data, just in a cleaner way. Add some logging for some of the fields in the kernel preamble. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Support a kernel on either partitionSimon Glass
ChromiumOS allows a kernel to be on either partition 2 or 4. Add support for scanning both and using the first one we find with a suitable signature. Record the partition which is used. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Bring in some ChromiumOS structuresSimon Glass
Add a header file with structures for booting ChromiumOS, taken from the vboot tree. Using these makes it easier to understand the code. Note that the code style has not been updated for U-Boot, with use of uint64_t, __attribute__((packed)) and one comment-style nit. This should make it easier to keep the code in sync. It was taken from commit: 5b8596ce ("2sha256_arm: Fix data abort issue") Update the CHROMEOS string to use the defined values. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Move partition reading into a functionSimon Glass
Move the code which reads a partition into its own function. Add a constant for the number of bytes to 'probe' at the start of the partition. Signed-off-by: Simon Glass <[email protected]>
2023-08-10bootstd: cros: Correct reporting of I/O errorsSimon Glass
Return -EIO when the read failed, rather than the number of blocks read. Signed-off-by: Simon Glass <[email protected]>
2023-08-10Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini
- cmd: cyclic: Remove duplicate command name in help text (Alexander) - ftwdt010: need to reset watchdog in ftwdt010_wdt_start() (Sergei)
2023-08-10Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
+ Add USB host support on VisionFive2 board + Enable SPI flash support on VisionFive2 board + Enable Random Number Generator in RISC-V QEMU board + Display new SBI extension + Add SPL_ZERO_MEM_BEFORE_USE Kconfig for jh7110 L2 LIM (Loosely-Integrated Memory)
2023-08-10watchdog: ftwdt010: need to reset watchdog in ftwdt010_wdt_start()Sergei Antonov
ftwdt010_wdt_start() has to call ftwdt010_wdt_reset() after setting-up the timeout in the same fashion ftwdt010_wdt_expire_now() does it. Without this patch the "wdt start <ms>" command does not actually start the watchdog timer until the "wdt reset" command is executed. Signed-off-by: Sergei Antonov <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-08-10cmd: cyclic: Remove duplicate command name in help textAlexander Dahl
Function 'cmd_usage()' already prints one command in usage before printing out the help text given to the U_BOOT_CMD_WITH_SUBCMDS macro. Wrong previous output: Usage: cyclic cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function cyclic list - list cyclic functions Signed-off-by: Alexander Dahl <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-08-10riscv: cpu: jh7110: Select SPL_ZERO_MEM_BEFORE_USEShengyu Qu
Add Kconfig item for Starfive JH7110 to select SPL_ZERO_MEM_BEFORE_USE. Signed-off-by: Bo Gan <[email protected]> Signed-off-by: Shengyu Qu <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10riscv: Add SPL_ZERO_MEM_BEFORE_USE implementationShengyu Qu
Add the actual support code for SPL_ZERO_MEM_BEFORE_USE and remove existing Starfive JH7110's L2 LIM clean code, since existing code has following issues: 1. Each hart (in the middle of a function call) overwriting its own stack and other harts' stacks. (data-race and data-corruption) 2. Lottery winner hart can be doing "board_init_f_init_reserve", while other harts are in the middle of zeroing L2 LIM. (data-race) Signed-off-by: Bo Gan <[email protected]> Signed-off-by: Shengyu Qu <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10riscv: Kconfig: Add SPL_ZERO_MEM_BEFORE_USEShengyu Qu
Add a Kconfig item to allow SPL to clear stack/GD/malloc area before using them. Signed-off-by: Bo Gan <[email protected]> Signed-off-by: Shengyu Qu <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10configs: starfive: Enable environment in SPI flash supportShengyu Qu
On Starfive Visionfive 2, the u-boot environment settings are saved to on-board SPI flash. Enable relative configs by default and set offset and size according to upstream linux dts. Signed-off-by: Shengyu Qu <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10configs: riscv: starfive: Add VF2 PCIe USB3 XHCI supportMinda Chen
Add XHCI_PCI to enable usb3-host functions. Also add usb command and keyboard config. Signed-off-by: Minda Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10riscv: starfive: Add SYS_CACHE_SHIFT_6 to enable SYS_CACHELINE_SIZEMinda Chen
Some device driver need SYS_CACHELINE_SIZE macro. Add StarFive SYS_CACHE_SHIFT_6 to enable it. Signed-off-by: Minda Chen <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10riscv: dts: starfive: Enable pcie0 dts nodeMinda Chen
In StarFive VF2 board. pcie0 connect to VTI usb controller. Enable it to support usb host. Signed-off-by: Minda Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10pci: plda: Get correct ECAM offset in multiple PCIe RC caseMinda Chen
Get the correct ECAM offset and record the secondary bus number in Multiple RC case. Signed-off-by: Minda Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10cmd/sbi: display new extensionsHeinrich Schuchardt
The SBI specification v2.0-rc2 defines new extensions: * Nested Acceleration Extension (NACL) * Steal Time Accounting (STA) Allow the sbi command to display these. Add missing implementation IDs. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-08-10riscv: qemu: imply CONFIG_DM_RNGHeinrich Schuchardt
The EFI_RNG_PROTOCOL is needed for Linux' KASLR. QEMU can provide a virtio-rng device to emulate a hardware random number generator which is supported by our virtio_rng driver. Enabling CONFIG_DM_RNG will enable CONFIG_VIRTIO_RNG and CONFIG_EFI_RNG_PROTOCOL by default too. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-08-09Merge tag 'x86-pull-20230809' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-x86 - x86: Fixes for distro booting - x86: Move some boards to text environment
2023-08-09Merge branch '2023-08-09-misc-cleanups' into nextTom Rini
- Rework the arch linker scripts to be consistent for all, support Kconfig fragments in the board directory and fix some Kconfig options that were hex-type by default of 0 not 0x0.
2023-08-09x86: qemu-x86: Convert to text environmentSimon Glass
Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> # Intel Edison Reviewed-by: Bin Meng <[email protected]>
2023-08-09x86: qemu: Add required linux/sizes.h includeSimon Glass
These files rely on the config.h file provided this include. Add it explictily so we can move to a text environment. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> # Intel Edison Reviewed-by: Bin Meng <[email protected]>
2023-08-09x86: efi-x86_payload: Convert to text environmentSimon Glass
Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> # Intel Edison Reviewed-by: Bin Meng <[email protected]>
2023-08-09x86: efi-x86_app: Convert to text environmentSimon Glass
Use the common include. Drop the unnecessary changes, since missing stdio drivers will be ignored. Drop everything from the config.h file. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> # Intel Edison Reviewed-by: Bin Meng <[email protected]>