Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ |
| 4 | * Lokesh Vutla <lokeshvutla@ti.com> |
| 5 | */ |
| 6 | #ifndef _ASM_ARCH_HARDWARE_H_ |
| 7 | #define _ASM_ARCH_HARDWARE_H_ |
| 8 | |
Andrew Davis | 1be5e97 | 2022-07-15 10:25:27 -0500 | [diff] [blame] | 9 | #ifdef CONFIG_SOC_K3_AM654 |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 10 | #include "am6_hardware.h" |
| 11 | #endif |
Lokesh Vutla | 6edde29 | 2019-06-13 10:29:43 +0530 | [diff] [blame] | 12 | |
| 13 | #ifdef CONFIG_SOC_K3_J721E |
| 14 | #include "j721e_hardware.h" |
| 15 | #endif |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 16 | |
David Huang | 6109820 | 2022-01-25 20:56:31 +0530 | [diff] [blame] | 17 | #ifdef CONFIG_SOC_K3_J721S2 |
| 18 | #include "j721s2_hardware.h" |
| 19 | #endif |
| 20 | |
Keerthy | 05d670e | 2021-04-23 11:27:33 -0500 | [diff] [blame] | 21 | #ifdef CONFIG_SOC_K3_AM642 |
| 22 | #include "am64_hardware.h" |
| 23 | #endif |
| 24 | |
Suman Anna | 27fa412 | 2022-05-25 13:38:42 +0530 | [diff] [blame] | 25 | #ifdef CONFIG_SOC_K3_AM625 |
| 26 | #include "am62_hardware.h" |
| 27 | #endif |
| 28 | |
Bryan Brattlof | daa39a6 | 2022-11-03 19:13:55 -0500 | [diff] [blame] | 29 | #ifdef CONFIG_SOC_K3_AM62A7 |
| 30 | #include "am62a_hardware.h" |
| 31 | #endif |
| 32 | |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 33 | /* Assuming these addresses and definitions stay common across K3 devices */ |
Andrew Davis | 990ec70 | 2022-10-07 14:22:05 -0500 | [diff] [blame] | 34 | #define CTRLMMR_WKUP_JTAG_ID (WKUP_CTRL_MMR0_BASE + 0x14) |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 35 | #define JTAG_ID_VARIANT_SHIFT 28 |
| 36 | #define JTAG_ID_VARIANT_MASK (0xf << 28) |
| 37 | #define JTAG_ID_PARTNO_SHIFT 12 |
Lokesh Vutla | b407587 | 2020-04-17 13:43:53 +0530 | [diff] [blame] | 38 | #define JTAG_ID_PARTNO_MASK (0xffff << 12) |
Andrew Davis | f8c9836 | 2022-07-15 11:34:32 -0500 | [diff] [blame] | 39 | #define K3_SEC_MGR_SYS_STATUS 0x44234100 |
| 40 | #define SYS_STATUS_DEV_TYPE_SHIFT 0 |
| 41 | #define SYS_STATUS_DEV_TYPE_MASK (0xf) |
| 42 | #define SYS_STATUS_DEV_TYPE_GP 0x3 |
| 43 | #define SYS_STATUS_DEV_TYPE_TEST 0x5 |
| 44 | #define SYS_STATUS_DEV_TYPE_EMU 0x9 |
| 45 | #define SYS_STATUS_DEV_TYPE_HS 0xa |
| 46 | #define SYS_STATUS_SUB_TYPE_SHIFT 8 |
| 47 | #define SYS_STATUS_SUB_TYPE_MASK (0xf << 8) |
| 48 | #define SYS_STATUS_SUB_TYPE_VAL_FS 0xa |
Lokesh Vutla | a04cf3b | 2019-09-27 13:32:11 +0530 | [diff] [blame] | 49 | |
Andrew Davis | 990ec70 | 2022-10-07 14:22:05 -0500 | [diff] [blame] | 50 | /* |
| 51 | * The CTRL_MMR0 memory space is divided into several equally-spaced |
| 52 | * partitions, so defining the partition size allows us to determine |
| 53 | * register addresses common to those partitions. |
| 54 | */ |
| 55 | #define CTRL_MMR0_PARTITION_SIZE 0x4000 |
| 56 | |
| 57 | /* |
| 58 | * CTRL_MMR0, WKUP_CTRL_MMR0, and MCU_CTRL_MMR0 lock/kick-mechanism |
| 59 | * shared register definitions. The same registers are also used for |
| 60 | * PADCFG_MMR lock/kick-mechanism. |
| 61 | */ |
| 62 | #define CTRLMMR_LOCK_KICK0 0x1008 |
| 63 | #define CTRLMMR_LOCK_KICK0_UNLOCK_VAL 0x68ef3490 |
| 64 | #define CTRLMMR_LOCK_KICK1 0x100c |
| 65 | #define CTRLMMR_LOCK_KICK1_UNLOCK_VAL 0xd172bc5a |
| 66 | |
Lokesh Vutla | 8e7bd01 | 2020-08-05 22:44:22 +0530 | [diff] [blame] | 67 | #define K3_ROM_BOOT_HEADER_MAGIC "EXTBOOT" |
| 68 | |
| 69 | struct rom_extended_boot_data { |
| 70 | char header[8]; |
| 71 | u32 num_components; |
| 72 | }; |
| 73 | |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 74 | #endif /* _ASM_ARCH_HARDWARE_H_ */ |