mediatek: fix mt7530 mcm reset
[openwrt/openwrt.git] / target / linux / mediatek / files / arch / arm / boot / dts / mt7623-eMMC.dts
index 630240c..fe1a42d 100644 (file)
@@ -18,8 +18,8 @@
 #include <dt-bindings/gpio/gpio.h>
 
 / {
-       model = "MediaTek MT7623 eMMC evaluation board";
-       compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
+       model = "MediaTek MT7623 eMMC reference board";
+       compatible = "mediatek,mt7623-rfb-emmc", "mediatek,mt7623";
 
        chosen {
                stdout-path = &uart2;
                                 <MT7623_PIN_273_ESW_INT_FUNC_ESW_INT>,
                                 <MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV>;
                };
-               
+
                pins_eth_rst {
                        pinmux = <MT7623_PIN_15_GPIO15_FUNC_GPIO15>;
                        output-low;
 &gmac2 {
        mac-address = [00 11 22 33 44 55];
        status = "okay";
+
        phy-handle = <&phy5>;
 };
 
-&gsw {
-       pinctrl-names = "default";
-       pinctrl-0 = <&eth_default>;
-       mediatek,reset-pin = <&pio 15 0>;
-       status = "okay";
+&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>;
+
+               mediatek,mcm;
+               resets = <&ethsys 2>;
+               reset-names = "mcm";
+
+               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 {