blob: 9913964c46bdbf222f1ac112c2cc939c7c714335 [file] [log] [blame]
Lokesh Vutlac7bfb852018-08-27 15:57:11 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * K3: AM6 SoC definitions, structures etc.
4 *
Nishanth Menoneaa39c62023-11-01 15:56:03 -05005 * (C) Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
Lokesh Vutlac7bfb852018-08-27 15:57:11 +05306 */
7#ifndef __ASM_ARCH_AM6_HARDWARE_H
8#define __ASM_ARCH_AM6_HARDWARE_H
9
10#include <config.h>
Simon Glass4dcacfc2020-05-10 11:40:13 -060011#ifndef __ASSEMBLY__
12#include <linux/bitops.h>
13#endif
Lokesh Vutlac7bfb852018-08-27 15:57:11 +053014
15#define CTRL_MMR0_BASE 0x00100000
Andrew Davis990ec702022-10-07 14:22:05 -050016#define WKUP_CTRL_MMR0_BASE 0x43000000
17#define MCU_CTRL_MMR0_BASE 0x40f00000
Lokesh Vutlac7bfb852018-08-27 15:57:11 +053018
Andrew Davis990ec702022-10-07 14:22:05 -050019#define CTRLMMR_MAIN_DEVSTAT (CTRL_MMR0_BASE + 0x30)
Lokesh Vutlac7bfb852018-08-27 15:57:11 +053020#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. Davisf515cf02018-10-03 10:03:22 -050024#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 Abbas0ae20ed2020-08-03 11:35:10 +053030#define CTRLMMR_MAIN_DEVSTAT_USB_MODE_SHIFT 9
31#define CTRLMMR_MAIN_DEVSTAT_USB_MODE_MASK GENMASK(10, 9)
Lokesh Vutlac7bfb852018-08-27 15:57:11 +053032
Andreas Dannenberg8400a902019-06-04 18:08:23 -050033/* MCU SCRATCHPAD usage */
34#define TI_SRAM_SCRATCH_BOARD_EEPROM_START CONFIG_SYS_K3_MCU_SCRATCHPAD_BASE
35
Roger Quadros768e6672021-09-08 15:28:59 -050036/* 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 Davisc178e6d2023-04-06 11:38:15 -050042#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
49static const u32 put_device_ids[] = {
50 AM6_DEV_MCU_RTI0,
51 AM6_DEV_MCU_RTI1,
52};
53
54static 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 Vutlac7bfb852018-08-27 15:57:11 +053061#endif /* __ASM_ARCH_AM6_HARDWARE_H */