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