Commit c5ceea7a authored by Mugunthan V N's avatar Mugunthan V N Committed by David S. Miller

drivers: net: ethernet: cpsw: add phy-mode support to cpsw driver

Adding phy-mode support to cpsw driver and updating the cpsw binding
documentation.
Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f6655d69
...@@ -28,6 +28,8 @@ Optional properties: ...@@ -28,6 +28,8 @@ Optional properties:
Slave Properties: Slave Properties:
Required properties: Required properties:
- phy_id : Specifies slave phy id - phy_id : Specifies slave phy id
- phy-mode : The interface between the SoC and the PHY (a string
that of_get_phy_mode() can understand)
- mac-address : Specifies slave MAC address - mac-address : Specifies slave MAC address
Optional properties: Optional properties:
...@@ -58,11 +60,13 @@ Examples: ...@@ -58,11 +60,13 @@ Examples:
cpts_clock_shift = <29>; cpts_clock_shift = <29>;
cpsw_emac0: slave@0 { cpsw_emac0: slave@0 {
phy_id = <&davinci_mdio>, <0>; phy_id = <&davinci_mdio>, <0>;
phy-mode = "rgmii-txid";
/* Filled in by U-Boot */ /* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ]; mac-address = [ 00 00 00 00 00 00 ];
}; };
cpsw_emac1: slave@1 { cpsw_emac1: slave@1 {
phy_id = <&davinci_mdio>, <1>; phy_id = <&davinci_mdio>, <1>;
phy-mode = "rgmii-txid";
/* Filled in by U-Boot */ /* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ]; mac-address = [ 00 00 00 00 00 00 ];
}; };
...@@ -84,11 +88,13 @@ Examples: ...@@ -84,11 +88,13 @@ Examples:
cpts_clock_shift = <29>; cpts_clock_shift = <29>;
cpsw_emac0: slave@0 { cpsw_emac0: slave@0 {
phy_id = <&davinci_mdio>, <0>; phy_id = <&davinci_mdio>, <0>;
phy-mode = "rgmii-txid";
/* Filled in by U-Boot */ /* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ]; mac-address = [ 00 00 00 00 00 00 ];
}; };
cpsw_emac1: slave@1 { cpsw_emac1: slave@1 {
phy_id = <&davinci_mdio>, <1>; phy_id = <&davinci_mdio>, <1>;
phy-mode = "rgmii-txid";
/* Filled in by U-Boot */ /* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ]; mac-address = [ 00 00 00 00 00 00 ];
}; };
......
...@@ -1554,6 +1554,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, ...@@ -1554,6 +1554,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
if (mac_addr) if (mac_addr)
memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN); memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);
slave_data->phy_if = of_get_phy_mode(slave_node);
if (data->dual_emac) { if (data->dual_emac) {
if (of_property_read_u32(slave_node, "dual_emac_res_vlan", if (of_property_read_u32(slave_node, "dual_emac_res_vlan",
&prop)) { &prop)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment