summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2023-03-29imx8ulp_evk: Change to use DDR driverYe Li
Remove the DDR initialization codes from board and enable the iMX8ULP DDR driver. Signed-off-by: Ye Li <[email protected]>
2023-03-29imx: sentinel: Update S400 API get info message structureYe Li
From Sentinel FW v0.0.9-9df0f503, the response message of get info API is changed to add OEM SRK and some states (IMEM, CSAL, TRNG). With old structure, we get failure from sentinel due to the buffer size can't fit with new response message. So update the API structure to fix the issue. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Update clocks to meet max rate restrictionsYe Li
Update PLL3/PLL4 PFD and USDHC clocks to meet maximum frequency restrictions. Detail clock rate changes in the patch: PLL3 PFD2: 389M -> 324M PLL3 PFD3: 336M -> 389M PLL3 PFD3: DIV1 336M -> 389M (OD), 194M (ND/LD) PLL3 PFD3: DIV2 336M -> 194M (OD), 97M (ND/LD) PLL4 PFD0: 792M -> 594M PLL4 PFD2: 792M -> 316.8M NIC_AP: 96M (ND) -> 192M, 48M (LD) -> 96M NIC_LPAV: 198 (ND) -> 192M, 99M (LD) -> 96M USDHC0: PLL3 PFD3 DIV1, 389M (OD), 194M (ND/LD) USDHC1: PLL3 PFD3 DIV2, 194M (OD), 97M (ND/LD) USDHC2: PLL3 PFD3 DIV2, 194M (OD), 97M (ND/LD) Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Configure XRDC PDAC and MSC for DBD owner=S400 onlyYe Li
This patch is used to support DBD owner fuse changed to S400 only. The XRDC PDAC2 for LPAV pbridge5 and MSC1/2/3 for GPIO and LPAV are not configured by S400 default setting. So these PDAC and MSC are invalid, only DBD owner can access the corresponding resources. We have to configure necessary PDAC and MSC for SPL before DDR initialization. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: upower: make code cleanerPeng Fan
To clean the upower codes by aligning codes format, check err_code and add detail bits list for the memory magic number Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: upower: replace magic number with macroPeng Fan
The swton indicates the logic switch, magic number 0xfff80 is hard to understand, so use macro. Some board design may not have MIPI_CSI voltage input connected per data sheet. In that case, the upower power on API may dead loop mu to wait response, however there is no response. So remove MIPI_CSI here, let linux power domain driver to runtime enable the power domain. Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Clear dividers in PLL3DIV_PFD registersYe Li
At present, in cgc1_pll3_init we don't set the pll3pfd div values, just use the default 0. But on A1 part, ROM will set PLL3 pfd1div2 to 1 and pfd2div1 to 3. This finally causes some clocks' rate decreased, for example USDHC. So clear the PLL3DIV_PFD dividers to get correct rate. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Reconfigure MRC3 for SRAM0 accessYe Li
Some space in SRAM0 will be protected by S400 to allow RX SecPriv mode access only for boot purpose. Since SW will reuse the SRAM0 as SCMI buffer and SPL container loading buffer, need to reconfigure MRC3. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: configure XRDC for DRAM access from S400Ye Li
Need to add DRAM access permission for S400, as S400 needs to access it When SPL calls image authentication Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Adjust handshake to sync TRDC and XRDC completionYe Li
To fit the DBD_EN fused part, we re-design the TRDC and XRDC assignment. M33 will be the TRDC owner and needs to configure TRDC. A35 is the XRDC owner, ATF will configure XRDC. The handshake between U-boot and M33 image is used to sync TRDC and XRDC configuration completion. Once the handshake is done, A35 and M33 can access the allowed resources in others domain. The handshake is needed when M33 is booted or DBD_EN fused, because both cases will enable the TRDC. If handshake is timeout, the boot will hang. We use SIM GPR0 to pass the info from SPL to u-boot, because before the handshake, u-boot can't access SEC SIM and FSB. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Jacky Bai <[email protected]>
2023-03-29imx: imx8ulp: Remove the TRDC configure from A35Ye Li
As M33 is responsible for TRDC configuration, the settings for A35 nonsecure world access and DMA0 access are moved to M33 image. So remove the codes to release TRDC and configure it. Just keep the configurations for reference. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Jacky Bai <[email protected]>
2023-03-29imx: imx8ulp: Set XRDC MRC4/5 for access DDR from APDYe Li
iMX8ULP A1 S400 ROM removes the setting for MRC4/5. So we have to set them in SPL to allow access to DDR from A35 and APD PER masters Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Limit the eMMC ROM API workaround to A0.1 partYe Li
Since A1 ROM has fixed the ROM API eMMC issue, we should only use the workaround for A0.1 part. Add a SOC revision check. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Get chip revision from SentinelYe Li
In both SPL and u-boot, after probing the S400 MU, get the chip revision, lifecycle and UID from Sentinel. Update get_cpu_rev to use the chip revision not hard coded it for A0 Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29imx: imx8ulp: Fix MU device probe failureYe Li
Since latest DTS has added multiple MU nodes, using compatible string to find the device node is not proper. It finds the first node with the compatible string matched even the node is disabled. Signed-off-by: Ye Li <[email protected]>
2023-03-29mpc83xx: Remove CONFIG_SYS_GPIO{1/2}_PRELIM and relatedChristophe Leroy
Last use of CONFIG_SYS_GPIO1_PRELIM was removed by commit fae2ea5951 ("ppc: Remove MPC8349EMDS board and ARCH_MPC8349 support"). Last use of CONFIG_SYS_GPIO2_PRELIM was removed even before by commit 6843862342 ("ppc: Remove caddy2 / vme8349 boards") Those two items were removed from whitelist by commit 8cca60a2cb ("Kconfig: Remove some symbols from the whitelist") Signed-off-by: Christophe Leroy <[email protected]> Fixes: fae2ea5951 ("ppc: Remove MPC8349EMDS board and ARCH_MPC8349 support")
2023-03-29mpc83xx: Remove stale CONFIG_SYS_LBLAWBAR{4/5/6/7}_PRELIMChristophe Leroy
Last (incorrect) use of those CONFIG items was removed by commit 9fd9abedcc ("TQM834x: remove defines causing gcc4.4 warnings") Those items are invalid and should have been removed at the same time because lblaw[] has only 4 elements. And they were removed from the whitelist by commit 9c5df7a2a9 ("mpc83xx: Migrate LBLAW_* to Kconfig") Signed-off-by: Christophe Leroy <[email protected]> Fixes: 9fd9abedcc ("TQM834x: remove defines causing gcc4.4 warnings")
2023-03-29arm: mach-k3: introduce generic board detction kconfig optionChristian Gmeiner
For non TI boards it is not possible to enable the do_board_detect() call as TI_I2C_BOARD_DETECT is defined in board/ti/common/Kconfig. I want to use do_board_detect() to dectect boards and properties based on some SPI communication with a FPGA. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-29iot2050: Add support for configuring M.2 connectorJan Kiszka
The M.2 slots of the related IOT2050 variant need to be configured according to the plugged cards. This tries to detect the card using the M.2 configuration pins of the B-key slot. If that fails, a U-Boot environment variable can be set to configure manually. This variable is write-permitted also in secure boot mode as it is not able to undermine the integrity of the booted system. The configuration is then applied to mux the serdes and to fix up the device tree passed to or loaded by the bootloader. The fix-ups are coming from device tree overlays that are embedded into the firmware image and there also integrity protected. The OS remains free to load a device tree to which they do not apply: U-Boot will not fail to boot in that case. Based on original patch by Chao Zeng. Signed-off-by: Jan Kiszka <[email protected]>
2023-03-29arm: dts: iot2050: Add support for M.2 variantchao zeng
Add support for the M.2 board based on the iot2050 advanced board. The board has two m.2 connectors, one is B-keyed, the other E-keyed. The B-key slot can connect 5G/SSD devices, and E-key can be used for WIFI/BT devices. This variant is covered by PG2 firmware image. Signed-off-by: chao zeng <[email protected]> [Jan: align DT to kernel, polish wording] Signed-off-by: Jan Kiszka <[email protected]>
2023-03-29arm: dts: iot2050: Optionally embed OTP programming data into imageJan Kiszka
Use external blob otpcmd.bin to replace the 0xff filled OTP programming command block to create a firmware image that provisions the OTP on first boot. This otpcmd.bin is generated from the customer keys using steps described in the meta-iot2050 integration layer for the device. Based on original patch by Baocheng Su. Signed-off-by: Jan Kiszka <[email protected]>
2023-03-29arm: dts: iot2050: Allow verifying U-Boot proper by SPLJan Kiszka
Add hashes and configuration signature stubs to prepare verified boot of main U-Boot by SPL. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-29iot2050: Update firmware layoutJan Kiszka
The latest version of the binary-only firmware parts come in a combined form of FSBL and sysfw containers. This implies some layout changes to the generated firmware image but also makes handling of artifacts much simpler (4 files less). The env locations will not change, just the space reserved for U-Boot will shrink from 4 to 3 MB - still plenty of space left in practice. Adjust configuration and documentation accordingly. Along this change, add a new reservation for update commands of the user-controlled OTP part. A specific userspace tool will fill it, and the FSBL will evaluate it during boot. This reservation will use 64K of the former sysfw section. Signed-off-by: Jan Kiszka <[email protected]>
2023-03-29arm: dts: iot2050: Use the auto generator nodes for fdtSu Baocheng
Refactor according to the entry `fit: Entry containing a FIT` of document tools/binman/README.entries. As the generator uses the device tree name for the config description, board_fit_config_name_match requires a small adjustment as well. Signed-off-by: Su Baocheng <[email protected]> [Jan: re-add now required CONFIG_OF_LIST, update config matching] Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-29board: siemens: iot2050: Split the build for PG1 and PG2Su Baocheng
Due to different signature keys, the PG1 and the PG2 boards can no longer use the same FSBL (tiboot3). This makes it impossible anyway to maintaine a single flash.bin for both variants, so we can also split the build. A new target is added to indicates the build is for PG1 vs. PG2 boards. Hence now the variants have separated defconfig files. The runtime board_is_sr1() check does make no sense anymore, so remove it and replace with build time check. Documentation is updated accordingly. New binary artifacts are already available via meta-iot2050. Signed-off-by: Su Baocheng <[email protected]> [Jan: refactor config option into targets, tweak some wordings] Signed-off-by: Jan Kiszka <[email protected]>
2023-03-28imx6sx-udoo-neo-basic: Introduce the u-boot.dtsiFabio Estevam
After the conversion to DM_SERIAL in commit 01f372d8d62b ("udoo_neo: Select DM_SERIAL and drop iomux board level init") the SPL log is gone and the U-Boot proper log becomes incomplete: Core: 80 devices, 18 uclasses, devicetree: separate MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@2020000 Out: serial@2020000 Err: serial@2020000 Net: eth0: ethernet@2188000 Hit any key to stop autoboot: 0 Introduce the u-boot.dtsi file that passes the u-boot,dm-pre-reloc properties to the relevant nodes so that UART can be used early in SPL. With this change, the complete SPL and U-Boot messages are seen again. Signed-off-by: Fabio Estevam <[email protected]>
2023-03-27Revert "rockchip: Fix early use of bootph props"Tom Rini
While this change is correct for v2023.04 it is not correct for next (where this is right now) nor post-v2023.04. This reverts commit 8653e5d3b745925fced5fa6897c92f4a46ec2757. Signed-off-by: Tom Rini <[email protected]>
2023-03-27Merge branch 'master' into nextTom Rini
2023-03-27rockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTSTom Rini
When we do not enable DISTRO_DEFAULTS (generally, to get distro_bootcmd) we instea do want to imply BOOTSTD_DEFAULTS so that when using bootstd the general distro boot functionality will still work. Signed-off-by: Tom Rini <[email protected]>
2023-03-27rockchip: Disable DISTRO_DEFAULTS for rk3399 boardsSimon Glass
These board have moved to standard boot but the old 'distro_bootcmd' command is still active. Disable DISTRO_DEFAULTS to fix this. Signed-off-by: Simon Glass <[email protected]> Tested-by: Vagrant Cascadian <[email protected]>
2023-03-27x86: som-db5800-som-6867: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: e23cae30801f ("x86: som-db5800-som-6867: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-03-27x86: dfi-bt700: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: 5d1c8342aeaa ("x86: dfi-bt700: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-03-27x86: conga-qeval20-qa3-e3845: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: 388f93f96354 ("x86: conga-qeval20-qa3-e3845: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-03-27x86: bayleybay: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: f38be3086837 ("x86: bayleybay: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-03-27x86: minnowmax: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Add documentation on how to make this change safely. Fixes: 66e2c665f3b6 ("x86: minnowmax: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-03-25Merge tag 'efi-next-20230325' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request for efi-next-20230325 Documenation: * add man-page for efi command UEFI: * Let EFI app call ExitBootServices() before legacy booting kernel * Support zboot and bootm in the EFI app * Let efi command show configuration tables * Support booting a 64-bit kernel from 64-bit EFI app * Allocate device-tree copy from high memory * simplify efi_str_to_u16()
2023-03-25x86: Exit EFI boot services before starting kernelSimon Glass
When running the EFI app, we need to exit boot services before jumping to Linux. At some point it may be possible to jump to Linux and pass on the system table, and: * install the device-tree as configuration table * use LoadImage() to load the kernel image (e.g. from memory) * start the image with StartImage() This should allow the Linux efistub to be used. For now, this is not implemented. Signed-off-by: Simon Glass <[email protected]>
2023-03-25x86: Support booting a 64-bit kernel from 64-bit U-BootSimon Glass
Add the missing code to handle this. For a 64-bit kernel the entry address is 0x200 bytes after the normal entry. Rename the parameter to boot_linux_kernel() accordingly. Update the comments to indicate that these are addresses, not pointers. Signed-off-by: Simon Glass <[email protected]>
2023-03-25x86: Add return-value comment to cpu_jump_to_64bit()Simon Glass
This does not mention what it returns. Add the missing documentation. Signed-off-by: Simon Glass <[email protected]>
2023-03-25x86: Adjust bootparam.h to be more like linuxSimon Glass
This likely came from Linux originally, so update it to match v6.2 more. This has no functional change. Signed-off-by: Simon Glass <[email protected]>
2023-03-25efi: Set RUN_64BIT correctly for the EFI appSimon Glass
The U-Boot EFI app can run as a 64-bit program, so set the Kconfig correctly in that case. Make sure it doesn't build SPL, since there is no need to switch from 32 to 64 bit when running. Signed-off-by: Simon Glass <[email protected]>
2023-03-24Merge branch 'rpi-2023.04' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi - Fixes for booting newer revs of the SoC in the Raspberry Pi 4 - Propagate some firmware DT properties to the loaded DT - Update the Zero2W upstream DT name
2023-03-24mmc: bcm2835-host: let firmware manage the clock divisorVincent Fazio
Newer firmware can manage the SDCDIV clock divisor register, allowing the divisor to scale with the core as necessary. Leverage this ability if the firmware supports it. Adapted from the following raspberrypi Linux kernel commit: bcm2835-sdhost: Firmware manages the clock divisor https://github.com/raspberrypi/linux/commit/08532d242d7702ae0add95096aa49c5e96e066e2 Signed-off-by: Vincent Fazio <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2023-03-24arm: rpi: fallback to max clock rate for MMC clockVincent Fazio
In rpi-firmware 25e2b597ebfb2495eab4816a276758dcc6ea21f1, the GET_CLOCK_RATE mailbox property was changed to return the last value set by SET_CLOCK_RATE. https://github.com/raspberrypi/firmware/issues/1619#issuecomment-917025502 Due to this change in firmware behavior, bcm2835_get_mmc_clock now returns a clock rate of zero since we do not issue SET_CLOCK_RATE. This results in degraded MMC performance. SET_CLOCK_RATE fixes the clock to a specific value and disables scaling so is not an ideal solution. Instead, fallback to GET_MAX_CLOCK_RATE in bcm2835_get_mmc_clock if GET_CLOCK_RATE returns zero. Signed-off-by: Vincent Fazio <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2023-03-24arm: kirkwood: Move internal registers in arch_very_early_init() functionPali Rohár
Same change as was done for mvebu in commit 5bb2c550b11e ("arm: mvebu: Move internal registers in arch_very_early_init() function") but for kirkwood. Signed-off-by: Pali Rohár <[email protected]> Tested-by: Tony Dinh <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-03-24arm: mvebu: Set common SPI flash default speed and modeTony Dinh
CONFIG_SF_DEFAULT_SPEED is used in SPL SPI to configure and probe the flash device during DM SPI uclass probing process, if the spi-max-frequency is not available in the DTB. Currently the max frequency is not available, because of the probing mechanism in SPI uclass has not been fully updated to DM. The CONFIG_SF_DEFAULT_SPEED is set to 1Mhz if a board defconfig does not specify it. This speed is too slow and result in a few seconds delay while the u-boot image is loaded from flash. Based on a survey of the device tree specifications for MVEBU boards, a sane default value should be 10Mhz. The default of 10Mhz enables an almost instantaneously loading of the u-boot image. Note that this patch depends on this patch series (has been merged to u-boot-marvell/next): https://lists.denx.de/pipermail/u-boot/2023-March/511038.html - RESEND: correct spelling of SF_DEFAULT_MODE Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-03-22spl: Add function prototype for spl_mmc_get_uboot_raw_sectorTom Rini
We did not add a prototype for spl_mmc_get_uboot_raw_sector to include/spl.h before, so add and document one now. Correct the incorrect prototype in board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c and ensure that we have spl.h where we define a non-weak spl_mmc_get_uboot_raw_sector as well. Signed-off-by: Tom Rini <[email protected]>
2023-03-22arm: Correct cpu_reset function prototype on some platformsTom Rini
Some platforms were not including <cpu_func.h> which sets the prototype for reset_cpu, and in turn had it set wrong. Correct these cases. Signed-off-by: Tom Rini <[email protected]>
2023-03-22arm: mach-k3: am62: move scratch board area to HSM RAMKamlesh Gurudasani
On high security devices, ROM enables firewalls to protect the OCSRAM region access during bootup. Only after TIFS has started (and had time to disable the OCSRAM firewall region) will we have write access to the region. So, move scratch board area to HSM RAM. Signed-off-by: Kamlesh Gurudasani <[email protected]>
2023-03-22console: Use flush() before panic and resetTony Dinh
To make sure the panic and the reset messages will go out, console flush() should be used. Sleep periods do not work in early u-boot phase when timer driver is not initialized yet. Reference: https://lists.denx.de/pipermail/u-boot/2023-March/512233.html Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Stefan Roese <[email protected]>