ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / DCH-M225.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 = "dlink,dch-m225", "ralink,mt7620a-soc";
10 model = "D-Link DCH-M225";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-keys-polled {
17 compatible = "gpio-keys-polled";
18 #address-cells = <1>;
19 #size-cells = <0>;
20 poll-interval = <100>;
21
22 wps {
23 label = "wps";
24 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RFKILL>;
26 };
27
28 reset {
29 label = "reset";
30 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 gpio-leds {
36 compatible = "gpio-leds";
37
38 led_power: power {
39 label = "dch-m225:green:power";
40 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
41 };
42
43 status {
44 label = "dch-m225:red:status";
45 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 sound {
50 compatible = "simple-audio-card";
51 simple-audio-card,name = "Audio-I2S";
52 simple-audio-card,format = "i2s";
53 simple-audio-card,bitclock-master = <&dailink0_master>;
54 simple-audio-card,frame-master = <&dailink0_master>;
55 simple-audio-card,widgets =
56 "Headphone", "Headphones";
57 simple-audio-card,routing =
58 "Headphones", "HP_L",
59 "Headphones", "HP_R";
60 simple-audio-card,mclk-fs = <256>;
61 simple-audio-card,hp-det-gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
62
63 simple-audio-card,cpu {
64 sound-dai = <&i2s>;
65 };
66
67 dailink0_master: simple-audio-card,codec {
68 sound-dai = <&codec>;
69 };
70 };
71 };
72
73 &gpio0 {
74 status = "okay";
75 };
76
77 &gpio1 {
78 status = "okay";
79 };
80
81 &i2c {
82 status = "okay";
83
84 codec: wm8960@1a {
85 #sound-dai-cells = <0>;
86 compatible = "wlf,wm8960";
87 reg = <0x1a>;
88
89 wlf,shared-lrclk;
90 };
91 };
92
93 &i2s {
94 #sound-dai-cells = <0>;
95 status = "okay";
96 pinctrl-names = "default";
97 pinctrl-0 = <&mdio_refclk_pins>;
98 };
99
100 &spi0 {
101 status = "okay";
102
103 m25p80@0 {
104 #address-cells = <1>;
105 #size-cells = <1>;
106 compatible = "jedec,spi-nor";
107 reg = <0>;
108 spi-max-frequency = <80000000>;
109 m25p,fast-read;
110
111 partition@0 {
112 label = "u-boot";
113 reg = <0x0 0x30000>;
114 read-only;
115 };
116
117 partition@30000 {
118 label = "u-boot-env";
119 reg = <0x30000 0x4000>;
120 read-only;
121 };
122
123 factory: partition@34000 {
124 label = "factory";
125 reg = <0x34000 0x4000>;
126 read-only;
127 };
128
129 nvram: partition@38000 {
130 label = "nvram";
131 reg = <0x38000 0x8000>;
132 read-only;
133 };
134
135 partition@40000 {
136 label = "devconf";
137 reg = <0x40000 0x10000>;
138 read-only;
139 };
140
141 partition@50000 {
142 label = "upgrade_rec";
143 reg = <0x50000 0x100000>;
144 read-only;
145 };
146
147 partition@150000 {
148 label = "firmware";
149 reg = <0x150000 0x6b0000>;
150 };
151 };
152 };
153
154 &gdma {
155 status = "okay";
156 };
157
158 &pinctrl {
159 state_default: pinctrl0 {
160 gpio {
161 ralink,group = "wdt", "rgmii1";
162 ralink,function = "gpio";
163 };
164
165 gpio_i2s {
166 ralink,group = "uartf";
167 ralink,function = "gpio i2s";
168 };
169 };
170 };
171
172 &ethernet {
173 mtd-mac-address = <&factory 0x4>;
174 };
175
176 &gsw {
177 ralink,port4 = "ephy";
178 };
179
180 &wmac {
181 ralink,mtd-eeprom = <&factory 0>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&pa_pins>;
184 };