Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * K3: AM6 SoC definitions, structures etc. |
| 4 | * |
Nishanth Menon | eaa39c6 | 2023-11-01 15:56:03 -0500 | [diff] [blame] | 5 | * (C) Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/ |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __ASM_ARCH_AM6_HARDWARE_H |
| 8 | #define __ASM_ARCH_AM6_HARDWARE_H |
| 9 | |
| 10 | #include <config.h> |
Simon Glass | 4dcacfc | 2020-05-10 11:40:13 -0600 | [diff] [blame] | 11 | #ifndef __ASSEMBLY__ |
| 12 | #include <linux/bitops.h> |
| 13 | #endif |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 14 | |
| 15 | #define CTRL_MMR0_BASE 0x00100000 |
Andrew Davis | 990ec70 | 2022-10-07 14:22:05 -0500 | [diff] [blame] | 16 | #define WKUP_CTRL_MMR0_BASE 0x43000000 |
| 17 | #define MCU_CTRL_MMR0_BASE 0x40f00000 |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 18 | |
Andrew Davis | 990ec70 | 2022-10-07 14:22:05 -0500 | [diff] [blame] | 19 | #define CTRLMMR_MAIN_DEVSTAT (CTRL_MMR0_BASE + 0x30) |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 20 | #define CTRLMMR_MAIN_DEVSTAT_BOOTMODE_MASK GENMASK(3, 0) |
| 21 | #define CTRLMMR_MAIN_DEVSTAT_BOOTMODE_SHIFT 0 |
| 22 | #define CTRLMMR_MAIN_DEVSTAT_BKUP_BOOTMODE_MASK GENMASK(6, 4) |
| 23 | #define CTRLMMR_MAIN_DEVSTAT_BKUP_BOOTMODE_SHIFT 4 |
Andrew F. Davis | f515cf0 | 2018-10-03 10:03:22 -0500 | [diff] [blame] | 24 | #define CTRLMMR_MAIN_DEVSTAT_MMC_PORT_MASK GENMASK(12, 12) |
| 25 | #define CTRLMMR_MAIN_DEVSTAT_MMC_PORT_SHIFT 12 |
| 26 | #define CTRLMMR_MAIN_DEVSTAT_EMMC_PORT_MASK GENMASK(14, 14) |
| 27 | #define CTRLMMR_MAIN_DEVSTAT_EMMC_PORT_SHIFT 14 |
| 28 | #define CTRLMMR_MAIN_DEVSTAT_BKUP_MMC_PORT_MASK GENMASK(17, 17) |
| 29 | #define CTRLMMR_MAIN_DEVSTAT_BKUP_MMC_PORT_SHIFT 12 |
Faiz Abbas | 0ae20ed | 2020-08-03 11:35:10 +0530 | [diff] [blame] | 30 | #define CTRLMMR_MAIN_DEVSTAT_USB_MODE_SHIFT 9 |
| 31 | #define CTRLMMR_MAIN_DEVSTAT_USB_MODE_MASK GENMASK(10, 9) |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 32 | |
Andreas Dannenberg | 8400a90 | 2019-06-04 18:08:23 -0500 | [diff] [blame] | 33 | /* MCU SCRATCHPAD usage */ |
| 34 | #define TI_SRAM_SCRATCH_BOARD_EEPROM_START CONFIG_SYS_K3_MCU_SCRATCHPAD_BASE |
| 35 | |
Roger Quadros | 768e667 | 2021-09-08 15:28:59 -0500 | [diff] [blame] | 36 | /* NAVSS Northbridge config */ |
| 37 | #define NAVSS0_NBSS_NB0_CFG_BASE 0x03802000 |
| 38 | #define NAVSS0_NBSS_NB1_CFG_BASE 0x03803000 |
| 39 | |
| 40 | #define NAVSS_NBSS_THREADMAP 0x10 |
| 41 | |
Andrew Davis | c178e6d | 2023-04-06 11:38:15 -0500 | [diff] [blame] | 42 | #if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__) |
| 43 | |
| 44 | #define AM6_DEV_MCU_RTI0 134 |
| 45 | #define AM6_DEV_MCU_RTI1 135 |
| 46 | #define AM6_DEV_MCU_ARMSS0_CPU0 159 |
| 47 | #define AM6_DEV_MCU_ARMSS0_CPU1 245 |
| 48 | |
| 49 | static const u32 put_device_ids[] = { |
| 50 | AM6_DEV_MCU_RTI0, |
| 51 | AM6_DEV_MCU_RTI1, |
| 52 | }; |
| 53 | |
| 54 | static const u32 put_core_ids[] = { |
| 55 | AM6_DEV_MCU_ARMSS0_CPU1, |
| 56 | AM6_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ |
| 57 | }; |
| 58 | |
| 59 | #endif |
| 60 | |
Lokesh Vutla | c7bfb85 | 2018-08-27 15:57:11 +0530 | [diff] [blame] | 61 | #endif /* __ASM_ARCH_AM6_HARDWARE_H */ |