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