ramips: simplify state_default/pinctrl0 in device DTS files
[openwrt/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 &state_default {
75 gpio {
76 ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag";
77 ralink,function = "gpio";
78 };
79 };
80
81 &spi0 {
82 /*
83 * This board has 2Mb spi flash soldered in and visible
84 * from manufacturer's firmware.
85 * But this SoC shares spi and nand pins,
86 * and current driver doesn't handle this sharing well
87 */
88 status = "disabled";
89
90 m25p80@1 {
91 compatible = "jedec,spi-nor";
92 reg = <1>;
93 spi-max-frequency = <10000000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "spi";
102 reg = <0x0 0x200000>;
103 read-only;
104 };
105 };
106 };
107 };
108
109 &xhci {
110 status = "disabled";
111 };