Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: meson: switch to the generic Ethernet PHY reset bindings

The snps,reset-gpio bindings are deprecated in favour of the generic
"Ethernet PHY reset" bindings.

Replace snps,reset-gpio from the &ethmac node with reset-gpios in the
ethernet-phy node. The old snps,reset-active-low property is now encoded
directly as GPIO flag inside the reset-gpios property.

snps,reset-delays-us is converted to reset-assert-us and
reset-deassert-us. reset-assert-us is the second cell from
snps,reset-delays-us while reset-deassert-us was the third cell.
Instead of blindly copying the old values (which seems strange since
they gave the PHY one second to come out of reset) over this also
updates the delays based on the datasheets:
- RTL8211F PHY on the Odroid-C1 and MXIII-Plus needs a 10ms assert
delay (the datasheet mentions: "For a complete PHY reset, this pin
must be asserted low for at least 10ms") and a 30ms deassert delay
(the datasheet mentions: "Wait for a further 30ms (for internal
circuits settling time) before accessing the PHY register"). The
old settings used 10ms for assert and 1000ms for deassert.
- IP101GR PHY on the EC-100 and MXQ needs a 10ms assert delay (the
datasheet mentions: "Trst | Reset period | 10ms") and a 10ms deassert
delay as well (the datasheet mentions: "Tclk_MII_rdy | MII/RMII clock
output ready after reset released | 10ms")). The old settings used
10ms for assert and 1000ms for deassert.

No functional changes intended.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>

authored by

Martin Blumenstingl and committed by
Kevin Hilman
a2c6e82e 677092c3

+19 -16
+5 -4
arch/arm/boot/dts/meson8b-ec100.dts
··· 234 234 phy-handle = <&eth_phy0>; 235 235 phy-mode = "rmii"; 236 236 237 - snps,reset-gpio = <&gpio GPIOH_4 0>; 238 - snps,reset-delays-us = <0 10000 1000000>; 239 - snps,reset-active-low; 240 - 241 237 mdio { 242 238 compatible = "snps,dwmac-mdio"; 243 239 #address-cells = <1>; ··· 242 246 eth_phy0: ethernet-phy@0 { 243 247 /* IC Plus IP101A/G (0x02430c54) */ 244 248 reg = <0>; 249 + 250 + reset-assert-us = <10000>; 251 + reset-deassert-us = <10000>; 252 + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; 253 + 245 254 icplus,select-interrupt; 246 255 interrupt-parent = <&gpio_intc>; 247 256 /* GPIOH_3 */
+5 -4
arch/arm/boot/dts/meson8b-mxq.dts
··· 91 91 phy-handle = <&eth_phy0>; 92 92 phy-mode = "rmii"; 93 93 94 - snps,reset-gpio = <&gpio GPIOH_4 0>; 95 - snps,reset-delays-us = <0 10000 1000000>; 96 - snps,reset-active-low; 97 - 98 94 mdio { 99 95 compatible = "snps,dwmac-mdio"; 100 96 #address-cells = <1>; ··· 99 103 eth_phy0: ethernet-phy@0 { 100 104 /* IC Plus IP101A/G (0x02430c54) */ 101 105 reg = <0>; 106 + 107 + reset-assert-us = <10000>; 108 + reset-deassert-us = <10000>; 109 + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; 110 + 102 111 icplus,select-interrupt; 103 112 interrupt-parent = <&gpio_intc>; 104 113 /* GPIOH_3 */
+5 -4
arch/arm/boot/dts/meson8b-odroidc1.dts
··· 176 176 &ethmac { 177 177 status = "okay"; 178 178 179 - snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; 180 - snps,reset-active-low; 181 - snps,reset-delays-us = <0 10000 30000>; 182 - 183 179 pinctrl-0 = <&eth_rgmii_pins>; 184 180 pinctrl-names = "default"; 185 181 ··· 191 195 /* Realtek RTL8211F (0x001cc916) */ 192 196 eth_phy: ethernet-phy@0 { 193 197 reg = <0>; 198 + 199 + reset-assert-us = <10000>; 200 + reset-deassert-us = <30000>; 201 + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; 202 + 194 203 interrupt-parent = <&gpio_intc>; 195 204 /* GPIOH_3 */ 196 205 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
+4 -4
arch/arm/boot/dts/meson8m2-mxiii-plus.dts
··· 73 73 74 74 amlogic,tx-delay-ns = <4>; 75 75 76 - snps,reset-gpio = <&gpio GPIOH_4 0>; 77 - snps,reset-delays-us = <0 10000 1000000>; 78 - snps,reset-active-low; 79 - 80 76 mdio { 81 77 compatible = "snps,dwmac-mdio"; 82 78 #address-cells = <1>; ··· 81 85 eth_phy0: ethernet-phy@0 { 82 86 /* Realtek RTL8211F (0x001cc916) */ 83 87 reg = <0>; 88 + 89 + reset-assert-us = <10000>; 90 + reset-deassert-us = <30000>; 91 + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; 84 92 }; 85 93 }; 86 94 };