]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ARM: dts: meson: switch to the generic Ethernet PHY reset bindings
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 15 Jun 2019 10:38:30 +0000 (12:38 +0200)
committerKevin Hilman <khilman@baylibre.com>
Thu, 20 Jun 2019 20:58:11 +0000 (13:58 -0700)
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>
arch/arm/boot/dts/meson8b-ec100.dts
arch/arm/boot/dts/meson8b-mxq.dts
arch/arm/boot/dts/meson8b-odroidc1.dts
arch/arm/boot/dts/meson8m2-mxiii-plus.dts

index 9bf4249cb60d00effefe87dd6016885293e1caab..96d239d8334ee29478bb4cfa1ec5078dbcde2459 100644 (file)
        phy-handle = <&eth_phy0>;
        phy-mode = "rmii";
 
-       snps,reset-gpio = <&gpio GPIOH_4 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        mdio {
                compatible = "snps,dwmac-mdio";
                #address-cells = <1>;
                eth_phy0: ethernet-phy@0 {
                        /* IC Plus IP101A/G (0x02430c54) */
                        reg = <0>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <10000>;
+                       reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+
                        icplus,select-interrupt;
                        interrupt-parent = <&gpio_intc>;
                        /* GPIOH_3 */
index ef602ab45efd98ab4cb7c71c4fe33b26c87d316e..bb27b34eb34613ca124153abfb93998bc833b19f 100644 (file)
        phy-handle = <&eth_phy0>;
        phy-mode = "rmii";
 
-       snps,reset-gpio = <&gpio GPIOH_4 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        mdio {
                compatible = "snps,dwmac-mdio";
                #address-cells = <1>;
                eth_phy0: ethernet-phy@0 {
                        /* IC Plus IP101A/G (0x02430c54) */
                        reg = <0>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <10000>;
+                       reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+
                        icplus,select-interrupt;
                        interrupt-parent = <&gpio_intc>;
                        /* GPIOH_3 */
index 018695b2b83a185d9975285b09f1708fb707155b..86c4614e0a387520591ce50f0d695e5023bf4db7 100644 (file)
 &ethmac {
        status = "okay";
 
-       snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
-       snps,reset-active-low;
-       snps,reset-delays-us = <0 10000 30000>;
-
        pinctrl-0 = <&eth_rgmii_pins>;
        pinctrl-names = "default";
 
                /* Realtek RTL8211F (0x001cc916) */
                eth_phy: ethernet-phy@0 {
                        reg = <0>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <30000>;
+                       reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+
                        interrupt-parent = <&gpio_intc>;
                        /* GPIOH_3 */
                        interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
index 59b07a55e461b3ea6e1bdce17221450dee010079..d54477b1001ca775a2137060870b9cface45ece6 100644 (file)
 
        amlogic,tx-delay-ns = <4>;
 
-       snps,reset-gpio = <&gpio GPIOH_4 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        mdio {
                compatible = "snps,dwmac-mdio";
                #address-cells = <1>;
                eth_phy0: ethernet-phy@0 {
                        /* Realtek RTL8211F (0x001cc916) */
                        reg = <0>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <30000>;
+                       reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
                };
        };
 };