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