68b733cade28ba924fc177fb212979aa8ca5f726
[openwrt/staging/noltari.git] / target / linux / ramips / dts / mt7620a_dlink_dch-m225.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
8 model = "D-Link DCH-M225";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 keys {
18 compatible = "gpio-keys";
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 leds {
34 compatible = "gpio-leds";
35
36 led_power: power {
37 label = "green:power";
38 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
39 default-state = "on";
40 };
41
42 status {
43 label = "red:status";
44 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 sound {
49 compatible = "simple-audio-card";
50 simple-audio-card,name = "Audio-I2S";
51 simple-audio-card,format = "i2s";
52 simple-audio-card,bitclock-master = <&dailink0_master>;
53 simple-audio-card,frame-master = <&dailink0_master>;
54 simple-audio-card,widgets =
55 "Headphone", "Headphones";
56 simple-audio-card,routing =
57 "Headphones", "HP_L",
58 "Headphones", "HP_R";
59 simple-audio-card,mclk-fs = <256>;
60 simple-audio-card,hp-det-gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
61
62 simple-audio-card,cpu {
63 sound-dai = <&i2s>;
64 };
65
66 dailink0_master: simple-audio-card,codec {
67 sound-dai = <&codec>;
68 };
69 };
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 = <&mdio_refclk_pins>;
93 };
94
95 &spi0 {
96 status = "okay";
97
98 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <80000000>;
102 m25p,fast-read;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
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 compatible = "seama";
147 label = "firmware";
148 reg = <0x150000 0x6b0000>;
149 };
150 };
151 };
152 };
153
154 &gdma {
155 status = "okay";
156 };
157
158 &state_default {
159 gpio {
160 groups = "wdt", "rgmii1";
161 function = "gpio";
162 };
163
164 gpio_i2s {
165 groups = "uartf";
166 function = "gpio i2s";
167 };
168 };
169
170 &ethernet {
171 nvmem-cells = <&macaddr_factory_4>;
172 nvmem-cell-names = "mac-address";
173 };
174
175 &wmac {
176 ralink,mtd-eeprom = <&factory 0x0>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&pa_pins>;
179 };
180
181 &factory {
182 compatible = "nvmem-cells";
183 #address-cells = <1>;
184 #size-cells = <1>;
185
186 macaddr_factory_4: macaddr@4 {
187 reg = <0x4 0x6>;
188 };
189 };