-
Notifications
You must be signed in to change notification settings - Fork 221
arm64: dts: rockchip: radxa-e24c: read MAC addresses from EEPROM #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: linux-6.1-stan-rkr1
Are you sure you want to change the base?
arm64: dts: rockchip: radxa-e24c: read MAC addresses from EEPROM #505
Conversation
Signed-off-by: SongJun Li <lisongjun@radxa.com>
Signed-off-by: SongJun Li <lisongjun@radxa.com>
b4b7a44 to
b428a76
Compare
RadxaYuntian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我感觉怎么又在弄一个新实现,之前不是说有一个基于starfive的eeprom格式么?那个不是已经写过了一个配置mac的实现了
Signed-off-by: SongJun Li <lisongjun@radxa.com>
RadxaYuntian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所以这个local-mac-address/mac-at-eeprom是我们自己加的一个值咯?这个应该很难让第三方系统支持
phy的mac应该可以从uboot配置吧?
| } | ||
|
|
||
| /* 24c16 uses 1-byte address */ | ||
| if (offset > 0xff) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该还有offset+len > 0xff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那这里多加一个if (offset + len - 1 > 0xff)么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我的意思是最好是看看下面uboot那个实现,用上游支持比较好的接口
| goto out_put_np; | ||
| } | ||
|
|
||
| if (len != ETH_ALEN) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果len的数值是固定的那为什么设备树里面还要写?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是比如 dts 配置成 local-mac-address = [00 48 54 20 00 ]; 或者 local-mac-address = [00 48 54 20 00 02 03]; 那驱动会检测这个长度
这个是针对交换机芯片的 PORT, u-boot 传递的 mac 地址没法传递给 SWITCH PORT |
net: dsa: add support for reading port MAC addresses from EEPROM