aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2015-01-13 18:20:21 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-14 00:27:10 -0500
commit3d125f9c91c599a77ac3cb8f05113a6c8df99cbe (patch)
tree2c026971de57cfa183b42494a5d4eb409c003d79 /arch
parent900e183301b54f8ca17a86d9835e9569090d182a (diff)
net: fec: fix MDIO bus assignement for dual fec SoC's
On i.MX28, the MDIO bus is shared between the two FEC instances. The driver makes sure that the second FEC uses the MDIO bus of the first FEC. This is done conditionally if FEC_QUIRK_ENET_MAC is set. However, in newer designs, such as Vybrid or i.MX6SX, each FEC MAC has its own MDIO bus. Simply removing the quirk FEC_QUIRK_ENET_MAC is not an option since other logic, triggered by this quirk, is still needed. Furthermore, there are board designs which use the same MDIO bus for both PHY's even though the second bus would be available on the SoC side. Such layout are popular since it saves pins on SoC side. Due to the above quirk, those boards currently do work fine. The boards in the mainline tree with such a layout are: - Freescale Vybrid Tower with TWR-SER2 (vf610-twr.dts) - Freescale i.MX6 SoloX SDB Board (imx6sx-sdb.dts) This patch adds a new quirk FEC_QUIRK_SINGLE_MDIO for i.MX28, which makes sure that the MDIO bus of the first FEC is used in any case. However, the boards above do have a SoC with a MDIO bus for each FEC instance. But the PHY's are not connected in a 1:1 configuration. A proper device tree description is needed to allow the driver to figure out where to find its PHY. This patch fixes that shortcoming by adding a MDIO bus child node to the first FEC instance, along with the two PHY's on that bus, and making use of the phy-handle property to add a reference to the PHY's. Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/imx6sx-sdb.dts15
-rw-r--r--arch/arm/boot/dts/vf610-twr.dts15
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
index 1e6e5cc1c14c..8c1febd7e3f2 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dts
+++ b/arch/arm/boot/dts/imx6sx-sdb.dts
@@ -159,13 +159,28 @@
159 pinctrl-0 = <&pinctrl_enet1>; 159 pinctrl-0 = <&pinctrl_enet1>;
160 phy-supply = <&reg_enet_3v3>; 160 phy-supply = <&reg_enet_3v3>;
161 phy-mode = "rgmii"; 161 phy-mode = "rgmii";
162 phy-handle = <&ethphy1>;
162 status = "okay"; 163 status = "okay";
164
165 mdio {
166 #address-cells = <1>;
167 #size-cells = <0>;
168
169 ethphy1: ethernet-phy@0 {
170 reg = <0>;
171 };
172
173 ethphy2: ethernet-phy@1 {
174 reg = <1>;
175 };
176 };
163}; 177};
164 178
165&fec2 { 179&fec2 {
166 pinctrl-names = "default"; 180 pinctrl-names = "default";
167 pinctrl-0 = <&pinctrl_enet2>; 181 pinctrl-0 = <&pinctrl_enet2>;
168 phy-mode = "rgmii"; 182 phy-mode = "rgmii";
183 phy-handle = <&ethphy2>;
169 status = "okay"; 184 status = "okay";
170}; 185};
171 186
diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
index a0f762159cb2..f2b64b1b00fa 100644
--- a/arch/arm/boot/dts/vf610-twr.dts
+++ b/arch/arm/boot/dts/vf610-twr.dts
@@ -129,13 +129,28 @@
129 129
130&fec0 { 130&fec0 {
131 phy-mode = "rmii"; 131 phy-mode = "rmii";
132 phy-handle = <&ethphy0>;
132 pinctrl-names = "default"; 133 pinctrl-names = "default";
133 pinctrl-0 = <&pinctrl_fec0>; 134 pinctrl-0 = <&pinctrl_fec0>;
134 status = "okay"; 135 status = "okay";
136
137 mdio {
138 #address-cells = <1>;
139 #size-cells = <0>;
140
141 ethphy0: ethernet-phy@0 {
142 reg = <0>;
143 };
144
145 ethphy1: ethernet-phy@1 {
146 reg = <1>;
147 };
148 };
135}; 149};
136 150
137&fec1 { 151&fec1 {
138 phy-mode = "rmii"; 152 phy-mode = "rmii";
153 phy-handle = <&ethphy1>;
139 pinctrl-names = "default"; 154 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_fec1>; 155 pinctrl-0 = <&pinctrl_fec1>;
141 status = "okay"; 156 status = "okay";