ramips: mt7621: update dts/defconfig for DSA
[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 aliases {
8 label-mac-device = &gmac0;
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 = <&gpio 12 GPIO_ACTIVE_LOW>;
21 linux,code = <KEY_RESTART>;
22 };
23 };
24 };
25
26 &gmac0 {
27 mtd-mac-address = <&factory 0x22>;
28 };
29
30 &switch0 {
31 ports {
32 port@0 {
33 status = "okay";
34 label = "wan";
35 mtd-mac-address = <&factory 0x22>;
36 mtd-mac-address-increment = <1>;
37 };
38
39 port@1 {
40 status = "okay";
41 label = "lan1";
42 };
43
44 port@2 {
45 status = "okay";
46 label = "lan2";
47 };
48
49 port@3 {
50 status = "okay";
51 label = "lan3";
52 };
53
54 port@4 {
55 status = "okay";
56 label = "lan4";
57 };
58 };
59 };
60
61 &nand {
62 status = "okay";
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x80000>;
72 read-only;
73 };
74
75 partition@80000 {
76 label = "u-boot-env";
77 reg = <0x80000 0x60000>;
78 read-only;
79 };
80
81 factory: partition@e0000 {
82 label = "factory";
83 reg = <0xe0000 0x60000>;
84 };
85
86 partition@140000 {
87 label = "kernel1";
88 reg = <0x140000 0x300000>;
89 };
90
91 partition@440000 {
92 label = "kernel2";
93 reg = <0x440000 0x300000>;
94 };
95
96 partition@740000 {
97 label = "ubi";
98 reg = <0x740000 0xf7c0000>;
99 };
100 };
101 };
102
103 &state_default {
104 gpio {
105 groups = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag";
106 function = "gpio";
107 };
108 };
109
110 &spi0 {
111 /*
112 * This board has 2Mb spi flash soldered in and visible
113 * from manufacturer's firmware.
114 * But this SoC shares spi and nand pins,
115 * and current driver doesn't handle this sharing well
116 */
117 status = "disabled";
118
119 m25p80@1 {
120 compatible = "jedec,spi-nor";
121 reg = <1>;
122 spi-max-frequency = <10000000>;
123
124 partitions {
125 compatible = "fixed-partitions";
126 #address-cells = <1>;
127 #size-cells = <1>;
128
129 partition@0 {
130 label = "spi";
131 reg = <0x0 0x200000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &xhci {
139 status = "disabled";
140 };