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