ramips: express diag led handling via devicetree
[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 poll-interval = <100>;
19
20 wps {
21 label = "wps";
22 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RFKILL>;
24 };
25
26 reset {
27 label = "reset";
28 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 gpio-leds {
34 compatible = "gpio-leds";
35
36 led_power: power {
37 label = "dch-m225:green:power";
38 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
39 default-state = "on";
40 };
41
42 status {
43 label = "dch-m225:red:status";
44 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
45 default-state = "off";
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 compatible = "jedec,spi-nor";
105 reg = <0>;
106 spi-max-frequency = <80000000>;
107 m25p,fast-read;
108
109 partitions {
110 compatible = "fixed-partitions";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 partition@0 {
115 label = "u-boot";
116 reg = <0x0 0x30000>;
117 read-only;
118 };
119
120 partition@30000 {
121 label = "u-boot-env";
122 reg = <0x30000 0x4000>;
123 read-only;
124 };
125
126 factory: partition@34000 {
127 label = "factory";
128 reg = <0x34000 0x4000>;
129 read-only;
130 };
131
132 nvram: partition@38000 {
133 label = "nvram";
134 reg = <0x38000 0x8000>;
135 read-only;
136 };
137
138 partition@40000 {
139 label = "devconf";
140 reg = <0x40000 0x10000>;
141 read-only;
142 };
143
144 partition@50000 {
145 label = "upgrade_rec";
146 reg = <0x50000 0x100000>;
147 read-only;
148 };
149
150 partition@150000 {
151 label = "firmware";
152 reg = <0x150000 0x6b0000>;
153 };
154 };
155 };
156 };
157
158 &gdma {
159 status = "okay";
160 };
161
162 &pinctrl {
163 state_default: pinctrl0 {
164 gpio {
165 ralink,group = "wdt", "rgmii1";
166 ralink,function = "gpio";
167 };
168
169 gpio_i2s {
170 ralink,group = "uartf";
171 ralink,function = "gpio i2s";
172 };
173 };
174 };
175
176 &ethernet {
177 mtd-mac-address = <&factory 0x4>;
178 };
179
180 &gsw {
181 ralink,port4 = "ephy";
182 };
183
184 &wmac {
185 ralink,mtd-eeprom = <&factory 0>;
186 pinctrl-names = "default";
187 pinctrl-0 = <&pa_pins>;
188 };