summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-26video: Add a test for 16bpp BMP filesSimon Glass
Add a compressed 16bpp BMP file and a test to cover this. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: Tidy up 24/32 BMP blittingSimon Glass
Drop the unnecessary brackets. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: Drop the uclass colour mapSimon Glass
We don't need this anymore since we use the BMP palette directly. Drop it. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: bmp: Update RLE8 support to use the write functionSimon Glass
Update this code to use write_pix8() rather than writing the pixels only for a single supported display depth. This allows us to support any depth. Add some more tests too. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: Move BMP pixel-writing into a functionSimon Glass
At present the code that writes to a pixel is quite convoluted. It uses a colour map which is in the uclass and the same code is repeated in different places within video_bmp_display(). As a first step, create a function which can write a pixel from the bitmap, no matter what the display depth. Use any provided palette directly, rather than using the uclass version. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: Drop fb_put_byte() el atSimon Glass
These functions are not used with driver model, nor in any U-Boot boards. Drop them and inline the code. Signed-off-by: Simon Glass <[email protected]>
2021-12-26sandbox: Enable support for the gzip commandSimon Glass
This does not work with sandbox at present. Fix it up to use map_sysmem() to convert an address to a pointer. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: Expand video debugging buffer sizeSimon Glass
On sandbox these addresses are 16 hex digits log so we need more space for the debug string. Update it. Signed-off-by: Simon Glass <[email protected]>
2021-12-26sandbox: video: Add BMP tests for 32bpp and 8bpp modesSimon Glass
Add a few more tests for BMP rendering. Use a back door into the sandbox SDL driver to adjust the resolution at runtime. The truetype code does not support 8bpp. Add this so that the display is not blank when running in this mode. Signed-off-by: Simon Glass <[email protected]>
2021-12-26sandbox: video: Correct the address of the copy baseSimon Glass
The intention is for the copy base to start halfway through the frame-buffer area. At present is it actually below the frame buffer, which could have anything in it (probably it is malloc space). Fix this. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: sandbox: Set a maximum frame-buffer sizeSimon Glass
If U-Boot starts with the frame buffer set to 16bpp but then runs a test that uses 32bpp, there is not enough space. Update the driver to use the maximum possible frame-buffer size, to avoid this. Signed-off-by: Simon Glass <[email protected]>
2021-12-26console: Avoid serial output before the console is runningSimon Glass
The video driver uses this for debugging, but if used before relocation it crashes at present. Avoid trying to output debugging before the console is ready. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: sandbox: Avoid duplicate display windowsSimon Glass
When unit tests are run they currently create a new window. Update the code so that the old one is removed first. This avoids the confusion as to which one is active. Signed-off-by: Simon Glass <[email protected]>
2021-12-26sandbox: video: Support 8bpp depthSimon Glass
At present sandbox only supports 16 and 32bpp depths, since those are the easy ones with SDL. We can support other depths by manually converting the pixel formats. Add support for this, to enable an 8ppp (monochrome) format. Signed-off-by: Simon Glass <[email protected]>
2021-12-26Merge https://source.denx.de/u-boot/custodians/u-boot-spiTom Rini
2021-12-26Merge tag 'u-boot-rockchip-20211226' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Add kaslrseed support; - rk3568 spl and image tool support; - px30 dts sync from kernel; - rk3399 emmc fix; - rockchip fastboot cmd fix;
2021-12-26tools: avoid OpenSSL deprecation warningsHeinrich Schuchardt
Our Gitlab CI buildsystem is set up to treat warnings as errors. With OpenSSL 3.0 a lot of deprecation warnings occur. With the patch compatibility with OpenSSL 1.1.1 is declared. In the long run we should upgrade our code to use the current API. A -Wdiscarded-qualifiers warning is muted by casting. Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-12-26sysreset: watchdog: watchdog cannot power offHeinrich Schuchardt
The watchdog system reset driver can reboot the device but it cannot power it off. If power off is requested, the driver should not reset the system but leave powering off to one of the other system reset drivers. As power cycling is typically not a feature of a watchdog driver the reset types SYSRESET_POWER and SYSRESET_POWER_OFF shall both be excluded. Fixes: 17a0c14164dc ("dm: sysreset: add watchdog-reboot driver") Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-12-26efi_loader: Don't limit the StMM buffer size explicitlyIlias Apalodimas
Currently we allow and explicitly check a single shared page with StandAloneMM. This is dictated by OP-TEE which runs the application. However there's no way for us dynamically discover the number of pages we are allowed to use. Since writing big EFI signature list variable requires more than a page, OP-TEE has bumped the number of shared pages to four. Let's remove our explicit check and allow the request to reach OP-TEE even if it's bigger than what it supports. There's no need to sanitize the number of pages internally. OP-TEE will fail if we try to write more than it's allowed. The error will just trigger later on, during the StMM access. While at it add an error message to help users figure out what failed. Signed-off-by: Ilias Apalodimas <[email protected]> Tested-by: Ying-Chun Liu (PaulLiu) <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
2021-12-26efi: fix typo in description of struct efi_entry_hdrHeinrich Schuchardt
Add missing colon. Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-12-24Merge branch '2021-12-23-make-OF_BOARD-a-boolean' into nextTom Rini
Merge v8 of Simon's series to make CONFIG_OF_BOARD a boolean option. Quoting him: With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so there are only three ways to obtain a devicetree: - OF_SEPARATE - the normal way, where the devicetree is built and appended to U-Boot - OF_EMBED - for development purposes, the devicetree is embedded in the ELF file (also used for EFI) - OF_BOARD - the board figures it out on its own The last one is currently set up so that no devicetree is needed at all in the U-Boot tree. Most boards do provide one, but some don't. Some don't even provide instructions on how to boot on the board. The problems with this approach were covered in another patch[1], since removed from this series. In practice, OF_BOARD is not really distinct from OF_SEPARATE. Any board can obtain its devicetree at runtime, even it is has a devicetree built in U-Boot. This is because U-Boot may be a second-stage bootloader and its caller may have a better idea about the hardware available in the machine. This is the case with a few QEMU boards, for example. So it makes no sense to have OF_BOARD as a 'choice'. It should be an option, available with either OF_SEPARATE or OF_EMBED. This would allow rpi3, for example, to run with the devicetree provided by the prior bootloader. This series makes this change, adding various missing devicetree files (and placeholders) to make the build work. To make the 'prior stage' side of things more deterministic, a new OF_HAS_PRIOR_STAGE is added, which cannot be disabled by updated a board's defconfig. This should help to prevent mistakes. It also adds a run-time message showing where the devicetree came from, as well as warnings if the board's expected flow is not being used. This comes originally from the 'standard passage' series, which depends on this series. It also provides a few qemu clean-ups discovered along the way. The qemu-riscv64_spl problem is fixed. Please see [2] for discussion on the v6 series. I put Heinrich's Tested-by tag[3] for the series onto the three devicetree patches (ARM and RISC-V) that I think it most affects. It isn't possible to apply a tag to a whole series at present and in any case there are changes in v7. This series is available at u-boot-dm/ofb-working [1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/ [2] https://lore.kernel.org/u-boot/20211205133207.GW1220664@bill-the-cat/T/#mcd8c0258827fbc1bb3000b7ff9ba0929df1ddcb2 [3] https://lore.kernel.org/u-boot/[email protected]/raw
2021-12-24rockchip: mkimage: Add support for rk3568 SoCKever Yang
rk3568 is the first SoC which supports idb header v2. Signed-off-by: Kever Yang <[email protected]>
2021-12-24rockchip: mkimage: Add support for idb header V2Yi Liu
Rockchip BootRom supports new idb header v2 instead of legacy version. Add support for it so that we can generate image for new SoCs. Signed-off-by: Yi Liu <[email protected]> Signed-off-by: Kever Yang <[email protected]>
2021-12-24rockchip: mkimage: Add image header versionKever Yang
We are going to have more than one version header, add the version in the header info. Signed-off-by: Kever Yang <[email protected]>
2021-12-24rockchip: mkimage: rename RK_SIGNATURE to RK_MAGICKever Yang
The first 4byte of idbimage is a magic number instead of signature, correct it. Signed-off-by: Kever Yang <[email protected]>
2021-12-24configs: rock-pi-4: Enable rockchip efuse supportSjoerd Simons
Enable efuse support for reading the cpuid#, serial# and generate a board unique mac address Signed-off-by: Sjoerd Simons <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24rockchip: boot_mode: fix fastboot commandJohn Keeping
The USB controller index must be separated from the type argument, otherwise the preboot command fails with the error: Error: Wrong USB controller index format Add the missing space to fix fastboot mode here. Signed-off-by: John Keeping <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24power: pmic/fan53555: allow dm be omitted by SPLQuentin Schulz
Allow the dm driver be omitted by SPL. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24engicam: px30: Add Engicam PX30.Core C.TOUCH 2.0 10.1" OFJagan Teki
PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. 10.1" OF is a capacitive touch 10.1" Open Frame panel solutions. PX30.Core needs to mount on top of C.TOUCH 2.0 carrier with pluged 10.1" OF for creating complete PX30.Core C.TOUCH 2.0 10.1" Open Frame. Add support for it. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24arm64: dts: rockchip: Sync px30 from linux-nextJagan Teki
Sync the px30 devicetree files from linux-next tree. commit <14ce8069f48b> ("lib/stackdepot: allow optional init and stack_table allocation by kvmalloc() - fixup3") Note, this path even sync rk3326 files as it depends on px30. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24arm64: dts: rockchip: px30: Move dmc into -u-boot.dtsiJagan Teki
dmc node is specific to U-Boot, it is always better practice to maintain U-Boot specific nodes into -u-boot.dtsi files in order to maintain Linux dts file sync compatibility. Move the dmc into px30-u-boot.dtsi, also add dmc node explicitly in rk3326-odroid-go2-u-boot.dtsi since it is using px30.dts. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24doc: rockchip: puma: update build and flash instructionsQuentin Schulz
Long gone is the time a custom TF-A was needed for Puma, upstream TF-A works just fine now. The flashing instructions are updated to match how newer rkdeveloptool and rkbin work. Finally, rkbin provides a way to flash SPI via USB OTG interface so let's document that. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24dts: rockchip: rk3399: enable emmc phy for splYifeng Zhao
adapting commit ac804143cf ("mmc: rockchip_sdhci: add phy and clock config for rk3399") to fix the issue "Not found emmc phy device". Signed-off-by: Yifeng Zhao <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]> - on a Rock960 Reviewed-by: Patrick Wildt <[email protected]> Tested-by: Patrick Wildt <[email protected]> - on a Pinebook Pro Reviewed-by: Kever Yang <[email protected]>
2021-12-24rockchip: rk3568: add arch_cpu_init()Nico Cheng
We configured the drive strength and security of EMMC in arch_cpu_init(). Signed-off-by: Nico Cheng <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24arm: dts: rockchip: rk3568: Enable sdhci and sdmmc0 nodeNico Cheng
Enable sdhci and sdmmc0 node in rk3568-u-boot.dtsi Signed-off-by: Nico Cheng <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24rockchip: Kconfig: Enable SPL support for rk3568Nico Cheng
Enable SPL support in Kconfig and add some related option in rk3568_common.h Signed-off-by: Nico Cheng <[email protected]> Signed-off-by: Jason Zhu <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24rockchip: px30: add support for HW RNG for Odroid Go AdvanceChris Morgan
The Odroid Go Advance has a hardware random number generator present. The device does not have an upstream Linux driver, but does have a U-Boot driver. Add the appropriate node so that the hardware RNG can be used in U-Boot. Signed-off-by: Chris Morgan <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2021-12-24cmd: kaslrseed: add command to generate value from hwrngChris Morgan
Allow the kaslr-seed value in the chosen node to be set from a hardware rng source. Tested on a Rockchip PX30 (Odroid Go Advance), you must have loaded the devicetree first and prepared it for editing. On my device the workflow goes as follows: setenv dtb_loadaddr "0x01f00000" load mmc 0:1 ${dtb_loadaddr} rk3326-odroid-go2.dtb fdt addr ${dtb_loadaddr} fdt resize kaslrseed and the output can be seen here: fdt print /chosen chosen { kaslr-seed = <0x6f61df74 0x6f7b996c>; stdout-path = "serial2:115200n8"; }; Signed-off-by: Chris Morgan <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-12-23fdt: Show a runtime warning based on devicetree sourceSimon Glass
When running, if the devicetree failed to come from the expected source, show a warning, e.g: U-Boot ... DRAM: 128 MiB Core: 42 devices, 11 uclasses, devicetree: separate Warning: Unexpected devicetree source (not from a prior stage) Warning: U-Boot may not function properly Flash: 64 MiB ... These warnings should only appear if the board config has been changed, or the prior stage is broken. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Avoid emitting an device tree when not neededSimon Glass
U-Boot always needs some sort of a device tree in the build. Some boards never actually use this, at least in production systems, since a prior firmware stage sets one up and passes it to U-Boot. At present the only mechanism to do that is with custom function (OF_BOARD), but future work will include a standard way of doing this ('standard passage'). It can be confusing to see a device tree emitted from the U-Boot build in this situation. Add an option to drop it. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Makefile: Ensure that OF_BOARD is used when neededSimon Glass
Boards which define OF_HAS_PRIOR_STAGE must define OF_BOARD at present, since a custom function is the only way to obtain the devicetree at runtime. Add a build error when this requirement is not met, to avoid accepting any patches which break this requirement. Add an allowlist for boards which use it, currently none. This allowlist can be updated for local development, if needed. Signed-off-by: Simon Glass <[email protected]> [trini: change of_whitelist to of_allowlist] Signed-off-by: Tom Rini <[email protected]>
2021-12-23fdt: Enable OF_HAS_PRIOR_STAGE for most boards with OF_BOARDSimon Glass
Use this new Kconfig instead of OF_BOARD, so we know for sure which boards obtain their devicetree from a prior stage. Leave sandbox alone since it does not. Also don't touch xilinx_versal_virt since it does not have a specific TARGET Kconfig. This option implies OF_BOARD for now, but with future work standard passage may be used instead. Signed-off-by: Simon Glass <[email protected]> [trini: Add rpi_4_32b and rpi_arm64 to the list of boards converted] Signed-off-by: Tom Rini <[email protected]>
2021-12-23fdt: Add a Kconfig for boards with a prior stageSimon Glass
When U-Boot is started from another firmware program, not just a prior phase of U-Boot, special behaviour is typically used. In particular, the device tree may come from that prior stage. At present this is sort-of indicated by OF_BOARD, although the correlation is not 1:1, since that option simply means that the board has a custom mechanism for obtaining the device tree. For example, sandbox defines OF_BOARD. Also the board_fdt_blob_setup() function can in fact make use of the devicetree in U-Boot if it wishes, as used by dragonboard410c until very recently. Add an explicit Kconfig for this situation. Update the OF_BOARD option to more-accurately reflect what it is doing, e.g. for sandbox. Drop the docs in the README as it is out of date. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Report the devicetree sourceSimon Glass
It can be confusing to figure out where the devicetree came from. It seems important enough to warrant a message during boot. Add information about the number of devices and uclasses too since it is helpful to have some idea what is going on with driver model. Report the devicetree source in bdinfo too. This looks something like this, with > marking the new line. U-Boot 2021.10-00190 (Oct 30 2021 - 09:01:29 -0600) DRAM: 128 MiB > Core: 42 devices, 11 uclasses, devicetree: passage Flash: 64 MiB Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Record where the devicetree came fromSimon Glass
Keep track of where the devicetree came from, so we can report this later. Signed-off-by: Simon Glass <[email protected]>
2021-12-23dm: core: Allow getting some basic statsSimon Glass
Add a function that returns some basic stats about driver model. For now we only have two. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Don't call board_fdt_blob_setup() without OF_BOARDSimon Glass
At present this override function is called even when OF_BOARD is not enabled. This makes it impossible to disable this feature and in fact makes the OF_BOARD option useless. Reinstate its intended purpose, so that it is possible to switch between the appended devicetree and one provided by the board's custom function. A follower patch adds warnings for this scenario, but for now we don't have a Kconfig that definitively tells us that OF_BOARD should be used. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Drop remaining preprocessor macros in fdtdec_setup()Simon Glass
We only have two choices for obtaining the devicetree. Simplify the code to make that clear. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Drop OF_CONTROL check in fdtdec_setup()Simon Glass
This function should only be called when OF_CONTROL is enabled. It fails in fdtdec_prepare_fdt() anyway, since gd->fdt_blob stays as NULL if OF_CONTROL is not enabled. Drop this useless check. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Use if() for fdtcontroladdr checkSimon Glass
Change this to use if() instead of #if Signed-off-by: Simon Glass <[email protected]>