summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-19efi_loader: avoid buffer overrun in efi_var_mem_compareHeinrich Schuchardt
We should not scan beyond the end of string name. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-19doc: arch: Add document for RISC-V architectureYu Chien Peter Lin
This patch adds a brief introduction to the RISC-V architecture and the typical boot process used on a variety of RISC-V platforms. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Rick Chen <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2023-02-19board: gateworks: venice: move README to RSTTim Harvey
Move board/gateworks/venice/README to RST documentation. Signed-off-by: Tim Harvey <[email protected]>
2023-02-19doc: board: bcm7xxx: Convert to reStructuredText formatThomas Fitzsimmons
Convert the documentation for the Broadcom BCM7445 and BCM7260 boards to reStructuredText format and add the new filename to doc/board/broadcom/index.rst. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-19doc: devicetree: dt_qemu.rst: Fix the typo and spaceYu Chien Peter Lin
Fix typo and whitespace in the document. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2023-02-17Merge branch '2023-02-17-assorted-fixes'Tom Rini
- avb_verify bugfix, and cpsw_mdio bugfix
2023-02-17common: avb_verify: prevent opening incorrect sessionIvan Khoronzhuk
The arg->session is not valid if arg->ret != NULL, so can't be assigned, correct this. Signed-off-by: Ivan Khoronzhuk <[email protected]> Reviewed-by: Jens Wiklander <[email protected]>
2023-02-17cpsw_mdio.c: Use correct reg in cpsw_mdio_get_aliveUlf Samuelsson
cpsw_mdio_get_alive reads the wrong register. See page 2316 in SPRUH73Q AM335x TRM Signed-off-by: Ulf Samuelsson <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]> Reviewed-by: Siddharth Vadapalli <[email protected]>
2023-02-17configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <[email protected]>
2023-02-17Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
- binman: Add help message if opensbi is absent when building u-boot SPL - AndesTech: rename cpu and board name to 'andesv5' and 'ae350' - Clean up cache operation for Andes ae350 platform
2023-02-17riscv: binman: Add help message for missing blobsRick Chen
Add the 'missing-msg' for more detailed output on missing system firmware. Signed-off-by: Rick Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]>
2023-02-17riscv: ae350: Adjust the memory layout of ae350Leo Yu-Chi Liang
Adjust the initial stack pointer address to 0x10000000(256M) Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17riscv: Rename Andes cpu and board namesLeo Yu-Chi Liang
The current ae350-related defconfigs could also support newer Andes CPU IP, so modify the names of CPU from ax25 to andesv5, and board name from ax25-ae350 to ae350. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17driver: cache-v5l2: Fix type casting warning on RV32Yu Chien Peter Lin
This patch fixes following warning for the riscv32 toolchain. drivers/cache/cache-v5l2.c:122:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 122 | regs = (struct l2cache *)dev_read_addr(dev); | ^ Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-02-17configs: ae350: Display CPU and board info for AE350 platformsYu Chien Peter Lin
Display information about CPU and board during start up. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17configs: ae350: Increase maximum retry count for AE350 platformsYu Chien Peter Lin
Loading an image via TFTP is often interrupted when retrying more than 10 times, increase the number of retries so that it does not simply stop the transfer. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-02-17configs: ae350: Enable v5l2 cache for AE350 platforms in SPLYu Chien Peter Lin
To reduce the code size, CONFIG_V5L2_CACHE was disabled since commit: ca06444aac2c643db3a3f2eb37afc60fae15177e Turing on does not significantly increase the size of u-boot-spl.bin, so we enable it by default to improve performance. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17riscv: ax25: cache.c: Cleanups to L1/L2 cache function used in SPLYu Chien Peter Lin
This patch refines L1 cache enable/disable and v5l2-cache enable functions. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17riscv: ae350: dts: Update L2 cache compatible stringYu Chien Peter Lin
Update the compatible string of L2 cache. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17riscv: cpu: ax25: Simplify cache enabling logic in harts_early_init()Yu Chien Peter Lin
As the OpenSBI v1.2 does not enable the cache [0], we enable the i/d-cache in harts_early_init() and do not disable in cleanup_before_linux(). This patch also simplifies the logic and moves the CSR encoding to include/asm/arch-andes/csr.h. [0] https://github.com/riscv-software-src/opensbi/commit/bd7ef4139829da5c30fa980f7498d385124408fa Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17driver: cache: cache-v5l2: Update memory-mapped scheme to support Gen2 platformYu Chien Peter Lin
The L2C configuration register has MAP field to indicate its version is v0 (Gen1) or v1 (Gen2) L2-cache. This patch makes the driver compatible with both memory-mapped scheme. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17board: AndesTech: ax25-ae350.c: Enable v5l2-cache in spl_board_init()Yu Chien Peter Lin
The L2-cache is not enabled currently, the enbale_caches() will call the v5l2_enable() callback to enable it in SPL. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17riscv: Remove redundant Kconfig "RISCV_NDS_CACHE"Leo Yu-Chi Liang
There is no need for RISCV_NDS_CACHE config to control cache switches. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17riscv: global_data.h: Correct the comment for PLICSWYu Chien Peter Lin
PLIC is used for external interrupt, while PLICSW is an Andes-specific design for software interrupt. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-14Merge tag 'dm-next-valentine' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dm into next Move U-Boot over to the new schema for driver model tags
2023-02-14dm: test: Add a test for the various migration combinationsSimon Glass
Test that: - sandbox shows a warning when an unmigrated DT is used - sandbox fails to run when migration is turned off - sandbox_spl fails to build when migration is turned off Signed-off-by: Simon Glass <[email protected]>
2023-02-14test: Add a way to set the environment for a pytestSimon Glass
This is useful when we need to control a particular environment variable. Add a way to handle this. Signed-off-by: Simon Glass <[email protected]>
2023-02-14CI: Add a check for pre-schema driver model tagsSimon Glass
These should not be used anymore. Add a check to ensure they don't creek back into U-Boot. Use bootph-... instead. Signed-off-by: Simon Glass <[email protected]>
2023-02-14checkpatch: Add a warning for pre-schema driver model tagsSimon Glass
Help ensure that these don't creep into development by adding a check in checkpatch for them. Signed-off-by: Simon Glass <[email protected]>
2023-02-14dm: doc: Move to new driver model schemaSimon Glass
Now that Linux has accepted these tags, update the dtoc tool to use them. Signed-off-by: Simon Glass <[email protected]>
2023-02-14dm: doc: Update documentation for new driver model schemaSimon Glass
Now that Linux has accepted these tags, move U-Boot over to use them. Tidy up the comments and formatting, making sure that VPL is mentioned too. Signed-off-by: Simon Glass <[email protected]>
2023-02-14dm: doc: Update device tree binding docs for new schemaSimon Glass
Now that Linux has accepted these tags, move U-Boot over to use them. Signed-off-by: Simon Glass <[email protected]>
2023-02-14dm: treewide: Complete migration to new driver model schemaSimon Glass
Update various build and test components to use the new schema. Signed-off-by: Simon Glass <[email protected]>
2023-02-14dm: dts: Convert driver model tags to use new schemaSimon Glass
Now that Linux has accepted these tags, move the device tree files in U-Boot over to use them. Signed-off-by: Simon Glass <[email protected]>
2023-02-14dm: Add support for handling old u-boot,dm- tagsSimon Glass
Add a CONFIG option to deal with this automatically, printing a warning when U-Boot starts up. This can be useful if the device tree comes from another project. We will maintain this through the 2023.07 release, providing 6 months for people to notice. Signed-off-by: Simon Glass <[email protected]> Version 4: Acked-by: Michal Simek <[email protected]>
2023-02-14schemas: Add schema for U-Boot driver model 'phase tags'Simon Glass
U-Boot has some particular challenges with device tree and devices: - U-Boot has multiple build phases, such as a Secondary Program Loader (SPL) phase which typically runs in a pre-SDRAM environment where code and data space are limited. In particular, there may not be enough space for the full device tree blob. U-Boot uses various automated techniques to reduce the size from perhaps 40KB to 3KB. It is not always possible to handle these tags entirely at build time, since U-Boot proper must have the full device tree, even though we do not want it to process all nodes until after relocation. - Some U-Boot phases needs to run before the clocks are properly set up, where the CPU may be running very slowly. Therefore it is important to bind only those devices which are actually needed in that phase - U-Boot uses lazy initialisation for its devices, with 'bind' and 'probe' being separate steps. Even if a device is bound, it is not actually probed until it is used. This is necessary to keep the boot time reasonable, e.g. to under a second The phases of U-Boot in order are: TPL, VPL, SPL, U-Boot (first pre-relocation, then post-relocation). ALl but the last two are optional. For the above reasons, U-Boot only includes the full device tree in the final 'U-Boot proper' build. Even then, before relocation U-Boot only processes nodes which are marked as being needed. For this to work, U-Boot's driver model[1] provides a way to mark device tree nodes as applicable for a particular phase. This works by adding a tag to the node, e.g.: cru: clock-controller@ff760000 { bootph-all; compatible = "rockchip,rk3399-cru"; reg = <0x0 0xff760000 0x0 0x1000>; rockchip,grf = <&grf>; #clock-cells = <1>; #reset-cells = <1>; ... }; Here the "bootph-all" tag indicates that the node must be present in all phases, since the clock driver is required. There has been discussion over the years about whether this could be done in a property instead, e.g. options { bootph-all = <&cru> <&gpio_a> ...; ... }; Some problems with this: - we need to be able to merge several such tags from different .dtsi files since many boards have their own specific requirements - it is hard to find and cross-reference the affected nodes - it is more error-prone - it requires significant tool rework in U-Boot, including fdtgrep and the build system - is harder (slower, more code) to process since it involves scanning another node/property to find out what to do with a particular node - we don't want to add phandle arguments to the above since we are referring, e.g., to the clock device as a whole, not a paricular clock - the of-platdata feature[2], which converts device tree to C for even more constrained environments, would need to become aware of the /options node There is also the question about whether this needs to be U-Boot-specific, or whether the tags could be generic. From what I can tell, U-Boot is the only bootloader which seriously attempts to use a runtime device tree in all cases. For this version, an attempt is made to name the phases in a generic manner. It should also be noted that the approach provided here has stood the test of time, used in U-Boot for 8 years so far. So add the schema for this. This will allow a major class of schema exceptions to be dropped from the U-Boot source tree. This has been applied upstream[3] [1] https://u-boot.readthedocs.io/en/latest/develop/driver-model/index.html [2] https://u-boot.readthedocs.io/en/latest/develop/driver-model/of-plat.html [3] https://github.com/devicetree-org/dt-schema/commit/63bd847 Signed-off-by: Simon Glass <[email protected]>
2023-02-13Prepare v2023.04-rc2v2023.04-rc2Tom Rini
Signed-off-by: Tom Rini <[email protected]>
2023-02-13clocks: qcs404: Add support for I2C clocksSumit Garg
Co-developed-by: Mike Worsfold <[email protected]> Signed-off-by: Mike Worsfold <[email protected]> Signed-off-by: Sumit Garg <[email protected]>
2023-02-13Merge tag 'i2c-updates-for-v2023.04' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c updates for v2023.04 - add new i2c driver ast2600 from Ryan Chen - i2c-cdns: make read fifo-depth configurable through device tree from Pei Yue Ho - mxc i2c driver: print base address in hex, not in decimal from Fabio
2023-02-13Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- mvebu: Support for 2 new Armada 385 boards (Tony) - mvebu: Minor misc board enhancements (Tony) - kirkwood: Serial driver fixes (Kconfig & dtsi) (Tony) - cmd: return code when tlv_eeprom incorrectly called (Heinrich)
2023-02-13arm: kirkwood: Enable uart0 dm-pre-reloc for Pogoplug V4 boardTony Dinh
When DM_SERIAL is enabled, the device-tree tag u-boot,dm-pre-reloc is required for this board to boot over UART with kwboot. Enable this in kirkwood-pogoplug-series-4-u-boot.dtsi. Added by Stefan while applying: Please note that it's not fully understood, why this property really is needed. Here a link to the discussion about this: https://lore.kernel.org/r/20230201080210.ypz4nrj4y2igwxz3@pali/ Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-02-13arm: mvebu: Add support for Synology DS116 (Armada 385)Tony Dinh
Synology DS116 is a NAS based on Marvell Armada 385 SoC. Board Specification: - Marvel MV88F6820 Dual Core at 1.8GHz - 1 GiB DDR3 RAM - 8MB Macronix mx25l6405d SPI flash - I2C - 2x USB 3.0 - 1x GBE LAN port (PHY: Marvell 88E1510) - 1x SATA (6 Gbps) - 3x LED - PIC16F1829 (connected to uart1) - GPIO fan - serial console Note that this patch depends on the add-support for Thecus N2350 patch: https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/ Signed-off-by: Tony Dinh <[email protected]>
2023-02-13arm: mvebu: Power up 2nd SATA port for Thecus N2350Tony Dinh
Currently, only the 1st SATA port is powered up (by GPIO1 12). Add GPIO1 13 in board initialization to power up the 2nd SATA port. Note that this patch depends on the initial add-support patch: https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/ Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-02-13arm: kirkwood: sheevaplug: reduce u-boot image sizeTony Dinh
Sheevaplug board has 512K CONFIG_BOARD_SIZE_LIMIT. Recently, DM_SERIAL has pushed the image size a few hundred bytes over that limit. So explicitly deselect some configs that are unrelated to this board (and gain back a bit over 2K). Signed-off-by: Tony Dinh <[email protected]>
2023-02-13arm: mvebu: Add support for Thecus N2350 (Armada 385) boardTony Dinh
Thecus N2350 is a NAS based on Marvell Armada 385 SoC. Specification: - Processor: Marvel MV88F6820 Dual Core at 1GHz - 1 GiB DDR4 RAM - 4MB Macronix mx25l3205d SPI flash - 512MB Hynix H27U4G8F2DTR-BC NAND flash - I2C - 2x USB 3.0 - 1x GBE LAN port (PHY: Marvell 88E1510) - 2x SATA (hot swap slots) - 3x buttons - 10x LEDS - serial console Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-02-13arm: kirkwood: Use CONFIG_SYS_NS16550 with DM_SERIAL for Kirkwood boardsTony Dinh
CONFIG_SYS_NS16550 is required when DM_SERIAL is enabled for Kirkwood boards. Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-02-13cmd: return code when tlv_eeprom incorrectly calledHeinrich Schuchardt
A command called with incorrect parameters should set $? to 1 (false). Instead of calling cmd_usage(cmdtp) and then returning 0 just return CMD_RET_FAILURE. Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Baruch Siach <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-02-13i2c: i2c-cdns.c: Update driver to read fifo-depth from device treePei Yue Ho
Enable driver to fetch the optional parameter (fifo-depth) from device tree. If the parameter is not found in the device tree, it will use the default value declared in the driver. Signed-off-by: Pei Yue Ho <[email protected]> Reviewed-by: Wei Liang Lim <[email protected]> Reviewed-by: Eng Lee Teh <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2023-02-13dt-bindings: i2c: i2c-cdns.txt: Add description for an optional parameter, ↵Pei Yue Ho
fifo-depth Add description for fifo-depth parameter that can be used in the device tree. Signed-off-by: Pei Yue Ho <[email protected]> Reviewed-by: Wei Liang Lim <[email protected]> Reviewed-by: Eng Lee Teh <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2023-02-13arm: aspeed: dtsi: add reg for i2cRyan Chen
The i2c driver have global register that i2c bus use ofnode_get_parent to get parent register address. Signed-off-by: Ryan Chen <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>