ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3662_samsung_cy-swr1100.dts
1 #include "rt3883.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 = "samsung,cy-swr1100", "ralink,rt3662-soc", "ralink,rt3883-soc";
9 model = "Samsung CY-SWR1100";
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 flash@1c000000 {
19 compatible = "cfi-flash";
20 reg = <0x1c000000 0x800000>;
21 bank-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "uboot";
30 reg = <0x0 0x30000>;
31 read-only;
32 };
33
34 partition@30000 {
35 label = "uboot-env";
36 reg = <0x30000 0x4000>;
37 read-only;
38 };
39
40 factory: partition@34000 {
41 label = "factory";
42 reg = <0x34000 0x4000>;
43 read-only;
44
45 nvmem-layout {
46 compatible = "fixed-layout";
47 #address-cells = <1>;
48 #size-cells = <1>;
49
50 eeprom_factory_0: eeprom@0 {
51 reg = <0x0 0x200>;
52 };
53
54 eeprom_factory_2000: eeprom@2000 {
55 reg = <0x2000 0x200>;
56 };
57 };
58 };
59
60 partition@38000 {
61 label = "nvram";
62 reg = <0x38000 0x8000>;
63 read-only;
64 };
65
66 partition@40000 {
67 label = "devconf";
68 reg = <0x40000 0x10000>;
69 read-only;
70 };
71
72 partition@50000 {
73 compatible = "seama";
74 label = "firmware";
75 reg = <0x50000 0x7b0000>;
76 };
77 };
78 };
79
80 rtl8367 {
81 compatible = "realtek,rtl8367";
82 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
83 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
84 realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
85 };
86
87 keys {
88 compatible = "gpio-keys";
89
90 reset {
91 label = "reset";
92 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
93 linux,code = <KEY_RESTART>;
94 };
95
96 wps {
97 label = "wps";
98 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
99 linux,code = <KEY_WPS_BUTTON>;
100 };
101 };
102
103 leds {
104 compatible = "gpio-leds";
105
106 wps {
107 function = LED_FUNCTION_WPS;
108 color = <LED_COLOR_ID_BLUE>;
109 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
110 };
111
112 usb {
113 function = LED_FUNCTION_USB;
114 color = <LED_COLOR_ID_BLUE>;
115 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
116 trigger-sources = <&ohci_port1>, <&ehci_port1>;
117 linux,default-trigger = "usbport";
118 };
119
120 led_power: power {
121 function = LED_FUNCTION_POWER;
122 color = <LED_COLOR_ID_BLUE>;
123 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
124 };
125 };
126 };
127
128 &gpio1 {
129 status = "okay";
130 };
131
132 &state_default {
133 gpio {
134 groups = "i2c", "spi";
135 function = "gpio";
136 };
137 };
138
139 &ethernet {
140 port@0 {
141 mediatek,fixed-link = <1000 1 1 1>;
142 phy-mode = "rgmii";
143 };
144 };
145
146 &pci {
147 status = "okay";
148 };
149
150 &pci1 {
151 status = "okay";
152
153 wifi@0,0 {
154 compatible = "pci1814,3091";
155 reg = <0x10000 0 0 0 0>;
156 nvmem-cells = <&eeprom_factory_2000>;
157 nvmem-cell-names = "eeprom";
158 };
159 };
160
161 &wmac {
162 ralink,2ghz = <0>;
163 nvmem-cells = <&eeprom_factory_0>;
164 nvmem-cell-names = "eeprom";
165 };
166
167 &ehci {
168 status = "okay";
169 };
170
171 &ohci {
172 status = "okay";
173 };