mediatek: add support for Adtran SmartRG Bonanza Peak series
[openwrt/staging/robimarko.git] / target / linux / mediatek / dts / mt7986a-smartrg-SDG-8614.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /*
3 * Copyright (C) 2022 SmartRG Inc.
4 * Author: Chad Monroe <chad.monroe@smartrg.com>
5 */
6
7 #include "mt7986a-smartrg-bonanza-peak.dtsi"
8
9 / {
10 model = "SmartRG SDG-8614";
11 compatible = "smartrg,sdg-8614", "mediatek,mt7986a";
12
13 /* SFP1 cage (WAN) */
14 i2c_sfp1: i2c-gpio-0 {
15 compatible = "i2c-gpio";
16 sda-gpios = <&pio 62 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
17 scl-gpios = <&pio 63 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
18 i2c-gpio,delay-us = <2>;
19 #address-cells = <1>;
20 #size-cells = <0>;
21 };
22
23 sfp1: sfp1 {
24 compatible = "sff,sfp";
25 i2c-bus = <&i2c_sfp1>;
26 los-gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
27 mod-def0-gpios = <&pio 65 GPIO_ACTIVE_LOW>;
28 rate-select0-gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
29 rate-select1-gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
30 tx-disable-gpios = <&pio 64 GPIO_ACTIVE_HIGH>;
31 tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
32 maximum-power-milliwatt = <3000>;
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 sfp_red {
39 color = <LED_COLOR_ID_RED>;
40 function = "sfp";
41 function-enumerator = <1>;
42 gpios = <&pio 16 GPIO_ACTIVE_HIGH>;
43 default-state = "off";
44 };
45
46 sfp_green {
47 color = <LED_COLOR_ID_GREEN>;
48 function = "sfp";
49 function-enumerator = <0>;
50 gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
51 default-state = "off";
52 };
53 };
54 };
55
56 &mux_sel {
57 output-low;
58 /delete-node/ output-high;
59 };
60
61 &gmac0 {
62 fixed-link {
63 speed = <2500>;
64 full-duplex;
65 pause;
66 };
67 };
68
69 &gmac1 {
70 sfp = <&sfp1>;
71 managed = "in-band-status";
72 };
73
74 &mdio {
75 switch: switch@1f {
76 compatible = "mediatek,mt7531";
77 reg = <31>;
78 reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
79
80 ports {
81 #address-cells = <1>;
82 #size-cells = <0>;
83
84 port@1 {
85 reg = <1>;
86 label = "lan3";
87 };
88
89 port@2 {
90 reg = <2>;
91 label = "lan2";
92 };
93
94 port@3 {
95 reg = <3>;
96 label = "lan1";
97 };
98
99 port5: port@5 {
100 reg = <5>;
101 label = "lan4";
102
103 phy-mode = "2500base-x";
104 phy-handle = <&phy5>;
105 };
106
107 port@6 {
108 reg = <6>;
109 ethernet = <&gmac0>;
110 phy-mode = "2500base-x";
111
112 fixed-link {
113 speed = <2500>;
114 full-duplex;
115 pause;
116 };
117 };
118 };
119 };
120 };
121
122 &wifi {
123 ieee80211-freq-limit = <2400000 2500000>, <5170000 5835000>;
124 };