mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 5xE
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Tue, 5 Dec 2023 13:15:38 +0000 (22:15 +0900)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 25 May 2024 18:03:00 +0000 (20:03 +0200)
Add a new dtsi which contains the common parts of Fortinet
FortiGate/FortiWiFi 5xE series devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-5xe.dtsi [new file with mode: 0644]

index c56a06fda0fd7ad38560f35481a38c318888153e..01a9e3682684608e68f75c97c71381901c67056a 100644 (file)
@@ -1,175 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "armada-385-fortinet-fg-xxe.dtsi"
+#include "armada-385-fortinet-fg-5xe.dtsi"
 
 / {
        model = "Fortinet FortiGate 50E";
        compatible = "fortinet,fg-50e", "marvell,armada385", "marvell,armada380";
-
-       memory@0 {
-               device_type = "memory";
-               reg = <0x00000000 0x80000000>; /* 2GB */
-       };
-};
-
-&gpio_leds {
-       led-14 {
-               gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
-               color = <LED_COLOR_ID_GREEN>;
-               function = LED_FUNCTION_SPEED_WAN;
-               function-enumerator = <1>;
-               linux,default-trigger = "f1072004.mdio-mii:00:1Gbps";
-       };
-
-       led-15 {
-               gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
-               color = <LED_COLOR_ID_GREEN>;
-               function = LED_FUNCTION_SPEED_WAN;
-               function-enumerator = <2>;
-               linux,default-trigger = "f1072004.mdio-mii:01:1Gbps";
-       };
-
-       led-16 {
-               gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
-               color = <LED_COLOR_ID_AMBER>;
-               function = LED_FUNCTION_SPEED_LAN;
-               function-enumerator = <5>;
-               linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
-       };
-
-       led-17 {
-               gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
-               color = <LED_COLOR_ID_GREEN>;
-               function = LED_FUNCTION_SPEED_LAN;
-               function-enumerator = <5>;
-               linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
-       };
-};
-
-&pinctrl {
-       pmx_phy_switch_pins: phy-switch-pins {
-               marvell,pins = "mpp19", "mpp20", "mpp23", "mpp34", "mpp41";
-               marvell,function = "gpio";
-       };
-};
-
-&eth1 {
-       status = "okay";
-
-       phy-handle = <&ethphy0>;
-       phy-connection-type = "sgmii";
-       buffer-manager = <&bm>;
-       bm,pool-long = <2>;
-       nvmem-cells = <&macaddr_bdinfo_d880 1>;
-       nvmem-cell-names = "mac-address";
-};
-
-&eth2 {
-       status = "okay";
-
-       phy-handle = <&ethphy1>;
-       phy-connection-type = "sgmii";
-       buffer-manager = <&bm>;
-       bm,pool-long = <3>;
-       nvmem-cells = <&macaddr_bdinfo_d880 2>;
-       nvmem-cell-names = "mac-address";
-};
-
-&mdio {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mdio_pins>, <&pmx_phy_switch_pins>;
-
-       /* Marvell 88E1512 */
-       ethphy0: ethernet-phy@0 {
-               compatible = "ethernet-phy-id0141,0dd1",
-                            "ethernet-phy-ieee802.3-c22";
-               reg = <0>;
-               interrupt-parent = <&gpio0>;
-               interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
-               reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
-               reset-assert-us = <10000>;
-               reset-deassert-us = <10000>;
-               /*
-                * LINK/ACT   (Green): LED[0], Active Low
-                * SPEED 100M (Amber): LED[1], Active High
-                */
-               marvell,reg-init = <3 16 0 0x71>,
-                                  <3 17 0 0x4>;
-       };
-
-       /* Marvell 88E1512 */
-       ethphy1: ethernet-phy@1 {
-               compatible = "ethernet-phy-id0141,0dd1",
-                            "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-               interrupt-parent = <&gpio1>;
-               interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
-               reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
-               reset-assert-us = <10000>;
-               reset-deassert-us = <10000>;
-               /*
-                * LINK/ACT   (Green): LED[0], Active Low
-                * SPEED 100M (Amber): LED[1], Active High
-                */
-               marvell,reg-init = <3 16 0 0x71>,
-                                  <3 17 0 0x4>;
-       };
-
-       /* Marvell 88E6176 */
-       switch@2 {
-               compatible = "marvell,mv88e6085";
-               reg = <0x2>;
-               reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
-
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       port@0 {
-                               reg = <0>;
-                               label = "lan5";
-                               nvmem-cells = <&macaddr_bdinfo_d880 7>;
-                               nvmem-cell-names = "mac-address";
-                       };
-
-                       port@1 {
-                               reg = <1>;
-                               label = "lan4";
-                               nvmem-cells = <&macaddr_bdinfo_d880 6>;
-                               nvmem-cell-names = "mac-address";
-                       };
-
-                       port@2 {
-                               reg = <2>;
-                               label = "lan3";
-                               nvmem-cells = <&macaddr_bdinfo_d880 5>;
-                               nvmem-cell-names = "mac-address";
-                       };
-
-                       port@3 {
-                               reg = <3>;
-                               label = "lan2";
-                               nvmem-cells = <&macaddr_bdinfo_d880 4>;
-                               nvmem-cell-names = "mac-address";
-                       };
-
-                       port@4 {
-                               reg = <4>;
-                               label = "lan1";
-                               nvmem-cells = <&macaddr_bdinfo_d880 3>;
-                               nvmem-cell-names = "mac-address";
-                       };
-
-                       port@6 {
-                               reg = <6>;
-                               ethernet = <&eth0>;
-                               phy-connection-type = "rgmii-id";
-
-                               fixed-link {
-                                       speed = <1000>;
-                                       full-duplex;
-                               };
-                       };
-               };
-       };
 };
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-5xe.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-5xe.dtsi
new file mode 100644 (file)
index 0000000..063632d
--- /dev/null
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "armada-385-fortinet-fg-xxe.dtsi"
+
+/ {
+       memory@0 {
+               device_type = "memory";
+               reg = <0x00000000 0x80000000>; /* 2GB */
+       };
+};
+
+&gpio_leds {
+       led-14 {
+               gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
+               color = <LED_COLOR_ID_GREEN>;
+               function = LED_FUNCTION_SPEED_WAN;
+               function-enumerator = <1>;
+               linux,default-trigger = "f1072004.mdio-mii:00:1Gbps";
+       };
+
+       led-15 {
+               gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+               color = <LED_COLOR_ID_GREEN>;
+               function = LED_FUNCTION_SPEED_WAN;
+               function-enumerator = <2>;
+               linux,default-trigger = "f1072004.mdio-mii:01:1Gbps";
+       };
+
+       led-16 {
+               gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+               color = <LED_COLOR_ID_AMBER>;
+               function = LED_FUNCTION_SPEED_LAN;
+               function-enumerator = <5>;
+               linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
+       };
+
+       led-17 {
+               gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+               color = <LED_COLOR_ID_GREEN>;
+               function = LED_FUNCTION_SPEED_LAN;
+               function-enumerator = <5>;
+               linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
+       };
+};
+
+&pinctrl {
+       pmx_phy_switch_pins: phy-switch-pins {
+               marvell,pins = "mpp19", "mpp20", "mpp23", "mpp34", "mpp41";
+               marvell,function = "gpio";
+       };
+};
+
+&eth1 {
+       status = "okay";
+
+       phy-handle = <&ethphy0>;
+       phy-connection-type = "sgmii";
+       buffer-manager = <&bm>;
+       bm,pool-long = <2>;
+       nvmem-cells = <&macaddr_bdinfo_d880 1>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth2 {
+       status = "okay";
+
+       phy-handle = <&ethphy1>;
+       phy-connection-type = "sgmii";
+       buffer-manager = <&bm>;
+       bm,pool-long = <3>;
+       nvmem-cells = <&macaddr_bdinfo_d880 2>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mdio_pins>, <&pmx_phy_switch_pins>;
+
+       /* Marvell 88E1512 */
+       ethphy0: ethernet-phy@0 {
+               compatible = "ethernet-phy-id0141,0dd1",
+                            "ethernet-phy-ieee802.3-c22";
+               reg = <0x0>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+               reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+               reset-assert-us = <10000>;
+               reset-deassert-us = <10000>;
+               /*
+                * LINK/ACT   (Green): LED[0], Active Low
+                * SPEED 100M (Amber): LED[1], Active High
+                */
+               marvell,reg-init = <3 16 0 0x71>,
+                                  <3 17 0 0x4>;
+       };
+
+       /* Marvell 88E1512 */
+       ethphy1: ethernet-phy@1 {
+               compatible = "ethernet-phy-id0141,0dd1",
+                            "ethernet-phy-ieee802.3-c22";
+               reg = <0x1>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+               reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+               reset-assert-us = <10000>;
+               reset-deassert-us = <10000>;
+               /*
+                * LINK/ACT   (Green): LED[0], Active Low
+                * SPEED 100M (Amber): LED[1], Active High
+                */
+               marvell,reg-init = <3 16 0 0x71>,
+                                  <3 17 0 0x4>;
+       };
+
+       /* Marvell 88E6176 */
+       switch@2 {
+               compatible = "marvell,mv88e6085";
+               reg = <0x2>;
+               reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               label = "lan5";
+                               nvmem-cells = <&macaddr_bdinfo_d880 7>;
+                               nvmem-cell-names = "mac-address";
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               label = "lan4";
+                               nvmem-cells = <&macaddr_bdinfo_d880 6>;
+                               nvmem-cell-names = "mac-address";
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               label = "lan3";
+                               nvmem-cells = <&macaddr_bdinfo_d880 5>;
+                               nvmem-cell-names = "mac-address";
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               label = "lan2";
+                               nvmem-cells = <&macaddr_bdinfo_d880 4>;
+                               nvmem-cell-names = "mac-address";
+                       };
+
+                       port@4 {
+                               reg = <4>;
+                               label = "lan1";
+                               nvmem-cells = <&macaddr_bdinfo_d880 3>;
+                               nvmem-cell-names = "mac-address";
+                       };
+
+                       port@6 {
+                               reg = <6>;
+                               ethernet = <&eth0>;
+                               phy-connection-type = "rgmii-id";
+
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                               };
+                       };
+               };
+       };
+};