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