aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-08-15Merge tag 'efi-2023-10-rc3' of ↵WIP/15Aug2023Tom Rini42-144/+185
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-10-rc3 Documentation: * Correct description of board_get_usable_ram_top * Add partition API to HTML documentation * Describe lmb_is_reserved * doc/sphinx/requirements.txt: Bump certifi up UEFI: * Fix efi_add_known_memory * Make distro_efi_boot() static Other: * Correct return type board_get_usable_ram_top
2023-08-15common: return type board_get_usable_ram_topHeinrich Schuchardt35-35/+35
board_get_usable_ram_top() returns a physical address that is stored in gd->ram_top. The return type of the function should be phys_addr_t like the current type of gd->ram_top. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-15efi_loader: fix efi_add_known_memory()Heinrich Schuchardt1-1/+1
In efi_add_known_memory() we currently call board_get_usable_ram_top() with an incorrect value 0 of parameter total_size. This leads to an incorrect value for ram_top depending on the code in board_get_usable_ram_top(). Use the value of gd->ram_top instead which is set before relocation by calling board_get_usable_ram_top(). Fixes: 7b78d6438a2b ("efi_loader: Reserve unaccessible memory") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-15bootmeth: efi: Make distro_efi_boot() staticBin Meng1-1/+1
As it is only called in bootmeth_efi.c Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-15doc: add partition API to HTML documentationHeinrich Schuchardt3-98/+119
* Convert comments in part.h to Sphinx style. * Create documentation page for the partition API. * Add the partition API page to the API index page. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-15doc: description of board_get_usable_ram_top()Heinrich Schuchardt1-5/+10
Improve the description of function board_get_usable_ram_top(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-15lmb: description lmb_is_reserved, lmb_is_reserved_flagsHeinrich Schuchardt1-3/+18
* provide a description for function lmb_is_reserved() * improve the description of funciton lmb_is_reserved_flags() Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-15doc/sphinx/requirements.txt: Bump certifi upTom Rini1-1/+1
Upgrade certifi to the latest version, to remove e-Tugra from the root store. Link: https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/C-HrP1SEq1A?pli=1 Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-15Merge tag 'ubi-updates-for-v2023.10-rc3' of ↵Tom Rini1-1/+1
https://source.denx.de/u-boot/custodians/u-boot-ubi ubi changes for v2023.10-rc3 Fix: - Fix 'ubi list' command arguments parsing from Dmitry
2023-08-15Merge tag 'i2c-updates-for-v2023.10-rc3' of ↵Tom Rini1-0/+42
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c updates for v2023.10-rc3 Bugfixes: - mvtwsi driver fix stuck "bus error" state from Sam
2023-08-15cmd: ubi: Fix 'ubi list' command arguments parsingDmitry Dunaev1-1/+1
This fixes allowed argc variable value for arguments parsing Fixes: 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command") Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru>
2023-08-15i2c: mvtwsi: reset controller if stuck in "bus error" stateSam Edwards1-0/+42
The MVTWSI controller can act either as a master or slave device. When acting as a master, the FSM is driven by the CPU. As a slave, the FSM is driven by the bus directly. In what is (apparently) a safety mechanism, if the bus transitions our FSM in any improper way, the FSM goes to a "bus error" state (0x00). I could find no documented or experimental way to get the FSM out of this state, except for a controller reset. Since U-Boot only uses the MVTWSI controller as a bus master, this feature only gets in the way: we do not care what happened on the bus previously as long as the bus is ready for a new transaction. So, when trying to start a new transaction, check for this state and reset the controller if necessary. Note that this should not be confused with the "deblocking" technique (used by the `i2c reset` command), which involves pulsing SCL repeatedly if SDA is found to be held low, in an attempt to force the bus back to an idle state. This patch only resets the controller in case something else had previously upset it, and (in principle) results in no externally-observable change in behavior. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-08-14Merge tag 'u-boot-rockchip-20230814' of ↵WIP/14Aug2023Tom Rini25-119/+1085
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Add board: rk3568 EmbedFire Lubancat 2 - Fixes for rk3568 clock and pinctrl; - Fixes for rk3308 clock and uart; - rk3328 rock64 updates; - Video fix on veyron board;
2023-08-14Merge tag 'video-20230814' of ↵Tom Rini4-2/+7
https://source.denx.de/u-boot/custodians/u-boot-video - fix NULL dereference in vidconsole_measure() - fix simplefb format for raspberrypi-4b - fix typo in Kconfig
2023-08-14pinctrl: rockchip: Fix drive and input schmitt on RK3568Jonas Karlman1-25/+31
On RK3568 most pins have a configurable drive strength of level 0-5 and some pins level 0-11. When rk3568_set_drive is called with a strength value above 7 the drv value written to reg may overflow into the write enable bits, resulting in a bad configuration. This cause e.g. ethernet PHY on Radxa CM3-IO board not to work after drive is configured according to the device tree. Could not get PHY for ethernet@fe010000: addr 0 Level 6-11 can be configured using a second reg for some pins, however the drv value is reused resulting in lower 6 bits being written to reg. Input schmitt is configured in 2-bit fields on RK3568 compared to earlier generation and 2'b10 should be used to enable input schmitt. Change to use regmap_update_bits with a rmask to fix the overflow issue and closer match the linux driver. Bit shift the drv value used for the second reg to configure drive strength level 6-11. Also write correct values for input schmitt setting. Fixes: 1977d746aa54 ("rockchip: rk3568: add rk3568 pinctrl driver") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-13rpi: set the correct parameter for simple framebuffer nodeMeng Li1-0/+2
When raspberrpi-4b platform boots up, there are 2 sets of same bootup log displayed on HDMI monitor screen, it looks like the screen is split into 2 parts. The root cause is that video format of u-boot is different from kernel. The fixing "a8r8g8b8" video format is used in u-boot, but "r5g6b5" video format from framebuffer node is used in kernel image. In order to avoid weird display status on screen, it needs to set the correct parameter for simple framebuffer node even if it has existed. Signed-off-by: Meng Li <Meng.Li@windriver.com>
2023-08-13bcm2835: Add simiple-framebuffer for use with fkmsJason Wessel1-0/+3
When the fkms dtb overlay is used only the simple-framebuffer is presented as a usable video display. So, add "simple-framebuffer" compatible to enable video driver bcm2835. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Meng Li <Meng.Li@windriver.com>
2023-08-13video: kconfig: Fix a typo in SPL_VIDEO_REMOVEBin Meng1-1/+1
Add one space between 'before' and 'loading'. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-13video: vidconsole: Fix null dereference of ops->measureBin Meng1-1/+1
At present vidconsole_measure() tests ops->select_font before calling ops->measure, which would result in a null dereference when the console driver provides no ops for measure. Fixes: b828ed7d7929 ("console: Allow measuring the bounding box of text") Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-12rockchip: MAINTAINERS: fix board name for Radxa ROCK 4C+FUKAUMI Naoki1-1/+1
align with other ROCK series. Fixes: 2b506407c8 ("rockchip: Add MAINTAINERS entry for Radxa Rock 4C+") Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12dts: rockchip: rk3308: Avoid warning for serial probe on prerelocMassimo Pegorer1-0/+27
Make device tree complete and consistent for pre relocation phase. Some nodes are missing, causing warnings to be issued on serial port probing during pre relocation phase (uclass_get_device_by_phandle_id fails when called by pinctrl_select_state_full: none of these failures is fatal nor causing issues). Add to *-u-boot.dtsi all required nodes with the 'bootph-some-ram' attribute. Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12clk: rockchip: rk3308: Support reading UART rate and clock registersMassimo Pegorer3-2/+74
Add support to read RK3308 registers used to configure UART clocks, and thus to get UART rate and baudrate. This fixes clock_get_rate returning error on serial device probing. Moreover, there is no need anymore to use 'clock-frequency' property for UART nodes in *-u-boot.dtsi files for all cases where UART is not inited by U-Boot proper or by SPL o by TPL code but by a preliminary external boot phase (for Rock PI S, UART is inited by external TPL). Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12clk: rockchip: rk3308: Fix ordering between masking and shiftingMassimo Pegorer1-5/+5
As per definitions of masks and shift offsets in cru_rk3308.h, values read from registers must be first masked and then shifted. By the way, this fix is binary invariant, because in all of fixed cases the shift offset is zero. Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: spl: Drop out of scope debug message related to uart initMassimo Pegorer1-11/+0
Debug uart is no more inited in board_init_f function: remove this debug message from board_init_f. If an earliest-as-possible message after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE Kconfig option, instead. Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: spl: Drop useless call to debug_uart_initMassimo Pegorer1-2/+0
Since commit 0dba45864b2a ("arm: Init the debug UART") function debug_uart_init is called in crt files _main before calling board_init_f. Therefore, there is no need to call it again inside board_init_f implementation in arm/mach-rockchip/spl.c. Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: rk356x-u-boot: Set max-frequency prop in sdhci nodeJonas Karlman1-2/+1
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 <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12clk: rockchip: rk3568: Add dummy support for GMAC speed clocksJonas Karlman1-0/+4
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 <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12clk: rockchip: rk3568: Include UART clocks in SPLJonas Karlman1-3/+3
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 <jonas@kwiboo.se> Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12clk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_divJonas Karlman2-2/+5
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 <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12clk: rockchip: rk3568: Fix clk selection in rk3568_pwm_get_clkDamon Ding1-1/+1
Fix use of wrong clk selection for CLK_PWM1 on RK3568. Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver") Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: cru: Enable cpu info support for rk3568Anton2-0/+4
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 <vao@asu-vei.ru> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12video: avoid build failure on veyron boardAlvaro Fernando García1-2/+5
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 <alvarofernandogarcia@gmail.com> Tested-by: Simon Glass <sjg@chromium.org> # chromebook_jerry Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: rk3568: Add EmbedFire Lubancat 2 supportAndy Yan6-0/+854
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 <andyshrk@163.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: rv1126: Enable fdtoverlay supportJagan Teki2-0/+2
Add fdtoverlay_addr_r and enable OF_LIBFDT_OVERLAY for the use of DT overlay in RV1126. Signed-off-by: Jagan Teki <jagan@edgeble.ai> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: dts: rk3328: rock64: Align spi flash entryPeter Robinson2-2/+2
Align the SPI flash entry with upstream. There's no need to diverge here. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: dts: rk3328: Add rng details to u-boot.dtsiPeter Robinson2-0/+8
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 <pbrobinson@gmail.com> (Fix typo message) Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12config: rock64: enable efuse for stable mac addrPeter Robinson1-0/+1
Enable the rockchip efuse driver on the Rock64 to provide a stable ethernet address on the device. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12pci: rockchip: Release resources on failing probeJonas Karlman1-51/+57
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 <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-12rockchip: rk3399: remove duplicate call to regulators_enable_boot_onQuentin Schulz1-10/+0
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 <foss+uboot@0leil.net> Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-08-10Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini2-20/+22
- 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-riscvWIP/10Aug2023Tom Rini11-28/+50
+ 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 Antonov1-19/+21
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 <saproj@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-08-10cmd: cyclic: Remove duplicate command name in help textAlexander Dahl1-1/+1
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 <ada@thorsis.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-08-10riscv: cpu: jh7110: Select SPL_ZERO_MEM_BEFORE_USEShengyu Qu1-0/+1
Add Kconfig item for Starfive JH7110 to select SPL_ZERO_MEM_BEFORE_USE. Signed-off-by: Bo Gan <ganboing@gmail.com> Signed-off-by: Shengyu Qu <wiagn233@outlook.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-10riscv: Add SPL_ZERO_MEM_BEFORE_USE implementationShengyu Qu3-25/+15
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 <ganboing@gmail.com> Signed-off-by: Shengyu Qu <wiagn233@outlook.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-10riscv: Kconfig: Add SPL_ZERO_MEM_BEFORE_USEShengyu Qu1-0/+8
Add a Kconfig item to allow SPL to clear stack/GD/malloc area before using them. Signed-off-by: Bo Gan <ganboing@gmail.com> Signed-off-by: Shengyu Qu <wiagn233@outlook.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-10configs: starfive: Enable environment in SPI flash supportShengyu Qu1-0/+9
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 <wiagn233@outlook.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-10configs: riscv: starfive: Add VF2 PCIe USB3 XHCI supportMinda Chen1-0/+5
Add XHCI_PCI to enable usb3-host functions. Also add usb command and keyboard config. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-10riscv: starfive: Add SYS_CACHE_SHIFT_6 to enable SYS_CACHELINE_SIZEMinda Chen1-0/+1
Some device driver need SYS_CACHELINE_SIZE macro. Add StarFive SYS_CACHE_SHIFT_6 to enable it. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-10riscv: dts: starfive: Enable pcie0 dts nodeMinda Chen1-1/+1
In StarFive VF2 board. pcie0 connect to VTI usb controller. Enable it to support usb host. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>