ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_ubiquiti_edgerouterx.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 = &ethernet;
9         };
10
11         chosen {
12                 bootargs = "console=ttyS0,57600";
13         };
14
15         keys {
16                 compatible = "gpio-keys";
17
18                 reset {
19                         label = "reset";
20                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
21                         linux,code = <KEY_RESTART>;
22                 };
23         };
24 };
25
26 &ethernet {
27         mtd-mac-address = <&factory 0x22>;
28 };
29
30 &nand {
31         status = "okay";
32
33         partitions {
34                 compatible = "fixed-partitions";
35                 #address-cells = <1>;
36                 #size-cells = <1>;
37
38                 partition@0 {
39                         label = "u-boot";
40                         reg = <0x0 0x80000>;
41                         read-only;
42                 };
43
44                 partition@80000 {
45                         label = "u-boot-env";
46                         reg = <0x80000 0x60000>;
47                         read-only;
48                 };
49
50                 factory: partition@e0000 {
51                         label = "factory";
52                         reg = <0xe0000 0x60000>;
53                 };
54
55                 partition@140000 {
56                         label = "kernel1";
57                         reg = <0x140000 0x300000>;
58                 };
59
60                 partition@440000 {
61                         label = "kernel2";
62                         reg = <0x440000 0x300000>;
63                 };
64
65                 partition@740000 {
66                         label = "ubi";
67                         reg = <0x740000 0xf7c0000>;
68                 };
69         };
70 };
71
72 &state_default {
73         gpio {
74                 ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag";
75                 ralink,function = "gpio";
76         };
77 };
78
79 &spi0 {
80         /*
81          * This board has 2Mb spi flash soldered in and visible
82          * from manufacturer's firmware.
83          * But this SoC shares spi and nand pins,
84          * and current driver doesn't handle this sharing well
85          */
86         status = "disabled";
87
88         m25p80@1 {
89                 compatible = "jedec,spi-nor";
90                 reg = <1>;
91                 spi-max-frequency = <10000000>;
92
93                 partitions {
94                         compatible = "fixed-partitions";
95                         #address-cells = <1>;
96                         #size-cells = <1>;
97
98                         partition@0 {
99                                 label = "spi";
100                                 reg = <0x0 0x200000>;
101                                 read-only;
102                         };
103                 };
104         };
105 };
106
107 &xhci {
108         status = "disabled";
109 };