summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/devtree.h
Commit message (Collapse)AuthorAgeFilesLines
* [dwgpio] Add driver for the DesignWare GPIO controllerMichael Brown2025-08-051-0/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dt] Allow for creation of standalone devicesMichael Brown2025-06-111-2/+4
| | | | | | | | | | | | | | | | | We will want to be able to create the console device as early as possible. Refactor devicetree probing to remove the assumption that a devicetree device must have a devicetree parent, and expose functions to allow a standalone device to be created given only the offset of a node within the tree. The full device path is no longer trivial to construct with this assumption removed. The full path is currently used only for debug messages. Remove the stored full path, use just the node name for debug messages, and ensure that the topology information previously visible in the full path is reconstructible from the combined debug output if needed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dt] Locate parent node at point of use in dt_ioremap()Michael Brown2025-05-301-3/+0Star
| | | | | | | | | | | | We currently rely on the recursive nature of devicetree bus probing to obtain the region cell size specification from the parent device. This blocks the possibility of creating a standalone console device based on /chosen/stdout-path before probing the whole bus. Fix by using fdt_parent() to locate the parent device at the point of use within dt_ioremap(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fdt] Generalise access to "reg" propertyMichael Brown2025-05-091-10/+3Star
| | | | | | | | | | The "reg" property is also used by non-device nodes, such as the nodes describing the system memory map. Provide generalised functionality for parsing the "#address-cells", "#size-cells", and "reg" properties. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cgem] Add a driver for the Cadence GEM NICMichael Brown2025-04-191-0/+3
| | | | | | | Add a basic driver for the Cadence GEM network interface as emulated by QEMU when using the RISC-V "sifive_u" machine type. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dt] Provide dt_ioremap() to map device registersMichael Brown2025-04-151-0/+14
| | | | | | | | | | | | | Devicetree devices encode register address ranges within the "reg" property, with the number of cells used for addresses and for sizes determined by the #address-cells and #size-cells properties of the immediate parent device. Record the number of address and size cells for each device, and provide a dt_ioremap() function to allow drivers to map a specified range without having to directly handle the "reg" property. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dt] Add basic concept of a devicetree busMichael Brown2025-04-141-0/+76
Add a basic model for devices instantiated by parsing the system flattened device tree, with drivers matched via the "compatible" property for any non-root node. Signed-off-by: Michael Brown <mcb30@ipxe.org>