ramips/mt7621: Name DTS files based on scheme
[oweals/openwrt.git] / target / linux / ramips / dts / R6120.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "netgear,r6120", "mediatek,mt7628an-soc";
10         model = "Netgear R6120";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         memory@0 {
20                 device_type = "memory";
21                 reg = <0x0 0x4000000>;
22         };
23
24         keys {
25                 compatible = "gpio-keys-polled";
26                 poll-interval = <20>;
27
28                 reset {
29                         label = "reset";
30                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
31                         linux,code = <KEY_RESTART>;
32                 };
33         };
34
35         leds {
36                 compatible = "gpio-leds";
37
38                 lan {
39                         label = "r6120:green:lan";
40                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
41                 };
42
43                 led_power: power {
44                         label = "r6120:green:power";
45                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wlan {
49                         label = "r6120:green:wlan2g";
50                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wlan_orange {
54                         label = "r6120:orange:wlan2g";
55                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
56                 };
57
58                 wan {
59                         label = "r6120:green:wan";
60                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
61                 };
62
63                 wan_orange {
64                         label = "r6120:orange:wan";
65                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
66                 };
67         };
68
69         usb-regulator {
70                 compatible = "regulator-fixed";
71
72                 regulator-name = "USB-power";
73                 gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
74                 regulator-min-microvolt = <5000000>;
75                 regulator-max-microvolt = <5000000>;
76                 enable-active-high;
77
78                 regulator-always-on;
79         };
80 };
81
82 &pinctrl {
83         state_default: pinctrl0 {
84                 gpio {
85                         ralink,group = "p0led_an", "p1led_an", "p2led_an",
86                                        "p3led_an", "p4led_an", "wdt",
87                                        "wled_an", "uart1";
88                         ralink,function = "gpio";
89                 };
90         };
91 };
92
93 &spi0 {
94         status = "okay";
95
96         flash@0 {
97                 compatible = "jedec,spi-nor";
98                 reg = <0>;
99                 spi-max-frequency = <10000000>;
100
101                 partitions {
102                         compatible = "fixed-partitions";
103                         #address-cells = <1>;
104                         #size-cells = <1>;
105
106                         partition@0 {
107                                 label = "u-boot";
108                                 reg = <0x0 0x40000>;
109                                 read-only;
110                         };
111
112                         factory: partition@40000 {
113                                 label = "factory";
114                                 reg = <0x40000 0x20000>;
115                                 read-only;
116                         };
117
118                         partition@60000 {
119                                 label = "nvram";
120                                 reg = <0x60000 0x30000>;
121                                 read-only;
122                         };
123
124                         partition@90000 {
125                                 compatible = "denx,uimage";
126                                 label = "firmware";
127                                 reg = <0x90000 0xf60000>;
128                         };
129
130                         partition@ff0000 {
131                                 label = "reserved";
132                                 reg = <0xff0000 0x10000>;
133                                 read-only;
134                         };
135                 };
136         };
137 };
138
139 &wmac {
140         status = "okay";
141         mtd-mac-address = <&factory 0x4>;
142         mediatek,mtd-eeprom = <&factory 0x0>;
143 };
144
145 &ethernet {
146         mtd-mac-address = <&factory 0x4>;
147 };
148
149 &pcie {
150         status = "okay";
151 };
152
153 &pcie0 {
154         wifi@0,0 {
155                 reg = <0x0000 0 0 0 0>;
156                 mediatek,mtd-eeprom = <&factory 0x8000>;
157                 ieee80211-freq-limit = <5000000 6000000>;
158                 mtd-mac-address = <&factory 0x4>;
159                 mtd-mac-address-increment = <(2)>;
160         };
161 };