Skip to content

Commit 1ad9fb7

Browse files
cdleonardShawn Guo
authored andcommitted
ARM: dts: imx6sx-sdb: Fix enet phy regulator
Bindings for "fixed-regulator" only explicitly support "gpio" property, not "gpios". Fix by correcting the property name. The enet PHYs on imx6sx-sdb needs to be explicitly reset after a power cycle, this can be handled by the phy-reset-gpios property. Sadly this is not handled on suspend: the fec driver turns phy-supply off but doesn't assert phy-reset-gpios again on resume. Since additional phy-level work is required to support powering off the phy in suspend fix the problem by just marking the regulator as "boot-on" "always-on" so that it's never turned off. This behavior is equivalent to older releases. Keep the phy-reset-gpios property on fec anyway because it is a correct description of board design. This issue was exposed by commit efdfeb0 ("regulator: fixed: Convert to use GPIO descriptor only") which causes the "gpios" property to also be parsed. Before that commit the "gpios" property had no effect, PHY reset was only handled in the the bootloader. This fixes linux-next boot failures previously reported here: https://lore.kernel.org/patchwork/patch/982437/#1177900 https://lore.kernel.org/patchwork/patch/994091/#1178304 Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent 1af6ab3 commit 1ad9fb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arch/arm/boot/dts/imx6sx-sdb.dtsi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@
117117
regulator-name = "enet_3v3";
118118
regulator-min-microvolt = <3300000>;
119119
regulator-max-microvolt = <3300000>;
120-
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
120+
gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
121+
regulator-boot-on;
122+
regulator-always-on;
121123
};
122124

123125
reg_pcie_gpio: regulator-pcie-gpio {
@@ -180,6 +182,7 @@
180182
phy-supply = <&reg_enet_3v3>;
181183
phy-mode = "rgmii";
182184
phy-handle = <&ethphy1>;
185+
phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
183186
status = "okay";
184187

185188
mdio {
@@ -373,6 +376,8 @@
373376
MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3 0x3081
374377
MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN 0x3081
375378
MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M 0x91
379+
/* phy reset */
380+
MX6SX_PAD_ENET2_CRS__GPIO2_IO_7 0x10b0
376381
>;
377382
};
378383

0 commit comments

Comments
 (0)