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