Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Fabio Estevam | 87d8733 | 2014-01-26 15:06:40 -0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2014 Freescale Semiconductor, Inc. |
Fabio Estevam | 87d8733 | 2014-01-26 15:06:40 -0200 | [diff] [blame] | 4 | */ |
| 5 | |
Peng Fan | f9b78a7 | 2015-08-13 10:55:30 +0800 | [diff] [blame] | 6 | #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 Estevam | 87d8733 | 2014-01-26 15:06:40 -0200 | [diff] [blame] | 12 | #define MXC_CPU_MX51 0x51 |
| 13 | #define MXC_CPU_MX53 0x53 |
| 14 | #define MXC_CPU_MX6SL 0x60 |
| 15 | #define MXC_CPU_MX6DL 0x61 |
Fabio Estevam | 712ab88 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 16 | #define MXC_CPU_MX6SX 0x62 |
Fabio Estevam | 87d8733 | 2014-01-26 15:06:40 -0200 | [diff] [blame] | 17 | #define MXC_CPU_MX6Q 0x63 |
Peng Fan | eaa53a1 | 2015-07-20 19:28:21 +0800 | [diff] [blame] | 18 | #define MXC_CPU_MX6UL 0x64 |
Peng Fan | 3b33e3f | 2016-08-11 14:02:38 +0800 | [diff] [blame] | 19 | #define MXC_CPU_MX6ULL 0x65 |
Peng Fan | c53d0c9 | 2019-08-08 09:55:52 +0000 | [diff] [blame] | 20 | #define MXC_CPU_MX6ULZ 0x6B |
Peng Fan | 3b33e3f | 2016-08-11 14:02:38 +0800 | [diff] [blame] | 21 | #define MXC_CPU_MX6SOLO 0x66 /* dummy */ |
Peng Fan | 4cfd797 | 2016-12-11 19:24:20 +0800 | [diff] [blame] | 22 | #define MXC_CPU_MX6SLL 0x67 |
| 23 | #define MXC_CPU_MX6D 0x6A |
Peng Fan | 5f24792 | 2015-07-11 11:38:42 +0800 | [diff] [blame] | 24 | #define MXC_CPU_MX6DP 0x68 |
| 25 | #define MXC_CPU_MX6QP 0x69 |
Fabio Estevam | f6ced1b | 2016-02-28 12:33:17 -0300 | [diff] [blame] | 26 | #define MXC_CPU_MX7S 0x71 /* dummy ID */ |
Adrian Alonso | 2b3d961 | 2015-09-02 13:54:19 -0500 | [diff] [blame] | 27 | #define MXC_CPU_MX7D 0x72 |
Peng Fan | 39945c1 | 2018-11-20 10:19:25 +0000 | [diff] [blame] | 28 | #define MXC_CPU_IMX8MQ 0x82 |
Peng Fan | 6781508 | 2020-02-05 17:34:54 +0800 | [diff] [blame] | 29 | #define MXC_CPU_IMX8MD 0x83 /* dummy ID */ |
| 30 | #define MXC_CPU_IMX8MQL 0x84 /* dummy ID */ |
Peng Fan | 2d22a99 | 2019-08-27 06:25:04 +0000 | [diff] [blame] | 31 | #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 Fan | 5d2f206 | 2019-06-27 17:23:49 +0800 | [diff] [blame] | 37 | #define MXC_CPU_IMX8MN 0x8b /* dummy ID */ |
Peng Fan | 1a07d91 | 2020-02-05 17:39:27 +0800 | [diff] [blame] | 38 | #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 Li | 715180e | 2021-03-19 15:57:11 +0800 | [diff] [blame] | 43 | #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 */ |
Peng Fan | 4d54f5b | 2022-04-07 15:55:51 +0800 | [diff] [blame] | 50 | #define MXC_CPU_IMX8MPUL 0x189 /* dummy ID */ |
Anatolij Gustschin | 9b39be9 | 2018-10-18 14:28:24 +0200 | [diff] [blame] | 51 | #define MXC_CPU_IMX8QXP_A0 0x90 /* dummy ID */ |
Peng Fan | cb9ce01 | 2019-03-05 02:32:28 +0000 | [diff] [blame] | 52 | #define MXC_CPU_IMX8QM 0x91 /* dummy ID */ |
Peng Fan | 36b6517 | 2018-10-18 14:28:16 +0200 | [diff] [blame] | 53 | #define MXC_CPU_IMX8QXP 0x92 /* dummy ID */ |
Peng Fan | 5c2218a | 2021-08-07 16:00:31 +0800 | [diff] [blame] | 54 | |
| 55 | #define MXC_CPU_IMX8ULP 0xA1 /* dummy ID */ |
| 56 | |
Giulio Benetti | 3d1a573 | 2021-05-20 16:10:13 +0200 | [diff] [blame] | 57 | #define MXC_CPU_IMXRT1020 0xB4 /* dummy ID */ |
| 58 | #define MXC_CPU_IMXRT1050 0xB6 /* dummy ID */ |
Jesse Taube | 9451ffe | 2022-07-26 01:43:39 -0400 | [diff] [blame] | 59 | #define MXC_CPU_IMXRT1170 0xBA /* dummy ID */ |
Peng Fan | 5c2218a | 2021-08-07 16:00:31 +0800 | [diff] [blame] | 60 | |
Peng Fan | 44eaba6 | 2018-01-10 13:20:27 +0800 | [diff] [blame] | 61 | #define MXC_CPU_MX7ULP 0xE1 /* Temporally hard code */ |
Peng Fan | 0bacb93 | 2015-09-01 17:15:03 +0800 | [diff] [blame] | 62 | #define MXC_CPU_VF610 0xF6 /* dummy ID */ |
Peng Fan | bbcd2c4 | 2022-07-26 16:40:39 +0800 | [diff] [blame] | 63 | #define MXC_CPU_IMX93 0xC1 /* dummy ID */ |
Peng Fan | c3db3ad | 2023-04-28 12:08:32 +0800 | [diff] [blame] | 64 | #define MXC_CPU_IMX9351 0xC2 /* dummy ID */ |
| 65 | #define MXC_CPU_IMX9332 0xC3 /* dummy ID */ |
| 66 | #define MXC_CPU_IMX9331 0xC4 /* dummy ID */ |
| 67 | #define MXC_CPU_IMX9322 0xC5 /* dummy ID */ |
| 68 | #define MXC_CPU_IMX9321 0xC6 /* dummy ID */ |
| 69 | #define MXC_CPU_IMX9312 0xC7 /* dummy ID */ |
| 70 | #define MXC_CPU_IMX9311 0xC8 /* dummy ID */ |
Fabio Estevam | 16e65f6 | 2014-11-14 11:27:21 -0200 | [diff] [blame] | 71 | |
Adrian Alonso | 1eec27c | 2015-09-02 13:54:12 -0500 | [diff] [blame] | 72 | #define MXC_SOC_MX6 0x60 |
Adrian Alonso | 2b3d961 | 2015-09-02 13:54:19 -0500 | [diff] [blame] | 73 | #define MXC_SOC_MX7 0x70 |
Peng Fan | 39945c1 | 2018-11-20 10:19:25 +0000 | [diff] [blame] | 74 | #define MXC_SOC_IMX8M 0x80 |
Peng Fan | 36b6517 | 2018-10-18 14:28:16 +0200 | [diff] [blame] | 75 | #define MXC_SOC_IMX8 0x90 /* dummy */ |
Giulio Benetti | 3d1a573 | 2021-05-20 16:10:13 +0200 | [diff] [blame] | 76 | #define MXC_SOC_IMXRT 0xB0 /* dummy */ |
Peng Fan | 44eaba6 | 2018-01-10 13:20:27 +0800 | [diff] [blame] | 77 | #define MXC_SOC_MX7ULP 0xE0 /* dummy */ |
Peng Fan | bbcd2c4 | 2022-07-26 16:40:39 +0800 | [diff] [blame] | 78 | #define MXC_SOC_IMX9 0xC0 /* dummy */ |
Adrian Alonso | 1eec27c | 2015-09-02 13:54:12 -0500 | [diff] [blame] | 79 | |
Adrian Alonso | a7209a2 | 2015-10-12 13:48:07 -0500 | [diff] [blame] | 80 | #define CHIP_REV_1_0 0x10 |
| 81 | #define CHIP_REV_1_1 0x11 |
| 82 | #define CHIP_REV_1_2 0x12 |
Breno Lima | 90ec0ea | 2021-03-25 17:30:19 +0800 | [diff] [blame] | 83 | #define CHIP_REV_1_3 0x13 |
Adrian Alonso | a7209a2 | 2015-10-12 13:48:07 -0500 | [diff] [blame] | 84 | #define CHIP_REV_1_5 0x15 |
| 85 | #define CHIP_REV_2_0 0x20 |
Peng Fan | 9900eb9 | 2018-11-20 10:19:18 +0000 | [diff] [blame] | 86 | #define CHIP_REV_2_1 0x21 |
Ye Li | c963ed1 | 2021-03-19 15:57:16 +0800 | [diff] [blame] | 87 | #define CHIP_REV_2_2 0x22 |
Adrian Alonso | a7209a2 | 2015-10-12 13:48:07 -0500 | [diff] [blame] | 88 | #define CHIP_REV_2_5 0x25 |
| 89 | #define CHIP_REV_3_0 0x30 |
| 90 | |
Anatolij Gustschin | 9b39be9 | 2018-10-18 14:28:24 +0200 | [diff] [blame] | 91 | #define CHIP_REV_A 0x0 |
| 92 | #define CHIP_REV_B 0x1 |
Frank Li | 877ff94 | 2020-05-03 21:58:55 +0800 | [diff] [blame] | 93 | #define CHIP_REV_C 0x2 |
Peng Fan | 36b6517 | 2018-10-18 14:28:16 +0200 | [diff] [blame] | 94 | |
Adrian Alonso | a7209a2 | 2015-10-12 13:48:07 -0500 | [diff] [blame] | 95 | #define BOARD_REV_1_0 0x0 |
| 96 | #define BOARD_REV_2_0 0x1 |
| 97 | #define BOARD_VER_OFFSET 0x8 |
| 98 | |
Fabio Estevam | 16e65f6 | 2014-11-14 11:27:21 -0200 | [diff] [blame] | 99 | #define CS0_128 0 |
| 100 | #define CS0_64M_CS1_64M 1 |
| 101 | #define CS0_64M_CS1_32M_CS2_32M 2 |
| 102 | #define CS0_32M_CS1_32M_CS2_32M_CS3_32M 3 |
Eric Nelson | 25e0230 | 2015-02-15 14:37:21 -0700 | [diff] [blame] | 103 | |
| 104 | u32 get_imx_reset_cause(void); |
Simon Glass | 125a4c1 | 2017-05-17 08:23:07 -0600 | [diff] [blame] | 105 | ulong get_systemPLLCLK(void); |
| 106 | ulong get_FCLK(void); |
| 107 | ulong get_HCLK(void); |
| 108 | ulong get_BCLK(void); |
| 109 | ulong get_PERCLK1(void); |
| 110 | ulong get_PERCLK2(void); |
| 111 | ulong get_PERCLK3(void); |