
Gerhard Pircher wrote:
Hi,
I'm trying to understand how to add flatten device tree support to a specific board (MAI/AmigaOneG3SE in this case). Besides setting CONFIG_OF_LIBFDT, is it necessary to add any code to the board's platform code? Which nodes are automatically added to the fdt by U-boot? Does the device tree include nodes for e.g. the PCI bus and its devices?
regards,
Gerhard
PS: Please put me on CC:
Hi Gerhard,
It is hard to say. I've done the Freescale MPC8360EMDS eval board, which is a whole different animal than an AmigaOneG3SE (and I don't know exactly what an AmigaOneG3SE is). If you don't have any fixups/additions necessary for the fdt, then it theoretically is "enable and it just works" but you will be blazing new ground and I wouldn't bet on it being quite that simple. It never seems to be. :-/
If you look at my page FDT page, you will see a table of known conversions, most of which have not happened yet (only the MPC8360 family has been worked on). http://www.denx.de/wiki/UBoot/UBootFdtInfo#adapt
There are three areas that fix up fdt entries: board setup, CPU setup, and PCI setup. These do fixups on things like ethernet MAC addresses (set them from the env variables) and clock frequencies. I would guess that your AmigaOneG3SE won't need these fixed up, with the possible exception of the MAC addresses. The current boards that have fixups have different boards and/or configurations that can run with different PCI and CPU clock frequencies, for instance, so the fdt property has to be fixed up with the correct frequency for the given configuration.
FWIIW, I'm coming out of my busy cycle of the month (first 2+ weeks) and am getting ready to update the u-boot-fdt fork with respins of some of the existing patches and some improvements (primarily addressing Kim's concerns). I hope to get this published and pushed to the u-boot-fdt repo this week, probably spilling into next week.
Good luck, gvb