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