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