ramips: DTS rework
[openwrt/openwrt.git] / target / linux / ramips / dts / GL-MT300N.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 / {
6 compatible = "GL-MT300N", "ralink,mt7620a-soc";
7 model = "GL-MT300N";
8
9 chosen {
10 bootargs = "console=ttyS0,115200";
11 };
12
13 gpio-leds {
14 compatible = "gpio-leds";
15
16 wan {
17 label = "gl-mt300n:wan";
18 gpios = <&gpio2 0 1>;
19 };
20
21 lan {
22 label = "gl-mt300n:lan";
23 gpios = <&gpio2 1 1>;
24 };
25
26 wlan {
27 label = "gl-mt300n:wlan";
28 gpios = <&gpio3 0 1>;
29 };
30
31 };
32
33 gpio-keys-polled {
34 compatible = "gpio-keys-polled";
35 #address-cells = <1>;
36 #size-cells = <0>;
37 poll-interval = <20>;
38 reset {
39 label = "reset";
40 gpios = <&gpio0 1 1>;
41 linux,code = <0x198>;
42 };
43
44 BTN_0 {
45 label = "BTN_0";
46 gpios = <&gpio2 2 1>;
47 linux,code = <0x100>;
48 };
49
50 BTN_1 {
51 label = "BTN_1";
52 gpios = <&gpio2 3 1>;
53 linux,code = <0x101>;
54 };
55 };
56 };
57
58 &gpio0 {
59 status = "okay";
60 };
61
62 &gpio1 {
63 status = "okay";
64 };
65
66 &gpio2 {
67 status = "okay";
68 };
69
70 &gpio3 {
71 status = "okay";
72 };
73
74 &spi0 {
75 status = "okay";
76
77 m25p80@0 {
78 #address-cells = <1>;
79 #size-cells = <1>;
80 compatible = "w25q128";
81 reg = <0 0>;
82 linux,modalias = "m25p80", "w25q128";
83 spi-max-frequency = <10000000>;
84
85 partition@0 {
86 label = "u-boot";
87 reg = <0x0 0x30000>;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 read-only;
94 };
95
96 factory: partition@40000 {
97 label = "factory";
98 reg = <0x40000 0x10000>;
99 read-only;
100 };
101
102 partition@50000 {
103 label = "firmware";
104 reg = <0x50000 0xf80000>;
105 };
106
107 partition@ff0000 {
108 label = "art";
109 reg = <0xff0000 0x10000>;
110 };
111 };
112 };
113
114 &ehci {
115 status = "okay";
116 };
117
118 &ohci {
119 status = "okay";
120 };
121
122 &ethernet {
123 mtd-mac-address = <&factory 0x4000>;
124 ralink,port-map = "wllll";
125 };
126
127 &wmac {
128 ralink,mtd-eeprom = <&factory 0>;
129 };
130
131 &pcie {
132 status = "okay";
133
134 pcie-bridge {
135 mt76@0,0 {
136 reg = <0x0000 0 0 0 0>;
137 device_type = "pci";
138 mediatek,mtd-eeprom = <&factory 0x8000>;
139 mediatek,2ghz = <0>;
140 };
141 };
142 };
143
144 &pinctrl {
145 state_default: pinctrl0 {
146 gpio {
147 ralink,group = "wled","ephy","i2c";
148 ralink,function = "gpio";
149 };
150 };
151 };