aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-02-16pci: Make PCI_INIT_R be selected rather than promptedWIP/select-some-syms-2Tom Rini8-3/+9
As this CONFIG option is for a hook, it should be selected when required for a platform to function, rather than asked (or implied). Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-16x86: Select LAST_STAGE_INITTom Rini1-0/+1
All x86 platforms make use of the last_stage_init hook, so select this. Signed-off-by: Tom Rini <trini@konsulko.com> --- Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com>
2023-02-16arm: CLOCKS: Update this option to have help and be selectedTom Rini2-0/+6
On a few platforms, we can select this symbol as it's always needed. Further, add a help section to this option so it's clearer when to use. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-16board_postclk_init: Make this hook only be selectableTom Rini1-2/+4
Rather than prompt for this hook, make it only be something that can be selected. Update the help text here to be slightly more verbose and clearer about when this is used. All current platforms already select this, so no further changes are needed. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-16configs: Resync with savedefconfigTom Rini770-1908/+1578
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15common: Make ARCH_MISC_INIT be selected onlyTom Rini1-1/+1
As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15global: Add a select for ARCH_MISC_INIT where usedTom Rini14-14/+19
When we have an arch_misc_init function, we can select it to ensure it's used. In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is. Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15imx8mm-mx8menlo: Drop SPL_BOARD_INITTom Rini1-1/+0
On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options. Cc: Marek Vasut <marex@denx.de> Cc: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15verdin-imx8mm: Remove unused SPL_BOARD_INITTom Rini2-6/+0
On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call. Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15s5p: Remove empty arch_misc_initTom Rini2-8/+0
We don't need to provide an empty arch_misc_init function here, we can just not enable the hook. Cc: Stefan Bosch <stefan_b@posteo.net> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15mvebu: Drop empty arch_misc_initTom Rini2-12/+0
If this hooks is needed later, it should be added and populated for real. Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15mvebe: Drop ARCH_MISC_INIT from alleycat 5Tom Rini2-10/+0
In this platform, arch_misc_init doesn't perform any real function. The call to get_soc_type_rev has no lasting side effects. Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15imx9: Remove ARCH_MISC_INITTom Rini2-6/+0
We don't need an empty function, we can just not enable the hook we don't use. Cc: Peng Fan <peng.fan@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15common: Make ARCH_EARLY_INIT_R be selected onlyTom Rini1-1/+1
As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15arm: rk3368: Select ARCH_EARLY_INIT_R when usedTom Rini1-0/+2
On the lion and evb-px5 platforms, we need this function, so select it. Cc: Andy Yan <andy.yan@rock-chips.com> Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com> Cc: Klaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15arm: zynq: Move to select'ing ARCH_EARLY_INIT_R if we have FPGATom Rini1-1/+1
The function arch_early_init_r only does anything on these platforms if we have FPGA (or SPL and SPL_FPGA) enabled, so move the logic to select based on that. Cc: Michal Simek <michal.simek@amd.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15arm: mvebu: Add select on ARCH_EARLY_INIT_R if ARM64Tom Rini1-0/+1
We need to be calling arch_early_init_r() on 64bit mvebu platforms, so move this to a select. Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-15common/Kconfig: Reword text for BOARD_TYPESTom Rini1-5/+4
While it is true that for some Samsung platforms, we call get_board_type() the main usage of this CONFIG switch is to enable board_types in global data, which is then used by various platforms. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-14Merge tag 'dm-next-valentine' of ↵WIP/14Feb2023-nextTom Rini628-4385/+4666
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 Glass1-0/+108
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 <sjg@chromium.org>
2023-02-14test: Add a way to set the environment for a pytestSimon Glass2-4/+6
This is useful when we need to control a particular environment variable. Add a way to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14CI: Add a check for pre-schema driver model tagsSimon Glass2-0/+21
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 <sjg@chromium.org>
2023-02-14checkpatch: Add a warning for pre-schema driver model tagsSimon Glass2-0/+12
Help ensure that these don't creep into development by adding a check in checkpatch for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: doc: Move to new driver model schemaSimon Glass23-62/+62
Now that Linux has accepted these tags, update the dtoc tool to use them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: doc: Update documentation for new driver model schemaSimon Glass7-42/+49
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 <sjg@chromium.org>
2023-02-14dm: doc: Update device tree binding docs for new schemaSimon Glass14-30/+30
Now that Linux has accepted these tags, move U-Boot over to use them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: treewide: Complete migration to new driver model schemaSimon Glass9-25/+24
Update various build and test components to use the new schema. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: dts: Convert driver model tags to use new schemaSimon Glass564-4216/+4216
Now that Linux has accepted these tags, move the device tree files in U-Boot over to use them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: Add support for handling old u-boot,dm- tagsSimon Glass5-6/+50
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 <sjg@chromium.org> Version 4: Acked-by: Michal Simek <michal.simek@amd.com>
2023-02-14schemas: Add schema for U-Boot driver model 'phase tags'Simon Glass1-0/+88
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 <sjg@chromium.org>
2023-02-13Prepare v2023.04-rc2v2023.04-rc2Tom Rini2-2/+4
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-13clocks: qcs404: Add support for I2C clocksSumit Garg2-0/+75
Co-developed-by: Mike Worsfold <mworsfold@impinj.com> Signed-off-by: Mike Worsfold <mworsfold@impinj.com> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2023-02-13Merge tag 'i2c-updates-for-v2023.04' of ↵WIP/13Feb2023Tom Rini9-13/+527
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 Rini18-7/+1358
- 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 Dinh1-0/+7
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 <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-02-13arm: mvebu: Add support for Synology DS116 (Armada 385)Tony Dinh8-0/+595
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/20230201231306.7010-1-mibodhi@gmail.com/ Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2023-02-13arm: mvebu: Power up 2nd SATA port for Thecus N2350Tony Dinh1-2/+2
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/20230201231306.7010-1-mibodhi@gmail.com/ Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-02-13arm: kirkwood: sheevaplug: reduce u-boot image sizeTony Dinh1-0/+5
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 <mibodhi@gmail.com>
2023-02-13arm: mvebu: Add support for Thecus N2350 (Armada 385) boardTony Dinh8-0/+746
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 <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-02-13arm: kirkwood: Use CONFIG_SYS_NS16550 with DM_SERIAL for Kirkwood boardsTony Dinh1-0/+1
CONFIG_SYS_NS16550 is required when DM_SERIAL is enabled for Kirkwood boards. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-02-13cmd: return code when tlv_eeprom incorrectly calledHeinrich Schuchardt1-7/+4
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 <heinrich.schuchardt@canonical.com> Acked-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de>
2023-02-13i2c: i2c-cdns.c: Update driver to read fifo-depth from device treePei Yue Ho1-12/+18
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 <peiyue.ho@starfivetech.com> Reviewed-by: Wei Liang Lim <weiliang.lim@starfivetech.com> Reviewed-by: Eng Lee Teh <englee.teh@starfivetech.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-02-13dt-bindings: i2c: i2c-cdns.txt: Add description for an optional parameter, ↵Pei Yue Ho1-0/+4
fifo-depth Add description for fifo-depth parameter that can be used in the device tree. Signed-off-by: Pei Yue Ho <peiyue.ho@starfivetech.com> Reviewed-by: Wei Liang Lim <weiliang.lim@starfivetech.com> Reviewed-by: Eng Lee Teh <englee.teh@starfivetech.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-02-13arm: aspeed: dtsi: add reg for i2cRyan Chen1-0/+1
The i2c driver have global register that i2c bus use ofnode_get_parent to get parent register address. Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-02-13i2c:aspeed:support ast2600 i2c new register mode driverRyan Chen5-0/+503
Add i2c new register mode driver to support AST2600 i2c new register mode. AST2600 i2c controller have legacy and new register mode. The new register mode have global register support 4 base clock for scl clock selection, and new clock divider mode. Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-02-13i2c: mxc_i2c: Use hex notation for the base addressFabio Estevam1-1/+1
Printing the I2C controller base address in decimal notation is not helpful. Change it to hex notation, which is the standard format found in the Reference Manual and devicetree. Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-02-12Merge tag 'dm-pull-12feb23' of ↵WIP/12Feb2023Tom Rini3-53/+51
https://source.denx.de/u-boot/custodians/u-boot-dm minor changes to fdt command and binman
2023-02-12cmd: fdt: allow standalone "fdt move"Andre Przywara1-11/+17
At the moment every subcommand of "fdt", except "addr" itself, requires the DT address to be set first. We explicitly check for that before even comparing against the subcommands' string. This early bailout also affects the "move" subcommand, even though that does not require or rely on a previous call to "fdt addr". In fact it even sets the FDT address to the target of the move command, so is a perfect beginning for a sequence of fdt commands. Move the check for a previously set FDT address to after we handle the "move" command also, so we don't need a dummy call to "fdt addr" first, before being able to move the devicetree. This skips one pointless "fdt addr" call in scripts which aim to alter the control DT, but need to copy it to a safe location first (for instance to $fdt_addr_r). Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-12cmd: fdt: move: Use map_sysmem to convert pointersAndre Przywara1-3/+3
The "fdt move" subcommand was using the provided DTB addresses directly, without trying to "map" them into U-Boot's address space. This happened to work since on the vast majority of "real" platforms there is a simple 1:1 mapping of VA to PAs, so either value works fine. However this is not true on the sandbox, so the "fdt move" command fails there miserably: => fdt addr $fdtcontroladdr => cp.l $fdtcontroladdr $fdt_addr_r 40 # simple memcpy works => fdt move $fdtcontroladdr $fdt_addr_r Segmentation fault Use the proper "map_sysmem" call to convert PAs to VAs, to make this more robust in general and to enable operation in the sandbox. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-12binman: Show the image name for the top-level sectionSimon Glass2-39/+31
At present we show 'main section' as the top-level section name. It may be more helpful to show the actual image name. This is tricky because Image is a parent class of Entry_section, so there is no distinction between an image and a section. Update it to show the image name. Signed-off-by: Simon Glass <sjg@chromium.org>