nmhw21: fix broadr PHY addresses for HW v1.0
- set PHY Id 6 for broadr0 on v1.0 - set PHY Id 7 for broadr1 on v1.0 BugzId: 55529
This commit is contained in:
parent
d53bbfbc77
commit
d10a7daaaf
|
|
@ -1265,20 +1265,28 @@ static void ft_user_interface(void *blob)
|
||||||
|
|
||||||
static void ft_eth(void *blob)
|
static void ft_eth(void *blob)
|
||||||
{
|
{
|
||||||
/* In HW V1.0 the BroadR PHYs are at addresses 6 and 7, later versions uses 2 and 3 */
|
/*
|
||||||
|
* PHY ID Assignment
|
||||||
|
*
|
||||||
|
* broadr0 broadr1
|
||||||
|
* HW V1.0: 6 7
|
||||||
|
* HW V2.0: 3 2
|
||||||
|
*
|
||||||
|
* DTB defines V2.0 settings. When running on v1.0 hardware, we change the PHY Ids as required.
|
||||||
|
*/
|
||||||
if (hw_ver == 1) {
|
if (hw_ver == 1) {
|
||||||
int node_offset;
|
int node_offset;
|
||||||
|
|
||||||
node_offset = fdt_path_offset(blob, "/ocp/ethernet@4a100000/mdio@4a101000/ethernet-phy@2/");
|
node_offset = fdt_path_offset(blob, "/ocp/ethernet@4a100000/mdio@4a101000/ethernet-phy@2/");
|
||||||
if (node_offset != -1) {
|
if (node_offset != -1) {
|
||||||
fdt_setprop_u32(blob, node_offset, "<reg>", 6);
|
fdt_setprop_u32(blob, node_offset, "<reg>", 7);
|
||||||
fdt_setprop_u32(blob, node_offset, "reg", 6);
|
fdt_setprop_u32(blob, node_offset, "reg", 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
node_offset = fdt_path_offset(blob, "/ocp/ethernet@4a100000/mdio@4a101000/ethernet-phy@3/");
|
node_offset = fdt_path_offset(blob, "/ocp/ethernet@4a100000/mdio@4a101000/ethernet-phy@3/");
|
||||||
if (node_offset != -1) {
|
if (node_offset != -1) {
|
||||||
fdt_setprop_u32(blob, node_offset, "<reg>", 7);
|
fdt_setprop_u32(blob, node_offset, "<reg>", 6);
|
||||||
fdt_setprop_u32(blob, node_offset, "reg", 7);
|
fdt_setprop_u32(blob, node_offset, "reg", 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue