blob: 28244d767189165d6cb1db422f952e5e9249b7ba [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Fabio Estevam87d87332014-01-26 15:06:40 -02002/*
3 * (C) Copyright 2014 Freescale Semiconductor, Inc.
Fabio Estevam87d87332014-01-26 15:06:40 -02004 */
5
Peng Fanf9b78a72015-08-13 10:55:30 +08006#define MXC_CPU_MX23 0x23
7#define MXC_CPU_MX25 0x25
8#define MXC_CPU_MX27 0x27
9#define MXC_CPU_MX28 0x28
10#define MXC_CPU_MX31 0x31
11#define MXC_CPU_MX35 0x35
Fabio Estevam87d87332014-01-26 15:06:40 -020012#define MXC_CPU_MX51 0x51
13#define MXC_CPU_MX53 0x53
14#define MXC_CPU_MX6SL 0x60
15#define MXC_CPU_MX6DL 0x61
Fabio Estevam712ab882014-06-24 17:40:58 -030016#define MXC_CPU_MX6SX 0x62
Fabio Estevam87d87332014-01-26 15:06:40 -020017#define MXC_CPU_MX6Q 0x63
Peng Faneaa53a12015-07-20 19:28:21 +080018#define MXC_CPU_MX6UL 0x64
Peng Fan3b33e3f2016-08-11 14:02:38 +080019#define MXC_CPU_MX6ULL 0x65
Peng Fanc53d0c92019-08-08 09:55:52 +000020#define MXC_CPU_MX6ULZ 0x6B
Peng Fan3b33e3f2016-08-11 14:02:38 +080021#define MXC_CPU_MX6SOLO 0x66 /* dummy */
Peng Fan4cfd7972016-12-11 19:24:20 +080022#define MXC_CPU_MX6SLL 0x67
23#define MXC_CPU_MX6D 0x6A
Peng Fan5f247922015-07-11 11:38:42 +080024#define MXC_CPU_MX6DP 0x68
25#define MXC_CPU_MX6QP 0x69
Fabio Estevamf6ced1b2016-02-28 12:33:17 -030026#define MXC_CPU_MX7S 0x71 /* dummy ID */
Adrian Alonso2b3d9612015-09-02 13:54:19 -050027#define MXC_CPU_MX7D 0x72
Peng Fan39945c12018-11-20 10:19:25 +000028#define MXC_CPU_IMX8MQ 0x82
Peng Fan67815082020-02-05 17:34:54 +080029#define MXC_CPU_IMX8MD 0x83 /* dummy ID */
30#define MXC_CPU_IMX8MQL 0x84 /* dummy ID */
Peng Fan2d22a992019-08-27 06:25:04 +000031#define MXC_CPU_IMX8MM 0x85 /* dummy ID */
32#define MXC_CPU_IMX8MML 0x86 /* dummy ID */
33#define MXC_CPU_IMX8MMD 0x87 /* dummy ID */
34#define MXC_CPU_IMX8MMDL 0x88 /* dummy ID */
35#define MXC_CPU_IMX8MMS 0x89 /* dummy ID */
36#define MXC_CPU_IMX8MMSL 0x8a /* dummy ID */
Peng Fan5d2f2062019-06-27 17:23:49 +080037#define MXC_CPU_IMX8MN 0x8b /* dummy ID */
Peng Fan1a07d912020-02-05 17:39:27 +080038#define MXC_CPU_IMX8MND 0x8c /* dummy ID */
39#define MXC_CPU_IMX8MNS 0x8d /* dummy ID */
40#define MXC_CPU_IMX8MNL 0x8e /* dummy ID */
41#define MXC_CPU_IMX8MNDL 0x8f /* dummy ID */
42#define MXC_CPU_IMX8MNSL 0x181 /* dummy ID */
Ye Li715180e2021-03-19 15:57:11 +080043#define MXC_CPU_IMX8MNUQ 0x182 /* dummy ID */
44#define MXC_CPU_IMX8MNUD 0x183 /* dummy ID */
45#define MXC_CPU_IMX8MNUS 0x184 /* dummy ID */
46#define MXC_CPU_IMX8MP 0x185/* dummy ID */
47#define MXC_CPU_IMX8MP6 0x186 /* dummy ID */
48#define MXC_CPU_IMX8MPL 0x187 /* dummy ID */
49#define MXC_CPU_IMX8MPD 0x188 /* dummy ID */
Anatolij Gustschin9b39be92018-10-18 14:28:24 +020050#define MXC_CPU_IMX8QXP_A0 0x90 /* dummy ID */
Peng Fancb9ce012019-03-05 02:32:28 +000051#define MXC_CPU_IMX8QM 0x91 /* dummy ID */
Peng Fan36b65172018-10-18 14:28:16 +020052#define MXC_CPU_IMX8QXP 0x92 /* dummy ID */
Peng Fan44eaba62018-01-10 13:20:27 +080053#define MXC_CPU_MX7ULP 0xE1 /* Temporally hard code */
Peng Fan0bacb932015-09-01 17:15:03 +080054#define MXC_CPU_VF610 0xF6 /* dummy ID */
Fabio Estevam16e65f62014-11-14 11:27:21 -020055
Adrian Alonso1eec27c2015-09-02 13:54:12 -050056#define MXC_SOC_MX6 0x60
Adrian Alonso2b3d9612015-09-02 13:54:19 -050057#define MXC_SOC_MX7 0x70
Peng Fan39945c12018-11-20 10:19:25 +000058#define MXC_SOC_IMX8M 0x80
Peng Fan36b65172018-10-18 14:28:16 +020059#define MXC_SOC_IMX8 0x90 /* dummy */
Peng Fan44eaba62018-01-10 13:20:27 +080060#define MXC_SOC_MX7ULP 0xE0 /* dummy */
Adrian Alonso1eec27c2015-09-02 13:54:12 -050061
Adrian Alonsoa7209a22015-10-12 13:48:07 -050062#define CHIP_REV_1_0 0x10
63#define CHIP_REV_1_1 0x11
64#define CHIP_REV_1_2 0x12
65#define CHIP_REV_1_5 0x15
66#define CHIP_REV_2_0 0x20
Peng Fan9900eb92018-11-20 10:19:18 +000067#define CHIP_REV_2_1 0x21
Adrian Alonsoa7209a22015-10-12 13:48:07 -050068#define CHIP_REV_2_5 0x25
69#define CHIP_REV_3_0 0x30
70
Anatolij Gustschin9b39be92018-10-18 14:28:24 +020071#define CHIP_REV_A 0x0
72#define CHIP_REV_B 0x1
Frank Li877ff942020-05-03 21:58:55 +080073#define CHIP_REV_C 0x2
Peng Fan36b65172018-10-18 14:28:16 +020074
Adrian Alonsoa7209a22015-10-12 13:48:07 -050075#define BOARD_REV_1_0 0x0
76#define BOARD_REV_2_0 0x1
77#define BOARD_VER_OFFSET 0x8
78
Fabio Estevam16e65f62014-11-14 11:27:21 -020079#define CS0_128 0
80#define CS0_64M_CS1_64M 1
81#define CS0_64M_CS1_32M_CS2_32M 2
82#define CS0_32M_CS1_32M_CS2_32M_CS3_32M 3
Eric Nelson25e02302015-02-15 14:37:21 -070083
84u32 get_imx_reset_cause(void);
Simon Glass125a4c12017-05-17 08:23:07 -060085ulong get_systemPLLCLK(void);
86ulong get_FCLK(void);
87ulong get_HCLK(void);
88ulong get_BCLK(void);
89ulong get_PERCLK1(void);
90ulong get_PERCLK2(void);
91ulong get_PERCLK3(void);