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