mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00:00
net: phy: dp83867: allow RGMII_TXID/RGMII_RXID interface types
Currently dp83867 driver returns error if phy interface type PHY_INTERFACE_MODE_RGMII_RXID is used to set the rx only internal delay. Similarly issue happens for PHY_INTERFACE_MODE_RGMII_TXID. Fix this by checking also the interface type if a particular delay value is missing in the phy dt bindings. Also update the DT document accordingly. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
02ca0423fd
commit
34c55cf2fc
@ -3,9 +3,11 @@
|
|||||||
Required properties:
|
Required properties:
|
||||||
- reg - The ID number for the phy, usually a small integer
|
- reg - The ID number for the phy, usually a small integer
|
||||||
- ti,rx-internal-delay - RGMII Receive Clock Delay - see dt-bindings/net/ti-dp83867.h
|
- ti,rx-internal-delay - RGMII Receive Clock Delay - see dt-bindings/net/ti-dp83867.h
|
||||||
for applicable values
|
for applicable values. Required only if interface type is
|
||||||
|
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_RXID
|
||||||
- ti,tx-internal-delay - RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
|
- ti,tx-internal-delay - RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
|
||||||
for applicable values
|
for applicable values. Required only if interface type is
|
||||||
|
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_TXID
|
||||||
- ti,fifo-depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
|
- ti,fifo-depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
|
||||||
for applicable values
|
for applicable values
|
||||||
|
|
||||||
|
@ -132,12 +132,16 @@ static int dp83867_of_init(struct phy_device *phydev)
|
|||||||
|
|
||||||
ret = of_property_read_u32(of_node, "ti,rx-internal-delay",
|
ret = of_property_read_u32(of_node, "ti,rx-internal-delay",
|
||||||
&dp83867->rx_id_delay);
|
&dp83867->rx_id_delay);
|
||||||
if (ret)
|
if (ret &&
|
||||||
|
(phydev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
|
||||||
|
phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = of_property_read_u32(of_node, "ti,tx-internal-delay",
|
ret = of_property_read_u32(of_node, "ti,tx-internal-delay",
|
||||||
&dp83867->tx_id_delay);
|
&dp83867->tx_id_delay);
|
||||||
if (ret)
|
if (ret &&
|
||||||
|
(phydev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
|
||||||
|
phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return of_property_read_u32(of_node, "ti,fifo-depth",
|
return of_property_read_u32(of_node, "ti,fifo-depth",
|
||||||
|
Loading…
Reference in New Issue
Block a user