ramips: convert MT7603 EEPROM to NVMEM format
[openwrt/staging/dangole.git] / target / linux / ramips / dts / mt7621_hiwifi_hc5962.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "hiwifi,hc5962", "mediatek,mt7621-soc";
8 model = "HiWiFi HC5962";
9
10 aliases {
11 led-boot = &led_system;
12 led-failsafe = &led_system;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_status: status {
25 label = "white:status";
26 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
27 };
28
29 led_system: system {
30 label = "red:system";
31 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
32 panic-indicator;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45
46 ubi-concat {
47 compatible = "mtd-concat";
48 devices = <&ubiconcat0 &ubiconcat1>;
49
50 partitions {
51 compatible = "fixed-partitions";
52 #address-cells = <1>;
53 #size-cells = <1>;
54
55 partition@0 {
56 label = "ubi";
57 reg = <0x0 0x79c0000>;
58 };
59 };
60 };
61 };
62
63 &nand {
64 status = "okay";
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 0x80000>;
74 read-only;
75 };
76
77 partition@80000 {
78 label = "debug";
79 reg = <0x80000 0x80000>;
80 read-only;
81 };
82
83 factory: partition@100000 {
84 compatible = "nvmem-cells";
85 label = "factory";
86 reg = <0x100000 0x40000>;
87 #address-cells = <1>;
88 #size-cells = <1>;
89 read-only;
90
91 eeprom_factory_0: eeprom@0 {
92 reg = <0x0 0x400>;
93 };
94 };
95
96 partition@140000 {
97 label = "kernel";
98 reg = <0x140000 0x400000>;
99 };
100
101 ubiconcat0: partition@540000 {
102 label = "ubiconcat0";
103 reg = <0x540000 0x1c80000>;
104 };
105
106 partition@21c0000 {
107 label = "bdinfo";
108 reg = <0x21c0000 0x80000>;
109 read-only;
110 };
111
112 ubiconcat1: partition@2240000 {
113 label = "ubiconcat1";
114 reg = <0x2240000 0x5d40000>;
115 };
116 };
117 };
118
119 &pcie {
120 status = "okay";
121 };
122
123 &pcie0 {
124 mt76@0,0 {
125 reg = <0x0000 0 0 0 0>;
126 nvmem-cells = <&eeprom_factory_0>;
127 nvmem-cell-names = "eeprom";
128 ieee80211-freq-limit = <2400000 2500000>;
129 };
130 };
131
132 &pcie1 {
133 mt76@0,0 {
134 reg = <0x0000 0 0 0 0>;
135 mediatek,mtd-eeprom = <&factory 0x8000>;
136 ieee80211-freq-limit = <5000000 6000000>;
137 };
138 };
139
140 &gmac1 {
141 status = "okay";
142 label = "wan";
143 phy-handle = <&ethphy4>;
144 };
145
146 &mdio {
147 ethphy4: ethernet-phy@4 {
148 reg = <4>;
149 };
150 };
151
152 &switch0 {
153 ports {
154 port@1 {
155 status = "okay";
156 label = "lan1";
157 };
158
159 port@2 {
160 status = "okay";
161 label = "lan2";
162 };
163
164 port@3 {
165 status = "okay";
166 label = "lan3";
167 };
168 };
169 };
170
171 &state_default {
172 gpio {
173 groups = "uart3", "jtag";
174 function = "gpio";
175 };
176 };