ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WR1200JS.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "youhua,wr1200js", "mediatek,mt7621-soc";
10 model = "YouHua WR1200JS";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 internet {
29 label = "wr1200js:blue:internet";
30 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
31 };
32
33 led_wps: wps {
34 label = "wr1200js:blue:wps";
35 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
36 };
37
38 usb {
39 label = "wr1200js:blue:usb";
40 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio-keys-polled {
45 compatible = "gpio-keys-polled";
46 #address-cells = <1>;
47 #size-cells = <0>;
48 poll-interval = <20>;
49
50 reset {
51 label = "reset";
52 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55
56 wps {
57 label = "wps";
58 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61
62 wifi {
63 label = "wifi";
64 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RFKILL>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 #address-cells = <1>;
75 #size-cells = <1>;
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <10000000>;
79 m25p,chunked-io = <32>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x10000>;
96 read-only;
97 };
98
99 partition@50000 {
100 label = "firmware";
101 reg = <0x50000 0xfb0000>;
102 };
103 };
104 };
105
106 &pcie {
107 status = "okay";
108
109 pcie0 {
110 mt76@0,0 {
111 reg = <0x0000 0 0 0 0>;
112 device_type = "pci";
113 mediatek,mtd-eeprom = <&factory 0x0000>;
114 };
115 };
116
117 pcie1 {
118 mt76@1,0 {
119 reg = <0x0000 0 0 0 0>;
120 device_type = "pci";
121 mediatek,mtd-eeprom = <&factory 0x8000>;
122 ieee80211-freq-limit = <5000000 6000000>;
123
124 led {
125 led-sources = <2>;
126 led-active-low;
127 };
128 };
129 };
130 };
131
132 &ethernet {
133 mtd-mac-address = <&factory 0xe000>;
134 };
135
136 &pinctrl {
137 state_default: pinctrl0 {
138 gpio {
139 ralink,group = "i2c", "uart2", "uart3", "wdt";
140 ralink,function = "gpio";
141 };
142 };
143 };