aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-08-02Merge tag 'dm-pull-2aug23' of https://source.denx.de/u-boot/custodians/u-boot-dmWIP/02Aug2023Tom Rini17-48/+355
binman fixes for options, etc. binman template fixes / tweaks
2023-08-02binman: Add a temporary hack for duplicate phandlesSimon Glass4-4/+21
Three boards use a phandle in a FIT generator and the maintainer is away. For now, add a hack to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02cmd/bootdev: print readable status codeHeinrich Schuchardt1-1/+1
device_probe() called by the 'bootdev info' command returns 0 or a negative error code. itoa() cannot print negative numbers. Convert the error code to a positive number. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-02boot: fix bootdev_list()Heinrich Schuchardt1-1/+1
uclass_get_device_by_name() is meant to return 0 or a negative error code. simple_itoa() cannot handle negative numbers. This leads to output like: => bootdev list -p Seq Probed Status Uclass Name --- ------ ------ -------- ------------------ c [ ] 18446744073709551614 spi_flash spi.bin@0.bootdev Convert the status to a positive number. Now we get Seq Probed Status Uclass Name --- ------ ------ -------- ------------------ c [ ] 2 spi_flash spi.bin@0.bootdev Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-02binman: Support templates containing phandlesSimon Glass5-0/+165
This provides support for phandles to be copied over from templates. This is not quite safe, since if the template is instantiated twice (i.e. in two different nodes), then duplicate phandles will be found. This will result in an error. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Remove templates after useSimon Glass3-4/+25
It is not necessary to keep templates around after they have been processed. They can cause confusion and potentially duplicate phandles. Remove them. Use the same means of detecting a template node in _ReadImageDesc so that the two places are consistent. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02fdt: Allow copying phandles into templatesSimon Glass2-13/+36
Allow phandles to be copied over from a template. This can potentially cause duplicate phandles, so detect this and report an error. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02dtoc: Add some debugging when copying nodesSimon Glass2-1/+7
Show the operations being performed, when debugging is enabled. Convert a mistaken 'print' in test_copy_subnodes_from_phandles() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02dtoc: Make properties dirty when purging themSimon Glass3-5/+18
Without the 'dirty' flag properties are not written back to the devicetree when synced. This means that new properties copied over to a node are not always written out. Fix this and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Produce a template-file after processingSimon Glass3-2/+25
This file aids debugging when binman fails to get far enough to write out the final devicetree file. Write it immediate after template processing. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02Makefile: Show binman missing blob messageJonas Karlman1-1/+1
When binman is invoked during a build of U-Boot and an external blob is missing, the user is usually presented with a generic file not found in input path message. Invoke binman with --allow-missing so that binman can show relevant missing blob help messages. Build continue to fail with missing blobs unless BINMAN_ALLOW_MISSING=1 is used, same as before. This changes the following error message during a normal build: binman: Filename 'atf-bl31' not found in input path (...) to the following: Image 'itb' is missing external blobs and is non-functional: atf-blob /binman/itb/fit/images/atf/atf-blob (bl31.bin): See the documentation for your board. You may need to build ARM Trusted Firmware and build with BL31=/path/to/bl31.bin Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Show filename in missing blob help messageJonas Karlman2-3/+12
Show the filename next to the node path in missing blob help messages, also show a generic missing blob message when there was no help message for the help tag. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Fix blank line usage for invalid images warning textJonas Karlman1-6/+7
There is no blank line between last missing blob help message and the header line for optional blob help messages. Image 'simple-bin' is missing external blobs and is non-functional: atf-bl31 /binman/simple-bin/fit/images/@atf-SEQ/atf-bl31: See the documentation for your board. You may need to build ARM Trusted Firmware and build with BL31=/path/to/bl31.bin Image 'simple-bin' is missing external blobs but is still functional: tee-os /binman/simple-bin/fit/images/@tee-SEQ/tee-os: See the documentation for your board. You may need to build Open Portable Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin Some images are invalid With this a blank line is inserted to make the text more readable. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Override CheckOptional in fit entryJonas Karlman3-0/+15
Missing optional blobs was not reported for generated entries, e.g. tee-os on rockchip targets. Implement a CheckOptional to fix this. After this the following can be shown: Image 'simple-bin' is missing optional external blobs but is still functional: tee-os /binman/simple-bin/fit/images/@tee-SEQ/tee-os (tee-os): See the documentation for your board. You may need to build Open Portable Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Report missing external blobs using error levelJonas Karlman1-9/+9
Print missing external blobs using error level and missing optional external blobs using warning level. Also change to only print the header line in color, red for missing and yellow for optional. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Update missing optional external blob warning textJonas Karlman2-2/+2
Make it more clear that the missing external blob is optional in the printed warning message. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02binman: Update tee-os missing blob help textJonas Karlman1-1/+1
Make it a little bit more clear that it is U-Boot that should be built with TEE=/path/to/tee.bin and not OP-TEE itself. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini20-64/+755
+ Fix compilation error for CI when enabling RTL8169 driver + Fix compilation error for pci_mmc.c by adding acpi_table header file + Support video console and usb keyboard on RISC-V QEMU virt machine + Support StarFive JH7110 PCIe driver + Enable PCI on Unmatched board
2023-08-02binman: elf: Check for ELF_TOOLS availability and remove extra semicolonLukas Funke2-6/+20
Check if elf tools are available when running DecodeElf(). Also remove superfuous semicolon at line ending. Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org> Revert part of patch to make binman test pass Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-02riscv: qemu: Enable usb keyboard as an input deviceBin Meng4-1/+16
This brings PCI xHCI support to QEMU RISC-V and uses a usb keyboard as one of the input devices. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02riscv: qemu: Remove out-of-date "riscv, kernel-start" handlingBin Meng2-34/+0
Commit 66ffe57 ("riscv: qemu: detect and boot the kernel passed by QEMU") added some logic to handle "riscv,kernel-start" in DT and stored the address to an environment variable kernel_start. However this "riscv,kernel-start" has never been an upstream DT binding. The upstream QEMU never generates such a DT either. Presumably U-Boot development was based on a downstream QEMU fork. Now we drop all codes in commit 66ffe57, except that BOARD_LATE_INIT is kept for later use. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02riscv: qemu: Enable PRE_CONSOLE_BUFFERBin Meng1-0/+5
By default the video console only outputs messages after it's ready. Messages before that won't show on the video console, but U-Boot has an option to buffer the console messages before it's ready. Enable this support, and carefully select an address for the buffer. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02console: Print out complete stdio device listBin Meng1-9/+21
At present if both CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are on, during boot, the printed out stdio devices are incomplete, e.g.: with "stdout=serial,vidconsole", only "vidconsole" is printed. For such case, we can print out the stdio device name from the environment variables. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-02console: Refactor stdio_print_current_devices() a little bitBin Meng1-15/+15
In preparation to future changes, refactor this routine a little bit. Signed-off-by: Bin Meng <bmeng@tinylab.org>
2023-08-02console: Make stdio_print_current_devices() staticBin Meng2-3/+1
As it is only called in common/console.c Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-02console: kconfig: Drop the redundant VIDEO dependencyBin Meng1-1/+1
The VIDEO dependency is described twice in CONSOLE_MUX. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02riscv: qemu: Enable Bochs video supportBin Meng3-0/+13
Enable video console using the emulated Bochs VGA card. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-02acpi: Add missing RISC-V acpi_table headerHeinrich Schuchardt1-0/+11
The pci_mmc.c driver can generate ACPI info and therefore includes asm/acpi_table.h. This file does not exist for the RISC-V architecture and thus code compilation fails when using this driver on RISC-V Create an empty include file. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com>
2023-08-02riscv: sifive: initialize PCI on UnmatchedHeinrich Schuchardt1-0/+1
The Unmatched board is typically booted from NVMe which requires PCI. When dropping to a console PCI is not initialized yet. 'pci enum' has to be called. Change the configuration to call pci_init() in board_init_r(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Rick Chen <rick@andestech.com>
2023-08-02configs: starfive-jh7110: Add CONFIG_RTL8169Minda Chen1-0/+1
Add PCIe device rtl8169 net adapter driver support. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02net: rtl8169: Add one device ID 0x8161Minda Chen1-2/+4
Add rtl8169 NIC device ID and reorder the device ID. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02net: rtl8169: Fix DMA minimal aligned compile warning in RISC-VMinda Chen1-1/+3
For RISC-V architeture, hardware maintain the dcache coherency. Software do not flush the cache. So even cache-line size larger than descriptor size, driver can work. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02net: rtl8169: Fix compile warning in rtl8169Minda Chen1-6/+6
While compiling rtl8169.c, There are many "make pointer from integer without a cast" compile warnings. fix them with adding cast. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02riscv: dts: starfive: Enable PCIe host controllerMason Huo2-0/+85
Enable and add pinctrl configuration for PCIe host controller. Signed-off-by: Mason Huo <mason.huo@starfivetech.com> Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02configs: starfive-jh7110: Add support for PCIe host driverMason Huo1-0/+7
Add PCIe host driver and nvme driver in configure file. Signed-off-by: Mason Huo <mason.huo@starfivetech.com> Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02starfive: pci: Add StarFive JH7110 pcie driverMason Huo5-0/+566
Add pcie driver for StarFive JH7110, Also add PLDA PCIe controller common driver functions. Several devices are tested: a) M.2 NVMe SSD b) Realtek 8169 Ethernet adapter. Signed-off-by: Mason Huo <mason.huo@starfivetech.com> Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Acked-by: Pali Rohár <pali@kernel.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-02i2c: designware: Add Kconfig for designware_i2c_pci.cMinda Chen2-3/+10
As the Designware_i2c_pci.c uses ACPI APIs, If some SoCs (StarFive JH7110) contain Designware i2c and PCI but do not use ACPI, This file cannot be compiled. So add a new Kconfig for designware_i2c_pci.c, which depends on ACPIGEN Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-08-01Merge tag 'x86-pull-20230801' of ↵Tom Rini9-20/+24
https://source.denx.de/u-boot/custodians/u-boot-x86 - MTRR fixes for x86 boards - Add a little more info to 'cbsysinfo' command
2023-08-01Merge tag 'video-20230801' of ↵Tom Rini5-29/+29
https://source.denx.de/u-boot/custodians/u-boot-video - dm video cosmetic style fix - bochs: remove the x86 limitation - correct kconfig text for PCI default FB size - kconfig: drop the superfluous PCI dependency - set up default FB size for Bochs
2023-08-01Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini3-8/+25
- i2c-gpio: Correctly handle new {sda, scl}-gpios bindings (Chris) - mvebu: x240: Use i2c-gpio instead of built in controller (Chris)
2023-08-01drivers: video: tidss: tidss_drv: Use kconfig VIDEO_REMOVE to remove videoNikhil M Jain1-2/+8
Perform removal of DSS if kconfigs VIDEO_REMOVE or SPL_VIDEO_REMOVE is set by user. Otherwise if above Kconfigs are not selected, it is assumed that user wants splash screen to be displayed until linux kernel boots up. In such scenario, leave the power domain of DSS as "on" so that splash screen stays intact until kernel boots up. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-08-01drivers: video: tidss: tidss_drv: Change remove methodNikhil M Jain1-11/+1
Change remove method of DSS video driver to disable video port instead of performing a soft reset, as soft reset takes longer duration. Video port is disabled by setting enable bit of video port to 0. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-08-01video: bochs: Set the frame buffer size per configurationBin Meng1-2/+2
At present the uclass stored frame buffer size is set to a hard coded value, but we can calculate the correct value based on what is configured. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: kconfig: Set default FB size for BochsBin Meng1-2/+4
Set up a default frame buffer size of 8MiB for Bochs for non-x86 architecturs as PCI is normally not enumerated before relocation on these architectures. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-01video: kconfig: Drop the superfluous dependencyBin Meng1-4/+4
PCI is always selected by X86 architecture hence "X86 && PCI" does not make it better. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: kconfig: Fix wrong text for the PCI default FB sizeBin Meng1-2/+2
There is an example in the VIDEO_PCI_DEFAULT_FB_SIZE help text to tell people how to calculate its value but the resolution given does not match the value. Fix it. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-01video: bochs: Remove the x86 dependencyBin Meng1-1/+0
Now that the driver is legacy free, remove the x86 dependency so that it can be used on non-x86 architectures. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: bochs: Avoid using IO instructions to access VGA IO portBin Meng2-6/+4
At present the driver uses IO instructions to access the legacy VGA IO ports, which unfortunately limits the driver to work only on x86. It turns out the IO instruction is not necessary as Bochs VGA card remaps the legacy VGA IO ports (0x3c0 -> 0x3df) to its memory mapped register space from offset 0x400. Update the driver to use MMIO access for VGA IO port. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: bochs: Drop the useless argument of bochs_vga_write()Bin Meng2-4/+8
bochs_vga_write() takes 'index' as one argument, but never uses it. While we are here, use macros instead of magic numbers for the VGA IO port register name and value. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
2023-08-01video: bochs: Drop inclusion of <asm/mtrr.h>Bin Meng1-1/+0
The driver does not call any MTRR APIs. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64