ramips: mt7621: convert to nvmem-layout
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_mediatek_ap-mt7621a-v60.dts
1 #include "mt7621.dtsi"
2
3 / {
4 compatible = "mediatek,ap-mt7621a-v60", "mediatek,mt7621-soc";
5 model = "Mediatek AP-MT7621A-V60 EVB";
6
7 sound {
8 compatible = "simple-audio-card";
9 simple-audio-card,name = "Audio-I2S";
10 simple-audio-card,format = "i2s";
11 simple-audio-card,bitclock-master = <&dailink0_master>;
12 simple-audio-card,frame-master = <&dailink0_master>;
13 simple-audio-card,widgets =
14 "Microphone", "Microphone Jack",
15 "Headphone", "Headphone Jack";
16 simple-audio-card,routing =
17 "LINPUT1", "Microphone Jack",
18 "RINPUT1", "Microphone Jack",
19 "Headphone Jack", "HP_L",
20 "Headphone Jack", "HP_R";
21 simple-audio-card,mclk-fs = <256>;
22
23 simple-audio-card,cpu {
24 sound-dai = <&i2s>;
25 };
26
27 dailink0_master: simple-audio-card,codec {
28 sound-dai = <&codec>;
29 };
30 };
31 };
32
33 &state_default {
34 gpio {
35 groups = "uart2";
36 function = "gpio";
37 };
38 };
39
40 &pinctrl {
41 i2s_pins: i2s {
42 i2s {
43 groups = "uart3";
44 function = "i2s";
45 };
46 };
47 };
48
49 &i2c {
50 status = "okay";
51
52 codec: wm8960@1a {
53 #sound-dai-cells = <0>;
54 compatible = "wlf,wm8960";
55 reg = <0x1a>;
56 wlf,shared-lrclk;
57 };
58 };
59
60 &gdma {
61 status = "okay";
62 };
63
64 &i2s {
65 #sound-dai-cells = <0>;
66 status = "okay";
67 pinctrl-names = "default";
68 pinctrl-0 = <&i2s_pins>;
69 };
70
71 &spi0 {
72 status = "okay";
73
74 flash@0 {
75 compatible = "mx25l6405d","jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <10000000>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 read-only;
94 };
95
96 factory: partition@40000 {
97 label = "factory";
98 reg = <0x40000 0x10000>;
99 read-only;
100
101 nvmem-layout {
102 compatible = "fixed-layout";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_factory_5: macaddr@5 {
107 reg = <0x5 0x6>;
108 };
109 };
110 };
111
112 partition@50000 {
113 compatible = "denx,uimage";
114 label = "firmware";
115 reg = <0x50000 0x7b0000>;
116 };
117 };
118 };
119 };
120
121 &sdhci {
122 status = "okay";
123 };
124
125 &gmac0 {
126 nvmem-cells = <&macaddr_factory_5>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &gmac1 {
131 status = "okay";
132 label = "wan";
133 phy-handle = <&ethphy4>;
134
135 nvmem-cells = <&macaddr_factory_5>;
136 nvmem-cell-names = "mac-address";
137 mac-address-increment = <1>;
138 };
139
140 &mdio {
141 ethphy4: ethernet-phy@4 {
142 reg = <4>;
143 };
144 };
145
146 &switch0 {
147 ports {
148 port@0 {
149 status = "okay";
150 label = "lan1";
151 };
152
153 port@1 {
154 status = "okay";
155 label = "lan2";
156 };
157
158 port@2 {
159 status = "okay";
160 label = "lan3";
161 };
162
163 port@3 {
164 status = "okay";
165 label = "lan4";
166 };
167 };
168 };
169
170 &pcie {
171 status = "okay";
172 };