Overlays and aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Kalimera Pantelis,

I'm trying to use an overlay to enable an additional serial port on an
expansion port. The serial driver relies on of_alias_get_id() to find the
serial index, so I have to update /aliases.

My first naive try:

        fragment@0 {
                target-path = "/aliases";

                __overlay__ {
                        serial3 = <&scif3>;
                };
        };

didn't work, as now /aliases/serial3 is a phandle, not a string.

Next try:

                        serial3 = &scif3;

That one isn't liked by dtc:

    ERROR (path_references): Reference to non-existent node or label "scif3"

Am I correct in assuming that fixup_path_references() needs updating to
support this, cfr. fixup_phandle_references()?

Finally, let's hardcode the path:

                        serial3 = "/serial@e6ea8000";

Now /sys/firmware/devicetree/base/aliases/serial3 is correct, but it
still doesn't
work, as the list of aliases is created only once (by of_alias_scan_aliases()),
after unpacking the device tree. I guess of_alias_add() should be called when
adding a property to /aliases.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux