ipq806x: move mdio node to ipq8064 dts
[openwrt/staging/hauke.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8064-ap161.dts
1 #include "qcom-ipq8064-v1.0.dtsi"
2
3 / {
4 model = "Qualcomm IPQ8064/AP161";
5 compatible = "qcom,ipq8064-ap161", "qcom,ipq8064";
6
7 memory@0 {
8 reg = <0x42000000 0x1e000000>;
9 device_type = "memory";
10 };
11
12 reserved-memory {
13 #address-cells = <1>;
14 #size-cells = <1>;
15 ranges;
16 rsvd@41200000 {
17 reg = <0x41200000 0x300000>;
18 no-map;
19 };
20 };
21
22 aliases {
23 serial0 = &gsbi4_serial;
24 mdio-gpio0 = &mdio0;
25 };
26
27 chosen {
28 stdout-path = "serial0:115200n8";
29 };
30 };
31
32 &qcom_pinmux {
33 i2c4_pins: i2c4_pinmux {
34 pins = "gpio12", "gpio13";
35 function = "gsbi4";
36 bias-disable;
37 };
38
39 spi_pins: spi_pins {
40 mux {
41 pins = "gpio18", "gpio19", "gpio21";
42 function = "gsbi5";
43 drive-strength = <10>;
44 bias-none;
45 };
46 };
47 nand_pins: nand_pins {
48 disable {
49 pins = "gpio34", "gpio35", "gpio36",
50 "gpio37", "gpio38";
51 function = "nand";
52 drive-strength = <10>;
53 bias-disable;
54 };
55
56 pullups {
57 pins = "gpio39";
58 function = "nand";
59 drive-strength = <10>;
60 bias-pull-up;
61 };
62
63 hold {
64 pins = "gpio40", "gpio41", "gpio42",
65 "gpio43", "gpio44", "gpio45",
66 "gpio46", "gpio47";
67 function = "nand";
68 drive-strength = <10>;
69 bias-bus-hold;
70 };
71 };
72
73 mdio0_pins: mdio0_pins {
74 mux {
75 pins = "gpio0", "gpio1";
76 function = "mdio";
77 drive-strength = <8>;
78 bias-disable;
79 };
80 };
81
82 rgmii2_pins: rgmii2_pins {
83 mux {
84 pins = "gpio2", "gpio27", "gpio28",
85 "gpio29", "gpio30", "gpio31",
86 "gpio32", "gpio51", "gpio52",
87 "gpio59", "gpio60", "gpio61",
88 "gpio62" , "gpio66";
89 function = "rgmii2";
90 drive-strength = <8>;
91 bias-disable;
92 };
93 };
94 };
95
96 &gsbi4 {
97 qcom,mode = <GSBI_PROT_I2C_UART>;
98 status = "okay";
99 serial@16340000 {
100 status = "okay";
101 };
102
103 /*
104 * The i2c device on gsbi4 should not be enabled.
105 * On ipq806x designs gsbi4 i2c is meant for exclusive
106 * RPM usage. Turning this on in kernel manifests as
107 * i2c failure for the RPM.
108 */
109 };
110
111 &gsbi5 {
112 qcom,mode = <GSBI_PROT_SPI>;
113 status = "okay";
114
115 spi4: spi@1a280000 {
116 status = "okay";
117 spi-max-frequency = <50000000>;
118
119 pinctrl-0 = <&spi_pins>;
120 pinctrl-names = "default";
121
122 cs-gpios = <&qcom_pinmux 20 0>;
123
124 m25p80@0 {
125 compatible = "s25fl256s1";
126 #address-cells = <1>;
127 #size-cells = <1>;
128 spi-max-frequency = <50000000>;
129 reg = <0>;
130
131 partitions {
132 compatible = "qcom,smem";
133 };
134 };
135 };
136 };
137
138 &sata_phy {
139 status = "okay";
140 };
141
142 &sata {
143 status = "okay";
144 };
145
146 &usb3_0 {
147 status = "okay";
148 };
149
150 &usb3_1 {
151 status = "okay";
152 };
153
154 &pcie0 {
155 status = "okay";
156 };
157
158 &pcie1 {
159 status = "okay";
160 force_gen1 = <1>;
161 };
162
163 &pcie2 {
164 status = "okay";
165 };
166
167 &nand_controller {
168 status = "okay";
169
170 pinctrl-0 = <&nand_pins>;
171 pinctrl-names = "default";
172
173 nand@0 {
174 reg = <0>;
175 compatible = "qcom,nandcs";
176
177 nand-ecc-strength = <4>;
178 nand-bus-width = <8>;
179 nand-ecc-step-size = <512>;
180
181 partitions {
182 compatible = "qcom,smem";
183 };
184 };
185 };
186
187 &mdio0 {
188 status = "okay";
189
190 pinctrl-0 = <&mdio0_pins>;
191 pinctrl-names = "default";
192
193 phy0: ethernet-phy@0 {
194 reg = <0>;
195 qca,ar8327-initvals = <
196 0x00004 0x7600000 /* PAD0_MODE */
197 0x00008 0x1000000 /* PAD5_MODE */
198 0x0000c 0x20080 /* PAD6_MODE */
199 0x000e4 0x6a545 /* MAC_POWER_SEL */
200 0x000e0 0xc74164de /* SGMII_CTRL */
201 0x0007c 0x4e /* PORT0_STATUS */
202 0x00094 0x4e /* PORT6_STATUS */
203 >;
204 };
205
206 phy4: ethernet-phy@4 {
207 reg = <4>;
208 qca,phy-rgmii-en;
209 qca,txclk-delay-en;
210 qca,rxclk-delay-en;
211 };
212
213 phy3: ethernet-phy@3 {
214 device_type = "ethernet-phy";
215 reg = <3>;
216 };
217 };
218
219 &gmac0 {
220 status = "okay";
221 phy-mode = "rgmii";
222 qcom,id = <0>;
223
224 pinctrl-0 = <&rgmii2_pins>;
225 pinctrl-names = "default";
226 mdiobus = <&mdio0>;
227
228 fixed-link {
229 speed = <1000>;
230 full-duplex;
231 };
232 };
233
234 &gmac1 {
235 status = "okay";
236 phy-mode = "rgmii";
237 qcom,id = <1>;
238 mdiobus = <&mdio0>;
239
240 fixed-link {
241 speed = <1000>;
242 full-duplex;
243 };
244 };
245
246 &gmac2 {
247 status = "okay";
248 phy-mode = "sgmii";
249 qcom,id = <2>;
250 mdiobus = <&mdio0>;
251
252 fixed-link {
253 speed = <1000>;
254 full-duplex;
255 };
256 };
257
258 &adm_dma {
259 status = "okay";
260 };