Skip to content
Snippets Groups Projects
Commit e88d2a57 authored by Andre Przywara's avatar Andre Przywara Committed by Jagan Teki
Browse files

arm: dts: sunxi: update H3 to new EMAC binding


The U-Boot driver for the sun8i-emac was using some preliminary DT
binding. Now since Linux got its own driver in v4.15 and our driver
can now cope with both bindings, let's convert the DT nodes used by the
various H3 boards over to the new bindings used by the kernel.

Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
parent 06a57f65
No related branches found
No related tags found
No related merge requests found
...@@ -100,14 +100,10 @@ ...@@ -100,14 +100,10 @@
}; };
&emac { &emac {
phy = <&phy1>; phy-handle = <&int_mii_phy>;
phy-mode = "mii"; phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low; allwinner,leds-active-low;
status = "okay"; status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
}; };
&mmc0 { &mmc0 {
......
...@@ -125,15 +125,10 @@ ...@@ -125,15 +125,10 @@
}; };
&emac { &emac {
phy = <&phy1>; phy-handle = <&int_mii_phy>;
phy-mode = "mii"; phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low; allwinner,leds-active-low;
status = "okay"; status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
}; };
&ir { &ir {
......
...@@ -48,12 +48,8 @@ ...@@ -48,12 +48,8 @@
}; };
&emac { &emac {
phy = <&phy1>; phy-handle = <&int_mii_phy>;
phy-mode = "mii"; phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low; allwinner,leds-active-low;
status = "okay"; status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
}; };
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,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;
}; };
...@@ -110,14 +111,10 @@ ...@@ -110,14 +111,10 @@
}; };
&emac { &emac {
phy = <&phy1>; phy-handle = <&int_mii_phy>;
phy-mode = "mii"; phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low; allwinner,leds-active-low;
status = "okay"; status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
}; };
&ir { &ir {
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3"; compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3";
aliases { aliases {
ethernet0 = &emac;
serial0 = &uart0; serial0 = &uart0;
}; };
...@@ -95,14 +96,10 @@ ...@@ -95,14 +96,10 @@
}; };
&emac { &emac {
phy = <&phy1>; phy-handle = <&int_mii_phy>;
phy-mode = "mii"; phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low; allwinner,leds-active-low;
status = "okay"; status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
}; };
&mmc0 { &mmc0 {
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3"; compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
aliases { aliases {
ethernet0 = &emac;
serial0 = &uart0; serial0 = &uart0;
}; };
...@@ -167,12 +168,8 @@ ...@@ -167,12 +168,8 @@
}; };
&emac { &emac {
phy = <&phy1>; phy-handle = <&int_mii_phy>;
phy-mode = "mii"; phy-mode = "mii";
allwinner,use-internal-phy;
allwinner,leds-active-low; allwinner,leds-active-low;
status = "okay"; status = "okay";
phy1: ethernet-phy@1 {
reg = <1>;
};
}; };
...@@ -82,7 +82,13 @@ ...@@ -82,7 +82,13 @@
pinctrl-0 = <&emac_rgmii_pins>; pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>; phy-supply = <&reg_gmac_3v3>;
phy-mode = "rgmii"; phy-mode = "rgmii";
/delete-property/allwinner,use-internal-phy; };
&external_mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
}; };
&mmc2 { &mmc2 {
......
...@@ -69,8 +69,15 @@ ...@@ -69,8 +69,15 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&emac_rgmii_pins>; pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>; phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
phy-mode = "rgmii"; phy-mode = "rgmii";
/delete-property/allwinner,use-internal-phy; };
&external_mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
}; };
&pio { &pio {
......
...@@ -144,9 +144,10 @@ ...@@ -144,9 +144,10 @@
#size-cells = <1>; #size-cells = <1>;
ranges; ranges;
syscon: syscon@01c00000 { syscon: syscon@1c00000 {
compatible = "allwinner,sun8i-h3-syscon","syscon"; compatible = "allwinner,sun8i-h3-system-controller",
reg = <0x01c00000 0x34>; "syscon";
reg = <0x01c00000 0x1000>;
}; };
dma: dma-controller@01c02000 { dma: dma-controller@01c02000 {
...@@ -339,15 +340,12 @@ ...@@ -339,15 +340,12 @@
interrupt-controller; interrupt-controller;
#interrupt-cells = <3>; #interrupt-cells = <3>;
emac_rgmii_pins: emac0@0 { emac_rgmii_pins: emac0 {
allwinner,pins = "PD0", "PD1", "PD2", "PD3", pins = "PD0", "PD1", "PD2", "PD3", "PD4",
"PD4", "PD5", "PD7", "PD5", "PD7", "PD8", "PD9", "PD10",
"PD8", "PD9", "PD10", "PD12", "PD13", "PD15", "PD16", "PD17";
"PD12", "PD13", "PD15", function = "emac";
"PD16", "PD17"; drive-strength = <40>;
allwinner,function = "emac";
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
}; };
mmc0_pins_a: mmc0@0 { mmc0_pins_a: mmc0@0 {
...@@ -466,16 +464,51 @@ ...@@ -466,16 +464,51 @@
emac: ethernet@1c30000 { emac: ethernet@1c30000 {
compatible = "allwinner,sun8i-h3-emac"; compatible = "allwinner,sun8i-h3-emac";
reg = <0x01c30000 0x104>, <0x01c00030 0x4>; syscon = <&syscon>;
reg-names = "emac", "syscon"; reg = <0x01c30000 0x10000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
resets = <&ccu RST_BUS_EMAC>, <&ccu RST_BUS_EPHY>; interrupt-names = "macirq";
reset-names = "ahb", "ephy"; resets = <&ccu RST_BUS_EMAC>;
clocks = <&ccu CLK_BUS_EMAC>, <&ccu CLK_BUS_EPHY>; reset-names = "stmmaceth";
clock-names = "ahb", "ephy"; clocks = <&ccu CLK_BUS_EMAC>;
clock-names = "stmmaceth";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
status = "disabled"; status = "disabled";
mdio: mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
};
mdio-mux {
compatible = "allwinner,sun8i-h3-mdio-mux";
#address-cells = <1>;
#size-cells = <0>;
mdio-parent-bus = <&mdio>;
/* Only one MDIO is usable at the time */
internal_mdio: mdio@1 {
compatible = "allwinner,sun8i-h3-mdio-internal";
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
int_mii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
clocks = <&ccu CLK_BUS_EPHY>;
resets = <&ccu RST_BUS_EPHY>;
};
};
external_mdio: mdio@2 {
reg = <2>;
#address-cells = <1>;
#size-cells = <0>;
};
};
}; };
gic: interrupt-controller@01c81000 { gic: interrupt-controller@01c81000 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment