411bf6a85ac6e5b7219651aee6ade3a67e8cf310
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7621_ubnt_edgerouter-x.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 keys {
12 compatible = "gpio-keys";
13
14 reset {
15 label = "reset";
16 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_RESTART>;
18 };
19 };
20 };
21
22 &gmac0 {
23 nvmem-cells = <&macaddr_factory_22 0>;
24 nvmem-cell-names = "mac-address";
25 label = "dsa";
26 };
27
28 &switch0 {
29 ports {
30 port@0 {
31 status = "okay";
32 label = "eth0";
33 };
34
35 port@1 {
36 status = "okay";
37 label = "eth1";
38 nvmem-cells = <&macaddr_factory_22 1>;
39 nvmem-cell-names = "mac-address";
40 };
41
42 port@2 {
43 status = "okay";
44 label = "eth2";
45 nvmem-cells = <&macaddr_factory_22 2>;
46 nvmem-cell-names = "mac-address";
47 };
48
49 port@3 {
50 status = "okay";
51 label = "eth3";
52 nvmem-cells = <&macaddr_factory_22 3>;
53 nvmem-cell-names = "mac-address";
54 };
55
56 port@4 {
57 status = "okay";
58 label = "eth4";
59 nvmem-cells = <&macaddr_factory_22 4>;
60 nvmem-cell-names = "mac-address";
61 };
62 };
63 };
64
65 &nand {
66 status = "okay";
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x80000>;
76 read-only;
77 };
78
79 partition@80000 {
80 label = "u-boot-env";
81 reg = <0x80000 0x60000>;
82 read-only;
83 };
84
85 factory: partition@e0000 {
86 compatible = "nvmem-cells";
87 label = "factory";
88 reg = <0xe0000 0x60000>;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 macaddr_factory_22: macaddr@22 {
96 compatible = "mac-base";
97 reg = <0x22 0x6>;
98 #nvmem-cell-cells = <1>;
99 };
100 };
101 };
102
103 partition@140000 {
104 label = "kernel1";
105 reg = <0x140000 0x300000>;
106 };
107
108 partition@440000 {
109 label = "kernel2";
110 reg = <0x440000 0x300000>;
111 };
112
113 partition@740000 {
114 label = "ubi";
115 reg = <0x740000 0xf7c0000>;
116 };
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "uart2", "uart3", "pcie", "jtag";
123 function = "gpio";
124 };
125 };
126
127 &spi0 {
128 /*
129 * This board has 2Mb spi flash soldered in and visible
130 * from manufacturer's firmware.
131 * But this SoC shares spi and nand pins,
132 * and current driver doesn't handle this sharing well
133 */
134 status = "disabled";
135
136 flash@1 {
137 compatible = "jedec,spi-nor";
138 reg = <1>;
139 spi-max-frequency = <10000000>;
140
141 partitions {
142 compatible = "fixed-partitions";
143 #address-cells = <1>;
144 #size-cells = <1>;
145
146 partition@0 {
147 label = "spi";
148 reg = <0x0 0x200000>;
149 read-only;
150 };
151 };
152 };
153 };
154
155 &xhci {
156 status = "disabled";
157 };