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