ipq806x: refactor l2 freq scaling patch
[oweals/openwrt.git] / target / linux / ipq806x / files-4.19 / 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         soc {
32                 pinmux@800000 {
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 = "gpio";
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                 gsbi@16300000 {
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: gsbi@1a200000 {
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                                 flash: 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@1b400000 {
139                         status = "okay";
140                 };
141
142                 sata@29000000 {
143                         status = "okay";
144                 };
145
146                 usb3_0: usb3@110f8800 {
147                         status = "okay";
148                 };
149
150                 usb3_1: usb3@100f8800 {
151                         status = "okay";
152                 };
153
154                 pcie0: pci@1b500000 {
155                         status = "okay";
156                 };
157
158                 pcie1: pci@1b700000 {
159                         status = "okay";
160                         force_gen1 = <1>;
161                 };
162
163                 pcie2: pci@1b900000 {
164                         status = "okay";
165                 };
166
167                 nand@1ac00000 {
168                         status = "okay";
169
170                         pinctrl-0 = <&nand_pins>;
171                         pinctrl-names = "default";
172
173                         cs0 {
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: mdio {
188                         compatible = "virtual,mdio-gpio";
189                         #address-cells = <1>;
190                         #size-cells = <0>;
191                         gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
192                         pinctrl-0 = <&mdio0_pins>;
193                         pinctrl-names = "default";
194
195                         phy0: ethernet-phy@0 {
196                                 reg = <0>;
197                                 qca,ar8327-initvals = <
198                                         0x00004 0x7600000   /* PAD0_MODE */
199                                         0x00008 0x1000000   /* PAD5_MODE */
200                                         0x0000c 0x20080     /* PAD6_MODE */
201                                         0x000e4 0x6a545     /* MAC_POWER_SEL */
202                                         0x000e0 0xc74164de  /* SGMII_CTRL */
203                                         0x0007c 0x4e        /* PORT0_STATUS */
204                                         0x00094 0x4e        /* PORT6_STATUS */
205                                         >;
206                         };
207
208                         phy4: ethernet-phy@4 {
209                                 reg = <4>;
210                                 qca,phy-rgmii-en;
211                                 qca,txclk-delay-en;
212                                 qca,rxclk-delay-en;
213                         };
214
215                         phy3: ethernet-phy@3 {
216                                 device_type = "ethernet-phy";
217                                 reg = <3>;
218                         };
219                 };
220
221                 gmac0: ethernet@37000000 {
222                         status = "okay";
223                         phy-mode = "rgmii";
224                         qcom,id = <0>;
225
226                         pinctrl-0 = <&rgmii2_pins>;
227                         pinctrl-names = "default";
228                         mdiobus = <&mdio0>;
229
230                         fixed-link {
231                                 speed = <1000>;
232                                 full-duplex;
233                         };
234                 };
235
236                 gmac1: ethernet@37200000 {
237                         status = "okay";
238                         phy-mode = "rgmii";
239                         qcom,id = <1>;
240                         mdiobus = <&mdio0>;
241
242                         fixed-link {
243                                 speed = <1000>;
244                                 full-duplex;
245                         };
246                 };
247
248                 gmac2: ethernet@37400000 {
249                         status = "okay";
250                         phy-mode = "sgmii";
251                         qcom,id = <2>;
252                         mdiobus = <&mdio0>;
253
254                         fixed-link {
255                                 speed = <1000>;
256                                 full-duplex;
257                         };
258                 };
259         };
260 };
261
262 &adm_dma {
263         status = "okay";
264 };