I am exploring device tree. Looking at imx6l-sabresd.dts
/dts-v1/;
#include "imx6dl.dtsi"
#include "imx6qdl-sabresd.dtsi"
/ {
model = "Freescale i.MX6 DualLite SABRE Smart Device Board";
compatible = "fsl,imx6dl-sabresd", "fsl,imx6dl";
};
There is "model" field in the root node. This field is present in almost every device tree, but when I grep for who is reading this model. Only Freescale CPU machine code is accessing it.. Is this field not compulsory.
jamal@jamal:~/rpi/rpi-build/tmp/work-shared/raspberrypi3/kernel-source$ grep -nr "of_property_read_string(root,"
arch/arm/mach-imx/cpu.c:91: ret = of_property_read_string(root, "model", &soc_dev_attr->machine);
arch/arm/mach-mxs/mach-mxs.c:469: ret = of_property_read_string(root, "model", &soc_dev_attr->machine);
Can anyone explain the significance of this field.
Searching the Linux source code found me where the model field is used by the Kernel. It is printing the value on the console.
./arch/arm/kernel/devtree.c:236:
model = of_get_flat_dt_prop(dt_root, "model", NULL);
pr_info("Machine: %s, model: %s\n", mdesc_best->name, model);