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