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

Andreas Färber afaerber at suse.de
Mon Jun 22 22:50:45 EDT 2020


Logic self-determined by comparing DS418j and DS418 registers.

Signed-off-by: Andreas Färber <afaerber at 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 --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";
-- 
2.26.2




More information about the linux-realtek-soc mailing list