User-modifiable PetaLinux device tree configuration is associated with following config files, that are located at <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files/:
- system-user.dtsi
The generated files are in the <plnx-proj-root>/components/plnx_workspace/device-tree/device-tree/ directory.
For more details on device tree files, see PetaLinux Project Structure.
To add information like the Ethernet PHY, included the information in the system-conf.dtsi file. In this case, device tree should include the information relevant for your specific platform as information (here, Ethernet PHY information) is board level and board specific.
The system-user.dtsi is automatically created when you configure your PetaLinux project. Once created, the tools do not update it automatically.
An example of a well-formed device tree node for the system-user.dtsi is as follows:
/dts-v1/;
/include/ "system-conf.dtsi"
/ {
};
&gem0 {
phy-handle = <&phy0>;
ps7_ethernet_0_mdio: mdio {
phy0: phy@7 {
compatible = "marvell,88e1116r";
device_type = "ethernet-phy";
reg = <7>;
};
};
};
The following example demonstrates adding the sample-user-1.dtsi file:
- Add
/include/ "system-user-1.dtsi"
in project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi. The file should look like the following:/include/ "system-conf.dtsi" /include/ "system-user-1.dtsi" / { };
- Add
file://system-user-1.dtsi
to project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbappend. The file should look like this:FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://system-user.dtsi" SRC_URI += "file://system-user-1.dtsi"
Recommended: It is not recommended to change anything in <plnx-proj-root>/components/plnx_workspace/device-tree/device-tree/.Recommended: It is recommended to use system user DTSIs for adding, modifying and deleting nodes or values. System user DTSIs are added at the end, which makes the values in it at higher priority.You can overwrite any existing value in other DTSIs by defining in system user DTSIs.