WIP
[openwrt/staging/stintel.git] / target / linux / realtek / dts-5.15 / rtl8392_edgecore_ecs4100-12ph.dts
index 067bf24f5a8c919a1c4869caad15a0618ab591e7..2fda9ebda3263ca1fc850c9a2e11bb8910c9ac7a 100644 (file)
                led-upgrade = &led_sys;
        };
 
-       chosen {
-               bootargs = "console=ttyS0,115200";
-       };
-
        memory@0 {
                device_type = "memory";
                reg = <0x0 0x10000000>;
        };
 
-        gpio1: rtl8231-gpio {
-                compatible = "realtek,rtl8231-gpio";
-                #gpio-cells = <2>;
-                indirect-access-bus-id = <3>;
-                gpio-controller;
-        };
+       leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinmux_disable_sys_led>;
+               compatible = "gpio-leds";
+
+               led_sys: sys {
+                       label = "green:sys";
+                       gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       gpio1: rtl8231-gpio {
+               compatible = "realtek,rtl8231-gpio";
+               #gpio-cells = <2>;
+               indirect-access-bus-id = <3>;
+               gpio-controller;
+       };
+
+       gpio-restart {
+               compatible = "gpio-restart";
+               gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
+       };
 
-       /* i2c of the left SFP cage: port 9 */
        i2c0: i2c-gpio-0 {
                compatible = "i2c-gpio";
                sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
                #address-cells = <1>;
                #size-cells = <0>;
 
-               adt7470@2f {
-                       compatible = "adi,adt7470";
-                       reg = <0x2f>;
-               };
-
                lm75b@48 {
                        compatible = "nxp,lm75a";
                        reg = <0x48>;
        };
 
        watchdog {
-                compatible = "linux,wdt-gpio";
-                gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
-                hw_algo = "toggle";
-                hw_margin_ms = <1200>;
-        };
-
-       reboot@0 {
-               compatible = "edgecore,reboot";
-               gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+               compatible = "linux,wdt-gpio";
+               gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+               hw_algo = "toggle";
+               hw_margin_ms = <1200>;
        };
-
-        fan0: gpio-fan {
-                #cooling-cells = <2>;
-                compatible = "gpio-fan";
-                gpio-fan,speed-map = <0 0 3000 1>;
-                gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
-                status = "okay";
-        };
 };
 
 &gpio0 {
                        };
                        partition@100000 {
                                label = "u-boot-env";
-                               reg = <0x100000 0x100000>;
+                               reg = <0x100000 0x20000>;
+                       };
+                       partition@120000 {
+                               label = "empty";
+                               reg = <0x120000 0x60000>;
+                               read-only;
+                       };
+                       partition@180000 {
+                               label = "para";
+                               reg = <0x180000 0x20000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_factory: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+                               };
                        };
                        partition@200000 {
                                label = "firmware";
 };
 
 &ethernet0 {
+       nvmem-cells = <&macaddr_factory>;
+       nvmem-cell-names = "mac-address";
+
        mdio: mdio-bus {
                compatible = "realtek,rtl838x-mdio";
                regmap = <&ethernet0>;
                #address-cells = <1>;
                #size-cells = <0>;
 
-               INTERNAL_PHY(0)
-               INTERNAL_PHY(1)
-               INTERNAL_PHY(2)
-               INTERNAL_PHY(3)
-               INTERNAL_PHY(4)
-               INTERNAL_PHY(5)
-               INTERNAL_PHY(6)
-               INTERNAL_PHY(7)
+               reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+               reset-delay-us = <2000>;
+               reset-post-delay-us = <140000>;
+
+               EXTERNAL_PHY(0)
+               EXTERNAL_PHY(1)
+               EXTERNAL_PHY(2)
+               EXTERNAL_PHY(3)
+               EXTERNAL_PHY(4)
+               EXTERNAL_PHY(5)
+               EXTERNAL_PHY(6)
+               EXTERNAL_PHY(7)
 
                phy48: ethernet-phy@48 {
                        reg = <48>;
 };
 
 &switch0 {
-       ext_io: ext-io@e4 {
-               compatible = "realtek,rtl8390-eio", "syscon";
-               reg = <0xe4 0x17c>;
-
-               led_sys: sys-led {
-                       active-low;
-                       label = "green:status";
-                       linux,default-trigger = "default-on";
-               };
-       };
        ports {
                #address-cells = <1>;
                #size-cells = <0>;
                port@48 {
                        reg = <48>;
                        label = "lan9";
-                       phy-mode = "sgmii";
+                       phy-mode = "qsgmii";
                        phy-handle = <&phy48>;
                        managed = "in-band-status";
                };
                port@49 {
                        reg = <49>;
                        label = "lan10";
-                       phy-mode = "sgmii";
+                       phy-mode = "qsgmii";
                        phy-handle = <&phy49>;
                        managed = "in-band-status";
                };
                port@50 {
                        reg = <50>;
                        label = "lan11";
-                       phy-mode = "sgmii";
+                       phy-mode = "qsgmii";
                        phy-handle = <&phy50>;
                        managed = "in-band-status";
                };
                port@51 {
                        reg = <51>;
                        label = "lan12";
-                       phy-mode = "sgmii";
+                       phy-mode = "qsgmii";
                        phy-handle = <&phy51>;
                        managed = "in-band-status";
                };
                };
        };
 };
+
+&uart1 {
+       status = "okay";
+};