diff mbox series

[v2,08/29] soc: realtek: chip: Detect RTD1293

Message ID 20200623025106.31273-9-afaerber@suse.de (mailing list archive)
State New, archived
Headers show
Series ARM: Realtek DHC SoC info | expand

Commit Message

Andreas Färber June 23, 2020, 2:50 a.m. UTC
Logic self-determined by comparing DS418j and DS418 registers.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 TODO: Identify the bit in ISO_CHIP_INFO1:bound_opts and what it really means.
 
 v1 -> v2:
 * Rebased onto iso syscon regmap
 
 drivers/soc/realtek/chip.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c
index 103f564aad7f..32ed0e4a3646 100644
--- a/drivers/soc/realtek/chip.c
+++ b/drivers/soc/realtek/chip.c
@@ -75,8 +75,11 @@  static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s)
 		ret = regmap_read(regmap, REG_ISO_CHIP_INFO1, &val);
 		if (ret)
 			dev_warn(dev, "Could not read chip_info1 (%d)\n", ret);
-		else if (val & BIT(11))
+		else if (val & BIT(11)) {
+			if (val & BIT(4))
+				return "RTD1293";
 			return "RTD1296";
+		}
 	}
 
 	return "RTD1295";