Re: [PATCH] ARM: dts: sun8i: h3: Enable EMAC with external PHY on NanoPi M1 Plus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Aug 1, 2017 at 1:01 PM, Luis Araneda <luaraneda@xxxxxxxxx> wrote:
> The Nanopi M1 Plus uses an external Realtek RTL8211E PHY in RGMII mode,
> enabled by a GPIO-based regulator.
>
> Signed-off-by: Luis Araneda <luaraneda@xxxxxxxxx>
> ---
>  arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 31 +++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> index 8ddd1b2cc..54727990c 100644
> --- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> @@ -45,6 +45,20 @@
>  / {
>         model = "FriendlyArm NanoPi M1 Plus";
>         compatible = "friendlyarm,nanopi-m1-plus", "allwinner,sun8i-h3";
> +
> +       aliases {
> +               ethernet0 = &emac;
> +       };
> +
> +       reg_gmac_3v3: gmac-3v3 {
> +               compatible = "regulator-fixed";
> +               regulator-name = "gmac-3v3";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +               startup-delay-us = <100000>;
> +               enable-active-high;
> +               gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
> +       };
>  };
>
>  &ehci1 {
> @@ -55,6 +69,23 @@
>         status = "okay";
>  };
>
> +&emac {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&emac_rgmii_pins>;
> +       phy-supply = <&reg_gmac_3v3>;
> +       phy-handle = <&ext_rgmii_phy>;
> +       phy-mode = "rgmii";
> +       allwinner,leds-active-low;

This property is for the internal PHY. You should not be using it
with an external PHY.

> +       status = "okay";
> +};
> +
> +&mdio {
> +       ext_rgmii_phy: ethernet-phy@1 {
> +               compatible = "ethernet-phy-ieee802.3-c22";
> +               reg = <0>;

Value in reg should match the address part of the node name.

ChenYu

> +       };
> +};
> +
>  &ohci1 {
>         status = "okay";
>  };
> --
> 2.13.3
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux