ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_zyxel_nwa-ax.dtsi
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 label-mac-device = &gmac0;
9 };
10 };
11
12 &nand {
13 status = "okay";
14
15 mediatek,nmbm;
16 mediatek,bmt-max-ratio = <15>;
17 mediatek,bmt-max-reserved-blocks = <64>;
18 mediatek,bmt-remap-range =
19 <0x0 0x980000>,
20 <0x2980000 0x7800000>;
21
22 partitions {
23 compatible = "fixed-partitions";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 partition@0 {
28 label = "u-boot";
29 reg = <0x0 0x80000>;
30 read-only;
31 };
32
33 partition@80000 {
34 label = "u-boot-env";
35 reg = <0x80000 0x80000>;
36 read-only;
37 };
38
39 factory: partition@100000 {
40 compatible = "nvmem-cells";
41 label = "factory";
42 reg = <0x100000 0x80000>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 read-only;
46
47 eeprom_factory_0: eeprom@0 {
48 reg = <0x0 0xe00>;
49 };
50 };
51
52 partition@180000 {
53 label = "firmware";
54 reg = <0x180000 0x2800000>;
55
56 /* This concatenates kernel1 & kernel2 & rootfs */
57
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "kernel";
64 reg = <0x0 0x800000>;
65 };
66
67 partition@400000 {
68 label = "ubi";
69 reg = <0x800000 0x2000000>;
70 };
71 };
72
73 partition@2980000 {
74 label = "zy_firmware_1";
75 reg = <0x2980000 0x2800000>;
76 read-only;
77 };
78
79 partition@5180000 {
80 label = "zy_rootfs_data";
81 reg = <0x5180000 0x1400000>;
82 read-only;
83 };
84
85 partition@6580000 {
86 label = "zy_logs";
87 reg = <0x6580000 0xd00000>;
88 read-only;
89 };
90
91 partition@7280000 {
92 label = "myzyxel";
93 reg = <0x7280000 0x480000>;
94 read-only;
95 };
96
97 partition@7700000 {
98 label = "bootconfig";
99 reg = <0x7700000 0x80000>;
100 };
101
102 mrd: partition@7780000 {
103 compatible = "nvmem-cells";
104 label = "mrd";
105 reg = <0x7780000 0x80000>;
106 #address-cells = <1>;
107 #size-cells = <1>;
108 read-only;
109
110 macaddr_mrd_1fff8: macaddr@1fff8 {
111 reg = <0x1fff8 0x6>;
112 };
113 };
114 };
115 };
116
117 &pcie {
118 status = "okay";
119 };
120
121 &pcie1 {
122 wlan_5g: wifi@0,0 {
123 reg = <0x0 0 0 0 0>;
124 compatible = "mediatek,mt76";
125
126 nvmem-cells = <&eeprom_factory_0>;
127 nvmem-cell-names = "eeprom";
128
129 /* MAC-Address set in userspace */
130 };
131 };
132
133 &gmac0 {
134 nvmem-cells = <&macaddr_mrd_1fff8>;
135 nvmem-cell-names = "mac-address";
136 };
137
138 &switch0 {
139 ports {
140 port@4 {
141 status = "okay";
142 label = "lan";
143 };
144 };
145 };
146
147 &state_default {
148 gpio {
149 groups = "uart3";
150 function = "gpio";
151 };
152 };