Commit 4904337f authored by Corentin Labbe's avatar Corentin Labbe Committed by Maxime Ripard

ARM: dts: sunxi: Restore EMAC changes (boards)

The original dwmac-sun8i DT bindings have some issue on how to handle
integrated PHY and was reverted in last RC of 4.13.
But now we have a solution so we need to get back that was reverted.

This patch restore all boards DT about dwmac-sun8i
This reverts partially commit fe45174b ("arm: dts: sunxi: Revert EMAC changes")
Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 776245ae
...@@ -56,6 +56,8 @@ / { ...@@ -56,6 +56,8 @@ / {
aliases { aliases {
serial0 = &uart0; serial0 = &uart0;
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
ethernet0 = &emac;
ethernet1 = &xr819; ethernet1 = &xr819;
}; };
...@@ -102,6 +104,13 @@ &ehci1 { ...@@ -102,6 +104,13 @@ &ehci1 {
status = "okay"; status = "okay";
}; };
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};
&mmc0 { &mmc0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>; pinctrl-0 = <&mmc0_pins_a>;
......
...@@ -52,6 +52,7 @@ / { ...@@ -52,6 +52,7 @@ / {
compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
aliases { aliases {
ethernet0 = &emac;
serial0 = &uart0; serial0 = &uart0;
serial1 = &uart1; serial1 = &uart1;
}; };
...@@ -111,6 +112,24 @@ &ehci2 { ...@@ -111,6 +112,24 @@ &ehci2 {
status = "okay"; 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;
status = "okay";
};
&external_mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
};
&ir { &ir {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ir_pins_a>; pinctrl-0 = <&ir_pins_a>;
......
...@@ -51,6 +51,16 @@ aliases { ...@@ -51,6 +51,16 @@ aliases {
ethernet1 = &sdio_wifi; ethernet1 = &sdio_wifi;
}; };
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>;
};
wifi_pwrseq: wifi_pwrseq { wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple"; compatible = "mmc-pwrseq-simple";
pinctrl-names = "default"; pinctrl-names = "default";
...@@ -66,6 +76,25 @@ &ehci2 { ...@@ -66,6 +76,25 @@ &ehci2 {
status = "okay"; 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;
status = "okay";
};
&external_mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <7>;
};
};
&ir { &ir {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ir_pins_a>; pinctrl-0 = <&ir_pins_a>;
......
...@@ -46,3 +46,10 @@ / { ...@@ -46,3 +46,10 @@ / {
model = "FriendlyARM NanoPi NEO"; model = "FriendlyARM NanoPi NEO";
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
}; };
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};
...@@ -54,6 +54,7 @@ / { ...@@ -54,6 +54,7 @@ / {
aliases { aliases {
serial0 = &uart0; serial0 = &uart0;
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
ethernet0 = &emac;
ethernet1 = &rtl8189; ethernet1 = &rtl8189;
}; };
...@@ -117,6 +118,13 @@ &ehci1 { ...@@ -117,6 +118,13 @@ &ehci1 {
status = "okay"; status = "okay";
}; };
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};
&ir { &ir {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ir_pins_a>; pinctrl-0 = <&ir_pins_a>;
......
...@@ -52,6 +52,7 @@ / { ...@@ -52,6 +52,7 @@ / {
compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3"; compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3";
aliases { aliases {
ethernet0 = &emac;
serial0 = &uart0; serial0 = &uart0;
}; };
...@@ -97,6 +98,13 @@ &ehci1 { ...@@ -97,6 +98,13 @@ &ehci1 {
status = "okay"; status = "okay";
}; };
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};
&mmc0 { &mmc0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
......
...@@ -53,6 +53,11 @@ aliases { ...@@ -53,6 +53,11 @@ aliases {
}; };
}; };
&emac {
/* LEDs changed to active high on the plus */
/delete-property/ allwinner,leds-active-low;
};
&mmc1 { &mmc1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins_a>; pinctrl-0 = <&mmc1_pins_a>;
......
...@@ -52,6 +52,7 @@ / { ...@@ -52,6 +52,7 @@ / {
compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3"; compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
aliases { aliases {
ethernet0 = &emac;
serial0 = &uart0; serial0 = &uart0;
}; };
...@@ -113,6 +114,13 @@ &ehci3 { ...@@ -113,6 +114,13 @@ &ehci3 {
status = "okay"; status = "okay";
}; };
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};
&ir { &ir {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ir_pins_a>; pinctrl-0 = <&ir_pins_a>;
......
...@@ -47,6 +47,10 @@ / { ...@@ -47,6 +47,10 @@ / {
model = "Xunlong Orange Pi Plus / Plus 2"; model = "Xunlong Orange Pi Plus / Plus 2";
compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3"; compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
aliases {
ethernet0 = &emac;
};
reg_gmac_3v3: gmac-3v3 { reg_gmac_3v3: gmac-3v3 {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "gmac-3v3"; regulator-name = "gmac-3v3";
...@@ -74,6 +78,24 @@ &ehci3 { ...@@ -74,6 +78,24 @@ &ehci3 {
status = "okay"; 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;
status = "okay";
};
&external_mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
};
&mmc2 { &mmc2 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>; pinctrl-0 = <&mmc2_8bit_pins>;
......
...@@ -61,3 +61,19 @@ reg_gmac_3v3: gmac-3v3 { ...@@ -61,3 +61,19 @@ reg_gmac_3v3: gmac-3v3 {
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
}; };
}; };
&emac {
pinctrl-names = "default";
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
phy-mode = "rgmii";
status = "okay";
};
&external_mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment