92119ff8127ccd73af8ace3eac9c8757cf5dc570
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_asus_rt-ac5x.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 label-mac-device = &ethernet;
9 led-boot = &led_power;
10 led-failsafe = &led_power;
11 led-running = &led_power;
12 led-upgrade = &led_power;
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 reset {
19 label = "reset";
20 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
21 linux,code = <KEY_RESTART>;
22 };
23
24 wps {
25 label = "wps";
26 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_WPS_BUTTON>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_power: power {
35 label = "blue:power";
36 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
37 };
38
39 usb {
40 label = "blue:usb";
41 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
42 trigger-sources = <&ohci_port1>, <&ehci_port1>;
43 linux,default-trigger = "usbport";
44 };
45
46 wifi2g {
47 label = "blue:wifi2g";
48 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy1tpt";
50 };
51 };
52 };
53
54 &spi0 {
55 status = "okay";
56
57 flash@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60
61 spi-max-frequency = <50000000>;
62 m25p,fast-read;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x30000>;
72 read-only;
73 };
74
75 partition@30000 {
76 label = "u-boot-env";
77 reg = <0x30000 0x10000>;
78 read-only;
79 };
80
81 factory: partition@40000 {
82 label = "factory";
83 reg = <0x40000 0x10000>;
84 read-only;
85
86 nvmem-layout {
87 compatible = "fixed-layout";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 eeprom_factory_0: eeprom@0 {
92 reg = <0x0 0x200>;
93 };
94
95 eeprom_factory_8000: eeprom@8000 {
96 reg = <0x8000 0x200>;
97 };
98
99 macaddr_factory_28: macaddr@28 {
100 reg = <0x28 0x6>;
101 };
102 };
103 };
104
105 partition@50000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x50000 0xfb0000>;
109 };
110 };
111 };
112 };
113
114 &ehci {
115 status = "okay";
116 };
117
118 &ohci {
119 status = "okay";
120 };
121
122 &gpio0 {
123 enable-leds {
124 gpio-hog;
125 line-name = "enable-leds";
126 output-low;
127 gpios = <10 GPIO_ACTIVE_HIGH>;
128 };
129 };
130
131 &gpio3 {
132 status = "okay";
133 };
134
135 &state_default {
136 gpio {
137 groups = "i2c", "wled", "uartf";
138 function = "gpio";
139 };
140 };
141
142 &ethernet {
143 nvmem-cells = <&macaddr_factory_28>;
144 nvmem-cell-names = "mac-address";
145
146 mediatek,portmap = "wllll";
147 };
148
149 &wmac {
150 nvmem-cells = <&eeprom_factory_0>;
151 nvmem-cell-names = "eeprom";
152 };
153
154 &pcie {
155 status = "okay";
156 };