rk3288 uboot解析act8846 dts
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;
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.name = act8846_reg_matches.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.gpio;
act8846.pwr_hold.flags = !(gpios.flags& OF_GPIO_ACTIVE_LOW);
return 0;
} uboot里面调用的dts,最终是在resource.img读取,这个文件是在内核编译生成的,
也就是说,dts生成的resource.img被uboot和kernel使用 jpchen 发表于 2018-12-24 14:36
uboot里面调用的dts,最终是在resource.img读取,这个文件是在内核编译生成的,
也就是说,dts生成的resou ...
您的意思是,uboot启动的时候会去解析reource.img获得设备树的信息? 1210443832 发表于 2018-12-28 10:12
您的意思是,uboot启动的时候会去解析reource.img获得设备树的信息?
是的
页:
[1]