Assuming that a MAC address ( or list of MAC addresses or any board data) is located in an I2C (or flash),
how would you specify the data location in the device tree?

For an I2C, should I specify the specific device containing the data under the I2C node?


The standard way to communicate MAC address information to the OS is via properties in the node for the network interface. "local-mac-address" is the MAC address that was factory-assigned to the interface and "mac-address" is the actual address that is being used for the device (in case the factory-assigned address was overridden by some policy choice). The value is the mac address itself (6 bytes), not the "address" of the mac address.

The reason I put "address" in quotes is because the devices that are used to store MAC addresses are often not "addressable" in any convenient sense. You often have to run some device-specific driver code to extract the information. It's the firmware's responsibility to do that, extracting the information and creating the properties described above.

Strictly speaking, a MAC address is an attribute of a network interface; the association of a MAC address with a mainboard is meaningless, or at least there is no standard that I know of that assigns a specific interpretation. That said, it's fairly common to store a MAC address on a mainboard EEPROM as a surrogate for a nonexistent EEPROM that is supposed to be attached to the network interface hardware. In that case, the mainboard firmware is supposed to know that and do whatever is necessary to move the data into the device node for the corresponding.





_______________________________________________
devicetree-discuss mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/devicetree-discuss

Reply via email to