ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.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 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
9 model = "D-Link DCH-M225";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 wps {
22 label = "wps";
23 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_RFKILL>;
25 };
26
27 reset {
28 label = "reset";
29 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_power: power {
38 function = LED_FUNCTION_POWER;
39 color = <LED_COLOR_ID_GREEN>;
40 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
41 default-state = "on";
42 };
43
44 status {
45 function = LED_FUNCTION_STATUS;
46 color = <LED_COLOR_ID_RED>;
47 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 sound {
52 compatible = "simple-audio-card";
53 simple-audio-card,name = "Audio-I2S";
54 simple-audio-card,format = "i2s";
55 simple-audio-card,bitclock-master = <&dailink0_master>;
56 simple-audio-card,frame-master = <&dailink0_master>;
57 simple-audio-card,widgets =
58 "Headphone", "Headphones";
59 simple-audio-card,routing =
60 "Headphones", "HP_L",
61 "Headphones", "HP_R";
62 simple-audio-card,mclk-fs = <256>;
63 simple-audio-card,hp-det-gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
64
65 simple-audio-card,cpu {
66 sound-dai = <&i2s>;
67 };
68
69 dailink0_master: simple-audio-card,codec {
70 sound-dai = <&codec>;
71 };
72 };
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 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <80000000>;
105 m25p,fast-read;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x0 0x30000>;
115 read-only;
116 };
117
118 partition@30000 {
119 label = "u-boot-env";
120 reg = <0x30000 0x4000>;
121 read-only;
122 };
123
124 factory: partition@34000 {
125 label = "factory";
126 reg = <0x34000 0x4000>;
127 read-only;
128
129 nvmem-layout {
130 compatible = "fixed-layout";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 eeprom_factory_0: eeprom@0 {
135 reg = <0x0 0x200>;
136 };
137
138 macaddr_factory_4: macaddr@4 {
139 reg = <0x4 0x6>;
140 };
141 };
142 };
143
144 nvram: partition@38000 {
145 label = "nvram";
146 reg = <0x38000 0x8000>;
147 read-only;
148 };
149
150 partition@40000 {
151 label = "devconf";
152 reg = <0x40000 0x10000>;
153 read-only;
154 };
155
156 partition@50000 {
157 label = "upgrade_rec";
158 reg = <0x50000 0x100000>;
159 read-only;
160 };
161
162 partition@150000 {
163 compatible = "seama";
164 label = "firmware";
165 reg = <0x150000 0x6b0000>;
166 };
167 };
168 };
169 };
170
171 &gdma {
172 status = "okay";
173 };
174
175 &state_default {
176 gpio {
177 groups = "wdt", "rgmii1";
178 function = "gpio";
179 };
180
181 gpio_i2s {
182 groups = "uartf";
183 function = "gpio i2s";
184 };
185 };
186
187 &ethernet {
188 nvmem-cells = <&macaddr_factory_4>;
189 nvmem-cell-names = "mac-address";
190 };
191
192 &wmac {
193 pinctrl-names = "default", "pa_gpio";
194 pinctrl-0 = <&pa_pins>;
195 pinctrl-1 = <&pa_gpio_pins>;
196 nvmem-cells = <&eeprom_factory_0>;
197 nvmem-cell-names = "eeprom";
198 };