ece2db036c46c699ec73cab9c8dbab9bb1dffedb
[oweals/openwrt.git] / target / linux / ramips / dts / rt5350_tenda_3g150b.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "tenda,3g150b", "ralink,rt5350-soc";
10         model = "Tenda 3G150B";
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                 led_ap: ap {
23                         label = "3g150b:blue:ap";
24                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25                 };
26
27                 3g {
28                         label = "3g150b:blue:3g";
29                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
30                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
31                         linux,default-trigger = "usbport";
32                 };
33         };
34
35         keys {
36                 compatible = "gpio-keys-polled";
37                 poll-interval = <20>;
38
39                 reset {
40                         label = "reset";
41                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
42                         linux,code = <KEY_RESTART>;
43                 };
44         };
45
46         gpio_export {
47                 compatible = "gpio-export";
48                 #size-cells = <0>;
49
50                 usb {
51                         gpio-export,name = "usb";
52                         gpio-export,output = <1>;
53                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
54                 };
55         };
56 };
57
58 &spi0 {
59         status = "okay";
60
61         m25p80@0 {
62                 compatible = "jedec,spi-nor";
63                 reg = <0>;
64                 spi-max-frequency = <10000000>;
65
66                 partitions {
67                         compatible = "fixed-partitions";
68                         #address-cells = <1>;
69                         #size-cells = <1>;
70
71                         partition@0 {
72                                 label = "u-boot";
73                                 reg = <0x0 0x30000>;
74                                 read-only;
75                         };
76
77                         partition@30000 {
78                                 label = "u-boot-env";
79                                 reg = <0x30000 0x10000>;
80                                 read-only;
81                         };
82
83                         factory: partition@40000 {
84                                 label = "factory";
85                                 reg = <0x40000 0x10000>;
86                                 read-only;
87                         };
88
89                         partition@50000 {
90                                 compatible = "denx,uimage";
91                                 label = "firmware";
92                                 reg = <0x50000 0x3b0000>;
93                         };
94                 };
95         };
96 };
97
98 &gpio1 {
99         status = "okay";
100 };
101
102 &state_default {
103         gpio {
104                 ralink,group = "i2c", "jtag", "uartf", "led";
105                 ralink,function = "gpio";
106         };
107 };
108
109 &ethernet {
110         mtd-mac-address = <&factory 0x4>;
111 };
112
113 &esw {
114         mediatek,portmap = <0x2f>;
115 };
116
117 &wmac {
118         ralink,mtd-eeprom = <&factory 0>;
119         ralink,led-polarity = <1>;
120 };
121
122 &ehci {
123         status = "okay";
124 };
125
126 &ohci {
127         status = "okay";
128 };