ramips: add support for Netgear R6350
[oweals/openwrt.git] / target / linux / ramips / dts / R6350.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "netgear,r6350", "mediatek,mt7621-soc";
10         model = "Netgear R6350";
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 0x8000000>;
22         };
23
24         chosen {
25                 bootargs = "console=ttyS0,57600";
26         };
27
28         gpio-leds {
29                 compatible = "gpio-leds";
30
31                 led_power: power {
32                         label = "r6350:green:power";
33                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
34                 };
35
36                 usb {
37                         label = "r6350:green:usb";
38                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
39                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
40                         linux,default-trigger = "usbport";
41                 };
42
43                 internet {
44                         label = "r6350:green:wan";
45                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wifi {
49                         label = "r6350:green:wifi";
50                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
51                 };
52         };
53
54         gpio-keys-polled {
55                 compatible = "gpio-keys-polled";
56                 poll-interval = <20>;
57
58                 wps {
59                         label = "wps";
60                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
61                         linux,code = <KEY_WPS_BUTTON>;
62                 };
63
64                 reset {
65                         label = "reset";
66                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
67                         linux,code = <KEY_RESTART>;
68                 };
69         };
70
71         gpio_export {
72                 compatible = "gpio-export";
73                 #size-cells = <0>;
74
75                 usbpower {
76                         gpio-export,name = "usbpower";
77                         gpio-export,output = <1>;
78                         gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
79                 };
80         };
81 };
82
83 &nand {
84         status = "okay";
85
86         partitions {
87                 compatible = "fixed-partitions";
88                 #address-cells = <1>;
89                 #size-cells = <1>;
90
91                 partition@0 {
92                         label = "u-boot";
93                         reg = <0x0 0x100000>;
94                         read-only;
95                 };
96
97                 partition@100000 {
98                         label = "SC PART_MAP";
99                         reg = <0x100000 0x100000>;
100                         read-only;
101                 };
102
103                 partition@200000 {
104                         label = "kernel";
105                         reg = <0x200000 0x400000>;
106                 };
107
108                 partition@600000 {
109                         label = "ubi";
110                         reg = <0x600000 0x2800000>;
111                 };
112
113                 partition@2e00000 {
114                         label = "reserved0";
115                         reg = <0x2e00000 0x1800000>;
116                         read-only;
117                 };
118
119                 factory: partition@4600000 {
120                         label = "factory";
121                         reg = <0x4600000 0x200000>;
122                         read-only;
123                 };
124
125                 partition@4800000 {
126                         label = "reserved1";
127                         reg = <0x4800000 0x3800000>;
128                         read-only;
129                 };
130         };
131 };
132
133 &pcie {
134         status = "okay";
135 };
136
137 &pcie1 {
138         wifi@0,0 {
139                 reg = <0x0 0 0 0 0>;
140                 mediatek,mtd-eeprom = <&factory 0x0>;
141                 ieee80211-freq-limit = <2400000 2500000>;
142         };
143 };
144
145 &ethernet {
146         mtd-mac-address = <&factory 0x4>;
147 };
148
149 &pinctrl {
150         state_default: pinctrl0 {
151                 gpio {
152                         ralink,group = "uart3", "uart2", "jtag", "wdt";
153                         ralink,function = "gpio";
154                 };
155         };
156 };