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

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 fe45174b72ae ("arm: dts: sunxi: Revert EMAC changes")

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

authored by

Corentin Labbe and committed by
Maxime Ripard
4904337f 776245ae

+131
+9
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
··· 56 56 57 57 aliases { 58 58 serial0 = &uart0; 59 + /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ 60 + ethernet0 = &emac; 59 61 ethernet1 = &xr819; 60 62 }; 61 63 ··· 101 99 }; 102 100 103 101 &ehci1 { 102 + status = "okay"; 103 + }; 104 + 105 + &emac { 106 + phy-handle = <&int_mii_phy>; 107 + phy-mode = "mii"; 108 + allwinner,leds-active-low; 104 109 status = "okay"; 105 110 }; 106 111
+19
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
··· 52 52 compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; 53 53 54 54 aliases { 55 + ethernet0 = &emac; 55 56 serial0 = &uart0; 56 57 serial1 = &uart1; 57 58 }; ··· 110 109 111 110 &ehci2 { 112 111 status = "okay"; 112 + }; 113 + 114 + &emac { 115 + pinctrl-names = "default"; 116 + pinctrl-0 = <&emac_rgmii_pins>; 117 + phy-supply = <&reg_gmac_3v3>; 118 + phy-handle = <&ext_rgmii_phy>; 119 + phy-mode = "rgmii"; 120 + 121 + allwinner,leds-active-low; 122 + status = "okay"; 123 + }; 124 + 125 + &external_mdio { 126 + ext_rgmii_phy: ethernet-phy@1 { 127 + compatible = "ethernet-phy-ieee802.3-c22"; 128 + reg = <0>; 129 + }; 113 130 }; 114 131 115 132 &ir {
+29
arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
··· 51 51 ethernet1 = &sdio_wifi; 52 52 }; 53 53 54 + reg_gmac_3v3: gmac-3v3 { 55 + compatible = "regulator-fixed"; 56 + regulator-name = "gmac-3v3"; 57 + regulator-min-microvolt = <3300000>; 58 + regulator-max-microvolt = <3300000>; 59 + startup-delay-us = <100000>; 60 + enable-active-high; 61 + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 62 + }; 63 + 54 64 wifi_pwrseq: wifi_pwrseq { 55 65 compatible = "mmc-pwrseq-simple"; 56 66 pinctrl-names = "default"; ··· 74 64 75 65 &ehci2 { 76 66 status = "okay"; 67 + }; 68 + 69 + &emac { 70 + pinctrl-names = "default"; 71 + pinctrl-0 = <&emac_rgmii_pins>; 72 + phy-supply = <&reg_gmac_3v3>; 73 + phy-handle = <&ext_rgmii_phy>; 74 + phy-mode = "rgmii"; 75 + 76 + allwinner,leds-active-low; 77 + 78 + status = "okay"; 79 + }; 80 + 81 + &external_mdio { 82 + ext_rgmii_phy: ethernet-phy@1 { 83 + compatible = "ethernet-phy-ieee802.3-c22"; 84 + reg = <7>; 85 + }; 77 86 }; 78 87 79 88 &ir {
+7
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
··· 46 46 model = "FriendlyARM NanoPi NEO"; 47 47 compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; 48 48 }; 49 + 50 + &emac { 51 + phy-handle = <&int_mii_phy>; 52 + phy-mode = "mii"; 53 + allwinner,leds-active-low; 54 + status = "okay"; 55 + };
+8
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
··· 54 54 aliases { 55 55 serial0 = &uart0; 56 56 /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ 57 + ethernet0 = &emac; 57 58 ethernet1 = &rtl8189; 58 59 }; 59 60 ··· 115 114 }; 116 115 117 116 &ehci1 { 117 + status = "okay"; 118 + }; 119 + 120 + &emac { 121 + phy-handle = <&int_mii_phy>; 122 + phy-mode = "mii"; 123 + allwinner,leds-active-low; 118 124 status = "okay"; 119 125 }; 120 126
+8
arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
··· 52 52 compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3"; 53 53 54 54 aliases { 55 + ethernet0 = &emac; 55 56 serial0 = &uart0; 56 57 }; 57 58 ··· 95 94 }; 96 95 97 96 &ehci1 { 97 + status = "okay"; 98 + }; 99 + 100 + &emac { 101 + phy-handle = <&int_mii_phy>; 102 + phy-mode = "mii"; 103 + allwinner,leds-active-low; 98 104 status = "okay"; 99 105 }; 100 106
+5
arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
··· 53 53 }; 54 54 }; 55 55 56 + &emac { 57 + /* LEDs changed to active high on the plus */ 58 + /delete-property/ allwinner,leds-active-low; 59 + }; 60 + 56 61 &mmc1 { 57 62 pinctrl-names = "default"; 58 63 pinctrl-0 = <&mmc1_pins_a>;
+8
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
··· 52 52 compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3"; 53 53 54 54 aliases { 55 + ethernet0 = &emac; 55 56 serial0 = &uart0; 56 57 }; 57 58 ··· 111 110 }; 112 111 113 112 &ehci3 { 113 + status = "okay"; 114 + }; 115 + 116 + &emac { 117 + phy-handle = <&int_mii_phy>; 118 + phy-mode = "mii"; 119 + allwinner,leds-active-low; 114 120 status = "okay"; 115 121 }; 116 122
+22
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
··· 47 47 model = "Xunlong Orange Pi Plus / Plus 2"; 48 48 compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3"; 49 49 50 + aliases { 51 + ethernet0 = &emac; 52 + }; 53 + 50 54 reg_gmac_3v3: gmac-3v3 { 51 55 compatible = "regulator-fixed"; 52 56 regulator-name = "gmac-3v3"; ··· 76 72 77 73 &ehci3 { 78 74 status = "okay"; 75 + }; 76 + 77 + &emac { 78 + pinctrl-names = "default"; 79 + pinctrl-0 = <&emac_rgmii_pins>; 80 + phy-supply = <&reg_gmac_3v3>; 81 + phy-handle = <&ext_rgmii_phy>; 82 + phy-mode = "rgmii"; 83 + 84 + allwinner,leds-active-low; 85 + status = "okay"; 86 + }; 87 + 88 + &external_mdio { 89 + ext_rgmii_phy: ethernet-phy@1 { 90 + compatible = "ethernet-phy-ieee802.3-c22"; 91 + reg = <0>; 92 + }; 79 93 }; 80 94 81 95 &mmc2 {
+16
arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
··· 61 61 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ 62 62 }; 63 63 }; 64 + 65 + &emac { 66 + pinctrl-names = "default"; 67 + pinctrl-0 = <&emac_rgmii_pins>; 68 + phy-supply = <&reg_gmac_3v3>; 69 + phy-handle = <&ext_rgmii_phy>; 70 + phy-mode = "rgmii"; 71 + status = "okay"; 72 + }; 73 + 74 + &external_mdio { 75 + ext_rgmii_phy: ethernet-phy@1 { 76 + compatible = "ethernet-phy-ieee802.3-c22"; 77 + reg = <1>; 78 + }; 79 + };