blob: 1617126beac4b045d5a3e08c3fdfb32a1a98416a [file] [log] [blame]
Tom Rini8b0c8a12018-05-06 18:27:01 -04001/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
Patrick Delaunay01e3afe2018-03-19 19:09:21 +01002/*
3 * Copyright (C) 2015-2017, STMicroelectronics - All Rights Reserved
Patrick Delaunay01e3afe2018-03-19 19:09:21 +01004 */
5
Patrick Delaunaydb33b0e2020-02-26 11:26:43 +01006/* ID = Device Version (bit31:16) + Device Part Number (RPN) (bit7:0) */
Patrick Delaunay45c82d22019-02-27 17:01:13 +01007#define CPU_STM32MP157Cxx 0x05000000
8#define CPU_STM32MP157Axx 0x05000001
9#define CPU_STM32MP153Cxx 0x05000024
10#define CPU_STM32MP153Axx 0x05000025
11#define CPU_STM32MP151Cxx 0x0500002E
12#define CPU_STM32MP151Axx 0x0500002F
Patrick Delaunaydb33b0e2020-02-26 11:26:43 +010013#define CPU_STM32MP157Fxx 0x05000080
14#define CPU_STM32MP157Dxx 0x05000081
15#define CPU_STM32MP153Fxx 0x050000A4
16#define CPU_STM32MP153Dxx 0x050000A5
17#define CPU_STM32MP151Fxx 0x050000AE
18#define CPU_STM32MP151Dxx 0x050000AF
Patrick Delaunay01e3afe2018-03-19 19:09:21 +010019
Patrick Delaunay45c82d22019-02-27 17:01:13 +010020/* return CPU_STMP32MP...Xxx constants */
Patrick Delaunay01e3afe2018-03-19 19:09:21 +010021u32 get_cpu_type(void);
22
23#define CPU_REVA 0x1000
24#define CPU_REVB 0x2000
Patrick Delaunayc8d4afe2020-01-28 10:11:06 +010025#define CPU_REVZ 0x2001
Patrick Delaunay01e3afe2018-03-19 19:09:21 +010026
27/* return CPU_REV constants */
28u32 get_cpu_rev(void);
Patrick Delaunayc74d6342019-07-05 17:20:13 +020029
30/* Get Package options from OTP */
31u32 get_cpu_package(void);
32
33#define PKG_AA_LBGA448 4
34#define PKG_AB_LBGA354 3
35#define PKG_AC_TFBGA361 2
36#define PKG_AD_TFBGA257 1
37
Patrick Delaunay3e738f22020-02-12 19:37:43 +010038/* Get SOC name */
39#define SOC_NAME_SIZE 20
40void get_soc_name(char name[SOC_NAME_SIZE]);
41
Patrick Delaunay18660a62019-02-27 17:01:12 +010042/* return boot mode */
43u32 get_bootmode(void);
Marek Vasut187cae22019-12-18 16:52:19 +010044
45int setup_mac_address(void);