]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: dts: add ethernet related node for MT7623 SoC
authorWeijie Gao <weijie.gao@mediatek.com>
Thu, 20 Dec 2018 08:12:54 +0000 (16:12 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 14 Jan 2019 22:43:18 +0000 (17:43 -0500)
This patch adds ethernet gmac node for MT7623 with MT7530 gigabit switch.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
arch/arm/dts/mt7623.dtsi
arch/arm/dts/mt7623n-bananapi-bpi-r2.dts

index f50f4ef1b92f62bb1ea28bdd33e1a43acbae9abb..448d1d73810e549bc7c02fb6cadc7d759b315187 100644 (file)
@@ -10,6 +10,7 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/mt7623-power.h>
+#include <dt-bindings/reset/mtk-reset.h>
 #include "skeleton.dtsi"
 
 / {
        };
 
        ethsys: syscon@1b000000 {
-               compatible = "mediatek,mt7623-ethsys";
+               compatible = "mediatek,mt7623-ethsys", "syscon";
                reg = <0x1b000000 0x1000>;
                #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+       eth: ethernet@1b100000 {
+               compatible = "mediatek,mt7623-eth", "syscon";
+               reg = <0x1b100000 0x20000>;
+               clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
+                        <&ethsys CLK_ETHSYS_ESW>,
+                        <&ethsys CLK_ETHSYS_GP1>,
+                        <&ethsys CLK_ETHSYS_GP2>,
+                        <&apmixedsys CLK_APMIXED_TRGPLL>;
+               clock-names = "ethif", "esw", "gp1", "gp2", "trgpll";
+               power-domains = <&scpsys MT7623_POWER_DOMAIN_ETH>;
+               resets = <&ethsys ETHSYS_FE_RST>,
+                        <&ethsys ETHSYS_MCM_RST>;
+               reset-names = "fe", "mcm";
+               mediatek,ethsys = <&ethsys>;
+               status = "disabled";
        };
 };
index 84a77fde443a8ed050cf5522fc1332568044174c..51628bb63995b78f7082217491d8c85668aad9b2 100644 (file)
        };
 };
 
+&eth {
+       status = "okay";
+       mediatek,gmac-id = <0>;
+       phy-mode = "rgmii";
+       mediatek,switch = "mt7530";
+       reset-gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
+
+       fixed-link {
+               speed = <1000>;
+               full-duplex;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_default>;