Just to clarify that. This thing would only appear when the ethernet is using nvidia driver.
However, Orin NX/Orin Nano does not use NVIDIA driver for their etherent. So their mac address is decided by the vendor driver (we use realek phy here).
I didn’t use Nvidia driver, so the node wouldn’t happen on Orin NX ? It’s correct ?
Another question, if I want to read the EEPROM in my driver, is a EEPROM driver already exist ? I didn’t find anything. Or I have to write a specific I2C EEPROM to access to the EEPROM ?
I didn’t use Nvidia driver, so the node wouldn’t happen on Orin NX ? It’s correct ?
Yes.
Another question, if I want to read the EEPROM in my driver, is a EEPROM driver already exist ? I didn’t find anything. Or I have to write a specific I2C EEPROM to access to the EEPROM ?
No, you have to write the eeprom driver read from i2c by yourself.
Then, I used the tegra-eeprom-tool to write a new serial number and a desired MAC address to the EEPROM, but after booting eth0 does not change it’s MAC address.
Do I understand you correctly that the Jetson Orin Nano 8GB devkit does not support changing the MAC address? If so, which Jetson boards do, so we can switch to another one?
The process of how eeprom gets read to etherent on other jetson platform is like below:
If ethernet is based on nvidia driver, then bootloader UEFI will reveal the nvidia,ether-mac node to the device tree. Read the content from eeprom.
After boot up into kernel, each PHY driver has its own method or order to read mac address from somewhere else. For example, Realtek PHY can read mac address from PHY itself or read from device tree. If all of these are not present, then it will use a random number as mac address.
So actually, my previous point was, if you want to read it from eeprom, then you have to go to ethernet PHY driver and probably initiate i2c read from there and let PHY set the mac-address.
I have no idea about why you added a eeprom@50 thing in i2c node. This thing won’t change the behavior in ethernet phy. And as PHY driver is based on each vendor, there is no definite solution from me here.
Can you explain precisely what the bootloader UEFI checks to decide it will create a ‘nvidia,ethernet-mac’ node, and where that ‘nvidia,ethernet-mac’ node will be created ?
If either MGBE or RGMII node got enabled in device tree, then UEFI will expose this nvidia,ethernet-mac to the device tree.
As Orin NX/Nano is not using any MGBE or RGMII function on jetson (it is just a PCIe device), this thing didn’t get exposed. Orin NX/Nano NIC is reading the mac directly from the PHY itself.
Could the creation of the ‘nvidia,ethernet-mac’ in the device-tree ‘chosen’ node become unconditional in a future jetpack ? It seems that many people are interested to get an easy access to those addresses without having to rewrite themselves the decoding of the nvidia eeprom. Adding an access to the ‘/chosen/nvidia,ethernet-mac’ can then simply be added to the used ethernet driver or even to the common ‘of_get_mac_address’ function.