ramips: dts: Unify naming of gpio-led nodes
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / DWR-118-A1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620a.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "dlink,dwr-118-a1", "ralink,mt7620a-soc";
11 model = "D-Link DWR-118 A1";
12
13 aliases {
14 led-boot = &led_internet;
15 led-failsafe = &led_internet;
16 led-upgrade = &led_internet;
17 };
18
19 keys {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 wan {
40 label = "dwr-118-a1:green:wan";
41 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
42 };
43
44 led_internet: internet {
45 label = "dwr-118-a1:green:internet";
46 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
47 };
48
49 lan {
50 label = "dwr-118-a1:green:lan";
51 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
52 };
53
54 wlan2g {
55 label = "dwr-118-a1:green:wlan2g";
56 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
57 };
58
59 usb {
60 label = "dwr-118-a1:green:usb";
61 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
62 trigger-sources = <&ohci_port1>, <&ehci_port1>;
63 linux,default-trigger = "usbport";
64 };
65 };
66
67 gpio_export {
68 compatible = "gpio-export";
69 #size-cells = <0>;
70
71 usb {
72 gpio-export,name = "usb";
73 gpio-export,output = <0>;
74 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
75 };
76 };
77 };
78
79 &gpio1 {
80 status = "okay";
81 };
82
83 &gpio2 {
84 status = "okay";
85 };
86
87 &gpio3 {
88 status = "okay";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <80000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "jboot";
106 reg = <0x0 0x10000>;
107 read-only;
108 };
109
110 partition@10000 {
111 compatible = "amit,jimage";
112 label = "firmware";
113 reg = <0x10000 0xfe0000>;
114 };
115
116 config: partition@ff0000 {
117 label = "config";
118 reg = <0xff0000 0x10000>;
119 read-only;
120 };
121 };
122 };
123 };
124
125 &ehci {
126 status = "okay";
127 };
128
129 &ohci {
130 status = "okay";
131 };
132
133 &pinctrl {
134 state_default: pinctrl0 {
135 default {
136 ralink,group = "ephy", "uartf", "spi refclk", "wled";
137 ralink,function = "gpio";
138 };
139 };
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &pcie0 {
147 wifi@0,0 {
148 reg = <0x0000 0 0 0 0>;
149 mtd-mac-address = <&config 0xe496>;
150 mtd-mac-address-increment = <(2)>;
151 mediatek,mtd-eeprom = <&config 0xe083>;
152 };
153 };
154
155 &ethernet {
156 status = "okay";
157 pinctrl-names = "default";
158 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
159
160 port@4 {
161 status = "okay";
162 phy-handle = <&phy4>;
163 phy-mode = "rgmii";
164 };
165
166 port@5 {
167 status = "okay";
168 phy-handle = <&phy5>;
169 phy-mode = "rgmii";
170 };
171
172 mdio-bus {
173 status = "okay";
174
175 phy4: ethernet-phy@4 {
176 reg = <4>;
177 phy-mode = "rgmii-rxid";
178 };
179
180 phy5: ethernet-phy@5 {
181 reg = <5>;
182 phy-mode = "rgmii-rxid";
183 };
184 };
185 };
186
187 &gsw {
188 mediatek,port4 = "gmac";
189 };