Skip to content

Commit

Permalink
Merge tag 'sunxi-dt64-for-4.15-2' of ssh://gitolite.kernel.org/pub/sc…
Browse files Browse the repository at this point in the history
…m/linux/kernel/git/sunxi/linux into next/dt

Pull "Allwinner arm64 changes, take 2" from Maxime Ripard:

Reintroduction of the EMAC bindings that were reverted in 4.13.

* tag 'sunxi-dt64-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio
  arm64: dts: allwinner: A64: Restore EMAC changes
  • Loading branch information
arndb committed Nov 7, 2017
2 parents 2cdc614 + 1641608 commit ea7cdc0
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
16 changes: 16 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";

aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
};
Expand All @@ -69,6 +70,14 @@
status = "okay";
};

&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>;
status = "okay";
};

&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
Expand All @@ -79,6 +88,13 @@
bias-pull-up;
};

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

&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
Expand Down
15 changes: 15 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,18 @@

/* TODO: Camera, touchscreen, etc. */
};

&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>;
status = "okay";
};

&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};
17 changes: 17 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
compatible = "pine64,pine64", "allwinner,sun50i-a64";

aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
Expand All @@ -71,6 +72,15 @@
status = "okay";
};

&emac {
pinctrl-names = "default";
pinctrl-0 = <&rmii_pins>;
phy-mode = "rmii";
phy-handle = <&ext_rmii_phy1>;
status = "okay";

};

&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
Expand All @@ -81,6 +91,13 @@
bias-pull-up;
};

&mdio {
ext_rmii_phy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};

&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"allwinner,sun50i-a64";

aliases {
ethernet0 = &emac;
serial0 = &uart0;
};

Expand All @@ -76,6 +77,21 @@
status = "okay";
};

&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>;
status = "okay";
};

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

&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
Expand Down
21 changes: 21 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,27 @@
#size-cells = <0>;
};

emac: ethernet@1c30000 {
compatible = "allwinner,sun50i-a64-emac";
syscon = <&syscon>;
reg = <0x01c30000 0x10000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
resets = <&ccu RST_BUS_EMAC>;
reset-names = "stmmaceth";
clocks = <&ccu CLK_BUS_EMAC>;
clock-names = "stmmaceth";
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;

mdio: mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
};
};

gic: interrupt-controller@1c81000 {
compatible = "arm,gic-400";
reg = <0x01c81000 0x1000>,
Expand Down

0 comments on commit ea7cdc0

Please sign in to comment.