return np;
 }
 
+static struct device_node *of_get_compat_node_parent(struct device_node *np)
+{
+       struct device_node *parent, *node;
+
+       parent = of_get_parent(np);
+       node = of_get_compat_node(parent);
+       of_node_put(parent);
+
+       return node;
+}
+
 /**
  * of_link_to_phandle - Add fwnode link to supplier from supplier phandle
  * @con_np: consumer device tree node
  * @parse_prop.index: For properties holding a list of phandles, this is the
  *                   index into the list
  * @optional: Describes whether a supplier is mandatory or not
- * @node_not_dev: The consumer node containing the property is never a device.
+ * @node_not_dev: The consumer node containing the property is never converted
+ *               to a struct device. Instead, parse ancestor nodes for the
+ *               compatible property to find a node corresponding to a device.
  *
  * Returns:
  * parse_prop() return values are
                        struct device_node *con_dev_np;
 
                        con_dev_np = s->node_not_dev
-                                       ? of_get_compat_node(con_np)
+                                       ? of_get_compat_node_parent(con_np)
                                        : of_node_get(con_np);
                        matched = true;
                        i++;