aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-20Merge tag 'u-boot-imx-20211020' of ↵WIP/20Oct2021Tom Rini123-534/+6595
https://source.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20211020 ------------------- First PR from u-boot-imx for 2022.01 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535 - new board: kontron-sl-mx8mm - imx8m: - fix secure boot - imx ESDHC: fixes - i.MX53: Support thum2, bmode and fixes for Menlo board usbarmory switch to Ethernet driver model - imx6 : - DDR calibration for Toradex boards - imx7: - Fixes - Updated gateworks boards (ventana / venice) # gpg verification failed.
2021-10-20Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini12-39/+67
- Assorted warning fixes, io read/write bugfix
2021-10-20imx8mm-cl-iot-gate-optee: align config with KconfigStefano Babic1-1/+2
Due to missing configs, CI goes in deadlock until an OOM is tracked. Add CONFIG_SYS_LOAD_ADDR and replace CONFIG_SYS_EXTRA_OPTIONS with CONFIG_IMX_CONFIG. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org> CC: Fabio Estevam <festevam@denx.de>
2021-10-20kontron-sl-mx8mm: fix missing configs and deadlock in CIStefano Babic2-4/+3
Even if board can be successfuly built, CI goes in deadlock (see thread on https://www.mail-archive.com/u-boot@lists.denx.de/msg419663.html). This is caused by SYS_CONFIG set in header file and because defconfig for the board is out of sync with Kconfig. As result, buildman goes on to read from stdin until an OOM is reached. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-10-20buildman: Detect Kconfig loopsSimon Glass3-5/+55
Hex and int Kconfig options are supposed to have defaults. This is so we can configure U-Boot without having to enter particular values for the items that don't have specific values in the board's defconfig file. If this rule is not followed, then introducing a new Kconfig can produce a loop like this: Break things (BREAK_ME) [] (NEW) Error in reading or end of file. Break things (BREAK_ME) [] (NEW) Error in reading or end of file. The continues forever since buildman passes /dev/null to 'conf', and the build system just tries again. Eventually there is so much output that buildman runs out of memory. We can detect this situation by looking for a symbol (like 'BREAK_ME') which has no default (the '[]' above) and is marked as new. If this appears multiple times in the output, we know something is wrong. Add a filter function for the output which detects this situation. Allow it to return True to terminate the process. Implement this termination in cros_subprocess. With this we get a nice message: buildman --board sandbox -T0 Building current source for 1 boards (0 threads, 32 jobs per thread) sandbox: w+ sandbox +.config:66:warning: symbol value '' invalid for BREAK_ME + +Error in reading or end of file. +make[3]: *** [scripts/kconfig/Makefile:75: syncconfig] Terminated +make[2]: *** [Makefile:569: syncconfig] Terminated +make: *** [Makefile:177: sub-make] Terminated +(** did you define an int/hex Kconfig with no default? **) Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-20buildman: Write output even on fatal errorSimon Glass1-6/+6
At present buildman does not write any output (to the 'out' and 'err) files if the build terminates with a fatal error. This is to avoid adding lots of spam to the logs. However there are times when this is actually useful, such as when the build fails for an obscure reason such as a Kconfig loop. Update the logic to always write the output, so that the user gets a clue as to what is happening. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-20riscv: Avoid io read/write cause wrong resultNick Hu1-9/+9
io read/write may cause wrong result because they may read/write data from/to register instead of memory. Add 'volatile' to avoid it. Signed-off-by: Nick Hu <nick.hu@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-10-20board: sifive: Fix -Wint-to-pointer-cast warningBin Meng2-2/+2
The following warning is seen in unleashed.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Cast with uintptr_t. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20ram: sifive: Fix -Wint-to-pointer-cast warningsBin Meng1-4/+4
The following warning is seen in sifive_ddr.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_index_ptr(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20net: macb: Fix -Wint-to-pointer-cast warningsBin Meng1-8/+3
The following warning is seen in macb.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_index_ptr(), or cast with uintptr_t. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-10-20dm: Provide dev_read_addr_index_ptr() wrapperBin Meng1-0/+18
Like dev_read_addr_ptr(), provide a wrapper for the indexed version. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-20dm: core: Add a new API devfdt_get_addr_index_ptr()Bin Meng2-3/+20
At present there is only devfdt_get_addr_ptr() which only returns the first <addr, size> pair in the 'reg' property. Add a new API devfdt_get_addr_index_ptr() to return the indexed pointer. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20i2c: ocores: Fix -Wint-to-pointer-cast warningBin Meng1-1/+1
The following warning is seen in ocores_i2c.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_ptr(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20gpio: sifive: Fix -Wint-to-pointer-cast warningBin Meng1-4/+2
dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit address and plat->base is a pointer. In a 32-bit build, this causes the following warning seen when building sifive-gpio.c: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_ptr(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20clk: sifive: Fix -Wint-to-pointer-cast warningBin Meng1-3/+3
dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit address and pd->va is a pointer. In a 32-bit build, this causes the following warning seen when building sifive-prci.c: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_ptr(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20cache: sifive: Fix -Wint-to-pointer-cast warningBin Meng1-1/+1
The following warning is seen in cache-sifive-ccache.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fix by casting it with uintptr_t. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-20board: sifive: Fix a potential build warning in board_fdt_blob_setup()Bin Meng2-4/+4
Commit 47d73ba4f4a4 ("board: sifive: overwrite board_fdt_blob_setup in u-boot proper") added a board-specific implementation of board_fdt_blob_setup() which takes a pointer as the return value, but it does not return anything if CONFIG_OF_SEPARATE is not enabled. This will cause a build warning seen when testing booting S-mode U-Boot directly from QEMU, per the instructions in [1]: board/sifive/unleashed/unleashed.c: In function ‘board_fdt_blob_setup’: board/sifive/unleashed/unleashed.c:125:1: warning: control reaches end of non-void function [-Wreturn-type] Return &_end as the default case. [1] https://qemu.readthedocs.io/en/latest/system/riscv/sifive_u.html#running-u-boot Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com>
2021-10-19Merge branch '2021-10-19-assorted-changes'Tom Rini16-11/+245
- Assorted minor fixes and a new GPIO driver
2021-10-19clk: fixed_rate: add dummy disable() functionWIP/2021-10-19-assorted-changesSamuel Holland1-0/+1
commit 6bf6d81c1112 ("clk: fixed_rate: add dummy enable() function") implemented .enable, so fixed rate clocks can be used where drivers might call clk_enable(). Implement the .disable op for the same reason; some drivers, e.g. USB PHYs, may attempt to disable clocks at runtime. Signed-off-by: Samuel Holland <samuel@sholland.org>
2021-10-19arm: total_compute: increase DRAM to 8GBUsama Arif2-0/+6
The extra 6GB start at 0x8080000000. Signed-off-by: Usama Arif <usama.arif@arm.com>
2021-10-19tools: Stop re-defining -std= when building toolsTom Rini2-4/+1
While we intentionally set -std=gnu11 for building host tools, and have for quite some time, we never dropped -std=gnu99 from tools/Makefile. This resulted in passing -std=gnu11 ... -std=gnu99 when building, and gnu99 would win. This in turn would result now in warnings such as: tools/mkeficapsule.c:25:15: warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition] typedef __u32 u32; ^ Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-19configs: am335x_evm: enable CONFIG_CLK_TI_CTRLAmjad Ouled-Ameur1-0/+1
This enables the clock controller driver support on TI's SoCs. This will fix this GPIO issue at boot time: request_and_set_gpio: Unable to request GPIO_PR1_MII_CTRL request_and_set_gpio: Unable to request GPIO_MUX_MII_CTRL request_and_set_gpio: Unable to request GPIO_FET_SWITCH_CTRL request_and_set_gpio: Unable to request GPIO_PHY_RESET This issue comes from the fact that the clock controller is not probed. Enable the TI's clock controller driver support to solve this. Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-10-19drivers/gpio: add support for MAX7320 i2c i/o expanderHannes Schmelzer4-0/+158
This commit adds support for the MAX7320 (and clones) gpio expander. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2021-10-19Makefile: Only build dtc if neededSimon Glass5-8/+55
At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined, even when DTC is provided. The built dtc is not actually used, so this is a waste of time. Update the Makefile logic to build dtc only if one is not provided to the build with the DTC variable. Add documentation to explain this. This saves about 3.5 seconds of elapsed time on a clean build of sandbox_spl for me. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-19Revert "kbuild: remove unused dtc-version.sh script"Simon Glass3-0/+24
We need this to make building dtc optional. It makes no sense to build our own dtc if the system one works correctly. This reverts commit ddb87a0b40262ff99d675e946f57427642303938. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-19Merge branch '2021-10-18-OF_xxx-cleanup'Tom Rini23-51/+44
- Clean things up and rework such that we can drop OF_PRIOR_STAGE
2021-10-19ARM: imx: mx5: Add altbootcmd and resets to M53MenloMarek Vasut1-4/+11
Bulletproof the default boot command with reset statements in case any command in the chain would fail. In case a failure were to happen, the board will reset, increment boot counter and retry the procedure. In case the failures persist and the boot counter reaches the bootlimit, U-Boot starts altbootcmd instead of the default bootcmd boot command. The altbootcmd swaps the default boot partition for the other boot partition, which is an identical copy or an older copy, and tries booting from that one instead. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2021-10-19ARM: imx: mx5: Enable Thumb2 build on MX53 Menlo boardMarek Vasut1-0/+1
Build U-Boot in Thumb2 mode for M53Menlo board, this makes better use of the CPU since the instruction density is higher. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2021-10-19ARM: imx: mx5: Enable BMODE command on MX53 Menlo boardMarek Vasut2-1/+5
The board can do primary/secondary boot switching, enable the bmode command. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2021-10-19board: ea: mx7ulp_com: move setting CONFIG_BOOTCOMMAND to defconfigRicardo Salveti2-5/+2
Move setting CONFIG_BOOTCOMMAND to the mx7ulp_com_defconfig file. It also allows replacing the default CONFIG_BOOTCOMMAND without code modification. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-10-19smegw01: Select IMX_HABFabio Estevam1-0/+1
Select IMX_HAB to allow secure boot. Signed-off-by: Fabio Estevam <festevam@denx.de>
2021-10-19smegw01: Add redundant environment supportFabio Estevam1-1/+3
Add redundant environment support as it is required by SWUpdate. While at it, place the CONFIG_ENV_OFFSET at 0x100000 to allow more headroom. Signed-off-by: Fabio Estevam <festevam@denx.de>
2021-10-19apalis-imx6: use dynamic DDR calibrationFrancesco Dolcini2-0/+20
Enable dynamic DDR calibration to have a reliable behavior on edge temperatures conditions. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2021-10-19colibri-imx6: use dynamic DDR calibrationFrancesco Dolcini2-0/+23
Enable dynamic DDR calibration to have a reliable behavior on edge temperatures conditions. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2021-10-18treewide: Remove OF_PRIOR_STAGEWIP/bisect-testingIlias Apalodimas4-25/+8
The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-18board: arm: Remove OF_PRIOR_STAGE from the remaining Arm boardsIlias Apalodimas4-3/+8
At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got introduced, in order to support a DTB handed over by an earlier stage boo loader. However we have another option in the Kconfig (OF_BOARD) which has identical semantics. So let's remove the option in an effort to simplify U-Boot's config and DTB management, and use OF_BOARD instead. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-18riscv: Remove OF_PRIOR_STAGE from RISC-V boardsIlias Apalodimas16-23/+28
At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got introduced, in order to support a DTB handed over by an earlier stage boo loader. However we have another option in the Kconfig (OF_BOARD) which has identical semantics. On RISC-V some of the boards pick up the DTB from a1 and copy it in their private gd_t. Apart from that they copy it to prior_stage_fdt_address, if the Kconfig option is selected, which is unnecessary. So let's switch the config option for those boards to OF_BOARD and define the required board_fdt_blob_setup() for them. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-17Merge tag 'u-boot-rockchip-20211015' of ↵WIP/17Oct2021Tom Rini14-100/+117
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Fix for Rockchip mmc HS400 mode; - Fix for px30 board Odroid Go; - rockchip_sfc update; - rk3568 clk update; - doc fix;
2021-10-15Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-tegraTom Rini13-308/+321
On merge, fixup order of fdtdec_add_reserved_memory parameters in arch/arm/cpu/armv8/fsl-layerscape/soc.c Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-15Merge branch '2021-10-15-Kconfig-migrations'Tom Rini240-321/+38
- Assorted Kconfig migration patches
2021-10-15configs: Resync with savedefconfigTom Rini206-220/+17
Resync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-15Convert CONFIG_USB_EHCI_IS_TDI to KconfigMarek Behún26-61/+8
On mvebu this is defined if and only if !ARM64. Otherwise it is defined for boards with ARCH_MX23, ARCH_TEGRA and ARCH_ZYNQ, and also for SOC_AR934X (tplink_wdr4300). Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15Drop CONFIG_USB_EHCI_KIRKWOODMarek Behún2-2/+0
This config option doesn't do anything. nas220 uses USB_EHCI_MARVELL. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15Convert CONFIG_USB_EHCI_MXS to KconfigMarek Behún3-2/+7
This option is only used for mx23evk_defconfig mx23_olinuxino_defconfig which are the only i.MX23 boards. Add depend on ARCH_MX23 and default to y. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15Rename CONFIG_EHCI_IS_TDI to CONFIG_USB_EHCI_IS_TDIMarek Behún25-25/+25
In preparation for moving this option to Kconfig, rename it to be consistent with other USB EHCI Kconfig options. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15mmc: rockchip_sdhci: enable strobe line for HS400Yifeng Zhao1-0/+3
The default configuration of rk3399 EMMC PHY does not enable the strobe line, and EMMC controller will got data transmission error at HS400 mode. Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15clk: rockchip: rk3568: update clksElaine Zhang2-3/+10
fix up ppll init freq. support tclk_emmc. add freq (26M) for mmc device. fix up the sfc clk rate unit error. Change in V2: remove change id. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15spi: rockchip_sfc: Using read_pollJon Lin1-32/+35
Using read_poll logic. Tested-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15spi: rockchip_sfc: Implement set_speed logicJon Lin1-43/+39
Set clock related processing into set_speed logic. And Optimize printing format. Tested-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15rockchip: px30: sync serial flash controller bindings with mainlineChris Morgan3-7/+7
The devicetree submitted and approved for the mainline linux kernel is slightly different than the one present here. This syncs both devicetrees (for the Rockchip SFC node at least) present on the PX30 and the Odroid Go Advance. Changes include renaming the flash node, reordering the values in the SFC node for the rk3326-odroid-go2, changing the name of the cs pinctrl node to cs0, and updating the u-boot specific tree to utilize the new flash node value. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>