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