summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-07rockchip: rk3399-puma: Sync DT from Linux kernel v6.8Jonas Karlman
Sync rk3399-puma related device tree from Linux kernel v6.8. The vdd_log node is already part of rk3399-puma.dtsi, only keep the regulator-init-microvolt prop in u-boot.dtsi. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399-gru: Sync DT from Linux kernel v6.8Jonas Karlman
Sync rk3399-gru related device tree from Linux kernel v6.8. The spi_flash symbol is no longer part of upstream DT, it is re-defined to allow existing reference use in related u-boot.dtsi-files. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Sync SoC DT from Linux kernel v6.8Jonas Karlman
Sync RK3399 SoC common .dtsi-files from Linux kernel v6.8. The ethernet0 alias is moved to rk3399-u-boot.dtsi in this patch, the alias will be added in board specific .dts-files and finally removed from rk3399-u-boot.dtsi in following patches. The rng node is replaced with crypto0 and crypto1, both can supply random numbers. There is no other intended change with this patch. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07clk: rockchip: rk3399: Add SCLK_USB3OTGx_REF supportJonas Karlman
The SCLK_USB3OTGx_REF clocks is used as reference clock for USB3 block. Add simple support to get rate of SCLK_USB3OTGx_REF clocks to fix reference clock period configuration. Also replace use of 24000000 with the OSC_HZ constant. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07clk: rockchip: rk3399: Improve support for SCLK_PCIEPHY_REF clockJonas Karlman
rk3399-nanopi-4.dtsi try to set parent of and set rate to 100 MHz of the SCLK_PCIEPHY_REF clock. The existing enable/disable ops for SCLK_PCIEPHY_REF currently force use of 24 MHz parent and rate. Add improved support for setting parent and rate of the pciephy refclk to driver to better support assign-clock props for pciephy refclk in DT. This limited implementation only support setting 24 or 100 MHz rate, and expect npll and clk_pciephy_ref100m divider to use default values. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07clk: rockchip: rk3399: Add dummy support for ACLK_VDU clockJonas Karlman
rk3399.dtsi from linux v5.19 and newer try to set VDU clock rate to 400 MHz using an assigned-clock-rates prop of the CRU node. U-Boot does not use or need this clock so add dummy support for getting and setting ACLK_VDU clock rate to allow CRU driver to be loaded with an updated rk3399.dtsi. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07clk: rockchip: rk3399: Rename SCLK_DDRCLK to SCLK_DDRCJonas Karlman
Sync rk3399-cru.h with one from Linux kernel v6.2+ and fix use of the SCLK_DDRCLK name that was only used by U-Boot. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Configure sdmmc regulator pinctrl in SPLJonas Karlman
A few boards have shown to be required to properly configure pinctrl for the fixed regulator gpio pin used by sdmmc before being able to read from SD-cards. Include the related gpio, regulator and pinctrl nodes and enable related Kconfig options so that pinctrl can be configured in SPL for boards that may be affected by such issue. Also change to imply SPL_DM_SEQ_ALIAS for all boards because it must be enabled for working gpio usage in SPL after a future DT sync. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Fix loading FIT from SD-card when booting from eMMCJonas Karlman
When RK3399 boards run SPL from eMMC and fail to load FIT from eMMC due to it being missing or checksum validation fails there can be a fallback to read FIT from SD-card. However, without proper pinctrl configuration reading FIT from SD-card may fail: U-Boot SPL 2024.04-rc4 (Mar 17 2024 - 22:54:45 +0000) Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC1 Card did not respond to voltage select! : -110 mmc_init: -95, time 12 spl: mmc init failed with error: -95 SPL: failed to boot from all boot devices (err=-6) ### ERROR ### Please RESET the board ### Fix this by tagging related sdhci, sdmmc and spi flash pinctrl nodes with bootph props. Also move bootph for common nodes shared by all boards to the SoC u-boot.dtsi. eMMC, SD-Card and SPI flash nodes are also changed to only be tagged with bootph props for SPL and U-Boot pre-reloc phases. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Include uart related pinctrl nodes in TPL/SPLJonas Karlman
The initial serial console UART iomux is typically configured in board_debug_uart_init() at TPL stage on Rockchip platform. Later stages typically use pinctrl driver to configure iomux UART once again based on the control FDT. Include uart related pinctrl nodes in TPL/SPL control FDT to make it possible for pinctrl driver to configure UART iomux at TPL/SPL stage. Following debug log message may also be seen at U-Boot pre-reloc stage: ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 This can be resolved by including bootph prop for U-Bood pre-reloc phase (bootph-some-ram or bootph-all). However, this has intentionally been excluded due to including it unnecessarily slows down boot around 200-400 ms. Also add the clock-frequency prop similar to what has been done for other Rockchip SoCs. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399-puma: Move uart0 bootph to board u-boot.dtsiJonas Karlman
rk3399-puma is the only supported board that use uart0 for serial console, other RK3399 boards typically use uart2 for serial console and may use uart0 for bluetooth. Move setting bootph prop to board u-boot.dtsi to only include the uart0 node in TPL/SPL control FDT for the rk3399-puma target. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Fix bootph prop for vop nodesJonas Karlman
The vop nodes should not be included in TPL/SPL control FDT, it should only be included at U-Boot proper pre-reloc phase. Change to use bootph-some-ram prop to fix this. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Sort nodes in u-boot.dtsi filesJonas Karlman
Sort nodes alphabetically by name, symbol or reg addr in RK3399 related u-boot.dtsi files. Also remove one of the duplicated &pmu nodes. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Remove inherited bootph-all propsJonas Karlman
Remove superfluous bootph-all props already inherited from main soc u-boot.dtsi file. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Add a default spl-boot-order propJonas Karlman
A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl", &sdhci and &sdmmc. Move this to rk3399-u-boot.dtsi and make this default for boards currently missing a u-boot,spl-boot-order prop. Before commit a7e69952eb6d ("rockchip: spl: Cache boot source id for later use") it was required to include the SPI flash node in the u-boot,spl-boot-order prop to successfully load FIT from SPI flash. The SPI flash node reference has been dropped from spl-boot-order from pinebook-pro, roc-pc and rockpro64 now that "same-as-spl" also gets resolved to the SPI flash node and loading FIT from SPI flash works without having the node explicitly referenced in spl-boot-order prop. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Dragan Simic <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Remove use of xPL_MISC_DRIVERS optionsJonas Karlman
The TPL and/or SPL control FDT on RK3399 boards does not contain any node with a compatible that is supported by driver/misc/ drivers. Remove use of xPL_MISC_DRIVERS options to stop including e.g an unused efuse driver in TPL and/or SPL. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Enable DT overlay support on all boardsJonas Karlman
Imply OF_LIBFDT_OVERLAY Kconfig options to add device tree overlay support on all RK3399 boards. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Dragan Simic <[email protected]>
2024-05-07rockchip: rk3399: Imply support for GbE PHYJonas Karlman
Imply support for GbE PHY status parsing and configuration when support for onboard ethernet is enabled. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Dragan Simic <[email protected]>
2024-05-07rockchip: rk3399: Enable random generator on all boardsJonas Karlman
The RK3399 SoC contain a crypto engine block that can generate random numbers. Imply DM_RNG and RNG_ROCKCHIP Kconfig options to take advantage of the random generator on all RK3399 boards. Also remove the unnecessary use of a status = "okay" prop. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Dragan Simic <[email protected]>
2024-05-07rockchip: rk3399: Enable ARMv8 crypto and FIT checksum validationJonas Karlman
The RK3399 SoC support the ARMv8 Cryptography Extensions, use of ARMv8 crypto can speed up FIT checksum validation in SPL. Imply ARMV8_SET_SMPEN and ARMV8_CRYPTO to take advantage of the crypto extensions for SHA256 when validating checksum of FIT images. Imply SPL_FIT_SIGNATURE and LEGACY_IMAGE_FORMAT to enable FIT checksum validation to almost all RK3399 boards. The following boards have been excluded: - chromebook_bob: SPL max size limitation of 120 KiB - chromebook_kevin: SPL max size limitation of 120 KiB Also imply OF_LIVE to help speed up init of U-Boot proper and disable CONFIG_SPL_RAW_IMAGE_SUPPORT on leez-rk3399 to ensure SPL does not try to jump to code that failed checksum validation. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399: Sort imply statements alphabeticallyJonas Karlman
Sort imply statements under ROCKCHIP_RK3399 alphabetically. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Dragan Simic <[email protected]>
2024-05-07rockchip: rk3399-ficus: Enable TPL and use common bss and stack addrJonas Karlman
The rk3399-ficus board is only using SPL and not TPL+SPL like all other RK3399 boards, chromebook bob/kevin excluded. It does not seem to be any technical reason why this board was left using only SPL. Switch to use TPL+SPL and to use the common bss and stack addresses introduced in commit 008ba0d56d00 ("rockchip: Add common default bss and stack addresses"). Also add the missing DEFAULT_FDT_FILE option. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399-puma: Use common bss and stack addressesJonas Karlman
The rk3399-puma board is currently using SPL stack and bss addr in SRAM, the same addr typically used by TPL, this differs from most other RK3399 boards. Switch to use the common bss and stack addresses introduced in commit 008ba0d56d00 ("rockchip: Add common default bss and stack addresses"). Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399-puma: Update SPL_PAD_TO Kconfig optionJonas Karlman
On rk3399-puma the FIT payload is located at sector 0x200 compared to the more Rockchip common sector 0x4000 offset: SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200 Because FIT payload is located at sector 0x200 and IDBlock is located at sector 64, the combined size of TPL+SPL (idbloader.img) cannot take up more than 224 KiB: (0x200 - 64) x 512 = 0x38000 (224 KiB) Adjust SPL_PAD_TO to match the used 0x200 sector offset. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-07rockchip: rk3399-gru: Fix max SPL size on bob and kevinJonas Karlman
Chromebook bob and kevin typically run coreboot as the initial boot loader, however, U-Boot proper can be used as a secondary boot loader. It is also possible to run U-Boot SPL and proper bare metal, with SPL and the U-Boot payload loaded from SPI flash. Because of this chromebook bob and kevin only use SPL and not TPL+SPL like other RK3399 boards, this mean that SPL is loaded to and run from SRAM instead of DRAM. The U-Boot payload is located at 0x40000 (256 KiB) offset in SPI flash and because the BROM only read first 2 KiB for each 4 KiB page, the size of SPL (idbloader.img) is limited to max 128 KiB. The chosen bss start address further limits the size of SPL to 120 KiB. 0xff8e0000 (SPL_BSS_START_ADDR) - 0xff8c2000 (SPL_TEXT_BASE) = 0x1e000 Update SPL_MAX_SIZE to reflect the 120 KiB max size limitation. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2024-05-06board: esd: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: engicam: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: emulation: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: embest: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: elgin: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: egnite: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: efi: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: eets: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: ea: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: dhelectronics: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: dfi: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: davinci: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Acked-by: Adam Ford <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: data_modul: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: d-link: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: cortina: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: coreboot: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: congatec: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Acked-by: Oliver Graute <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: conclusive: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: compulab: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: cobra5272: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: cloudengines: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Reviewed-by: Tony Dinh <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: cloos: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: chipspark: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: cei: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: cavium: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>