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