2e3253232ddfd1f3d38c5559cebf6279ca8b91e6
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / 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 gpio-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 gpio-keys-polled {
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 &pinctrl {
103 state_default: pinctrl0 {
104 gpio {
105 ralink,group = "i2c", "jtag", "uartf", "led";
106 ralink,function = "gpio";
107 };
108 };
109 };
110
111 &ethernet {
112 mtd-mac-address = <&factory 0x4>;
113 };
114
115 &esw {
116 mediatek,portmap = <0x2f>;
117 };
118
119 &wmac {
120 ralink,mtd-eeprom = <&factory 0>;
121 ralink,led-polarity = <1>;
122 };
123
124 &ehci {
125 status = "okay";
126 };
127
128 &ohci {
129 status = "okay";
130 };