Fresh pull from upstream
[librecmc/librecmc.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                 linux,modalias = "m25p80";
104                 spi-max-frequency = <80000000>;
105                 m25p,fast-read;
106
107                 partition@0 {
108                         label = "u-boot";
109                         reg = <0x0 0x30000>;
110                         read-only;
111                 };
112
113                 partition@30000 {
114                         label = "u-boot-env";
115                         reg = <0x30000 0x4000>;
116                         read-only;
117                 };
118
119                 factory: partition@34000 {
120                         label = "factory";
121                         reg = <0x34000 0x4000>;
122                         read-only;
123                 };
124
125                 nvram: partition@38000 {
126                         label = "nvram";
127                         reg = <0x38000 0x8000>;
128                         read-only;
129                 };
130
131                 partition@40000 {
132                         label = "devconf";
133                         reg = <0x40000 0x10000>;
134                         read-only;
135                 };
136
137                 partition@50000 {
138                         label = "upgrade_rec";
139                         reg = <0x50000 0x100000>;
140                         read-only;
141                 };
142
143                 partition@150000 {
144                         label = "firmware";
145                         reg = <0x150000 0x6b0000>;
146                 };
147         };
148 };
149
150 &gdma {
151         status = "okay";
152 };
153
154 &pinctrl {
155         state_default: pinctrl0 {
156                 gpio {
157                         ralink,group = "wdt", "rgmii1";
158                         ralink,function = "gpio";
159                 };
160
161                 pa {
162                         ralink,group = "pa";
163                         ralink,function = "pa";
164                 };
165
166                 wm8960_mclk_pins: wm8960_mclk {
167                         wm8960_mclk {
168                                 ralink,group = "mdio";
169                                 ralink,function = "refclk";
170                         };
171                 };
172         };
173 };
174
175 &ethernet {
176         mtd-mac-address = <&factory 0x4>;
177 };
178
179 &gsw {
180         ralink,port4 = "ephy";
181 };
182
183 &wmac {
184         ralink,mtd-eeprom = <&factory 0>;
185 };
186