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