ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_lava_lr-25g001.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/mtd/partitions/uimage.h>
6
7 / {
8 compatible = "lava,lr-25g001", "ralink,mt7620a-soc";
9 model = "LAVA LR-25G001";
10
11 aliases {
12 led-boot = &led_status;
13 led-failsafe = &led_status;
14 led-running = &led_status;
15 led-upgrade = &led_status;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 wps {
22 label = "wps";
23 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_WPS_BUTTON>;
25 };
26
27 reset {
28 label = "reset";
29 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_status: status {
38 label = "green:status";
39 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
40 };
41
42 wifi2g {
43 label = "green:wifi2g";
44 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "phy1tpt";
46 };
47
48 wifi5g {
49 label = "green:wifi5g";
50 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53 };
54
55 gpio_export {
56 compatible = "gpio-export";
57 #size-cells = <0>;
58
59 usbpower {
60 gpio-export,name = "usbpower";
61 gpio-export,output = <1>;
62 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
63 };
64 };
65 };
66
67 &spi0 {
68 status = "okay";
69
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <10000000>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "jboot";
82 reg = <0x0 0x10000>;
83 read-only;
84 };
85
86 partition@10000 {
87 compatible = "openwrt,uimage", "denx,uimage";
88 openwrt,ih-magic = <IH_MAGIC_OKLI>;
89 openwrt,offset = <0x10000>;
90 label = "firmware";
91 reg = <0x10000 0xfe0000>;
92 };
93
94 config: partition@ff0000 {
95 label = "config";
96 reg = <0xff0000 0x10000>;
97 read-only;
98 };
99 };
100 };
101 };
102
103 &ehci {
104 status = "okay";
105 };
106
107 &ohci {
108 status = "okay";
109 };
110
111 &ethernet {
112 pinctrl-names = "default";
113 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
114
115 port@5 {
116 status = "okay";
117 phy-mode = "rgmii";
118 mediatek,fixed-link = <1000 1 1 1>;
119 };
120
121 mdio-bus {
122 status = "okay";
123
124 ethernet-phy@0 {
125 reg = <0>;
126 phy-mode = "rgmii";
127 qca,ar8327-initvals = <
128 0x04 0x87300000 /* PORT0 PAD MODE CTRL */
129 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
130 0x7c 0x0000007e /* PORT0_STATUS */
131 0x80 0x00001200 /* PORT1_STATUS */
132 0x84 0x00001200 /* PORT2_STATUS */
133 0x88 0x00001200 /* PORT3_STATUS */
134 0x8c 0x00001200 /* PORT4_STATUS */
135 0x90 0x00001200 /* PORT5_STATUS */
136 0x94 0x00000000 /* PORT6_STATUS */
137 >;
138 };
139 };
140 };
141
142 &gsw {
143 mediatek,ephy-base = /bits/ 8 <8>;
144 };
145
146 &pcie {
147 status = "okay";
148 };
149
150 &pcie0 {
151 mt76x0e@0,0 {
152 reg = <0x0000 0 0 0 0>;
153 nvmem-cells = <&macaddr_config_e07e>;
154 nvmem-cell-names = "mac-address";
155 mac-address-increment = <(2)>;
156 mediatek,mtd-eeprom = <&config 0xe08a>;
157 };
158 };
159
160 &state_default {
161 gpio {
162 groups = "uartf", "i2c";
163 function = "gpio";
164 };
165 };
166
167 &config {
168 compatible = "nvmem-cells";
169 #address-cells = <1>;
170 #size-cells = <1>;
171
172 macaddr_config_e07e: macaddr@e07e {
173 reg = <0xe07e 0x6>;
174 };
175 };