mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-13 02:36:59 +02:00
soc: Add information to identify the J742S2 SoC family
J742S2 has the same part number as J784S4 but JTAG_DEVICE_ID has a PKG bit that tells about J742S2. Add support for reading JTAG_DEVICE_ID and set family as J742S2 based on that. Link: https://www.ti.com/lit/pdf/spruje3 (TRM) Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
This commit is contained in:
parent
61b6b2fcc9
commit
201b08702e
@ -62,6 +62,12 @@
|
|||||||
#define JTAG_ID_PARTNO_J722S 0xbba0
|
#define JTAG_ID_PARTNO_J722S 0xbba0
|
||||||
#define JTAG_ID_PARTNO_J784S4 0xbb80
|
#define JTAG_ID_PARTNO_J784S4 0xbb80
|
||||||
|
|
||||||
|
#define CTRLMMR_WKUP_JTAG_DEVICE_ID (WKUP_CTRL_MMR0_BASE + 0x18)
|
||||||
|
#define JTAG_DEV_J742S2_PKG_MASK GENMASK(2, 0)
|
||||||
|
#define JTAG_DEV_J742S2_PKG_SHIFT 0
|
||||||
|
|
||||||
|
#define JTAG_ID_PKG_J742S2 0x7
|
||||||
|
|
||||||
#define K3_SOC_ID(id, ID) \
|
#define K3_SOC_ID(id, ID) \
|
||||||
static inline bool soc_is_##id(void) \
|
static inline bool soc_is_##id(void) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -18,8 +18,12 @@ struct soc_ti_k3_plat {
|
|||||||
static const char *get_family_string(u32 idreg)
|
static const char *get_family_string(u32 idreg)
|
||||||
{
|
{
|
||||||
const char *family;
|
const char *family;
|
||||||
|
u32 jtag_dev_id;
|
||||||
|
u32 pkg;
|
||||||
u32 soc;
|
u32 soc;
|
||||||
|
|
||||||
|
jtag_dev_id = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
|
||||||
|
|
||||||
soc = (idreg & JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT;
|
soc = (idreg & JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT;
|
||||||
|
|
||||||
switch (soc) {
|
switch (soc) {
|
||||||
@ -51,8 +55,16 @@ static const char *get_family_string(u32 idreg)
|
|||||||
family = "J722S";
|
family = "J722S";
|
||||||
break;
|
break;
|
||||||
case JTAG_ID_PARTNO_J784S4:
|
case JTAG_ID_PARTNO_J784S4:
|
||||||
family = "J784S4";
|
{
|
||||||
break;
|
/* Keep default family as J784S4 */
|
||||||
|
family = "J784S4";
|
||||||
|
|
||||||
|
pkg = (jtag_dev_id & JTAG_DEV_J742S2_PKG_MASK) >> JTAG_DEV_J742S2_PKG_SHIFT;
|
||||||
|
if (pkg == JTAG_ID_PKG_J742S2)
|
||||||
|
family = "J742S2";
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
family = "Unknown Silicon";
|
family = "Unknown Silicon";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user