|
rk3288 uboot解析act8846 dts
发表于 2018-12-19 11:41:52
浏览:7819
|
回复:3
打印
只看该作者
[复制链接]
楼主
rk3288 uboot act8846初始化的时候解析act8846的DTS,但是在uboot(u-boot/arch/arm/dts)的目录中没有搜索rk3288的DTS文件,请问uboot解析的dts文件在哪个目录
static int act8846_parse_dt(const void* blob)
{
int node, nd;
struct fdt_gpio_state gpios[2];
u32 bus, addr;
int ret, i;
printf("act8846_parse_dt \r\n");
node = fdt_node_offset_by_compatible(blob,
g_i2c_node, COMPAT_ACTIVE_ACT8846);
if (node < 0) {
printf("can't find dts node for act8846\n\r\n");
debug("can't find dts node for act8846\n");
return -ENODEV;
}
printf("act8846_parse_dt step1 \r\n");
if (!fdt_device_is_available(blob, node)) {
debug("device act8846 is disabled\n");
return -1;
}
ret = fdt_get_i2c_info(blob, node, &bus, &addr);
if (ret < 0) {
debug("pmic act8846 get fdt i2c failed\n");
return ret;
}
ret = act8846_i2c_probe(bus, addr);
if (ret < 0) {
debug("pmic act8846 i2c probe failed\n");
return ret;
}
nd = fdt_get_regulator_node(blob, node);
if (nd < 0)
printf("%s: Cannot find regulators\n", __func__);
else
fdt_regulator_match(blob, nd, act8846_reg_matches,
ACT8846_NUM_REGULATORS);
for (i = 0; i < ACT8846_NUM_REGULATORS; i++)
regulator_init_pmic_matches[i].name = act8846_reg_matches[i].name;
fdtdec_decode_gpios(blob, node, "gpios", gpios, 2);
act8846.pmic = pmic_alloc();
act8846.node = node;
act8846.pmic->hw.i2c.addr = addr;
act8846.pmic->bus = bus;
act8846.pwr_hold.gpio = gpios[1].gpio;
act8846.pwr_hold.flags = !(gpios[1].flags & OF_GPIO_ACTIVE_LOW);
return 0;
} |
|