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