summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2023-08-31x86: Convert arch_fsp_init() to use eventsSimon Glass
Convert this to use events instead of calling a function directly in the init sequence. Rename it to arch_fsp_init_f() to distinguish it from the one that happens after relocation. For FSPv2 nothing needs to be done here, so drop the empty function. Signed-off-by: Simon Glass <[email protected]>
2023-08-31event: Convert existing spy records to simpleSimon Glass
Very few of the existing event-spy records use the arguments they are passed. Update them to use a simple spy instead, to simplify the code. Where an adaptor function is currently used, remove it where possible. Signed-off-by: Simon Glass <[email protected]>
2023-08-30Merge tag 'u-boot-at91-2023.10-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 into next First set of u-boot-at91 features for the 2023.10 cycle: This feature set includes a new board sama5d29 Curiosity, and various fixes and alignments for sam9x60 and sam9x60 curiosity board.
2023-08-29nuvoton: npcm845-evb: Add a newline at the end of fileSughosh Ganu
Add a newline at the end of the dts, without which the build fails when including a dtsi file. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-08-29ARM: dts: at91: sam9x60-curiosity: Sync gpio button from LinuxAlexander Dahl
Copied as is from Linux Kernel release v6.4. (dts file is still the same in Linux v6.5-rc7 but was moved to vendor sub-directories with v6.5-rc1.) Button works out of the box now if the following config options are enabled: CONFIG_BUTTON, CONFIG_BUTTON_GPIO, CONFIG_CMD_BUTTON, CONFIG_DM_GPIO. Signed-off-by: Alexander Dahl <[email protected]>
2023-08-29board: sam9x60-curiosity: Let LED subsystem init leds if enabledAlexander Dahl
If CONFIG_LED and CONFIG_LED_GPIO are enabled, it is not necessary to initialize the RGB LED on the board by manually setting hardcoded GPIOs anymore. Everything is well defined in dts and can be used like on boards of other vendors. Keep the old behaviour as fallback, though. With all this in place enabling CONFIG_CMD_LED gives us a working 'led' command on the U-Boot shell. Signed-off-by: Alexander Dahl <[email protected]>
2023-08-29ARM: dts: at91: sam9x60-curiosity: Sync LED nodes from LinuxAlexander Dahl
Copied as is from Linux Kernel release v6.4. (dts file is still the same in Linux v6.5-rc7 but was moved to vendor sub-directories with v6.5-rc1.) Signed-off-by: Alexander Dahl <[email protected]>
2023-08-28Revert "arm: imx: mx7: Move CONFIG_OPTEE_TZDRAM_SIZE from lib/optee"Ricardo Salveti
This reverts commit c5b68ef8af3c2f515c1f5b8d63a69359a85d753b. CONFIG_OPTEE_TZDRAM_SIZE is used by imx6-based SoCs as well. Move the option back. Signed-off-by: Ricardo Salveti <[email protected]> Signed-off-by: Oleksandr Suvorov <[email protected]>
2023-08-28imx: Drop unneeded phandle in FIT templateSimon Glass
Adding a phandle to a template node is not allowed, since when the node is instantiated multiple times, we end up with duplicate phandles. Drop this invalid constructs. Signed-off-by: Simon Glass <[email protected]> Acked-by: Tim Harvey <[email protected]>
2023-08-28arm: dts: mediatek: convert gmac link mode to 2500base-x for r3Frank Wunderlich
Ethernet on Bananapi-r3 is broken after commit bd70f3cea353 ("net: mediatek: add support for SGMII 1Gbps auto-negotiation mode") because changes from this commit were not applied to bpi-r3 devicetree too: commit aef54ea16cac ("arm: dts: medaitek: convert gmac link mode to 2500base-x") Signed-off-by: Frank Wunderlich <[email protected]> Reviewed-by: Weijie Gao <[email protected]>
2023-08-25bootstd: Add a test for bootmeth_crosSimon Glass
The ChromiumOS bootmeth has no tests at present. Before adding more features. add a basic test. This creates a disk which can be scanned by the bootmeth, so make sure things work. It is quite rudimentary, since the kernel is faked, the root disk is missing and there is no cmdline stored. Enable the bootmeth for snow so it can build the unit test. Signed-off-by: Simon Glass <[email protected]>
2023-08-25sandbox: Add a way to access persistent test filesSimon Glass
Some pytests create files in the persistent-data directory. It is useful to be able to access these files in C tests. Add a function which can locate a file given its leaf name, using the environment variable set up in test/py/conftest.py Signed-off-by: Simon Glass <[email protected]>
2023-08-25expo: Move cedit theme under bootstdSimon Glass
This is related to standard boot, so put it under the same node. This may simplify schema upstreaming later. Mention themes in the documentation while we are here. Signed-off-by: Simon Glass <[email protected]>
2023-08-25ARM: dts: stm32mp13: remove shmem for scmi-opteePatrick Delaunay
CFG_STM32MP1_SCMI_SHM_SYSRAM will be disabled by default for STM32MP13x SoCs in next OP-TEE version and the OP-TEE SMCI server uses the OP-TEE native shared memory registered by clients. To be compatible by default with this configuration this patch removes the shared memory in the SCMI configuration and the associated reserved memory in SRAM. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-08-25ARM: dts: stm32mp15: remove shmem for scmi-opteePatrick Delaunay
Since OP-TEE commit 89ba3422ee80 ("plat-stm32mp1: scmi_server: default use OP-TEE shared memory"), integrated in OP-TEE 3.22.0-rc1 the default configuration for STM32MP15x SoCs changes, CFG_STM32MP1_SCMI_SHM_SYSRAM is disabled by default and the OP-TEE SMCI server uses ithe OP-TEE native shared memory registered by clients. To be compatible by default with this configuration and the next OP-TEE version, this patch removes the SHMEM in the SCMI configuration and the associated reserved memory in the last 4KByte page of SRAM, in the STM32MP15 device tree. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-08-24arm: qemu: Enable usb keyboard as an input deviceAlper Nebi Yasak
Commit 02be57caf730 ("riscv: qemu: Enable usb keyboard as an input device") adds PCI xHCI support to QEMU RISC-V virtual machines and enables using a USB keyboard as one of the input devices. Similarly, enable those for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-08-24arm: qemu: Enable PRE_CONSOLE_BUFFERAlper Nebi Yasak
Commit 608b80b5b855 ("riscv: qemu: Enable PRE_CONSOLE_BUFFER") enables buffering console messages for QEMU RISC-V virtual machines so those printed before the video console is available will still show up on the display. Similarly, enable it for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-08-24arm: qemu: Enable Bochs video supportAlper Nebi Yasak
Commit 716161663ec49 ("riscv: qemu: Enable Bochs video support") enables a video console for QEMU RISC-V virtual machines using an emulated Bochs VGA card. Similarly, enable it for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-08-22riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callbackChanho Park
Since the Patch 55171aedda88, VisionFive2 booting has been broken [1]. VisionFive2 board requires to enable CONFIG_TIMER_EARLY but booting went to panic from initr_dm_devices due to lack of a timer device. - Error logs initcall sequence 00000000fffd8d38 failed at call 00000000402185e4 (err=-19) Thus, we need to move riscv_cpu_probe function in order to register the timer earlier than initr_dm_devices. Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Cc: Simon Glass <[email protected]> Cc: Bin Meng <[email protected]> Signed-off-by: Chanho Park <[email protected]> Tested-by: Milan P. Stanić <[email protected]> Tested-by: Roland Ruckerbauer <[email protected]> Tested-by: Roland Ruckerbauer <[email protected]>
2023-08-21Merge tag 'v2023.10-rc3' into nextTom Rini
Prepare v2023.10-rc3 Signed-off-by: Tom Rini <[email protected]>
2023-08-20Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
2023-08-19arm: rmobile: Fix off-by-one error in cpuinfoPaul Barker
In rmobile_cpuinfo_idx() there is an off-by-one error in accessing the rmobile_cpuinfo array. At the end of the loop, i is equal to the array size, i.e. rmobile_cpuinfo[i] accesses one entry past the end of the array. The last entry in the array is a fallback value so the loop should count to ARRAY_SIZE(rmobile_cpuinfo) - 1 instead, this will leave i equal to the index of the fallback value if no match is found. Signed-off-by: Paul Barker <[email protected]> Reviewed-by: Biju Das <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2023-08-18Merge tag 'tegra-for-2023.10-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tegra ARM: tegra: Changes for v2023.10-rc1 This adds support for various new Tegra30 boards (ASUS, LG and HTC) and has some other minor enhancements, such as enabling the poweroff command on several Tegra210 and Tegra186 boards.
2023-08-17arm: mediatek: add usb support for MT7988Frank Wunderlich
MT7988 has a t-phy and an x-phy controller. There is already a driver for t-phy so we can add USB support for this phy type. Signed-off-by: Frank Wunderlich <[email protected]>
2023-08-17arm: dts: mediatek: convert gmac link mode to 2500base-x for r3Frank Wunderlich
Ethernet on Bananapi-r3 is broken after commit bd70f3cea353 ("net: mediatek: add support for SGMII 1Gbps auto-negotiation mode") because changes from this commit were not applied to bpi-r3 devicetree too: commit aef54ea16cac ("arm: dts: medaitek: convert gmac link mode to 2500base-x") Signed-off-by: Frank Wunderlich <[email protected]> Reviewed-by: Weijie Gao <[email protected]>
2023-08-17arm: bcm283x undefined reference to "print_cpuinfo"Naveen Kumar Chaudhary
Builds for Raspberry Pi targets fail when CONFIG_DISPLAY_CPUINFO is enabled and following error can be seen - common/board_f.o:(.rodata.init_sequence_f+0x90): undefined reference to `print_cpuinfo' Added implementation of function "print_cpuinfo" Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2023-08-17armv8: Skip PIE in SPL due to load alignment fault.Kevin Chen
When PIE is enabled in start.S, u-boot/-spl use __rel_dyn_start and _rel_dyn_end symbol to be loaded to and executed at a different address than it was linked at. u-boot-spl.lds is used in SPL build, but relocation information section(.rela*) were discarded. In line number 80 in arch/arm/cpu/armv8/u-boot-spl.lds /DISCARD/ : { *(.rela*) } If PIE enabled in SPL, __rel_dyn_start which is defined as .rel_dyn_start in sections.c will be apended to the end of .bss section. In our ASPEED case, size of .bss section would let .rel_dyn_start without 8-byte alignment, leading to alignment fault when executing ldp instuction in pie_fix_loop. Signed-off-by: Kevin Chen <[email protected]>
2023-08-17arm: Use builtins for ffs/flsSean Anderson
Since ARMv5, the clz instruction allows for efficient implementation of ffs/fls with builtins. Until ARMv7 (with Thumb-2), this instruction is only available in ARM mode. LTO makes it difficult to force specific functions to be in ARM mode, as it is effectively a form of very aggressive inlining. To work around this, fls/ffs are implemented in assembly for ARMv5 and ARMv6 when compiling U-Boot in Thumb mode. Overall, this saves around 75 bytes per call. This code is synced with v5.15 of the Linux kernel. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-08-17arm: dts: k3-am64: Sync DT with Linux v6.5-rc1Roger Quadros
Sync all am642-evm/am642-sk related DT files with Linux v6.5-rc1. - drop timer1 in favor of main_timer0 in am64-main.dtsi. Need to delete clock & power domain properties of main_timer1 in -r5.dts else won't boot. This is because timer_init is done during rproc_start to start System Firmware, but we can't do any clock/power-domain operations before System Firmware starts. - same constraint applies to main_uart0 - drop cpsw3g custom DT property 'mac_efuse' and custom DT node cpsw-phy-sel as driver picks these from standard property/node. - include board dts file in -r5 dts file to avoid duplication of nodes. Include -u-boot.dtsi on top. - drop duplicate nodes in -r5 dts and -u-boot.dtsi Signed-off-by: Roger Quadros <[email protected]> Tested-by: Nishanth Menon <[email protected]> Reviewed-by: Nishanth Menon <[email protected]>
2023-08-17Revert "ARM: dts: k3-am642-sk-u-boot: add PMIC node"Roger Quadros
This reverts commit 28a4c3113445d4400639f357fae0def007a41093. This node should be in the board DT file and should come from upstream. Moreover, this PMIC is no present on all variants of am642-sk and will need a separate board DT file. Signed-off-by: Roger Quadros <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Tested-by: Nishanth Menon <[email protected]> #SK-AM64B
2023-08-16ARM: dts: stm32: Switch DWMAC RMII clock to MCO2 on DHCOMMarek Vasut
The DHCOM SoM has two options for supplying ETHRX clock to the DWMAC block and PHY. Either (1) ETHCK_K generates 50 MHz clock on ETH_CLK pad for the PHY and the same 50 MHz clock are fed back to ETHRX via internal eth_clk_fb clock connection OR (2) ETH_CLK is not used at all, MCO2 generates 50 MHz clock on MCO2 output pad for the PHY and the same MCO2 clock are fed back into ETHRX via ETH_RX_CLK input pad using external pad-to-pad connection. Option (1) has two downsides. ETHCK_K is supplied directly from either PLL3_Q or PLL4_P, hence the PLL output is limited to exactly 50 MHz and since the same PLL output is also used to supply SDMMC blocks, the performance of SD and eMMC access is affected. The second downside is that using this option, the EMI of the SoM is higher. Option (2) solves both of those problems, so implement it here. In this case, the PLL4_P is no longer limited and can be operated faster, at 100 MHz, which improves SDMMC performance (read performance is improved from ~41 MiB/s to ~57 MiB/s with dd if=/dev/mmcblk1 of=/dev/null bs=64M count=1). The EMI interference also decreases. Ported from Linux kernel commit 73ab99aad50cd ("ARM: dts: stm32: Switch DWMAC RMII clock to MCO2 on DHCOM") Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-08-16ARM: dts: stm32mp: alignment with v6.4Patrick Delaunay
Device tree alignment with Linux kernel v6.4. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-08-16ARM: stm32: Inhibit PDDS because CSTBYDIS is setMarek Vasut
The PWR_MPUCR CSTBYDIS bit is set, therefore the CA cores can never enter CStandby state and would always end up in CStop state. Clear the PDDS bit, which indicates the CA cores can enter CStandby state as it makes little sense to keep it set with CSTBYDIS also set. This does however fix a problem too. When both PWR_MPUCR and PWR_MCUCR PDDS bits are set, then the chip enters CStandby state even though the PWR_MCUCR CSTBYDIS is set. Clearing the PWR_MPUCR PDDS prevents that from happening. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2023-08-16ARM: dts: stm32: fix display pinmux for stm32f746-discoDario Binacchi
As reported by the datasheet (DocID027590 Rev 4) for PG12: - AF9 -> LCD_B4 - AF14 -> LCD_B1 So replace AF14 with AF9 for PG12 in the dts. Fixes: fe63d3cfb77ef ("ARM: dts: stm32: Sync DT with v4.20 kernel for stm32f7") Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-08-15common: return type board_get_usable_ram_topHeinrich Schuchardt
board_get_usable_ram_top() returns a physical address that is stored in gd->ram_top. The return type of the function should be phys_addr_t like the current type of gd->ram_top. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-08-15Merge branch '2023-08-14-assorted-general-updates' into nextTom Rini
- Assorted PCI-related fixes, add Apple Type-C PHY support, semihosting updates, fix a FAT corner-case, update the help on the pxe cmd and clean up the gpio uclass slightly.
2023-08-14phy: Add support for the Apple Type-C PHYMark Kettenis
This is merely a dummy driver that makes sure the DWC3 XHCI driver finds its reset and PHY controllers. We rely on iBoot to set up the PHY for us. Signed-off-by: Mark Kettenis <[email protected]>
2023-08-13ARM: rmobile: Update little‐endian byte order option in srec_cat commandHai Pham
Since srecord v1.60, option "-Little_Endian_CONSTant" is deprecated. Fix the build warnings by updating little‐endian byte order option in srec_cat command when generating loader header. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Hai Pham <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2023-08-12dts: rockchip: rk3308: Avoid warning for serial probe on prerelocMassimo Pegorer
Make device tree complete and consistent for pre relocation phase. Some nodes are missing, causing warnings to be issued on serial port probing during pre relocation phase (uclass_get_device_by_phandle_id fails when called by pinctrl_select_state_full: none of these failures is fatal nor causing issues). Add to *-u-boot.dtsi all required nodes with the 'bootph-some-ram' attribute. Signed-off-by: Massimo Pegorer <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12clk: rockchip: rk3308: Support reading UART rate and clock registersMassimo Pegorer
Add support to read RK3308 registers used to configure UART clocks, and thus to get UART rate and baudrate. This fixes clock_get_rate returning error on serial device probing. Moreover, there is no need anymore to use 'clock-frequency' property for UART nodes in *-u-boot.dtsi files for all cases where UART is not inited by U-Boot proper or by SPL o by TPL code but by a preliminary external boot phase (for Rock PI S, UART is inited by external TPL). Signed-off-by: Massimo Pegorer <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: spl: Drop out of scope debug message related to uart initMassimo Pegorer
Debug uart is no more inited in board_init_f function: remove this debug message from board_init_f. If an earliest-as-possible message after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE Kconfig option, instead. Signed-off-by: Massimo Pegorer <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: spl: Drop useless call to debug_uart_initMassimo Pegorer
Since commit 0dba45864b2a ("arm: Init the debug UART") function debug_uart_init is called in crt files _main before calling board_init_f. Therefore, there is no need to call it again inside board_init_f implementation in arm/mach-rockchip/spl.c. Signed-off-by: Massimo Pegorer <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: rk356x-u-boot: Set max-frequency prop in sdhci nodeJonas Karlman
Most board device trees for RK356x set max-frequency = <200000000> in the sdhci node, some boards like Quartz64 do not. This result in an error message due to sdhci driver trying to set a clock rate of 0 instead of the max-frequency value. rockchip_sdhci_probe clk set rate fail! Fix this by setting a common max-frequency in rk356x-u-boot.dtsi. A patch to set default max-frequency of sdhci node in linux is planned. Also remove the forced status = "okay" for the sdhci and sdmmc0 nodes, boards already set correct state for these nodes. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12clk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_divJonas Karlman
The field for clk_cpll_div_25m_div in CRU_CLKSEL_CON81 is 6 bits wide, not 5 bits wide as currently defined in CPLL_25M_DIV_MASK. Fix this and the assert so that CPLL_25M can be assigned a 25 MHz rate. Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver") Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: cru: Enable cpu info support for rk3568Anton
Add cru structure definition in head file to support cpu_info driver. Series-version: 2 Series-changes: 2 Format the patch header, add commit message and signature. Signed-off-by: Anton <[email protected]> Signed-off-by: Kever Yang <[email protected]>
2023-08-12rockchip: rk3568: Add EmbedFire Lubancat 2 supportAndy Yan
LubanCat2 is a rk3568 based SBC from EmbedFire. Specification: - Rockchip rk3568 - LPDDR4/4X 1/2/4/8 GB - TF scard slot - eMMC 8/32/64/128 GB - Gigabit ethernet x 2 - HDMI out - USB 2.0 Host x 1 - USB 2.0 Type-C OTG x 1 - USB 3.0 Host x 1 - Mini PCIE interface for WIFI/BT module - M.2 key for 2280 NVME - 40 pin header The dts file is sync from linux mainline. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: rv1126: Enable fdtoverlay supportJagan Teki
Add fdtoverlay_addr_r and enable OF_LIBFDT_OVERLAY for the use of DT overlay in RV1126. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: dts: rk3328: rock64: Align spi flash entryPeter Robinson
Align the SPI flash entry with upstream. There's no need to diverge here. Signed-off-by: Peter Robinson <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-08-12rockchip: dts: rk3328: Add rng details to u-boot.dtsiPeter Robinson
Add the rk3328 rng details to the u-boot.dtsi and enable the RNG on the Rock64 to be able to provide a random seed via UEFI. Signed-off-by: Peter Robinson <[email protected]> (Fix typo message) Signed-off-by: Kever Yang <[email protected]>
2023-08-12rockchip: rk3399: remove duplicate call to regulators_enable_boot_onQuentin Schulz
An earlier commit makes the common SPL code call regulators_enable_boot_on and regulators_enable_boot_off before iterating over possible boot media for U-Boot proper. There is therefore no need to do this in the rk3399-specific code, so let's remove it. Cc: Quentin Schulz <[email protected]> Tested-by: Xavier Drudis Ferran <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Jagan Teki <[email protected]>