ramips: mt7621-dts: add pinctrl properties for ethernet
[openwrt/staging/mkresin.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", "rgmii2";
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
102 partition@50000 {
103 compatible = "denx,uimage";
104 label = "firmware";
105 reg = <0x50000 0x7b0000>;
106 };
107 };
108 };
109 };
110
111 &sdhci {
112 status = "okay";
113 };
114
115 &ethernet {
116 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
117 };
118
119 &gmac0 {
120 nvmem-cells = <&macaddr_factory_5>;
121 nvmem-cell-names = "mac-address";
122 };
123
124 &switch0 {
125 ports {
126 port@0 {
127 status = "okay";
128 label = "lan1";
129 };
130
131 port@1 {
132 status = "okay";
133 label = "lan2";
134 };
135
136 port@2 {
137 status = "okay";
138 label = "lan3";
139 };
140
141 port@3 {
142 status = "okay";
143 label = "lan4";
144 };
145
146 port@4 {
147 status = "okay";
148 label = "wan";
149 nvmem-cells = <&macaddr_factory_5>;
150 nvmem-cell-names = "mac-address";
151 mac-address-increment = <1>;
152 };
153 };
154 };
155
156 &pcie {
157 status = "okay";
158 };
159
160 &factory {
161 compatible = "nvmem-cells";
162 #address-cells = <1>;
163 #size-cells = <1>;
164
165 macaddr_factory_5: macaddr@5 {
166 reg = <0x5 0x6>;
167 };
168 };