summaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/include
AgeCommit message (Collapse)Author
2026-03-09arm: mach-k3: arm64-mmu: add mapping for PCIe 4 GB Address WindowsSiddharth Vadapalli
The PCIe Controllers in the K3 SoCs have 4 GB Address Windows in the 64-bit address space to map System (CPU) Addresses to PCIe Bus Addresses. The physical addresses for these Address Windows across PCIe instances across SoCs is as follows: +--------+----------------+----------------+----------------+----------------+ | SoC | PCIe0 | PCIe1 | PCIe2 | PCIe3 | +--------+----------------+----------------+----------------+----------------+ | AM64 | 0x6_0000_0000 | NA | NA | NA | | J722S | 0x6_0000_0000 | NA | NA | NA | | AM68 | NA | 0x41_0000_0000 | NA | NA | | J7200 | NA | 0x41_0000_0000 | NA | NA | | J721S2 | NA | 0x41_0000_0000 | NA | NA | | J742S2 | 0x40_0000_0000 | 0x41_0000_0000 | NA | NA | | AM69 | 0x40_0000_0000 | 0x41_0000_0000 | 0x42_0000_0000 | 0x43_0000_0000 | | J721E | 0x40_0000_0000 | 0x41_0000_0000 | 0x42_0000_0000 | 0x43_0000_0000 | | J784S4 | 0x40_0000_0000 | 0x41_0000_0000 | 0x42_0000_0000 | 0x43_0000_0000 | +--------+----------------+----------------+----------------+----------------+ Two regions for a 1:1 mapping from virtual addresses to physical addresses catering to all of the above will be required, which are: 1. For AM64 and J722S SoCs => Start: 0x6_0000_0000 Size: 0x1_0000_0000 2. For AM68, AM69, J7200, J721E, J721S2, J742S2 and J784S4 SoCs => Start: 0x40_0000_0000 Size: 0x4_0000_0000 Since the 'Flash Peripherals' region from 0x5_0000_0000 to 0x8_7FFF_FFFF includes the mapping for AM64 and J722S SoCs, only the second region mentioned above needs to be added. Hence, add the region to support 64-bit address space for PCIe. Signed-off-by: Siddharth Vadapalli <[email protected]> Fixes: 79f3e77133bd ("Subtree merge tag 'v6.16-dts' of dts repo [1] into dts/upstream")
2026-01-29mach-k3: am64x: add support for speed gradesAnshul Dalal
With the support for common speed grade configuration added in commit 65a6b83a9b7f ("mach-k3: refactor A53 speed grade clock-rate fixup"), this patch extends the support to AM64x SoCs. Signed-off-by: Anshul Dalal <[email protected]>
2025-12-16ti: k3: abstract common fdt api for reserved mem fixupsAnshul Dalal
The usage of fdt_fixup_reserved is repeated for ATF and OP-TEE for multiple platforms, this patch creates a single fdt API for fixing up the reserved-memory node with added error handling. All k3 platforms already share a common tispl template which ensures binaries are loaded as per the respective CONFIG_*_LOAD_ADDR. And the provided new_size for the fixup is overridden by the size from fdt node anyways. This allows for safe abstraction of the reserved memory fixups for all current platforms. fdt_fixup_reserved now abstracts the ATF and OP-TEE fixups by calling the renamed static fdt_fixup_reserved_memory function with the required parameters. Signed-off-by: Anshul Dalal <[email protected]>
2025-11-12mach-k3: am62a: add support for speed gradesAnshul Dalal
Speed grades indicate the maximum operating frequency of any core on the SoC. This patch adds support for the same to AM62a, this allows the A53 core to be started with the correct frequency by the R5 SPL. Reference: Device Speed Grades (Table 6-1) in AM62a7 Datasheet https://www.ti.com/lit/ds/symlink/am62a7.pdf (Page#82) Signed-off-by: Anshul Dalal <[email protected]>
2025-11-12mach-k3: refactor A53 speed grade clock-rate fixupAnshul Dalal
The K3 ARM64 rproc driver uses the "assigned-clock-rates" value in the respective "/a53@0" node to properly configure the clocks for the A53 core. Although the clock value in the DT node might need to be fixed based on SoC's speed grade at runtime. Certain SoCs such as AM62p and AM62x already had this implemented, this patch moves the common code to common.c to avoid duplication and simplify speed grade handling. The logic to detect the correct entry in the "assigned-clock-rates" property has also changed. Where we earlier relied on per SoC specific device and clock IDs for the A53 core, we now use the "clock-names" property which is device agnostic. Signed-off-by: Anshul Dalal <[email protected]> Reviewed-by: Aniket Limaye <[email protected]>
2025-10-22mach-k3: map all banks using mem_map_from_dram_banksAnshul Dalal
The static memory map for K3 (k3_mem_map) only maps the first DRAM bank and therefore doesn't scale for platforms with multiple memory banks. This patch modifies enable_caches to add mem_map_from_dram_banks which appends all the memory banks to k3_mem_map before calling mmu_setup. Signed-off-by: Anshul Dalal <[email protected]> Tested-by: Wadim Egorov <[email protected]>
2025-09-12Merge patch series "arm: mach-k3: am64x: Add reset cause for cpuinfo"Tom Rini
Steffen Kothe <[email protected]> says: AM64X hereby receives support for reset reason printing during boot. Unfortunately does the AM64X register mapping slighlty differ from the AM62X. WDT and PORZ are not part of the reset source register, but the mapping remains the same for all other causes. To prevent ifdef/else constructs, I decided to follow a simple copy/paste approach and adjusted the logic accordingly. Link: https://lore.kernel.org/r/[email protected]
2025-09-12arm: mach-k3: am64_hardware.h: Add CTRLMMR_MCU_RST_SRC reset cause bit mappingsSteffen Kothe
AM64X SoCs use similar but not identical bit mappings like the AM62X family. In detail does the AM64X not support PORZ and WDT as reset caused. Add the mapping according to the technical reference manual into the SoC specific header. Signed-off-by: Steffen Kothe <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2025-08-20arm: mach-k3: j784s4_spl: Alias Ethernet boot to CPGMACChintan Vankar
This is required to enable spl_net boot on SK-AM69. Signed-off-by: Chintan Vankar <[email protected]>
2025-08-20arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMACChintan Vankar
This is required to enable spl_net boot on SK-AM68. Signed-off-by: Chintan Vankar <[email protected]>
2025-07-09arm: mach-k3: Export common fdt fixups for use in board codeJoão Paulo Gonçalves
Avoid code duplication by making the common TI K3 device tree fixup functions to be reusable by board-specific code. Signed-off-by: João Paulo Gonçalves <[email protected]>
2025-06-18Merge patch series "Add IPC support on MCU R5F cluster in Split Mode"Tom Rini
Beleswar Padhi <[email protected]> says: This series adds remoteproc support on MCU R5F in Split mode. During boot, ROM can bring up the boot R5F cores in either lockstep or split mode based on X509 certificate flags. If booted in lockstep mode, the MCU R5F cores will run first the R5 SPL, and then once A72 comes up, will run the Device Manager (DM) firmware. But if booted in split mode, core 0 will run DM firmware and second core sits in WFI. Shut it down so that other firmwares can later be loaded on them. The shutdown of MCU R5 Core 1 is invoked at A72 SPL init, as by that time Device Manager (DM) is up and running on R5 Core 0. The shutdown of MCU R5 Core 1 is handled by Device Manager itself. Test logs: https://gist.github.com/3V3RYONE/ee8e3cb9aa5f4c5c00b059b9c14bfa98 Link: https://lore.kernel.org/r/[email protected]
2025-06-18arm: mach-k3: {am6/j7}*_hardware.h: Expose MCU R5 proc and device idsBeleswar Padhi
Currently the MCU R5 processor ids and device ids are only defined for R5 SPL Stage. Expose these ids always so that A72 SPL can utilize this information to shutdown MCU R5 Core 1 when booted in Split mode. Signed-off-by: Beleswar Padhi <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
2025-05-29arm: mach-k3: am62x: Implement get_reset_reason()Wadim Egorov
Implement get_reset_reason() for AM62x to enable reporting of the reset cause in the cpuinfo output. Signed-off-by: Wadim Egorov <[email protected]>
2025-05-29arm: mach-k3: Detect and print reset reasonWadim Egorov
Call get_reset_reason() during CPU info output and display the result if the SoC provides the implementation. This helps in debugging by providing context on the last system reset reason. Signed-off-by: Wadim Egorov <[email protected]>
2025-04-05arm: mach-k3: k3-ddr.h: Include spl.hNeha Malcom Francis
Include spl.h to avoid definition errors in custom builds. Fixes: commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") Signed-off-by: Neha Malcom Francis <[email protected]>
2025-04-05arm: mach-k3: j721e: Split out J7200 SoC support from J721eAndrew Davis
Currently in j721e_init.c we check which firewalls to remove using the board configuration (e.g CONFIG_TARGET_J721E_R5_EVM). We do this as J721e and J7200 have different IP and firewalls but use the same SoC definition (SOC_K3_J721E) even though they are different SoCs. The idea was they would be similar enough that they both could use the same SoC config to help with common code sharing. Board checks would then be used differentiate. This has grown far too messy to maintain any more, especially now that there is more than one board using J721e (EVM, SK, Beagle AI64). As differentiation is done based on board, every one of these boards would have to have checks added for them. Instead let's split J7200 support out from J721e like how normal new SoC support is done. This patch touches several subsystems and could not be split much better as when we add SOC_K3_J7200 we want to make use of it in all spots that once used the combined SOC_K3_J721E so we can turn off SOC_K3_J721E when building for J7200 boards. Signed-off-by: Andrew Davis <[email protected]>
2025-04-03soc: Add information to identify the J742S2 SoC familyManorit Chawdhry
J742S2 has the same part number as J784S4 but JTAG_DEVICE_ID has a PKG bit that tells about J742S2. Add support for reading JTAG_DEVICE_ID and set family as J742S2 based on that. Link: https://www.ti.com/lit/pdf/spruje3 (TRM) Signed-off-by: Manorit Chawdhry <[email protected]>
2025-01-14Merge patch series "Add fdt-fixups for AM62P variants"Tom Rini
Aparna Patra <[email protected]> says: This series implements fdt fixups, by reading hardware information from registers and accordingly delete/modify the DT nodes, at run-time. Logs for AM62P boot: https://gist.github.com/itsme-aparna/b889fe59882c1acf0ef25a644bd325c4 Link: https://lore.kernel.org/r/[email protected]
2025-01-14arm: mach-k3: am62p: Fixup a53 max cpu frequency by speed-gradeAparna Patra
AM62P SoC has multiple speed grades. Add function to delete non-relevant CPU frequency nodes, based on the information retrieved from hardware registers. Fastest grade's maximum frequency also depends on PMIC voltage, hence to simplify implementation use the smaller value. Signed-off-by: Aparna Patra <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2025-01-14arm: mach-k3: am62p: Fixup thermal zone critical pointsAparna Patra
Read the max temperature for the SoC temperature grade from the hardware and modify the critical trip nodes on each thermal zone of FDT at runtime so they are correct with the hardware value for its grade. Signed-off-by: Aparna Patra <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2025-01-14arm: mach-k3: am62p: Fixup CPU core, CAN-FD and Video-codec nodes in fdtAparna Patra
AM62P SOC is available in multiple variants: -CPU cores (Cortex-A) AM62Px1 (1 core), AM62Px2 (2 cores), AM62Px4 (4 cores) -With and without CAN-FD & Video-codec support Remove the relevant FDT nodes by reading the actual configuration from the SoC registers, with that change it is possible to have a single dts/dtb file handling the different variant at runtime. Signed-off-by: Aparna Patra <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2025-01-14board: ti: Pull redundant DDR functions to a common location and Fixup DDR ↵Santhosh Kumar K
size when ECC is enabled As there are few redundant functions in board/ti/*/evm.c files, pull them to a common location of access to reuse and include the common file to access the functions. Call k3-ddrss driver through fixup_ddr_driver_for_ecc() to fixup the device tree and resize the available amount of DDR, if ECC is enabled. Otherwise, fixup the device tree using the regular fdt_fixup_memory_banks(). Also call dram_init_banksize() after every call to fixup_ddr_driver_for_ecc() is made so that gd->bd is populated correctly. Ensure that fixup_ddr_driver_for_ecc() is agnostic to the number of DDR controllers present. Signed-off-by: Santhosh Kumar K <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Wadim Egorov <[email protected]>
2024-12-31Merge patch series "Fix OSPI boot for J722S"Tom Rini
Prasanth Babu Mantena <[email protected]> says: This series fixes OSPI boot for J722S. It contains fixes for DMSC communication, R5 regmap for ospi and dma specific overrides for ospi. Test log: https://gist.github.com/PrasanthBabuMantena/ad469dd09ab7263f85f87dadda46c86d Link: https://lore.kernel.org/r/[email protected]
2024-12-31arm: mach-k3: j722_spl: Add FAST XSPI boot modeVaishnav Achath
Fast XSPI boot mode is supported by J722S ROM, add that. Signed-off-by: Vaishnav Achath <[email protected]> Signed-off-by: Prasanth Babu Mantena <[email protected]> Reviewed-by: Udit Kumar <[email protected]>
2024-12-15arm: mach-k3: fix typo in devstat macro namePrasanth Babu Mantena
Fix spelling mistake in the board init files of j721e and j721s2. s/WKUP_DEVSTAT_MCU_OMLY_MASK/WKUP_DEVSTAT_MCU_ONLY_MASK Signed-off-by: Prasanth Babu Mantena <[email protected]>
2024-06-24arm: mach-k3: am62a: Simplify the logic for QOS reg and val propagationJayesh Choudhary
For the QOS registers, instead of using the raw values for calculation for each reg field, use a defined macro which takes in argument for all the reg fields to get the desired value. Do the similar simplification for QOS register and group registers and make the corresponding changes for am62a_qos_uboot file. Suggested-by: Andrew Davis <[email protected]> Signed-off-by: Jayesh Choudhary <[email protected]> Acked-by: Andrew Davis <[email protected]>
2024-06-24arm: mach-k3: am62a_qos: Move common bit MACROS to k3_qos header fileJayesh Choudhary
QoS bit mapping are common across all K3 SoCs so move those defines to common header file (k3_qos.h). This ensures that we do not define these for each SoC. Signed-off-by: Jayesh Choudhary <[email protected]>
2024-06-19arch: mach-k3: Introduce basic files to support J722S SoC familyJayesh Choudhary
Introduce the basic functions and definitions needed to properly initialize TI J722S family of SoCs. Co-developed-by: Vaishnav Achath <[email protected]> Signed-off-by: Vaishnav Achath <[email protected]> Signed-off-by: Jayesh Choudhary <[email protected]>
2024-06-19soc: add info to identify the J722S SoC familyJayesh Choudhary
Include the part number for TI's j722s family of SoC to identify it during boot. Signed-off-by: Vaishnav Achath <[email protected]> Signed-off-by: Jayesh Choudhary <[email protected]>
2024-06-19arm: mach-k3: Sort CONFIG_SOC* and K3_SOC_ID entriesJayesh Choudhary
Sort CONFIG_SOC* and K3_SOC_ID alphabetically. Signed-off-by: Jayesh Choudhary <[email protected]> Reviewed-by: Andrew Davis <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
2024-06-07include: mach-k3: move k3 security functions to security.hManorit Chawdhry
ti_secure_image_post_process and ti_secure_image_check_binary is used for the authentication purposes in the current boot flow. Authentication of remoteproc firmware images require ti_secure_image_post_process to be available outside mach-k3. Signed-off-by: Manorit Chawdhry <[email protected]> Signed-off-by: Udit Kumar <[email protected]> Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> # Intel Edison Reviewed-by: Bin Meng <[email protected]>
2024-04-29arm: mach-k3: am62ax: Fix typo in ROM data macro nameAndrew Davis
s/ENTENDED/EXTENDED Signed-off-by: Andrew Davis <[email protected]>
2024-04-11arm: mach-k3: am625: Provide a way to obtain boot device for non SPLsWadim Egorov
Introduce get_boot_device() to obtain the booting device. Make it also available for non SPL builds so u-boot can also know the device it is booting from. Signed-off-by: Wadim Egorov <[email protected]>
2024-04-11arm: mach-k3: am625: copy bootindex to OCRAM for main domain SPLWadim Egorov
Relocate booindex to OCRAM region after it gets opened by TIFS so the main domain bootloaders can have access to this data. Signed-off-by: Wadim Egorov <[email protected]>
2024-04-11arm: mach-k3: am62: Get a53 max cpu frequency by speed gradeJoao Paulo Goncalves
AM62 SoC has multiple speed grades. Add function to return max A53 CPU frequency based on grade. Fastest grade's max frequency also depends on PMIC voltage, to simplify implementation use the smaller value. Suggested-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Joao Paulo Goncalves <[email protected]>
2024-03-13arch: mach-k3: introduce basic files to support the am62px SoC familyBryan Brattlof
Introduce the basic functions and definitions needed to properly initialize TI's am62p family of SoCs Signed-off-by: Bryan Brattlof <[email protected]>
2024-03-13soc: add info to identify the am62p SoC familyBryan Brattlof
Include the part number for TI's am62px family of SoCs so we can properly identify it during boot Reviewed-by: Igor Opaniuk <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]> Signed-off-by: Bryan Brattlof <[email protected]>
2024-03-11Merge tag 'v2024.04-rc4' into nextTom Rini
Prepare v2024.04-rc4
2024-03-05Merge patch series "Enable OSPI on j721e"Tom Rini
Jonathan Humphreys <[email protected]> says: This series enables OSPI storage and boot.
2024-03-05arm: mach-k3: j721e: Enable OSPI bootJonathan Humphreys
Add boot ROM XSPI bootmode, and set to BOOT_DEVICE_SPI if detected. Signed-off-by: Jonathan Humphreys <[email protected]> Reviewed-by: Udit Kumar <[email protected]>
2024-03-04arm: mach-k3: am62: Get soc max temperature by gradeJoao Paulo Goncalves
AM62x SoC is available in multiple temperature grade: - Commercial: 0° to 95° C - Industrial: -40° to 105° C - Automotive: -40° to 125° C Add a new function that returns the am62 max temperature value accordingly to its temperature grade in Celsius. Signed-off-by: Joao Paulo Goncalves <[email protected]> Signed-off-by: Francesco Dolcini <[email protected]>
2024-03-04soc: ti: k3-socinfo: Add entry for J784S4 SoCApurva Nandan
Add support for J784S4 SoC Identification. Signed-off-by: Hari Nagalla <[email protected]> Signed-off-by: Apurva Nandan <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Tested-by: Marcel Ziswiler <[email protected]> # AM69-SK
2024-03-04arm: mach-k3: Sort SoC JTAG_ID entriesApurva Nandan
Sort JTAG_IDs for K3 SoCs in hardware.h in alphabetical order. Signed-off-by: Apurva Nandan <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Tested-by: Marcel Ziswiler <[email protected]> # AM69-SK
2024-03-04arm: mach-k3: Add basic support for J784S4 SoC definitionApurva Nandan
Add J784S4 initialization files for initial SPL boot. config SYS_K3_MCU_SCRATCHPAD_BASE default value is same for J721E, J721S2, J784S4. So combined them into a single default. Signed-off-by: Hari Nagalla <[email protected]> [ add firewall configurations and change the R5 MCU scratchpad ] Signed-off-by: Manorit Chawdhry <[email protected]> Signed-off-by: Dasnavis Sabiya <[email protected]> Signed-off-by: Apurva Nandan <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]> Tested-by: Marcel Ziswiler <[email protected]> # AM69-SK
2024-03-04arm: mach-k3: am62: Add Debounce configuration register definitionsNishanth Menon
Add the Debounce configuration registers that need to be configured one time for the platform for the entire SoC. Signed-off-by: Nishanth Menon <[email protected]>
2024-03-01arm: mach-k3: Refactor QoS settingsAradhya Bhatia
Refactor common QoS code into a new common header file, and the soc specific setup_qos functions into a common API. Rename $(soc)_qos_count and $(soc)_qos_data variables to qos_count and qos_data. When QoS settings of more SoCs are added, only one pair will be defined at a time, based on the config SOC_K3_$(soc). This refactoring has been done for 2 major purposes. - The auto-generated $(soc)_qos_data.c and $(soc)_qos.h files cannot have any code that is specific to any bootloader. Those files have to remain agnostic of different bootloader implementations and their header files. - The existing implementation was less than ideal and would have enabled multiple $(soc)_qos_count and $(soc)_qos_data variables for all SoC variants. Signed-off-by: Aradhya Bhatia <[email protected]>
2024-01-24arm: mach-k3: am62: provide more soc feature info accessorsMax Krummenacher
Add two functions, one which returns the SoC speed grade and one which returns the SoC operating temperature range. Signed-off-by: Max Krummenacher <[email protected]>
2024-01-24arm: mach-k3: am62: move device identification accessor functions to headerMax Krummenacher
mach-k3/am625_fdt.c does fdt fixup depending on fields in the device identification register. Move the accessors to the device identification register as inline functions into the am62_hardware.h header, so that they can be used for other functionality. Signed-off-by: Max Krummenacher <[email protected]>
2024-01-15arm: mach-k3: am642: Define NAND boot deviceRoger Quadros
AM642 SoC supports booting from GPMC NAND device. Define boot device for it. Signed-off-by: Roger Quadros <[email protected]> Link: https://www.mail-archive.com/[email protected]/msg499180.html Signed-off-by: Dario Binacchi <[email protected]>