I am trying to convert this dts file into a user-provided overlay. I have a work-in-progress, but I'm running into the issue that some labels seem not available to reference with the "&" operator.
Specifically - the uart2 label seems not possible to reference. Maybe there are more compile errors in my code, but dtc only gives errors one by one...
I tried decompiling the current device tree using
dtc -I fs -O dts /sys/firmware/devicetree/base
There the uart2 label seems missing in that output. I tried whether creating an alias for the path found in the current device tree, but that also didn't help:
uart2 = "/soc/serial@1c28800";
The compile error I got is this:
nanopineo:overlay:% dtc -@ -q -I dts -O dtb -o test.dtbo ./overlay.dts
test.dtbo: ERROR (path_references): Reference to non-existent node or label "uart2"
ERROR: Input tree has errors, aborting (use -f to force output)
I am wondering these things:
- how to know what labels are available to reference?
- the source of the precompiled uart2 overlay seems to reference &uart2, why can't I reference it from a user-provided overlay?
- if the uart2 label is lost in compilation, how can I write a user-provided overlay for uart2?
Link to file I'm trying to convert to an overlay
Link to my work in progress
Device: NanoPi Neo
Distribution: Armbian Bionic