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