77a3f3baed5b48ba7394e38af9bab7727d30b758
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / 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 gpio-keys-polled {
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 gpio-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 reg = <0x00050000 0x00fb0000>;
122 label = "firmware";
123 };
124 };
125 };
126 };
127
128 &pinctrl {
129 state_default: pinctrl0 {
130 gpio {
131 ralink,group = "i2c", "jtag", "uartf";
132 ralink,function = "gpio";
133 };
134 };
135 };
136
137 &ethernet {
138 phy-handle = <&phy0>;
139 phy-mode = "rgmii";
140 mtd-mac-address = <&factory 0x28>;
141
142 mdio-bus {
143 status = "okay";
144
145 phy0: ethernet-phy@4 {
146 reg = <4>;
147 };
148 };
149 };
150
151 &wmac {
152 ralink,mtd-eeprom = <&factory 0>;
153 };
154
155 &ehci {
156 status = "okay";
157 };
158
159 &ohci {
160 status = "okay";
161 };