On Sun, May 20, 2018 at 2:32 PM, Simon Glass <sjg@xxxxxxxxxxxx> wrote: > Currently nodes with phandles just print out as plain integer values, e.g. > > $ fdtget firefly-rk3288/u-boot.dtb /gpio-keys/button@0 gpios > 112 5 1 > > A common use of phandles is: > > <phandle> <n cells of stuff> <phandle> <m cells of stuff> > > It is useful to be able to decode these phandles and print them out in a > properly formatted way, e.g. > > $ fdtget firefly-rk3288/u-boot.dtb -P -c gpio /gpio-keys/button@0 gpios > /pinctrl/gpio0@ff750000 5 1 > > Add a -P option to decode these sorts of phandles. For those which require > arguments, add a -c option to specify the name of the '#xxx-cells' property > in the target node. This allows the tool to look up the number of cells > that follow each phandle. The number of bindings using #*-cells is not that big. Why not add a lookup. We do that already in the dtc checks. You can almost do it without a lookup table by just dropping the 's' of the property name. But then you have special cases like 'mboxes'. In any case, just a thought for a follow-up. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html