ramips: Add support for Cudy WR1300 v3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_zbtlink_zbt-ape522ii.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-ape522ii", "ralink,mt7620a-soc";
8 model = "Zbtlink ZBT-APE522II";
9
10 chosen {
11 bootargs = "console=ttyS0,115200";
12 };
13
14 leds {
15 compatible = "gpio-leds";
16
17 sys1 {
18 label = "green:sys1";
19 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
20 };
21
22 sys2 {
23 label = "green:sys2";
24 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
25 };
26
27 sys3 {
28 label = "green:sys3";
29 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
30 };
31
32 sys4 {
33 label = "green:sys4";
34 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
35 };
36
37 wlan2g4 {
38 label = "green:wlan2g4";
39 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &gpio3 {
55 status = "okay";
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <10000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x30000>;
74 };
75
76 partition@30000 {
77 label = "u-boot-env";
78 reg = <0x30000 0x10000>;
79 read-only;
80 };
81
82 factory: partition@40000 {
83 compatible = "nvmem-cells";
84 label = "factory";
85 reg = <0x40000 0x10000>;
86 #address-cells = <1>;
87 #size-cells = <1>;
88 read-only;
89
90 eeprom_factory_0: eeprom@0 {
91 reg = <0x0 0x200>;
92 };
93
94 eeprom_factory_8000: eeprom@8000 {
95 reg = <0x8000 0x200>;
96 };
97
98 macaddr_factory_4: macaddr@4 {
99 reg = <0x4 0x6>;
100 };
101 };
102
103 partition@50000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x50000 0xf80000>;
107 };
108 };
109 };
110 };
111
112 &ethernet {
113 pinctrl-names = "default";
114 pinctrl-0 = <&ephy_pins>;
115
116 nvmem-cells = <&macaddr_factory_4>;
117 nvmem-cell-names = "mac-address";
118
119 mediatek,portmap = "llllw";
120 };
121
122 &wmac {
123 pinctrl-names = "default", "pa_gpio";
124 pinctrl-0 = <&pa_pins>;
125 pinctrl-1 = <&pa_gpio_pins>;
126 nvmem-cells = <&eeprom_factory_0>;
127 nvmem-cell-names = "eeprom";
128 };
129
130 &pcie {
131 status = "okay";
132 };
133
134 &pcie0 {
135 mt76@0,0 {
136 reg = <0x0000 0 0 0 0>;
137 nvmem-cells = <&eeprom_factory_8000>;
138 nvmem-cell-names = "eeprom";
139 ieee80211-freq-limit = <5000000 6000000>;
140 };
141 };
142
143 &state_default {
144 gpio {
145 groups = "wled", "i2c", "uartf", "wdt";
146 function = "gpio";
147 };
148 };