ramips: Add support for Cudy WR1300 v3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_alfa-network_ac1200rm.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
4 * All rights reserved.
5 */
6
7 #include "mt7620a.dtsi"
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc";
14 model = "ALFA Network AC1200RM";
15
16 aliases {
17 led-boot = &led_wps;
18 led-failsafe = &led_wps;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 wlan2g {
39 label = "green:wlan2g";
40 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
41 };
42
43 led_wps: wps {
44 label = "green:wps";
45 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
46 };
47 };
48 };
49
50 &ehci {
51 status = "okay";
52 };
53
54 &ethernet {
55 pinctrl-names = "default";
56 pinctrl-0 = <&ephy_pins>;
57
58 nvmem-cells = <&macaddr_factory_28>;
59 nvmem-cell-names = "mac-address";
60
61 mediatek,portmap = "llllw";
62 };
63
64 &gpio1 {
65 status = "okay";
66 };
67
68 &gpio2 {
69 status = "okay";
70 };
71
72 &gpio3 {
73 status = "okay";
74 };
75
76 &ohci {
77 status = "okay";
78 };
79
80 &pcie {
81 status = "okay";
82 };
83
84 &pcie0 {
85 mt76@0,0 {
86 reg = <0x0000 0 0 0 0>;
87 nvmem-cells = <&eeprom_factory_8000>;
88 nvmem-cell-names = "eeprom";
89 ieee80211-freq-limit = <5000000 6000000>;
90
91 led {
92 led-sources = <2>;
93 led-active-low;
94 };
95 };
96 };
97
98 &state_default {
99 gpio {
100 groups = "nd_sd", "spi refclk", "wled";
101 function = "gpio";
102 };
103 };
104
105 &spi0 {
106 status = "okay";
107
108 flash@0 {
109 compatible = "jedec,spi-nor";
110 reg = <0>;
111 spi-max-frequency = <10000000>;
112
113 partitions {
114 compatible = "fixed-partitions";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 partition@0 {
119 label = "u-boot";
120 reg = <0x0 0x30000>;
121 read-only;
122 };
123
124 partition@30000 {
125 label = "u-boot-env";
126 reg = <0x30000 0x1000>;
127 };
128
129 partition@31000 {
130 label = "config";
131 reg = <0x31000 0xf000>;
132 read-only;
133 };
134
135 factory: partition@40000 {
136 compatible = "nvmem-cells";
137 label = "factory";
138 reg = <0x40000 0x10000>;
139 #address-cells = <1>;
140 #size-cells = <1>;
141 read-only;
142
143 eeprom_factory_0: eeprom@0 {
144 reg = <0x0 0x200>;
145 };
146
147 eeprom_factory_8000: eeprom@8000 {
148 reg = <0x8000 0x200>;
149 };
150
151 macaddr_factory_28: macaddr@28 {
152 reg = <0x28 0x6>;
153 };
154 };
155
156 partition@50000 {
157 compatible = "denx,uimage";
158 label = "firmware";
159 reg = <0x50000 0xfb0000>;
160 };
161 };
162 };
163 };
164
165 &wmac {
166 nvmem-cells = <&eeprom_factory_0>;
167 nvmem-cell-names = "eeprom";
168 };