/* @blob: ptr to device tree @compat: compatiable string to match @compat_off: property name  */
int fdt_node_offset_by_compat_reg(void *blob, const char *compat, phys_addr_t compat_off)
/* @blob: ptr to device tree @compat: compatiable string to match @compat_off: property name  */
int fdt_node_offset_by_compat_reg(void *blob, const char *compat, phys_addr_t compat_off)
{
	int len, off = fdt_node_offset_by_compatible(blob, -1, compat);
	while (off != -FDT_ERR_NOTFOUND) {
		const fdt32_t *reg = fdt_getprop(blob, off, "reg", &len);
		if (reg) {
			if (compat_off == fdt_translate_address(blob, off, reg))
				return off;
		}
		off = fdt_node_offset_by_compatible(blob, off, compat);
	}
	return -FDT_ERR_NOTFOUND;
}