ramips: mt7621: convert to nvmem-layout
[openwrt/staging/hauke.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 label = "factory";
41 reg = <0x100000 0x80000>;
42 read-only;
43 };
44
45 partition@180000 {
46 label = "firmware";
47 reg = <0x180000 0x2800000>;
48
49 /* This concatenates kernel1 & kernel2 & rootfs */
50
51 compatible = "fixed-partitions";
52 #address-cells = <1>;
53 #size-cells = <1>;
54
55 partition@0 {
56 label = "kernel";
57 reg = <0x0 0x800000>;
58 };
59
60 partition@400000 {
61 label = "ubi";
62 reg = <0x800000 0x2000000>;
63 };
64 };
65
66 partition@2980000 {
67 label = "zy_firmware_1";
68 reg = <0x2980000 0x2800000>;
69 read-only;
70 };
71
72 partition@5180000 {
73 label = "zy_rootfs_data";
74 reg = <0x5180000 0x1400000>;
75 read-only;
76 };
77
78 partition@6580000 {
79 label = "zy_logs";
80 reg = <0x6580000 0xd00000>;
81 read-only;
82 };
83
84 partition@7280000 {
85 label = "myzyxel";
86 reg = <0x7280000 0x480000>;
87 read-only;
88 };
89
90 partition@7700000 {
91 label = "bootconfig";
92 reg = <0x7700000 0x80000>;
93 };
94
95 mrd: partition@7780000 {
96 label = "mrd";
97 reg = <0x7780000 0x80000>;
98 read-only;
99
100 nvmem-layout {
101 compatible = "fixed-layout";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 macaddr_mrd_1fff8: macaddr@1fff8 {
106 reg = <0x1fff8 0x6>;
107 };
108 };
109 };
110 };
111 };
112
113 &pcie {
114 status = "okay";
115 };
116
117 &pcie1 {
118 wlan_5g: wifi@0,0 {
119 reg = <0x0 0 0 0 0>;
120 compatible = "mediatek,mt76";
121
122 mediatek,mtd-eeprom = <&factory 0x0>;
123
124 /* MAC-Address set in userspace */
125 };
126 };
127
128 &gmac0 {
129 nvmem-cells = <&macaddr_mrd_1fff8>;
130 nvmem-cell-names = "mac-address";
131 };
132
133 &switch0 {
134 ports {
135 port@4 {
136 status = "okay";
137 label = "lan";
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "uart3";
145 function = "gpio";
146 };
147 };