arm64: versal2: Show major and minor silicon version

ES1 silicon is 0x10 (16) and production is 0x20 (32) but correct number to
see are v1.0 or v2.0 instead of v16 or v32.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20095339334fe07f373ffae3bdbfec51f5a00dc7.1739882585.git.michal.simek@amd.com
This commit is contained in:
Michal Simek 2025-02-18 13:43:07 +01:00
parent 96f47ae89a
commit f92623704e
2 changed files with 5 additions and 2 deletions

View file

@ -51,7 +51,8 @@ struct crp_regs {
#define PMC_TAP_VERSION (PMC_TAP + 0x4) #define PMC_TAP_VERSION (PMC_TAP + 0x4)
# define PMC_VERSION_MASK GENMASK(7, 0) # define PMC_VERSION_MASK GENMASK(7, 0)
# define PS_VERSION_MASK GENMASK(15, 8) # 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 RTL_VERSION_MASK GENMASK(23, 16)
# define PLATFORM_MASK GENMASK(27, 24) # define PLATFORM_MASK GENMASK(27, 24)
# define PLATFORM_VERSION_MASK GENMASK(31, 28) # define PLATFORM_VERSION_MASK GENMASK(31, 28)

View file

@ -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); 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 = { static const struct soc_ops soc_amd_versal2_ops = {