summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-16image: Move common image code to image_board and commandSimon Glass
We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <[email protected]>
2023-01-16image: Add a function to find a script in an imageSimon Glass
Split this functionality out of the 'source' command so it can be used from another place. For now leave it where it is, but a future patch will move it out of cmd/ Signed-off-by: Simon Glass <[email protected]>
2023-01-16menu: Make use of CLI character processingSimon Glass
Avoid duplicating some of the escape-sequence processing here and use the CLI function instead. Signed-off-by: Simon Glass <[email protected]>
2023-01-16menu: Use a switch statementSimon Glass
Convert the long line of if() statements to a switch() since this makes better use of the C language. Signed-off-by: Simon Glass <[email protected]>
2023-01-16menu: Update bootmenu_loop() to return the codeSimon Glass
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <[email protected]>
2023-01-16menu: Update bootmenu_autoboot_loop() to return the codeSimon Glass
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <[email protected]>
2023-01-16menu: Rename KEY_... to BKEY_...Simon Glass
This enum values conflict with linux/input.h so rename them. Signed-off-by: Simon Glass <[email protected]>
2023-01-16bootmenu: Add a few commentsSimon Glass
The behaviour of these two functions is completely undocumented. Add some notes so the poor, suffering dev can figure out what is going on. Signed-off-by: Simon Glass <[email protected]>
2023-01-16cli: Move readline character-processing to a state machineSimon Glass
The current cread_line() function is very long. It handles the escape processing inline. The menu command does similar processing but at the character level, so there is some duplication. Split the character processing into a new function cli_ch_process() which processes individual characters and returns the resulting input character, taking account of escape sequences. It requires the caller to set up and maintain its state. Update cread_line() to use this new function. The only intended functional change is that an invalid escape sequence does not add invalid/control characters into the input buffer, but instead discards these. Signed-off-by: Simon Glass <[email protected]>
2023-01-16sandbox: Enable mmc command and legacy imagesSimon Glass
The mmc command is useful for testing mmc disk images in sandbox, so enable it. We also need to enable legacy images so that we can run tests which use them. Disable it for a few avb tests since MMC is not implemented there yet. Signed-off-by: Simon Glass <[email protected]>
2023-01-16xilinx: versal-net: Add support for timer and start itAshok Reddy Soma
Add support for starting timer by setting up time stamp generator registers. This is done only for EL3 i.e. mini U-Boot case. For other cases, it will be done TF-A. Add COUNTER_FREQUENCY and IOU_SWITCH_DIVISOR0 to Kconfig so that they can be tuned as required. Signed-off-by: Ashok Reddy Soma <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/fcd8b0dc4b45a11f5e753afff42f84738ac813da.1673336645.git.michal.simek@amd.com
2023-01-16clk: versal: Return error in case if clock setup failedJay Buddhabhatti
Currently probe is getting success even if clock setup is failed because of that u-boot is trying to access invalid clocks. So return error if clock setup failed. Signed-off-by: Jay Buddhabhatti <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/fa78e71211e5f68f8dc1353b357f96e6283f65a8.1673335422.git.michal.simek@amd.com
2023-01-16rockchip: add support for PX30 Ringneck SoM on Haikou DevkitQuentin Schulz
The PX30-µQ7 (Ringneck) is a system-on-module featuring the Rockchip PX30 in a micro Qseven-compatible form-factor. PX30-µQ7 features: * CPU: quad-core Cortex-A35 * DRAM: 2GB dual-channel * eMMC: onboard eMMC * SD/MMC * TI DP83825I 10/100Mbps PHY * USB: * USB2.0 dual role port * 3x USB2.0 host via onboard USB2.0 hub * Display: MIPI-DSI * Camera: MIPI-CSI * onboard 2.4GHz WiFi + Bluetooth module * Companion Controller: on-board additional microcontroller (STM32 Cortex-M0 or ATtiny): * RTC * fan controller * CAN (only STM32) The non-U-Boot DTS files are imported from Linux v6.2-rc2. Cc: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2023-01-16arm64: dts: rockchip: sync px30 DTSI with Linux kernel v6.1Quentin Schulz
Sync the px30 dtsi from Linux kernel v6.1. Cc: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2023-01-16rockchip: px30: insert u-boot, spl-boot-device into U-Boot device treeQuentin Schulz
It is possible to boot U-Boot proper from a different storage medium than the one used by the BOOTROM to load the SPL. This information is stored in the u-boot,spl-boot-device Device Tree property and is accessible from U-Boot proper so that it has knowledge at runtime where it was loaded from. Let's add support for this feature for px30. Cc: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2023-01-16rockchip: px30: list possible SPL boot devicesQuentin Schulz
BOOTROM sets a bit in a CPU register so that the software can know from where the first stage bootloader was booted. One use case for this is to specify the default loading medium for U-Boot proper to match the one used by the BOOTROM to load the SPL (same-as-spl in u-boot,spl-boot-order). Let's create the mapping between BOOTROM value and Device Tree node names for MMC devices. Cc: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2023-01-16rockchip: px30: fix CFG_IRAM_BASEQuentin Schulz
The IRAM on PX30 (or Int_MEM in datasheet) starts at 0xff0e0000 and not 0xff020000 as rightfully stated in the FIXME comment. Let's fix it so that BROM_BOOTSOURCE_ID_ADDR points to the correct address for PX30. Fixes: 46281a76bee3 ("rockchip: add core px30 headers") Cc: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2023-01-16rockchip: px30: fix possibly unused grf and cru variablesQuentin Schulz
The grf and cru are only used when no UART base is provided by the user (defaults to UART2) or for UART1, UART3 and UART5 to be used for the debug UART. Therefore, let's surround those variable definitions with the proper checks. This wasn't an issue before support for UART0 was added, because all cases were using cru and grf. UART0 only uses pmucru so there's a need to not define those variables anymore. Fixes: d0af506625ff ("rockchip: px30: support debug uart on UART0") Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16rockchip: Add initial support for the PINE64 Pinephone ProPeter Robinson
The Pinephone Pro is another device by PINE64. It's closely related to the Pinebook Pro of which this initial support is derived from. Specification: - A variant of the Rockchip RK3399 - A 6 inch 720*1440 DSI display - Front and rear cameras - Type-C interface with alt mode display (DP 1.2) and PD charging - 4GB LPDDR4 RAM - 128GB eMMC - mSD card slot - An AP6255 module for 802.11ac WiFi and Bluetooth 5 - Quectel EG25-G 4G/LTE modem Signed-off-by: Peter Robinson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-01-16arm64: dts: rk3399: Add upstream Pinephone Pro dtsPeter Robinson
Initial support for the PinePhone Pro has now landed upstream in Linux 6.1 RC1 so sync the dts from 6.2-rc1 for initial support. Signed-off-by: Peter Robinson <[email protected]>
2023-01-16board: rockchip: Add Edgeble Neu2 IO BoardJagan Teki
Neural Compute Module 2(Neu2) IO board is an industrial form factor IO board from Edgeble AI. General features: - microSD slot - MIPI DSI connector - 2x USB Host - 1x USB OTG - Ethernet - mini PCIe - Onboard PoE - RS485, RS232, CAN - Micro Phone array - Speaker - RTC battery slot - 40-pin expansion Neu2 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 2(Neu2) IO platform. Add support for it. Signed-off-by: Jagan Teki <[email protected]>
2023-01-16ARM: dts: rockchip: Add rv1126-u-boot.dtsiJagan Teki
Add u-boot,dm-spl and u-boot,dm-pre-reloc related properties for Rockchip RV1126 SoC. Both eMMC and SD boot are tested in Edgeble Neu2 SoM. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ARM: dts: rockchip: rv1126: Add Edgeble Neural Compute Module 2(Neu2) IOJagan Teki
Neural Compute Module 2(Neu2) IO board is an industrial form factor evaluation board from Edgeble AI. General features: - microSD slot - MIPI DSI connector - 2x USB Host - 1x USB OTG - Ethernet - mini PCIe - Onboard PoE - RS485, RS232, CAN - Micro Phone array - Speaker - RTC battery slot - 40-pin expansion Neu2 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 2(Neu2) IO platform. Add support for it. Signed-off-by: Jagan Teki <[email protected]>
2023-01-16ARM: dts: rockchip: rv1126: Add Edgeble Neural Compute Module 2(Neu2)Jagan Teki
Neural Compute Module 2(Neu2) is a 96boards SoM-CB compute module based on Rockchip RV1126 from Edgeble AI. General features: - Rockchip RV1126 - 2/4GB LPDDR4 - 8/16/32GB eMMC - 2x MIPI CSI2 FPC connector - Fn-link 8223A-SR WiFi/BT Industrial grade (-40 °C to +85 °C) version of the same class of module called Neu2k powered with Rockchip RV1126K. Neu2 needs to mount on top of Edgeble IO boards for creating complete platform solutions. Add support for it. Signed-off-by: Jagan Teki <[email protected]>
2023-01-16rockchip: mkimage: Add rv1126 supportJagan Teki
Add support for rv1126 package header in mkimage tool. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16arm: rockchip: rv1126: Set dram area unsecure for SPLJagan Teki
Unsecure the dram area so that MMC, USB, and SFC controllers can able to read data from dram. Signed-off-by: Jason Zhu <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16arm: rockchip: Add RV1126 arch core supportJagan Teki
Rockchip RV1126 is a high-performance vision processor SoC for IPC/CVR, especially for AI related application. Add arch core support for it. Signed-off-by: Jagan Teki <[email protected]> Signed-off-by: Kever Yang <[email protected]> Reviewed-by: Kever Yang <[email protected]> Change-Id: I22fde40ec375e3c6aba39808abf252edc45d4b04
2023-01-16ARM: dts: rockchip: Add Rockchip RV1126 SoCJagan Teki
RV1126 is a high-performance vision processor SoC for IPC/CVR, especially for AI related application. It is based on quad-core ARM Cortex-A7 32-bit core which integrates NEON and FPU. There is a 32KB I-cache and 32KB D-cache for each core and 512KB unified L2 cache. It has build-in NPU supports INT8/INT16 hybrid operation and computing power is up to 2.0TOPs. This patch add basic core dtsi support. Signed-off-by: Jon Lin <[email protected]> Signed-off-by: Sugar Zhang <[email protected]> Signed-off-by: Jagan Teki <[email protected]>
2023-01-16ARM: dts: rockchip: Add Rockchip RV1126 pinctrlJagan Teki
Add pinctrl definitions for Rockchip RV1126. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16arm: rockchip: Add grf header for rv1126Jagan Teki
Add GRF header for Rockchip RV1126. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16dt-bindings: power: Add power-domain header for rv1126Jagan Teki
Add power-domain header for RV1126 SoC from description in TRM. Signed-off-by: Elaine Zhang <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16clk: rockchip: Add rv1126 clk supportJagan Teki
Add clock driver support for Rockchip RV1126 SoC. Signed-off-by: Joseph Chen <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16dt-bindings: clk: Add dt-binding header for RV1126Jagan Teki
Add the dt-bindings header for the Rockchip RV1126, that gets shared between the clock controller and the clock references in the dts. Signed-off-by: Finley Xiao <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16arch: rockchip: Add cru header for rv1126Jagan Teki
Add clock and reset unit header include for rv1126. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16pinctrl: rockchip: Add rv1126 supportJagan Teki
Add pinctrl driver for Rockchip RV1126. Signed-off-by: Jianqun Xu <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16pinctrl: rockchip: Add pinctrl route typesJagan Teki
Some pins in rockchip are routed via Top GRF and PMU GRF instead of direct regmap. Add support to handle all these routing paths so that the SoC pinctrl drivers will use them accordingly. Signed-off-by: Jianqun Xu <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Add rv1126 lpddr4 supportJagan Teki
Add LPDDR4 detection timings and support for RV1126. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: rv1126: Control ddr init prints via DEBUGJagan Teki
Control the ddr init print messages via RAM_ROCKCHIP_DEBUG instead of printing by default. This gives an option to configs to enable these prints or not. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Add rv1126 ddr driver supportJagan Teki
Add DDR driver for Rockchip RV1126 SoC. Signed-off-by: YouMin Chen <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Add rv1126 ddr loader paramsJagan Teki
Add DDR loader parameters for Rockchip RV1126 SoC. Signed-off-by: YouMin Chen <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Add rv1126 ddr3 supportJagan Teki
Add DDR3 detection timings for Rockchip RV1126 SoC. Signed-off-by: YouMin Chen <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Update ddr pctl regs for px30Jagan Teki
Add full ddr pctl registers and bit masks for px30. Signed-off-by: YouMin Chen <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Compute ddr capacity based on grf splitJagan Teki
DDR chip capacity is computed based on GRF split in some Rockchip SoC's like PX30 and RV1126. Add split argument in ddr print info so-that the respective ddr driver will pass the grf split. Signed-off-by: YouMin Chen <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: rockchip: Add common ddr type configsJagan Teki
We have common ddr types in rockchip or in general. So use the common ddr type names instead of per Rockchip SoC to avoid confusion. The respective ddr type names will use on the associated ddr SoC driver as these drivers are built per SoC at a time. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16ram: Mark ram-uclass depend on TPL_DM or SPL_DMJagan Teki
ram-uclass is building irrespective of whether TPL_DM or SPL_DM is enabled. So control the ram uclass build based on TPL/SPL_DM. Signed-off-by: Jagan Teki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16configs: roc-pc-rk3399: Enable rockchip efuse supportChristopher Obbard
Enable efuse support which allows reading of the cpuid#, serial# and also generates a unique mac address from the board's serial. Signed-off-by: Christopher Obbard <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16rockchip: mkimage: make RC4 key constJohn Keeping
This is read-only data, so mark it as such. Signed-off-by: John Keeping <[email protected]> Reviewed-by: Philipp Tomsich <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16rc4: mark key as constJohn Keeping
Key data is never written so the parameter can be const, which allows putting fixed keys in .rodata. Signed-off-by: John Keeping <[email protected]> Reviewed-by: Philipp Tomsich <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16rockchip: puma-rk3399: sync DTS with Linux kernel next-20221114Quentin Schulz
This synchronizes the Device Trees related to Puma RK3399 SoM with Linux kernel next-20221114 to include two important changes pertaining to eMMC and SD card instability. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-01-16rockchip: clk: add watchdog clock to px30_clk_enableQuentin Schulz
Add the PCLK_WDT_NS clock to px30_clk_enable so that the watchdog driver can probe since it wants to enable this clock. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Kever Yang <[email protected]>