331e9feaffe9699890893a9d771a0e6f8f2598d1
[lede.git] / target / linux / ramips / dts / 3G300M.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 / {
6         compatible = "3G300M", "ralink,rt3052-soc";
7         model = "Tenda 3G300M";
8
9         gpio-leds {
10                 compatible = "gpio-leds";
11
12                 3grouter {
13                         label = "3g300m:blue:3grouter";
14                         gpios = <&gpio0 11 1>;
15                 };
16
17                 ap {
18                         label = "3g300m:blue:ap";
19                         gpios = <&gpio0 12 1>;
20                 };
21
22                 wisprouter {
23                         label = "3g300m:blue:wisprouter";
24                         gpios = <&gpio0 9 1>;
25                 };
26
27                 wirelessrouter {
28                         label = "3g300m:blue:wirelessrouter";
29                         gpios = <&gpio0 13 1>;
30                 };
31
32                 3g {
33                         label = "3g300m:blue:3g";
34                         gpios = <&gpio0 7 1>;
35                 };
36
37                 wpsreset {
38                         label = "3g300m:blue:wpsreset";
39                         gpios = <&gpio0 14 1>;
40                 };
41         };
42
43         gpio-keys-polled {
44                 compatible = "gpio-keys-polled";
45                 #address-cells = <1>;
46                 #size-cells = <0>;
47                 poll-interval = <20>;
48
49                 reset {
50                         label = "reset";
51                         gpios = <&gpio0 0 1>;
52                         linux,code = <0x198>;
53                 };
54
55                 mode {
56                         label = "mode";
57                         gpios = <&gpio0 10 1>;
58                         linux,code = <0x100>;
59                 };
60         };
61 };
62
63 &spi0 {
64         status = "okay";
65
66         m25p80@0 {
67                 #address-cells = <1>;
68                 #size-cells = <1>;
69                 compatible = "jedec,spi-nor";
70                 reg = <0 0>;
71                 linux,modalias = "m25p80", "mx25l3205d";
72                 spi-max-frequency = <10000000>;
73
74                 partition@0 {
75                         label = "u-boot";
76                         reg = <0x0 0x30000>;
77                         read-only;
78                 };
79
80                 partition@30000 {
81                         label = "u-boot-env";
82                         reg = <0x30000 0x10000>;
83                         read-only;
84                 };
85
86                 factory: partition@40000 {
87                         label = "factory";
88                         reg = <0x40000 0x10000>;
89                         read-only;
90                 };
91
92                 partition@50000 {
93                         label = "firmware";
94                         reg = <0x50000 0x3b0000>;
95                 };
96         };
97 };
98
99 &pinctrl {
100         state_default: pinctrl0 {
101                 gpio {
102                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
103                         ralink,function = "gpio";
104                 };
105         };
106 };
107
108 &ethernet {
109         mtd-mac-address = <&factory 0x4>;
110 };
111
112 &esw {
113         mediatek,portmap = <0x2f>;
114 };
115
116 &wmac {
117         ralink,mtd-eeprom = <&factory 0>;
118 };
119
120 &otg {
121         status = "okay";
122 };