mvebu: fix LEDs on Fortinet FortiGate devices
[openwrt/openwrt.git] / target / linux / mvebu / files-6.6 / arch / arm / boot / dts / marvell / armada-385-fortinet-fg-50e.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "armada-385-fortinet-fg-x0e.dtsi"
4
5 / {
6 model = "Fortinet FortiGate 50E";
7 compatible = "fortinet,fg-50e", "marvell,armada385", "marvell,armada380";
8
9 memory@0 {
10 device_type = "memory";
11 reg = <0x00000000 0x80000000>; /* 2GB */
12 };
13 };
14
15 &gpio_leds {
16 led-14 {
17 gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
18 color = <LED_COLOR_ID_GREEN>;
19 function = LED_FUNCTION_SPEED_WAN;
20 function-enumerator = <1>;
21 linux,default-trigger = "f1072004.mdio-mii:00:1Gbps";
22 };
23
24 led-15 {
25 gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
26 color = <LED_COLOR_ID_GREEN>;
27 function = LED_FUNCTION_SPEED_WAN;
28 function-enumerator = <2>;
29 linux,default-trigger = "f1072004.mdio-mii:01:1Gbps";
30 };
31
32 led-16 {
33 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
34 color = <LED_COLOR_ID_AMBER>;
35 function = LED_FUNCTION_SPEED_LAN;
36 function-enumerator = <5>;
37 linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
38 };
39
40 led-17 {
41 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
42 color = <LED_COLOR_ID_GREEN>;
43 function = LED_FUNCTION_SPEED_LAN;
44 function-enumerator = <5>;
45 linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
46 };
47 };
48
49 &pinctrl {
50 pmx_phy_switch_pins: phy-switch-pins {
51 marvell,pins = "mpp19", "mpp20", "mpp23", "mpp34", "mpp41";
52 marvell,function = "gpio";
53 };
54 };
55
56 &eth1 {
57 status = "okay";
58
59 phy-handle = <&ethphy0>;
60 phy-connection-type = "sgmii";
61 buffer-manager = <&bm>;
62 bm,pool-long = <2>;
63 nvmem-cells = <&macaddr_bdinfo_d880 1>;
64 nvmem-cell-names = "mac-address";
65 };
66
67 &eth2 {
68 status = "okay";
69
70 phy-handle = <&ethphy1>;
71 phy-connection-type = "sgmii";
72 buffer-manager = <&bm>;
73 bm,pool-long = <3>;
74 nvmem-cells = <&macaddr_bdinfo_d880 2>;
75 nvmem-cell-names = "mac-address";
76 };
77
78 &mdio {
79 pinctrl-names = "default";
80 pinctrl-0 = <&mdio_pins>, <&pmx_phy_switch_pins>;
81
82 /* Marvell 88E1512 */
83 ethphy0: ethernet-phy@0 {
84 compatible = "ethernet-phy-id0141,0dd1",
85 "ethernet-phy-ieee802.3-c22";
86 reg = <0>;
87 interrupt-parent = <&gpio0>;
88 interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
89 reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
90 reset-assert-us = <10000>;
91 reset-deassert-us = <10000>;
92 /*
93 * LINK/ACT (Green): LED[0], Active Low
94 * SPEED 100M (Amber): LED[1], Active High
95 */
96 marvell,reg-init = <3 16 0 0x71>,
97 <3 17 0 0x4>;
98 };
99
100 /* Marvell 88E1512 */
101 ethphy1: ethernet-phy@1 {
102 compatible = "ethernet-phy-id0141,0dd1",
103 "ethernet-phy-ieee802.3-c22";
104 reg = <1>;
105 interrupt-parent = <&gpio1>;
106 interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
107 reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
108 reset-assert-us = <10000>;
109 reset-deassert-us = <10000>;
110 /*
111 * LINK/ACT (Green): LED[0], Active Low
112 * SPEED 100M (Amber): LED[1], Active High
113 */
114 marvell,reg-init = <3 16 0 0x71>,
115 <3 17 0 0x4>;
116 };
117
118 /* Marvell 88E6176 */
119 switch@2 {
120 compatible = "marvell,mv88e6085";
121 reg = <0x2>;
122 reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
123
124 ports {
125 #address-cells = <1>;
126 #size-cells = <0>;
127
128 port@0 {
129 reg = <0>;
130 label = "lan5";
131 nvmem-cells = <&macaddr_bdinfo_d880 7>;
132 nvmem-cell-names = "mac-address";
133 };
134
135 port@1 {
136 reg = <1>;
137 label = "lan4";
138 nvmem-cells = <&macaddr_bdinfo_d880 6>;
139 nvmem-cell-names = "mac-address";
140 };
141
142 port@2 {
143 reg = <2>;
144 label = "lan3";
145 nvmem-cells = <&macaddr_bdinfo_d880 5>;
146 nvmem-cell-names = "mac-address";
147 };
148
149 port@3 {
150 reg = <3>;
151 label = "lan2";
152 nvmem-cells = <&macaddr_bdinfo_d880 4>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 port@4 {
157 reg = <4>;
158 label = "lan1";
159 nvmem-cells = <&macaddr_bdinfo_d880 3>;
160 nvmem-cell-names = "mac-address";
161 };
162
163 port@6 {
164 reg = <6>;
165 ethernet = <&eth0>;
166 phy-connection-type = "rgmii-id";
167
168 fixed-link {
169 speed = <1000>;
170 full-duplex;
171 };
172 };
173 };
174 };
175 };