ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_sercomm_na930.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "sercomm,na930", "ralink,mt7620a-soc";
9 model = "Sercomm NA930";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 chosen {
19 bootargs = "console=ttyS1,57600";
20 };
21
22 nand {
23 compatible = "mtk,mt7620-nand";
24
25 partitions {
26 compatible = "fixed-partitions";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 label = "u-boot";
32 reg = <0x0 0x20000>;
33 read-only;
34 };
35
36 partition@200000 {
37 label = "factory";
38 reg = <0x200000 0x40000>;
39 read-only;
40 };
41
42 partition@240000 {
43 label = "Config";
44 reg = <0x240000 0x400000>;
45 read-only;
46 };
47
48 partition@640000 {
49 compatible = "denx,uimage";
50 label = "firmware";
51 reg = <0x640000 0x1400000>;
52 };
53 };
54 };
55
56 keys {
57 compatible = "gpio-keys";
58
59 reset {
60 label = "reset";
61 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_RESTART>;
63 };
64
65 zwave {
66 label = "zwave";
67 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
68 linux,code = <BTN_0>;
69 };
70
71 wps {
72 label = "wps";
73 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_WPS_BUTTON>;
75 };
76 };
77
78 leds {
79 compatible = "gpio-leds";
80
81 zwave {
82 label = "blue:zwave";
83 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
84 };
85
86 status {
87 function = LED_FUNCTION_STATUS;
88 color = <LED_COLOR_ID_BLUE>;
89 gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
90 trigger-sources = <&ohci_port1>, <&ehci_port1>;
91 linux,default-trigger = "usbport";
92 };
93
94 service {
95 label = "blue:service";
96 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
97 };
98
99 led_power: power {
100 function = LED_FUNCTION_POWER;
101 color = <LED_COLOR_ID_BLUE>;
102 gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
103 };
104 };
105
106 gpio_export {
107 compatible = "gpio-export";
108 #size-cells = <0>;
109
110 telit {
111 gpio-export,name = "telit";
112 gpio-export,output = <1>;
113 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
114 };
115 };
116 };
117
118 &state_default {
119 gpio {
120 groups = "i2c", "rgmii2", "spi", "ephy";
121 function = "gpio";
122 };
123
124 uartf_gpio {
125 groups = "uartf";
126 function = "gpio uartf";
127 };
128 };
129
130 &uart {
131 status = "okay";
132 };
133
134 &gpio2 {
135 status = "okay";
136 };
137
138 &ethernet {
139 pinctrl-names = "default";
140 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
141
142 mediatek,portmap = "llllw";
143
144 port@4 {
145 status = "okay";
146 phy-handle = <&phy4>;
147 phy-mode = "rgmii";
148 };
149
150 port@5 {
151 status = "okay";
152 phy-handle = <&phy5>;
153 phy-mode = "rgmii";
154 };
155
156 mdio-bus {
157 status = "okay";
158
159 phy4: ethernet-phy@4 {
160 reg = <4>;
161 phy-mode = "rgmii";
162 };
163
164 phy5: ethernet-phy@5 {
165 reg = <5>;
166 phy-mode = "rgmii";
167 };
168 };
169 };
170
171 &gsw {
172 mediatek,port4-gmac;
173 mediatek,ephy-base = /bits/ 8 <8>;
174 };
175
176 &ehci {
177 status = "okay";
178 };
179
180 &ohci {
181 status = "okay";
182 };