-
Notifications
You must be signed in to change notification settings - Fork 220
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配置吧?
net/dsa/dsa2.c
Outdated
| } | ||
|
|
||
| /* 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 |
Signed-off-by: SongJun Li <lisongjun@radxa.com>
|
在 u-boot 那里根据 mac 环境变量修改内核 dtb 的做法有个缺陷,无法知道如 rtl8367rb 是挂在哪个 gmac 控制器下,我们的 mac addr 环境变量是 ethaddr\eth1addr\eth2addr->ethaddr,需要匹配到对应的 ethaddr 才行,但是流程上做不到 |
Signed-off-by: SongJun Li <lisongjun@radxa.com>
|
|
但是我们的环境变量是 ethaddr/eth1addr/eth2addr...,我们没法动态绑定到哪个 eth*addr 上,除非增加新环境变量名 |
像参考的:https://github.com/u-boot/u-boot/blob/56cac250b0839ddbad1311d3ca4231f532b5aadf/board/Marvell/mvebu_armada-37xx/board.c#L574-L586 它有环境变量:downlink 和 uplink |
|
所以加上不行么?实例代码是直接修改port的,也跟gmac phy无关呀: |
net: dsa: add support for reading port MAC addresses from EEPROM