soc: rockchip: opp_select: Add support to parse nvmem cell customer demand

Change-Id: I3b13c89517f9b115be4cbce983217c30c1dcb86b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
Finley Xiao
2025-03-13 16:02:55 +08:00
parent 64857f0587
commit 23717a4748

View File

@@ -1353,6 +1353,16 @@ static int rockchip_get_soc_info(struct device *dev, struct device_node *np,
else if (value == 0x13)
*bin = 3;
if (of_property_match_string(np, "nvmem-cell-names", "customer_demand") >= 0) {
ret = rockchip_nvmem_cell_read_u8(np, "customer_demand", &value);
if (ret) {
dev_err(dev, "Failed to get customer_demand\n");
return ret;
}
if (value == 0x3)
*bin = 4;
}
if (*bin < 0)
*bin = 0;
dev_info(dev, "bin=%d\n", *bin);