d6954fe652004d0b37ff8c97c02a4bd9352c629c
[openwrt/openwrt.git] / target / linux / ramips / dts / 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 gpio-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 gpio-keys-polled {
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 &pinctrl {
97 state_default: pinctrl0 {
98 gpio {
99 ralink,group = "i2c", "jtag", "uartf";
100 ralink,function = "gpio";
101 };
102 };
103 };
104
105 &ethernet {
106 mtd-mac-address = <&factory 0x28>;
107 };
108
109 &esw {
110 mediatek,portmap = <0x10>;
111 mediatek,portdisable = <0x2f>;
112 };
113
114 &wmac {
115 ralink,mtd-eeprom = <&factory 0>;
116 };
117
118 &ehci {
119 status = "okay";
120 };
121
122 &ohci {
123 status = "okay";
124 };