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