summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/files/arch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2017-04-21 09:40:01 +0200
committerJohn Crispin <john@phrozen.org>2017-04-24 11:11:52 +0200
commitf3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3 (patch)
tree011e058645afb2aee6fa0b934fa2f2f3b8d67ac7 /target/linux/mediatek/files/arch
parent956e31b1e447a3a3d5cc4c17cda089ccb49b0f29 (diff)
downloadmtk-20170518-f3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3.zip
mtk-20170518-f3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3.tar.gz
mtk-20170518-f3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3.tar.bz2
mediatek: fix support for gmac1 using external PHY
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/files/arch')
-rw-r--r--target/linux/mediatek/files/arch/arm/boot/dts/mt7623-NAND.dts27
-rw-r--r--target/linux/mediatek/files/arch/arm/boot/dts/mt7623-eMMC.dts59
2 files changed, 84 insertions, 2 deletions
diff --git a/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-NAND.dts b/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-NAND.dts
index d90e0fb..072ebe7 100644
--- a/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-NAND.dts
+++ b/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-NAND.dts
@@ -454,6 +454,14 @@
&gmac1 {
mac-address = [00 11 22 33 44 56];
status = "okay";
+
+ phy-mode = "trgmii";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ pause;
+ };
};
&gmac2 {
@@ -490,29 +498,45 @@
port@0 {
reg = <0>;
label = "lan0";
+ cpu = <&cpu_port0>;
};
port@1 {
reg = <1>;
label = "lan1";
+ cpu = <&cpu_port0>;
};
port@2 {
reg = <2>;
label = "lan2";
+ cpu = <&cpu_port0>;
};
port@3 {
reg = <3>;
label = "lan3";
+ cpu = <&cpu_port0>;
};
port@4 {
reg = <4>;
label = "wan";
+ cpu = <&cpu_port1>;
};
- port@6 {
+ cpu_port1: port@5 {
+ reg = <5>;
+ label = "cpu";
+ ethernet = <&gmac2>;
+ phy-mode = "trgmii";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
+ cpu_port0: port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac1>;
@@ -526,7 +550,6 @@
};
};
-
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm_pins>;
diff --git a/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-eMMC.dts b/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-eMMC.dts
index 86c4dd5..36b0065 100644
--- a/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-eMMC.dts
+++ b/target/linux/mediatek/files/arch/arm/boot/dts/mt7623-eMMC.dts
@@ -474,6 +474,65 @@
&gmac2 {
mac-address = [00 11 22 33 44 55];
status = "okay";
+
+ phy-handle = <&phy5>;
+};
+
+&mdio0 {
+ switch@0 {
+ compatible = "mediatek,mt7530";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&eth_default>;
+
+ core-supply = <&mt6323_vpa_reg>;
+ io-supply = <&mt6323_vemc3v3_reg>;
+ reset-gpios = <&pio 33 0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ port@0 {
+ reg = <0>;
+ label = "lan0";
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "lan1";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "lan2";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "lan3";
+ };
+
+ port@6 {
+ reg = <6>;
+ label = "cpu";
+ ethernet = <&gmac1>;
+ phy-mode = "trgmii";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii-rxid";
+ };
};
&pwm {