ramips: add support for DuZun DM06
[oweals/openwrt.git] / target / linux / ramips / dts / DUZUN-DM06.dts
1 /dts-v1/;
2
3 /include/ "mt7628an.dtsi"
4
5 / {
6         compatible = "duzun,dm06-mt7628an", "mediatek,mt7628an-soc";
7         model = "DuZun DM06";
8
9         memory@0 {
10                 device_type = "memory";
11                 reg = <0x0 0x4000000>;
12         };
13
14         gpio-keys-polled {
15                 compatible = "gpio-keys-polled";
16                 #address-cells = <1>;
17                 #size-cells = <0>;
18                 poll-interval = <100>;
19
20                 reset {
21                         label = "reset";
22                         gpios = <&gpio1 14 1>;
23                         linux,code = <0x198>;
24                 };
25
26                 wps {
27                         label = "wps";
28                         gpios = <&gpio1 6 1>;
29                         linux,code = <0x211>;
30                 };
31         };
32
33         sound {
34                 compatible = "simple-audio-card";
35                 simple-audio-card,name = "Audio-I2S";
36                 simple-audio-card,format = "i2s";
37                 simple-audio-card,bitclock-master = <&dailink0_master>;
38                 simple-audio-card,frame-master = <&dailink0_master>;
39                 simple-audio-card,widgets =
40                         "Headphone", "Headphones";
41                 simple-audio-card,routing =
42                         "Headphones", "HP_L",
43                         "Headphones", "HP_R";
44                 simple-audio-card,mclk-fs = <256>;
45
46                 simple-audio-card,cpu {
47                         sound-dai = <&i2s>;
48                 };
49
50                 dailink0_master: simple-audio-card,codec {
51                         sound-dai = <&codec>;
52                 };
53         };
54 };
55
56 &pinctrl {
57         state_default: pinctrl0 {
58                 gpio {
59                         ralink,group = "wdt", "uart1";
60                         ralink,function = "gpio";
61                 };
62         };
63
64         i2s_pins: i2s {
65                 i2s {
66                         ralink,group = "i2s";
67                         ralink,function = "i2s";
68                 };
69         };
70
71         wm8960_mclk_pins: wm8960_mclk {
72                 wm8960_mclk {
73                         ralink,group = "refclk";
74                         ralink,function = "reclk";
75                 };
76         };
77 };
78
79 &gpio1 {
80         status = "okay";
81 };
82
83 &i2c {
84         status = "okay";
85
86         codec: wm8960@1a {
87                 #sound-dai-cells = <0>;
88                 compatible = "wlf,wm8960";
89                 reg = <0x1a>;
90
91                 wlf,shared-lrclk;
92         };
93 };
94
95 &ethernet {
96         mtd-mac-address = <&factory 0x4>;
97 };
98
99 &esw {
100         mediatek,portmap = <0x3>;
101         mediatek,portdisable = <0x3c>;
102 };
103
104 &i2s {
105         #sound-dai-cells = <0>;
106         status = "okay";
107         pinctrl-names = "default";
108         pinctrl-0 = <&i2s_pins>, <&wm8960_mclk_pins>;
109 };
110
111 &sdhci {
112         status = "okay";
113 };
114
115 &gdma {
116         status = "okay";
117 };
118
119 &spi0 {
120         status = "okay";
121
122         m25p80@0 {
123                 #address-cells = <1>;
124                 #size-cells = <1>;
125                 compatible = "jedec,spi-nor";
126                 reg = <0>;
127                 linux,modalias = "m25p80";
128                 spi-max-frequency = <60000000>;
129                 m25p,chunked-io = <32>;
130                 m25p,fast-read;
131
132                 partition@0 {
133                         label = "u-boot";
134                         reg = <0x0 0x30000>;
135                         read-only;
136                 };
137
138                 partition@30000 {
139                         label = "u-boot-env";
140                         reg = <0x30000 0x10000>;
141                         read-only;
142                 };
143
144                 factory: partition@40000 {
145                         label = "factory";
146                         reg = <0x40000 0x10000>;
147                         read-only;
148                 };
149
150                 partition@50000 {
151                         label = "firmware";
152                         reg = <0x50000 0x7b0000>;
153                 };
154         };
155 };