7ccd0781444681d2859b8a4aa623919fb9f8c34b
[oweals/openwrt.git] / target / linux / ramips / dts / rt3883_omnima_hpm.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "omnima,hpm", "ralink,rt3883-soc";
10         model = "Omnima HPM";
11
12         aliases {
13                 led-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         keys {
24                 compatible = "gpio-keys-polled";
25                 poll-interval = <100>;
26
27                 reset {
28                         label = "reset";
29                         gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
30                         linux,code = <KEY_RESTART>;
31                 };
32         };
33
34         leds {
35                 compatible = "gpio-leds";
36
37                 power {
38                         label = "hpm:orange:power";
39                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
40                         default-state = "on";
41                 };
42
43                 led_status: status {
44                         label = "hpm:green:status";
45                         gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
46                         default-state = "on";
47                 };
48
49                 eth {
50                         label = "hpm:green:eth";
51                         gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
52                 };
53
54                 eth2 {
55                         label = "hpm:red:eth";
56                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
57                 };
58
59                 wifi {
60                         label = "hpm:green:wifi";
61                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
62                 };
63
64                 wifi2 {
65                         label = "hpm:red:wifi";
66                         gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
67                 };
68         };
69
70         gpio_export {
71                 compatible = "gpio-export";
72                 #size-cells = <0>;
73                 /* gpio 12 and 13 handle the OC input */
74
75                 usb0 {
76                         gpio-export,name = "usb0";
77                         gpio-export,output = <1>;
78                         gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
79                 };
80
81                 usb1 {
82                         gpio-export,name = "usb1";
83                         gpio-export,output = <1>;
84                         gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
85                 };
86         };
87 };
88
89 &spi0 {
90         status = "okay";
91
92         m25p80@0 {
93                 compatible = "jedec,spi-nor";
94                 spi-max-frequency = <25000000>;
95                 reg = <0>;
96
97                 partitions {
98                         compatible = "fixed-partitions";
99                         #address-cells = <1>;
100                         #size-cells = <1>;
101
102                         partition@0 {
103                                 reg = <0x0 0x0030000>;
104                                 label = "u-boot";
105                                 read-only;
106                         };
107
108                         partition@30000 {
109                                 reg = <0x00030000 0x00010000>;
110                                 label = "config";
111                                 read-only;
112                         };
113
114                         factory: partition@40000 {
115                                 reg = <0x00040000 0x00010000>;
116                                 label = "factory";
117                                 read-only;
118                         };
119
120                         partition@50000 {
121                                 compatible = "denx,uimage";
122                                 reg = <0x00050000 0x00fb0000>;
123                                 label = "firmware";
124                         };
125                 };
126         };
127 };
128
129 &pinctrl {
130         state_default: pinctrl0 {
131                 gpio {
132                         ralink,group = "i2c", "jtag", "uartf";
133                         ralink,function = "gpio";
134                 };
135         };
136 };
137
138 &ethernet {
139         phy-handle = <&phy0>;
140         phy-mode = "rgmii";
141         mtd-mac-address = <&factory 0x28>;
142
143         mdio-bus {
144                 status = "okay";
145
146                 phy0: ethernet-phy@4 {
147                         reg = <4>;
148                 };
149         };
150 };
151
152 &wmac {
153         ralink,mtd-eeprom = <&factory 0>;
154 };
155
156 &ehci {
157         status = "okay";
158 };
159
160 &ohci {
161         status = "okay";
162 };