ramips: Use dts alias based status led
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / CS-QR10.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "planex,cs-qr10", "ralink,mt7620a-soc";
10 model = "Planex CS-QR10";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_power: power {
20 label = "cs-qr10:red:power";
21 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
22 };
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 #address-cells = <1>;
28 #size-cells = <0>;
29 poll-interval = <20>;
30
31 s1 {
32 label = "reset";
33 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36
37 s2 {
38 label = "wps";
39 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_WPS_BUTTON>;
41 };
42 };
43 };
44
45 &gpio0 {
46 status = "okay";
47 };
48
49 &gpio1 {
50 status = "okay";
51 };
52
53 &gpio2 {
54 status = "okay";
55 };
56
57 &gpio3 {
58 status = "okay";
59 };
60
61 &i2c {
62 status = "okay";
63 };
64
65 &i2s {
66 status = "okay";
67 pinctrl-names = "default";
68 pinctrl-0 = <&pcm_i2s_pins>;
69 };
70
71 &spi0 {
72 status = "okay";
73
74 m25p80@0 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <10000000>;
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 0x7b0000>;
102 };
103 };
104 };
105
106 &pcm {
107 status = "okay";
108 };
109
110 &gdma {
111 status = "okay";
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 gpio {
117 ralink,group = "spi refclk", "rgmii1";
118 ralink,function = "gpio";
119 };
120 wdt {
121 ralink,group = "wdt";
122 ralink,function = "wdt refclk";
123 };
124 };
125 };
126
127 &ethernet {
128 pinctrl-names = "default";
129 pinctrl-0 = <&ephy_pins>;
130 mtd-mac-address = <&factory 0x4>;
131 mediatek,portmap = "llllw";
132 };
133
134 &gsw {
135 ralink,port4 = "ephy";
136 };
137
138 &sdhci {
139 status = "okay";
140 };
141
142 &ehci {
143 status = "okay";
144 };
145
146 &ohci {
147 status = "okay";
148 };
149
150 &wmac {
151 ralink,mtd-eeprom = <&factory 0>;
152 };
153
154 &pcie {
155 status = "okay";
156 };