ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
83 label = "factory";
84 reg = <0x40000 0x10000>;
85 #address-cells = <1>;
86 #size-cells = <1>;
87 read-only;
88
89 eeprom_factory_0: eeprom@0 {
90 reg = <0x0 0x200>;
91 };
92
93 macaddr_factory_28: macaddr@28 {
94 reg = <0x28 0x6>;
95 };
96 };
97
98 partition@50000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x50000 0xfb0000>;
102 };
103 };
104 };
105 };
106
107 &ehci {
108 status = "okay";
109 };
110
111 &ohci {
112 status = "okay";
113 };
114
115 &gpio0 {
116 enable-leds {
117 gpio-hog;
118 line-name = "enable-leds";
119 output-low;
120 gpios = <10 GPIO_ACTIVE_HIGH>;
121 };
122 };
123
124 &gpio3 {
125 status = "okay";
126 };
127
128 &state_default {
129 gpio {
130 groups = "i2c", "wled", "uartf";
131 function = "gpio";
132 };
133 };
134
135 &ethernet {
136 nvmem-cells = <&macaddr_factory_28>;
137 nvmem-cell-names = "mac-address";
138
139 mediatek,portmap = "wllll";
140 };
141
142 &wmac {
143 nvmem-cells = <&eeprom_factory_0>;
144 nvmem-cell-names = "eeprom";
145 };
146
147 &pcie {
148 status = "okay";
149 };