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