summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-versal2/include/mach/hardware.h3
-rw-r--r--drivers/soc/soc_amd_versal2.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-versal2/include/mach/hardware.h b/arch/arm/mach-versal2/include/mach/hardware.h
index 42e3061a0ae..15085f941e0 100644
--- a/arch/arm/mach-versal2/include/mach/hardware.h
+++ b/arch/arm/mach-versal2/include/mach/hardware.h
@@ -51,7 +51,8 @@ struct crp_regs {
#define PMC_TAP_VERSION (PMC_TAP + 0x4)
# define PMC_VERSION_MASK GENMASK(7, 0)
# define PS_VERSION_MASK GENMASK(15, 8)
-# define PS_VERSION_PRODUCTION 0x20
+# define PS_VERSION_MAJOR GENMASK(7, 4)
+# define PS_VERSION_MINOR GENMASK(3, 0)
# define RTL_VERSION_MASK GENMASK(23, 16)
# define PLATFORM_MASK GENMASK(27, 24)
# define PLATFORM_VERSION_MASK GENMASK(31, 28)
diff --git a/drivers/soc/soc_amd_versal2.c b/drivers/soc/soc_amd_versal2.c
index 66bcb22b4fa..8507da0bd22 100644
--- a/drivers/soc/soc_amd_versal2.c
+++ b/drivers/soc/soc_amd_versal2.c
@@ -35,7 +35,9 @@ static int soc_amd_versal2_get_revision(struct udevice *dev, char *buf, int size
{
struct soc_amd_versal2_priv *priv = dev_get_priv(dev);
- return snprintf(buf, size, "v%d", priv->revision);
+ return snprintf(buf, size, "v%d.%d",
+ (u32)FIELD_GET(PS_VERSION_MAJOR, priv->revision),
+ (u32)FIELD_GET(PS_VERSION_MINOR, priv->revision));
}
static const struct soc_ops soc_amd_versal2_ops = {