ipq806x: replace caf nss-gmac driver by upstream stmmac
[openwrt.git] / target / linux / ipq806x / patches-4.0 / 708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch
1 From cab1f4720e82f2e17eaeed9a9ad9e4f07c742977 Mon Sep 17 00:00:00 2001
2 From: Mathieu Olivari <mathieu@codeaurora.org>
3 Date: Mon, 11 May 2015 12:29:18 -0700
4 Subject: [PATCH 8/8] ARM: dts: qcom: add gmac nodes to ipq806x platforms
5
6 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
7 ---
8  arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 31 ++++++++++++
9  arch/arm/boot/dts/qcom-ipq8064-db149.dts | 43 ++++++++++++++++
10  arch/arm/boot/dts/qcom-ipq8064.dtsi      | 86 ++++++++++++++++++++++++++++++++
11  3 files changed, 160 insertions(+)
12
13 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
14 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
15 @@ -64,6 +64,16 @@
16                                         bias-disable;
17                                 };
18                         };
19 +
20 +                       rgmii2_pins: rgmii2_pins {
21 +                               mux {
22 +                                       pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
23 +                                              "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
24 +                                       function = "rgmii2";
25 +                                       drive-strength = <8>;
26 +                                       bias-disable;
27 +                               };
28 +                       };
29                 };
30  
31                 gsbi@16300000 {
32 @@ -177,5 +187,26 @@
33                                 reg = <4>;
34                         };
35                 };
36 +
37 +               gmac1: ethernet@37200000 {
38 +                       status = "ok";
39 +                       phy-mode = "rgmii";
40 +                       phy-handle = <&phy4>;
41 +                       qcom,id = <1>;
42 +
43 +                       pinctrl-0 = <&rgmii2_pins>;
44 +                       pinctrl-names = "default";
45 +               };
46 +
47 +               gmac2: ethernet@37400000 {
48 +                       status = "ok";
49 +                       phy-mode = "sgmii";
50 +                       qcom,id = <2>;
51 +
52 +                       fixed-link {
53 +                               speed = <1000>;
54 +                               full-duplex;
55 +                       };
56 +               };
57         };
58  };
59 --- a/arch/arm/boot/dts/qcom-ipq8064-db149.dts
60 +++ b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
61 @@ -72,6 +72,14 @@
62                                         bias-disable;
63                                 };
64                         };
65 +
66 +                       rgmii0_pins: rgmii0_pins {
67 +                               mux {
68 +                                       pins = "gpio2", "gpio66";
69 +                                       drive-strength = <8>;
70 +                                       bias-disable;
71 +                               };
72 +                       };
73                 };
74  
75                 gsbi2: gsbi@12480000 {
76 @@ -222,5 +230,40 @@
77                                 reg = <7>;
78                         };
79                 };
80 +
81 +               gmac0: ethernet@37000000 {
82 +                       status = "ok";
83 +                       phy-mode = "rgmii";
84 +                       qcom,id = <0>;
85 +                       phy-handle = <&phy4>;
86 +
87 +                       pinctrl-0 = <&rgmii0_pins>;
88 +                       pinctrl-names = "default";
89 +               };
90 +
91 +               gmac1: ethernet@37200000 {
92 +                       status = "ok";
93 +                       phy-mode = "sgmii";
94 +                       qcom,id = <1>;
95 +
96 +                       fixed-link {
97 +                               speed = <1000>;
98 +                               full-duplex;
99 +                       };
100 +               };
101 +
102 +               gmac2: ethernet@37400000 {
103 +                       status = "ok";
104 +                       phy-mode = "sgmii";
105 +                       qcom,id = <2>;
106 +                       phy-handle = <&phy6>;
107 +               };
108 +
109 +               gmac3: ethernet@37600000 {
110 +                       status = "ok";
111 +                       phy-mode = "sgmii";
112 +                       qcom,id = <3>;
113 +                       phy-handle = <&phy7>;
114 +               };
115         };
116  };
117 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
118 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
119 @@ -540,5 +540,91 @@
120  
121                         status = "disabled";
122                 };
123 +
124 +               nss_common: syscon@03000000 {
125 +                       compatible = "syscon";
126 +                       reg = <0x03000000 0x0000FFFF>;
127 +               };
128 +
129 +               qsgmii_csr: syscon@1bb00000 {
130 +                       compatible = "syscon";
131 +                       reg = <0x1bb00000 0x000001FF>;
132 +               };
133 +
134 +               gmac0: ethernet@37000000 {
135 +                       device_type = "network";
136 +                       compatible = "qcom,ipq806x-gmac";
137 +                       reg = <0x37000000 0x200000>;
138 +                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
139 +                       interrupt-names = "macirq";
140 +
141 +                       qcom,nss-common = <&nss_common>;
142 +                       qcom,qsgmii-csr = <&qsgmii_csr>;
143 +
144 +                       clocks = <&gcc GMAC_CORE1_CLK>;
145 +                       clock-names = "stmmaceth";
146 +
147 +                       resets = <&gcc GMAC_CORE1_RESET>;
148 +                       reset-names = "stmmaceth";
149 +
150 +                       status = "disabled";
151 +               };
152 +
153 +               gmac1: ethernet@37200000 {
154 +                       device_type = "network";
155 +                       compatible = "qcom,ipq806x-gmac";
156 +                       reg = <0x37200000 0x200000>;
157 +                       interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
158 +                       interrupt-names = "macirq";
159 +
160 +                       qcom,nss-common = <&nss_common>;
161 +                       qcom,qsgmii-csr = <&qsgmii_csr>;
162 +
163 +                       clocks = <&gcc GMAC_CORE2_CLK>;
164 +                       clock-names = "stmmaceth";
165 +
166 +                       resets = <&gcc GMAC_CORE2_RESET>;
167 +                       reset-names = "stmmaceth";
168 +
169 +                       status = "disabled";
170 +               };
171 +
172 +               gmac2: ethernet@37400000 {
173 +                       device_type = "network";
174 +                       compatible = "qcom,ipq806x-gmac";
175 +                       reg = <0x37400000 0x200000>;
176 +                       interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
177 +                       interrupt-names = "macirq";
178 +
179 +                       qcom,nss-common = <&nss_common>;
180 +                       qcom,qsgmii-csr = <&qsgmii_csr>;
181 +
182 +                       clocks = <&gcc GMAC_CORE3_CLK>;
183 +                       clock-names = "stmmaceth";
184 +
185 +                       resets = <&gcc GMAC_CORE3_RESET>;
186 +                       reset-names = "stmmaceth";
187 +
188 +                       status = "disabled";
189 +               };
190 +
191 +               gmac3: ethernet@37600000 {
192 +                       device_type = "network";
193 +                       compatible = "qcom,ipq806x-gmac";
194 +                       reg = <0x37600000 0x200000>;
195 +                       interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
196 +                       interrupt-names = "macirq";
197 +
198 +                       qcom,nss-common = <&nss_common>;
199 +                       qcom,qsgmii-csr = <&qsgmii_csr>;
200 +
201 +                       clocks = <&gcc GMAC_CORE4_CLK>;
202 +                       clock-names = "stmmaceth";
203 +
204 +                       resets = <&gcc GMAC_CORE4_RESET>;
205 +                       reset-names = "stmmaceth";
206 +
207 +                       status = "disabled";
208 +               };
209         };
210  };