[Bug 227974] libfdt reverses order of child devices in overlays
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jun 5 15:49:31 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227974
Ian Lepore <ian at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |Not A Bug
CC| |ian at FreeBSD.org
Status|New |Closed
--- Comment #1 from Ian Lepore <ian at FreeBSD.org> ---
The names of FDT device nodes do not necessarily have any relationship to the
names of devices instantiated by freebsd. By FDT convention, a device node
name is formed as devicetype at regaddr; it's just a coincidence in the case of
spi that the register addresses are single-digit integers that seem to vaguely
correspond with freebsd device names. (And it should be noted that the names
in the example shown do not follow the FDT rules and would generate a warning
with the modern gnu dtc compiler because they should be spigen at 0 not spigen0).
The root problem is that a user of spi devices needs some way to identify which
/dev/spigenX device corresponds to which device described in the FDT data. We
ultimately solved that problem by naming spigen devices in devfs after their
bus and chip select number, instead of just using sequential 0-n numbers. So
instead of spigen0 and spigen1, the example overlay would now create
/dev/spigen0.0 and /dev/spigen0.1 (assume they were on spi bus zero), and since
it's based on the chip select number it comes out the same name matter what
order the nodes appear in.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-arm
mailing list