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