Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / arch / arm / boot / dts / imx53-usbarmory.dts
1 /*
2  * USB armory MkI device tree file
3  * https://inversepath.com/usbarmory
4  *
5  * Copyright (C) 2015, Inverse Path
6  * Andrej Rosano <andrej@inversepath.com>
7  *
8  * This file is dual-licensed: you can use it either under the terms
9  * of the GPL or the X11 license, at your option. Note that this dual
10  * licensing only applies to this file, and not this project as a
11  * whole.
12  *
13  *  a) This file is free software; you can redistribute it and/or
14  *     modify it under the terms of the GNU General Public License as
15  *     published by the Free Software Foundation; either version 2 of the
16  *     License, or (at your option) any later version.
17  *
18  *     This file is distributed in the hope that it will be useful,
19  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
20  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  *     GNU General Public License for more details.
22  *
23  * Or, alternatively,
24  *
25  *  b) Permission is hereby granted, free of charge, to any person
26  *     obtaining a copy of this software and associated documentation
27  *     files (the "Software"), to deal in the Software without
28  *     restriction, including without limitation the rights to use,
29  *     copy, modify, merge, publish, distribute, sublicense, and/or
30  *     sell copies of the Software, and to permit persons to whom the
31  *     Software is furnished to do so, subject to the following
32  *     conditions:
33  *
34  *     The above copyright notice and this permission notice shall be
35  *     included in all copies or substantial portions of the Software.
36  *
37  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44  *     OTHER DEALINGS IN THE SOFTWARE.
45  */
46
47 /dts-v1/;
48 #include "imx53.dtsi"
49
50 / {
51         model = "Inverse Path USB armory";
52         compatible = "inversepath,imx53-usbarmory", "fsl,imx53";
53 };
54
55 / {
56         chosen {
57                 stdout-path = &uart1;
58         };
59
60         memory {
61                 reg = <0x70000000 0x20000000>;
62         };
63
64         leds {
65                 compatible = "gpio-leds";
66                 pinctrl-names = "default";
67                 pinctrl-0 = <&pinctrl_led>;
68
69                 user {
70                         label = "LED";
71                         gpios = <&gpio4 27 GPIO_ACTIVE_LOW>;
72                         linux,default-trigger = "heartbeat";
73                 };
74         };
75 };
76
77 /*
78  * Not every i.MX53 P/N supports clock > 800MHz.
79  * As USB armory does not mount a specific P/N set a safe clock upper limit.
80  */
81 &cpu0 {
82         operating-points = <
83                 /* kHz */
84                 166666  850000
85                 400000  900000
86                 800000 1050000
87         >;
88 };
89
90 &esdhc1 {
91         pinctrl-names = "default";
92         pinctrl-0 = <&pinctrl_esdhc1>;
93         status = "okay";
94 };
95
96 &iomuxc {
97         pinctrl_esdhc1: esdhc1grp {
98                 fsl,pins = <
99                         MX53_PAD_SD1_DATA0__ESDHC1_DAT0         0x1d5
100                         MX53_PAD_SD1_DATA1__ESDHC1_DAT1         0x1d5
101                         MX53_PAD_SD1_DATA2__ESDHC1_DAT2         0x1d5
102                         MX53_PAD_SD1_DATA3__ESDHC1_DAT3         0x1d5
103                         MX53_PAD_SD1_CMD__ESDHC1_CMD            0x1d5
104                         MX53_PAD_SD1_CLK__ESDHC1_CLK            0x1d5
105                 >;
106         };
107
108         pinctrl_i2c1_pmic: i2c1grp {
109                 fsl,pins = <
110                         MX53_PAD_EIM_D21__I2C1_SCL      0x80
111                         MX53_PAD_EIM_D28__I2C1_SDA      0x80
112                 >;
113         };
114
115         pinctrl_led: ledgrp {
116                 fsl,pins = <
117                         MX53_PAD_DISP0_DAT6__GPIO4_27 0x1e4
118                 >;
119         };
120
121         /*
122          * UART mode pin header configration
123          * 3 - GPIO5[26], pull-down 100K
124          * 4 - GPIO5[27], pull-down 100K
125          * 5 - TX, pull-up 100K
126          * 6 - RX, pull-up 100K
127          * 7 - GPIO5[30], pull-down 100K
128          */
129         pinctrl_uart1: uart1grp {
130                 fsl,pins = <
131                         MX53_PAD_CSI0_DAT8__GPIO5_26            0xc0
132                         MX53_PAD_CSI0_DAT9__GPIO5_27            0xc0
133                         MX53_PAD_CSI0_DAT10__UART1_TXD_MUX      0x1e4
134                         MX53_PAD_CSI0_DAT11__UART1_RXD_MUX      0x1e4
135                         MX53_PAD_CSI0_DAT12__GPIO5_30           0xc0
136                 >;
137         };
138 };
139
140 &i2c1 {
141         pinctrl-0 = <&pinctrl_i2c1_pmic>;
142         status = "okay";
143
144         ltc3589: pmic@34 {
145                 compatible = "lltc,ltc3589-2";
146                 reg = <0x34>;
147
148                 regulators {
149                         sw1_reg: sw1 {
150                                 regulator-min-microvolt = <591930>;
151                                 regulator-max-microvolt = <1224671>;
152                                 lltc,fb-voltage-divider = <100000 158000>;
153                                 regulator-ramp-delay = <7000>;
154                                 regulator-boot-on;
155                                 regulator-always-on;
156                         };
157
158                         sw2_reg: sw2 {
159                                 regulator-min-microvolt = <704123>;
160                                 regulator-max-microvolt = <1456803>;
161                                 lltc,fb-voltage-divider = <180000 191000>;
162                                 regulator-ramp-delay = <7000>;
163                                 regulator-boot-on;
164                                 regulator-always-on;
165                         };
166
167                         sw3_reg: sw3 {
168                                 regulator-min-microvolt = <1341250>;
169                                 regulator-max-microvolt = <2775000>;
170                                 lltc,fb-voltage-divider = <270000 100000>;
171                                 regulator-ramp-delay = <7000>;
172                                 regulator-boot-on;
173                                 regulator-always-on;
174                         };
175
176                         bb_out_reg: bb-out {
177                                 regulator-min-microvolt = <3387341>;
178                                 regulator-max-microvolt = <3387341>;
179                                 lltc,fb-voltage-divider = <511000 158000>;
180                                 regulator-boot-on;
181                                 regulator-always-on;
182                         };
183
184                         ldo1_reg: ldo1 {
185                                 regulator-min-microvolt = <1306329>;
186                                 regulator-max-microvolt = <1306329>;
187                                 lltc,fb-voltage-divider = <100000 158000>;
188                                 regulator-boot-on;
189                                 regulator-always-on;
190                         };
191
192                         ldo2_reg: ldo2 {
193                                 regulator-min-microvolt = <704123>;
194                                 regulator-max-microvolt = <1456806>;
195                                 lltc,fb-voltage-divider = <180000 191000>;
196                                 regulator-ramp-delay = <7000>;
197                                 regulator-boot-on;
198                                 regulator-always-on;
199                         };
200
201                         ldo3_reg: ldo3 {
202                                 regulator-min-microvolt = <2800000>;
203                                 regulator-max-microvolt = <2800000>;
204                                 regulator-boot-on;
205                         };
206
207                         ldo4_reg: ldo4 {
208                                 regulator-min-microvolt = <1200000>;
209                                 regulator-max-microvolt = <3200000>;
210                         };
211                 };
212         };
213 };
214
215 &uart1 {
216         pinctrl-names = "default";
217         pinctrl-0 = <&pinctrl_uart1>;
218         status = "okay";
219 };
220
221 &usbotg {
222         dr_mode = "peripheral";
223         status = "okay";
224 };