ipq806x: refresh kernel patches
[openwrt.git] / target / linux / ipq806x / patches-4.0 / 022-add-db149-dts.patch
1 From a32d6e7c8fca6371a2614924b89981bc912b6378 Mon Sep 17 00:00:00 2001
2 From: Mathieu Olivari <mathieu@codeaurora.org>
3 Date: Tue, 7 Apr 2015 19:58:58 -0700
4 Subject: [PATCH] ARM: dts: qcom: add initial DB149 device-tree
5
6 Add basic DB149 (IPQ806x based platform) device-tree. It supports UART,
7 SATA, USB2, USB3 and NOR flash.
8
9 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
10 ---
11  arch/arm/boot/dts/Makefile               |   1 +
12  arch/arm/boot/dts/qcom-ipq8064-db149.dts | 257 +++++++++++++++++++++++++++++++
13  2 files changed, 258 insertions(+)
14  create mode 100644 arch/arm/boot/dts/qcom-ipq8064-db149.dts
15
16 --- a/arch/arm/boot/dts/Makefile
17 +++ b/arch/arm/boot/dts/Makefile
18 @@ -438,6 +438,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
19         qcom-apq8084-ifc6540.dtb \
20         qcom-apq8084-mtp.dtb \
21         qcom-ipq8064-ap148.dtb \
22 +       qcom-ipq8064-db149.dtb \
23         qcom-msm8660-surf.dtb \
24         qcom-msm8960-cdp.dtb \
25         qcom-msm8974-sony-xperia-honami.dtb
26 --- /dev/null
27 +++ b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
28 @@ -0,0 +1,257 @@
29 +#include "qcom-ipq8064-v1.0.dtsi"
30 +
31 +/ {
32 +       model = "Qualcomm IPQ8064/DB149";
33 +       compatible = "qcom,ipq8064-db149", "qcom,ipq8064";
34 +
35 +       reserved-memory {
36 +               #address-cells = <1>;
37 +               #size-cells = <1>;
38 +               ranges;
39 +               rsvd@41200000 {
40 +                       reg = <0x41200000 0x300000>;
41 +                       no-map;
42 +               };
43 +       };
44 +
45 +       alias {
46 +               serial0 = &uart2;
47 +       };
48 +
49 +       chosen {
50 +               linux,stdout-path = "serial0:115200n8";
51 +       };
52 +
53 +       aliases {
54 +               mdio-gpio0 = &mdio0;
55 +       };
56 +
57 +       soc {
58 +               pinmux@800000 {
59 +                       pinctrl-0 = <&mdio0_pins &rgmii0_pinmux>;
60 +                       pinctrl-names = "default";
61 +
62 +                       i2c4_pins: i2c4_pinmux {
63 +                               pins = "gpio12", "gpio13";
64 +                               function = "gsbi4";
65 +                               bias-disable;
66 +                       };
67 +
68 +                       spi_pins: spi_pins {
69 +                               mux {
70 +                                       pins = "gpio18", "gpio19", "gpio21";
71 +                                       function = "gsbi5";
72 +                                       drive-strength = <10>;
73 +                                       bias-none;
74 +                               };
75 +                       };
76 +
77 +                       mdio0_pins: mdio0_pins {
78 +                               mux {
79 +                                       pins = "gpio0", "gpio1";
80 +                                       function = "gpio";
81 +                                       drive-strength = <8>;
82 +                                       bias-disable;
83 +                               };
84 +                       };
85 +
86 +                       rgmii0_pinmux: rgmii0_pinmux {
87 +                               mux {
88 +                                       pins = "gpio2", "gpio66";
89 +                                       drive-strength = <8>;
90 +                                       bias-disable;
91 +                               };
92 +                       };
93 +               };
94 +
95 +               gsbi2: gsbi@12480000 {
96 +                       qcom,mode = <GSBI_PROT_I2C_UART>;
97 +                       status = "ok";
98 +                       uart2: serial@12490000 {
99 +                               status = "ok";
100 +                       };
101 +               };
102 +
103 +               gsbi5: gsbi@1a200000 {
104 +                       qcom,mode = <GSBI_PROT_SPI>;
105 +                       status = "ok";
106 +
107 +                       spi4: spi@1a280000 {
108 +                               status = "ok";
109 +                               spi-max-frequency = <50000000>;
110 +
111 +                               pinctrl-0 = <&spi_pins>;
112 +                               pinctrl-names = "default";
113 +
114 +                               cs-gpios = <&qcom_pinmux 20 0>;
115 +
116 +                               flash: m25p80@0 {
117 +                                       compatible = "s25fl256s1";
118 +                                       #address-cells = <1>;
119 +                                       #size-cells = <1>;
120 +                                       spi-max-frequency = <50000000>;
121 +                                       reg = <0>;
122 +                                       m25p,fast-read;
123 +
124 +                                       partition@0 {
125 +                                               label = "lowlevel_init";
126 +                                               reg = <0x0 0x1b0000>;
127 +                                       };
128 +
129 +                                       partition@1 {
130 +                                               label = "u-boot";
131 +                                               reg = <0x1b0000 0x80000>;
132 +                                       };
133 +
134 +                                       partition@2 {
135 +                                               label = "u-boot-env";
136 +                                               reg = <0x230000 0x40000>;
137 +                                       };
138 +
139 +                                       partition@3 {
140 +                                               label = "caldata";
141 +                                               reg = <0x270000 0x40000>;
142 +                                       };
143 +
144 +                                       partition@4 {
145 +                                               label = "firmware";
146 +                                               reg = <0x2b0000 0x1d50000>;
147 +                                       };
148 +                               };
149 +                       };
150 +               };
151 +
152 +               sata-phy@1b400000 {
153 +                       status = "ok";
154 +               };
155 +
156 +               sata@29000000 {
157 +                       status = "ok";
158 +               };
159 +
160 +               phy@100f8800 {          /* USB3 port 1 HS phy */
161 +                       status = "ok";
162 +               };
163 +
164 +               phy@100f8830 {          /* USB3 port 1 SS phy */
165 +                       status = "ok";
166 +               };
167 +
168 +               phy@110f8800 {          /* USB3 port 0 HS phy */
169 +                       status = "ok";
170 +               };
171 +
172 +               phy@110f8830 {          /* USB3 port 0 SS phy */
173 +                       status = "ok";
174 +               };
175 +
176 +               usb30@0 {
177 +                       status = "ok";
178 +               };
179 +
180 +               usb30@1 {
181 +                       status = "ok";
182 +               };
183 +
184 +               mdio0: mdio {
185 +                       compatible = "virtual,mdio-gpio";
186 +                       #address-cells = <1>;
187 +                       #size-cells = <0>;
188 +                       gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
189 +
190 +                       phy0: ethernet-phy@0 {
191 +                               device_type = "ethernet-phy";
192 +                               reg = <0>;
193 +                               qca,ar8327-initvals = <
194 +                                       0x00004 0x7600000   /* PAD0_MODE */
195 +                                       0x00008 0x1000000   /* PAD5_MODE */
196 +                                       0x0000c 0x80        /* PAD6_MODE */
197 +                                       0x000e4 0xaa545     /* MAC_POWER_SEL */
198 +                                       0x000e0 0xc74164de  /* SGMII_CTRL */
199 +                                       0x0007c 0x4e        /* PORT0_STATUS */
200 +                                       0x00094 0x4e        /* PORT6_STATUS */
201 +                               >;
202 +                       };
203 +
204 +                       phy4: ethernet-phy@4 {
205 +                               device_type = "ethernet-phy";
206 +                               reg = <4>;
207 +                       };
208 +
209 +                       phy6: ethernet-phy@6 {
210 +                               device_type = "ethernet-phy";
211 +                               reg = <6>;
212 +                       };
213 +
214 +                       phy7: ethernet-phy@7 {
215 +                               device_type = "ethernet-phy";
216 +                               reg = <7>;
217 +                       };
218 +               };
219 +
220 +               nss-gmac-common {
221 +                       reg = <0x03000000 0x0000FFFF 0x1bb00000 0x0000FFFF 0x00900000 0x00004000>;
222 +                       reg-names = "nss_reg_base" , "qsgmii_reg_base", "clk_ctl_base";
223 +               };
224 +
225 +               gmac0: ethernet@37000000 {
226 +                       status = "ok";
227 +                       phy-mode = "rgmii";
228 +                       qcom,id = <0>;
229 +                       qcom,phy_mdio_addr = <4>;
230 +                       qcom,poll_required = <1>;
231 +                       qcom,rgmii_delay = <1>;
232 +                       qcom,emulation = <0>;
233 +                       qcom,forced_speed = <1000>;
234 +                       qcom,forced_duplex = <1>;
235 +                       qcom,socver = <0>;
236 +                       local-mac-address = [000000000000];
237 +                       mdiobus = <&mdio0>;
238 +               };
239 +
240 +               gmac1: ethernet@37200000 {
241 +                       status = "ok";
242 +                       phy-mode = "sgmii";
243 +                       qcom,id = <1>;
244 +                       qcom,phy_mdio_addr = <0>;
245 +                       qcom,poll_required = <0>;
246 +                       qcom,rgmii_delay = <0>;
247 +                       qcom,emulation = <0>;
248 +                       qcom,forced_speed = <1000>;
249 +                       qcom,forced_duplex = <1>;
250 +                       qcom,socver = <0>;
251 +                       local-mac-address = [000000000000];
252 +                       mdiobus = <&mdio0>;
253 +               };
254 +
255 +               gmac2: ethernet@37400000 {
256 +                       status = "ok";
257 +                       phy-mode = "sgmii";
258 +                       qcom,id = <2>;
259 +                       qcom,phy_mdio_addr = <6>;
260 +                       qcom,poll_required = <1>;
261 +                       qcom,rgmii_delay = <0>;
262 +                       qcom,emulation = <0>;
263 +                       qcom,forced_speed = <0>;
264 +                       qcom,forced_duplex = <0>;
265 +                       qcom,socver = <0>;
266 +                       local-mac-address = [000000000000];
267 +                       mdiobus = <&mdio0>;
268 +               };
269 +
270 +               gmac3: ethernet@37600000 {
271 +                       status = "ok";
272 +                       phy-mode = "sgmii";
273 +                       qcom,id = <3>;
274 +                       qcom,phy_mdio_addr = <7>;
275 +                       qcom,poll_required = <1>;
276 +                       qcom,rgmii_delay = <0>;
277 +                       qcom,emulation = <0>;
278 +                       qcom,forced_speed = <0>;
279 +                       qcom,forced_duplex = <0>;
280 +                       qcom,socver = <0>;
281 +                       local-mac-address = [000000000000];
282 +                       mdiobus = <&mdio0>;
283 +               };
284 +       };
285 +};