7f71e3fa3f8b9abacd9a13ae2b265e793b73946d
[oweals/openwrt.git] / target / linux / ramips / dts / rt5350_hootoo_ht-tm02.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 = "hootoo,ht-tm02", "ralink,rt5350-soc";
10         model = "HooToo HT-TM02";
11
12         aliases {
13                 led-boot = &led_wlan;
14                 led-failsafe = &led_wlan;
15                 led-running = &led_wlan;
16                 led-upgrade = &led_wlan;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_wlan: wlan {
23                         label = "ht-tm02:blue:wlan";
24                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25                 };
26
27                 lan {
28                         label = "ht-tm02:green:lan";
29                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
30                 };
31         };
32
33         keys {
34                 compatible = "gpio-keys-polled";
35                 poll-interval = <20>;
36
37                 reset {
38                         label = "reset";
39                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_RESTART>;
41                 };
42
43                 modeswitch {
44                         label = "modeswitch";
45                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
46                         linux,code = <BTN_0>;
47                         linux,input-type = <EV_SW>;
48                 };
49         };
50 };
51
52 &gpio0 {
53         status = "okay";
54 };
55
56 &spi0 {
57         status = "okay";
58
59         m25p80@0 {
60                 compatible = "jedec,spi-nor";
61                 reg = <0>;
62                 spi-max-frequency = <10000000>;
63
64                 partitions {
65                         compatible = "fixed-partitions";
66                         #address-cells = <1>;
67                         #size-cells = <1>;
68
69                         partition@0 {
70                                 label = "u-boot";
71                                 reg = <0x0 0x30000>;
72                                 read-only;
73                         };
74
75                         partition@30000 {
76                                 label = "u-boot-env";
77                                 reg = <0x30000 0x10000>;
78                                 read-only;
79                         };
80
81                         factory: partition@40000 {
82                                 label = "factory";
83                                 reg = <0x40000 0x10000>;
84                                 read-only;
85                         };
86
87                         partition@50000 {
88                                 compatible = "denx,uimage";
89                                 label = "firmware";
90                                 reg = <0x50000 0x7b0000>;
91                         };
92                 };
93         };
94 };
95
96 &state_default {
97         gpio {
98                 ralink,group = "i2c", "jtag", "uartf";
99                 ralink,function = "gpio";
100         };
101 };
102
103 &ethernet {
104         mtd-mac-address = <&factory 0x28>;
105 };
106
107 &esw {
108         mediatek,portmap = <0x10>;
109         mediatek,portdisable = <0x2f>;
110 };
111
112 &wmac {
113         ralink,mtd-eeprom = <&factory 0>;
114 };
115
116 &ehci {
117         status = "okay";
118 };
119
120 &ohci {
121         status = "okay";
122 };