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