mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
driver: rknpu: Add support to parse nvmem cell customer demand for rk3588
Change-Id: Id2b52a372c869f45f4de10d0ed00eee79a843964 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -120,6 +120,15 @@ static int rk3588_npu_get_soc_info(struct device *dev, struct device_node *np,
|
||||
else if (value == 0xa)
|
||||
*bin = 2;
|
||||
}
|
||||
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;
|
||||
LOG_DEV_INFO(dev, "bin=%d\n", *bin);
|
||||
|
||||
Reference in New Issue
Block a user