aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-05-20Merge https://source.denx.de/u-boot/custodians/u-boot-usbWIP/20May2022Tom Rini4-1/+35
2022-05-20usb: dwc3: Fix non-usb3 configurationsJan Kiszka1-1/+3
Missing nodes may also be signaled via -ENODATA. We need to check for that to prevent failing in non-usb3 setups. Furthermore, dev.phy must be NULL'ed in case usb3-phy was not found. Fixes: 142d50fbce7c ("usb: dwc3: Add support for usb3-phy PHY configuration") Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-05-20Merge tag 'u-boot-stm32-20220520' of ↵Tom Rini3-20/+118
https://source.denx.de/u-boot/custodians/u-boot-stm - spi: fix busy bit check in stm32_qspi driver - stm32mp15: configure Buck3 voltage per PMIC NVM on Avenger96 board
2022-05-20usb: xhci-dwc3: Support role switch default roleMark Kettenis3-0/+32
When the device tree indicates support for role switching through the "usb-role-switch" property, take the "role-switch-default-mode" property into account when deciding which role to put the controller into. This makes USB devices work on Apple M1 systems where the device tree may include a "dr_mode" property that is set to "otg", but where we need to put the controller into "host" mode to see devices connected to the type-C ports. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2022-05-19spi: stm32_qspi: Remove SR_BUSY bit check before sending commandPatrice Chotard1-4/+0
Waiting for SR_BUSY bit when receiving a new command is not needed. SR_BUSY bit is already managed in the previous command treatment. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-19spi: stm32_qspi: Always check SR_TCF flags in stm32_qspi_wait_cmd()Patrice Chotard1-12/+11
Currently, SR_TCF flag is checked in case there is data, this criteria is not correct. SR_TCF flags is set when programmed number of bytes have been transferred to the memory device ("bytes" comprised command and data send to the SPI device). So even if there is no data, we must check SR_TCF flag. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-19ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96Marek Vasut2-4/+107
The Avenger96 board comes in multiple regulator configurations. - rev.100 or rev.200 have Buck3 preconfigured to 3V3 operation on boot and contains extra Enpirion EP53A8LQI DCDC converter which supplies the IO. Reduce Buck3 voltage to 2V9 to not waste power. - rev.200L have Buck3 preconfigured to 1V8 operation and have no Enpirion EP53A8LQI DCDC anymore, the IO is supplied from Buck3. Configure the Buck3 voltage on this board per PMIC NVM settings and update buck3 voltage limits in DT passed to OS before booting OS to prevent potential hardware damage. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-18Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/18May2022Tom Rini23-48/+92
- Misc Kconfig cleanups (Chris & Pali) - turris_omnia: Fix hangup in debug UART (this introduces TPL/SPL_DEBUG_UART_BASE) Pali - mvebu: uDPU: include fixed-phy support (Robert) - pinctrl: probe pinctrl drivers during post-bind (Robert)
2022-05-17pinctrl: probe pinctrl drivers during post-bindRobert Marko1-0/+7
Currently, pinctrl drivers only get probed if pinconf is actually being used, however on SoC-s like Armada 3720 pinctrl driver is a also the GPIO driver. So, if the pinctrl driver doesn't get probed GPIO-s won't get registered and thus they cannot be used. This is a problem on the Methode eDPU as it just uses SB pins as GPIO-s and without them being registered networking won't work as it only has one SFP slot and the TX disable GPIO is on the SB controller. So, probe the pinctrl drivers using DM_FLAG_PROBE_AFTER_BIND like LED uclass does. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-17mvebu: uDPU: include fixed-phy supportRobert Marko1-0/+1
uDPU relies on using fixed-phy for the SFP support, and since the fixed-phy parsing was moved to the generic driver instead of mvneta networking stopped working on uDPU with: uDPU>> dhcp dm_eth_phy_connect failed This is due to the conversion commit not enabling fixed-phy support in defconfig like it did for other boards. Fixes: 77fcf3cf1251 ("net: mvneta: Convert to use PHY_FIXED for fixed-link") Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-17arm: mvebu: turris_{omnia,mox}: Enable CONFIG_NETCONSOLEPali Rohár2-0/+2
This allows to use U-Boot console on Turris devices via network. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-17arm: mvebu: Fix DEBUG_UART_BASE for all 32-bit boardsPali Rohár10-10/+20
UART base address is located in internal registers. Internal registers for 32-bit mvebu boards in SPL are at address 0xd0000000 and in proper U-Boot at address 0xf1000000. Fix DEBUG_UART_BASE option for all 32-bit mvebu boards. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-17arm: mvebu: turris_omnia: Fix DEBUG_UART_BASEPali Rohár1-1/+2
Internal registers in SPL are at address 0xd0000000 and in proper U-Boot at address 0xf1000000. UART base address is located in internal registers. Fix DEBUG_UART_BASE option to correct value for both SPL and proper U-Boot. This change fixes hangup of proper U-Boot when it is trying to print something via debug UART. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-17serial: ns16550: Add support for SPL_DEBUG_UART_BASEPali Rohár1-2/+2
Use CONFIG_VAL(DEBUG_UART_BASE) instead of CONFIG_DEBUG_UART_BASE, so proper config value (CONFIG_DEBUG_UART_BASE or CONFIG_SPL_DEBUG_UART_BASE) is used based on building target. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-17serial: Add new config option TPL_DEBUG_UART_BASEPali Rohár1-0/+7
TPL_DEBUG_UART_BASE is same as DEBUG_UART_BASE, but applies only for TPL. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Stefan Roese <sr@denx.de>
2022-05-16serial: Add new config option SPL_DEBUG_UART_BASEPali Rohár1-0/+7
SPL_DEBUG_UART_BASE is same as DEBUG_UART_BASE, but applies only for SPL. In some cases base address of UART is different in SPL and proper U-Boot. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-16arm: mvebu: Move internal registers in arch_very_early_init() functionPali Rohár4-31/+29
Moving of internal registers from INTREG_BASE_ADDR_REG to SOC_REGS_PHY_BASE needs to be done very early, prior calling any function which may touch internal registers, like debug_uart_init(). So do it earlier in arch_very_early_init() instead of arch_cpu_init(). Movement is done in proper U-Boot, not in SPL. SPL may return to bootrom and bootrom requires internal registers at (old) expected location. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-16arm: Add new config option ARCH_VERY_EARLY_INITPali Rohár2-0/+11
When this option is set then ARM _main() function would call arch_very_early_init() function at the beginning. It would be before calling any other functions like debug_uart_init() and also before initializing C runtime environment. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-16arm: mvebu: Remove unused ARMADA_64BITChris Packham1-4/+0
Nothing selects ARMADA_64BIT. Instead the 64-bit SoCs just select ARM64 directly. Remove the unused config item. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-16cmd: mvebu: Hide bubt specific options when bubt is disabledPali Rohár1-0/+4
CONFIG_MVEBU_NAND_BOOT, CONFIG_MVEBU_SPI_BOOT, CONFIG_MVEBU_MMC_BOOT and CONFIG_MVEBU_UBOOT_DFLT_NAME are unused when CONFIG_CMD_MVEBU_BUBT is not enabled. So hide them. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-11Merge branch '2022-05-11-Kconfig-cleanups-etc'Tom Rini22-36/+43
- Migrate CONFIG_MTD_CONCAT to Kconfig, use CONFIG_VAL/IS_ENABLED in more places, rename SPL_LEGACY_IMAGE_SUPPORT to SPL_LEGACY_IMAGE_FORMAT and update some related dependencies for TI platforms.
2022-05-11Makefile: update warning about CONFIG_OF_EMBEDWIP/2022-05-11-Kconfig-cleanups-etcRalph Siemsen1-1/+1
Update the diagnostic message with revised location of document, which changed in 3e9fddfc4f1 ("doc: Move devicetree control doc to rST") Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
2022-05-11board_r: use IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) in board_init_r()Ovidiu Panait1-8/+5
Drop CONFIG_NEEDS_MANUAL_RELOC ifdefs in board_init_r() and use IS_ENABLED() instead. Also, use the MANUAL_RELOC() macro to update the initcall pointers. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-05-11Convert CONFIG_MTD_CONCAT to KconfigChris Packham5-3/+9
This converts the following to Kconfig: CONFIG_MTD_CONCAT Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-11common/console.c: use CONFIG_VAL() with PRE_CON_BUF_* variablesRasmus Villemoes1-6/+6
There is currently no support for PRE_CONSOLE_BUFFER in SPL, but if and when that gets implemented, one would almost certainly want to use a different address and/or size for the buffer (e.g., U-Boot proper might specify an address in DRAM and a generous buffer, while SPL would be much more constrained). So a prerequisite for adding SPL_PRE_CONSOLE_BUFFER is to make the code use SPL_-specific values. No functional change. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-05-11boot: Kconfig: Enable FIT processing by default on TI secure devicesAndrew Davis1-0/+2
TI secure devices chain-of-trust depends on FIT image processing, enable it by default on these devices. This also reduces the delta between the secure and non-secure defconfig files. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-11boot: Kconfig: Disable non-FIT loading for TI secure devicesAndrew Davis1-1/+1
Non-FIT image loading support should be disabled for TI secure devices as the image handlers for those image types do not follow our secure boot checks. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-11spl: Force disable non-FIT loading for TI secure devicesAndrew Davis1-2/+4
Booting of non-FIT images bypass our chain-of-trust boot flow, these options should not be allowed when high security is set. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-11spl: Rename Kconfig SPL_LEGACY_IMAGE_SUPPORT to SPL_LEGACY_IMAGE_FORMATAndrew Davis13-15/+15
This matches what this support is called in the non-SPL case. The postfix _SUPPORT is redundant as enabling Kconfig options implies support. With this we can use CONFIG_IS_ENABLED() as needed. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-10Merge tag 'u-boot-stm32-20220510' of ↵WIP/10May2022Tom Rini60-302/+1569
https://source.denx.de/u-boot/custodians/u-boot-stm Add new STM32 MCU boards and Documentation STM32 programmer improvements video: support several LTDC HW versions and fix data enable polarity board: fix stboard error message, consider USB cable connected when boot device is USB configs: stm32mp1: set console variable for extlinux.conf configs: stm32mp1: add support for baudrate higher than 115200 for ST-Link ARM: stm32mp: Fix Silicon version handling and ft_system_setup() phy: stm32-usbphyc: Add DT phy tuning support arm: dts: stm32mp15: alignment with v5.18 ram: Conditionally enable ASR mach-stm32mp: psci: retain MCUDIVR, PLL3CR, PLL4CR, MSSCKSELR across suspend configs: Use TFTP_TSIZE on DHSOM and STMicroelectronics boards ARM: stm32: Use default CONFIG_TFTP_BLOCKSIZE on DHSOM pinctrl: stm32: rework GPIO holes management
2022-05-10Merge tag 'i2c-2022-07' of https://source.denx.de/u-boot/custodians/u-boot-i2cTom Rini4-2/+7
i2c changes for 2022.07 - i2c: ihs: intel: Fix typo in comments Patch from Michal - misc: atsha204a: Add support for atsha204 chip from Pali
2022-05-10misc: Fix always compiling MISC even for SPL/TPLSean Anderson2-1/+13
We should only build support for misc if the appropriate SPL/TPL symbol is defined. To ease the transition, make SPL/TPL_MISC default to MISC. This is necessary because many drivers don't specify their dependencies properly. These defaults can be removed once all drivers depend on the appropriate config. Fixes: aaba703fd0 ("spl: misc: Allow misc drivers in SPL and TPL") Signed-off-by: Sean Anderson <sean.anderson@seco.com> [trini: Add VPL_MISC symbol, handle like SPL/TPL_MISC] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-05-10doc: Add documentation for STM32 MCUsPatrice Chotard9-0/+194
Add documentation for STM32 MCUs (F4, F7 and H7 series). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32746g-eval: Add stm32746g-eval_spl_defconfigPatrice Chotard2-0/+87
Add stm32746g-eval_spl_defconfig for stm32746g evaluation board to build SPL. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32746g-eval: Add stm32746g-eval_defconfigPatrice Chotard2-0/+65
Add stm32746g-eval_defconfig for stm32746g evaluation board to build U-Boot proper. Full board description can be found here : https://www.st.com/en/evaluation-tools/stm32746g-eval.html Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f746-disco: use CONFIG_DEFAULT_DEVICE_TREE as fdtfilePatrice Chotard1-1/+1
As stm32f46-disco, stm32f769-disco and stm32746g-eval are very similar except their respective device tree file. These 3 boards uses the same TARGET_STM32F746_DISCO flag (so same include/configs/stm32f746-disco.h and same board file board/st/stm32f746-disco/stm32f746-disco.c) To be able to compile these 3 boards, replace the hard-coded device-tree name in include/configs/stm32f746-disco.h by CONFIG_DEFAULT_DEVICE_TREE which is set in each board defconfig file with the correct value. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10board: stm32f746-disco: Fix dram_init() in none SPL configPatrice Chotard1-1/+1
Replace CONFIG_SUPPORT_SPL by CONFIG_SPL_BUILD to allow dram_init() execution when using none SPL defconfig (stm32f746-disco_defconfig). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f746-disco: Migrate SPL flags to defconfigPatrice Chotard2-24/+20
Migrate SPL flags to stm32f746-disco_spl_defconfig Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f769-disco: Migrate SPL flags to defconfigPatrice Chotard1-4/+21
Migrate SPL flags to stm32f769-disco_spl_defconfig Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f769-disco: Add stm32f769-disco_defconfigPatrice Chotard1-0/+65
Add stm32f769-disco_defconfig for stm32f769 discovery board to build U-Boot proper. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f769-disco: Rename stm32f769-disco_defconfig to ↵Patrice Chotard2-0/+1
stm32f769-disco_spl_defconfig The current stm32f769-disco_defconfig file supports SPL, rename it to stm32f769-disco_spl_defconfig to reflect the supported configuration. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f746-disco: Add stm32f746-disco_defconfigPatrice Chotard1-0/+64
Add stm32f746-disco_defconfig for stm32f746 discovery board to build U-Boot proper. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f746-disco: Rename stm32f746-disco_defconfig to ↵Patrice Chotard2-0/+1
stm32f746-disco_spl_defconfig The current stm32f746-disco_defconfig file supports SPL, rename it to stm32f746-disco_spl_defconfig to reflect the supported configuration. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f746-disco: Concatenate spl and u-boot binariesPatrice Chotard2-0/+2
This allows to concatenate spl and u-boot binaries together. Previously, both binaries has to be flashed separately at the correct offset (spl at offset 0 and u-boot at offset 0x8000). With this patch, only one binary is generated (u-boot-with-spl.bin) and has to be copied in flash at offset 0 using openocd for example or simply copied in exported mass storage. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10clk: stm32mp1: Add missing newlineMarek Vasut1-1/+1
Add missing newline to this debug message, no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-05-10board: st: stm32mp1: Consider USB cable connected when boot device is USBPatrice Chotard1-0/+7
Always consider USB cable is connected when USB boot device is detected. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10phy: stm32-usbphyc: stm32-usbphyc: Add DT phy tuning supportPatrice Chotard1-0/+167
Add support of phy-tuning properties for sm32-usbphyc's phy tuning aligned with v5.15 kernel bindings. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10gpio: stm32_gpio: Rework GPIO hole managementPatrice Chotard3-73/+37
On some STM32 SoC's package, GPIO bank may have hole in their GPIO bank Example: If GPIO bank have 16 GPIO pins [0-15]. In particular SoC's package case, some GPIO bank can have less GPIO pins: - [0-10] => 11 pins; - [2-7] => 6 pins. Commit dbf928dd2634 ("gpio: stm32f7: Add gpio bank holes management") proposed a first implementation by not counting GPIO "inside" hole. GPIO are not displaying correctly using gpio or pinmux command when GPIO holes are located at the beginning of GPIO bank. To simplify, consider that all GPIO have 16 GPIO and use the gpio_ranges struct to indicate if a GPIO is mapped or not. GPIO uclass offers several GPIO functions ("input", "output", "unused", "unknown" and "func"), use "unknown" GPIO function to indicate that a GPIO is not mapped. stm32_offset_to_index() is no more needed and removed. This must be reflected using the "gpio" command to indicate to user that a particular GPIO is not mapped (marked as "unknown") as shown below: Example for a 16 pins GPIO bank with the [2-7] mapping (only 6 pins mapped): GPIOI0 : unknown GPIOI1 : unknown GPIOI2 : analog GPIOI3 : analog GPIOI4 : alt function 0 push-pull pull-down GPIOI5 : alt function 0 push-pull pull-down GPIOI6 : alt function 0 push-pull pull-down GPIOI7 : analog GPIOI8 : unknown GPIOI9 : unknown GPIOI10 : unknown GPIOI11 : unknown GPIOI12 : unknown GPIOI13 : unknown GPIOI14 : unknown GPIOI15 : unknown Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10pinctrl: pinctrl_stm32: Use GPIOF_UNKNOWN to indicate not mapped pinsPatrice Chotard1-2/+0
GPIOF_UNKNOWN becomes a valid pin muxing information to indicate that a pin is not mapped. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10pinctrl: pinctrl_stm32: Update pinmux_mode definitionPatrice Chotard1-7/+6
pinmux_mode[] is linked to gpio_function[] defined in gpio-uclass.c So reuse the same gpio_func_t enum value Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>