xref: /linux/scripts/dtc/include-prefixes/arm/qcom/qcom-apq8060-dragonboard.dts (revision 06d07429858317ded2db7986113a9e0129cd599b)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2724ba675SRob Herring#include <dt-bindings/input/input.h>
3724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
4724ba675SRob Herring#include <dt-bindings/leds/common.h>
5724ba675SRob Herring#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
6724ba675SRob Herring#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
7724ba675SRob Herring#include "qcom-msm8660.dtsi"
8b00c86c2SDmitry Baryshkov#include "pm8058.dtsi"
9724ba675SRob Herring
10724ba675SRob Herring/ {
11724ba675SRob Herring	model = "Qualcomm APQ8060 Dragonboard";
12724ba675SRob Herring	compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";
13724ba675SRob Herring
14724ba675SRob Herring	aliases {
15724ba675SRob Herring		serial0 = &gsbi12_serial;
16724ba675SRob Herring	};
17724ba675SRob Herring
18724ba675SRob Herring	chosen {
19724ba675SRob Herring		stdout-path = "serial0:115200n8";
20724ba675SRob Herring	};
21724ba675SRob Herring
22724ba675SRob Herring	/* Main power of the board: 3.7V */
23724ba675SRob Herring	vph: regulator-fixed {
24724ba675SRob Herring		compatible = "regulator-fixed";
25724ba675SRob Herring		regulator-min-microvolt = <3700000>;
26724ba675SRob Herring		regulator-max-microvolt = <3700000>;
27724ba675SRob Herring		regulator-name = "VPH";
28724ba675SRob Herring		regulator-always-on;
29724ba675SRob Herring		regulator-boot-on;
30724ba675SRob Herring	};
31724ba675SRob Herring
32724ba675SRob Herring	/* GPIO controlled ethernet power regulator */
33724ba675SRob Herring	dragon_veth: xc622a331mrg {
34724ba675SRob Herring		compatible = "regulator-fixed";
35724ba675SRob Herring		regulator-name = "XC6222A331MR-G";
36724ba675SRob Herring		regulator-min-microvolt = <3300000>;
37724ba675SRob Herring		regulator-max-microvolt = <3300000>;
38724ba675SRob Herring		vin-supply = <&vph>;
39724ba675SRob Herring		gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
40724ba675SRob Herring		enable-active-high;
41724ba675SRob Herring		pinctrl-names = "default";
42724ba675SRob Herring		pinctrl-0 = <&dragon_veth_gpios>;
43724ba675SRob Herring		regulator-always-on;
44724ba675SRob Herring	};
45724ba675SRob Herring
46724ba675SRob Herring	/* VDDvario fixed regulator */
47724ba675SRob Herring	dragon_vario: nds332p {
48724ba675SRob Herring		compatible = "regulator-fixed";
49724ba675SRob Herring		regulator-name = "NDS332P";
50724ba675SRob Herring		regulator-min-microvolt = <1800000>;
51724ba675SRob Herring		regulator-max-microvolt = <1800000>;
52724ba675SRob Herring		vin-supply = <&pm8058_s3>;
53724ba675SRob Herring	};
54724ba675SRob Herring
55724ba675SRob Herring	/* This is a levelshifter for SDCC5 */
56724ba675SRob Herring	dragon_vio_txb: txb0104rgyr {
57724ba675SRob Herring		compatible = "regulator-fixed";
58724ba675SRob Herring		regulator-name = "Dragon SDCC levelshifter";
59724ba675SRob Herring		vin-supply = <&pm8058_l14>;
60724ba675SRob Herring		regulator-always-on;
61724ba675SRob Herring	};
62724ba675SRob Herring
63724ba675SRob Herring	/*
64724ba675SRob Herring	 * Capella CM3605 light and proximity sensor mounted directly
65724ba675SRob Herring	 * on the sensor board.
66724ba675SRob Herring	 */
67724ba675SRob Herring	cm3605 {
68724ba675SRob Herring		compatible = "capella,cm3605";
69724ba675SRob Herring		vdd-supply = <&pm8058_l14>; // 2.85V
70724ba675SRob Herring		aset-gpios = <&pm8058_gpio 35 GPIO_ACTIVE_LOW>;
71724ba675SRob Herring		capella,aset-resistance-ohms = <100000>;
72724ba675SRob Herring		/* Trig on both edges - getting close or far away */
73724ba675SRob Herring		interrupts-extended = <&pm8058_gpio 34 IRQ_TYPE_EDGE_BOTH>;
74724ba675SRob Herring		/* MPP05 analog input to the XOADC */
75c6d86aa8SDmitry Baryshkov		io-channels = <&pm8058_xoadc 0x00 0x05>;
76724ba675SRob Herring		io-channel-names = "aout";
77724ba675SRob Herring		pinctrl-names = "default";
78724ba675SRob Herring		pinctrl-0 = <&dragon_cm3605_gpios>, <&dragon_cm3605_mpps>;
79724ba675SRob Herring	};
80724ba675SRob Herring};
81724ba675SRob Herring
82724ba675SRob Herring&ebi2 {
83724ba675SRob Herring	/* The EBI2 will instantiate first, then populate its children */
84724ba675SRob Herring	pinctrl-names = "default";
85724ba675SRob Herring	pinctrl-0 = <&dragon_ebi2_pins>;
86724ba675SRob Herring	status = "okay";
87724ba675SRob Herring
88724ba675SRob Herring	/*
89724ba675SRob Herring	 * An on-board SMSC LAN9221 chip for "debug ethernet",
90724ba675SRob Herring	 * which is actually just an ordinary ethernet on the
91724ba675SRob Herring	 * EBI2. This has a 25MHz chrystal next to it, so no
92724ba675SRob Herring	 * clocking is needed.
93724ba675SRob Herring	 */
94724ba675SRob Herring	ethernet@2,0 {
95724ba675SRob Herring		compatible = "smsc,lan9221", "smsc,lan9115";
96724ba675SRob Herring		reg = <2 0x0 0x100>;
97724ba675SRob Herring		/*
98724ba675SRob Herring		 * The second interrupt is the PME interrupt
99724ba675SRob Herring		 * for network wakeup, connected to the TLMM.
100724ba675SRob Herring		 */
101724ba675SRob Herring		interrupts-extended = <&pm8058_gpio 7 IRQ_TYPE_EDGE_FALLING>,
102724ba675SRob Herring				    <&tlmm 29 IRQ_TYPE_EDGE_RISING>;
103724ba675SRob Herring		reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
104724ba675SRob Herring		vdd33a-supply = <&dragon_veth>;
105724ba675SRob Herring		vddvario-supply = <&dragon_vario>;
106724ba675SRob Herring		pinctrl-names = "default";
107724ba675SRob Herring		pinctrl-0 = <&dragon_ethernet_gpios>;
108724ba675SRob Herring		phy-mode = "mii";
109724ba675SRob Herring		reg-io-width = <2>;
110724ba675SRob Herring		smsc,force-external-phy;
111724ba675SRob Herring		smsc,irq-push-pull;
112724ba675SRob Herring
113724ba675SRob Herring		/*
114724ba675SRob Herring		 * SLOW chipselect config
115724ba675SRob Herring		 * Delay 9 cycles (140ns@64MHz) between SMSC
116724ba675SRob Herring		 * LAN9221 Ethernet controller reads and writes
117724ba675SRob Herring		 * on CS2.
118724ba675SRob Herring		 */
119724ba675SRob Herring		qcom,xmem-recovery-cycles = <0>;
120724ba675SRob Herring		qcom,xmem-write-hold-cycles = <3>;
121724ba675SRob Herring		qcom,xmem-write-delta-cycles = <31>;
122724ba675SRob Herring		qcom,xmem-read-delta-cycles = <28>;
123724ba675SRob Herring		qcom,xmem-write-wait-cycles = <9>;
124724ba675SRob Herring		qcom,xmem-read-wait-cycles = <9>;
125724ba675SRob Herring	};
126724ba675SRob Herring};
127724ba675SRob Herring
128724ba675SRob Herring&gsbi3 {
129724ba675SRob Herring	qcom,mode = <GSBI_PROT_I2C>;
130724ba675SRob Herring	status = "okay";
131724ba675SRob Herring};
132724ba675SRob Herring
133724ba675SRob Herring&gsbi3_i2c {
134724ba675SRob Herring	pinctrl-names = "default";
135724ba675SRob Herring	pinctrl-0 = <&dragon_gsbi3_i2c_pins>;
136724ba675SRob Herring	status = "okay";
137724ba675SRob Herring
138724ba675SRob Herring	touchscreen@24 {
139724ba675SRob Herring		compatible = "cypress,cy8ctma340";
140724ba675SRob Herring		reg = <0x24>;
141724ba675SRob Herring		/* Certainly we can do at least 400 kHz */
142724ba675SRob Herring		clock-frequency = <400000>;
143724ba675SRob Herring		/* IRQ on GPIO61 called /CTP_INT */
144724ba675SRob Herring		interrupt-parent = <&tlmm>;
145724ba675SRob Herring		interrupts = <61 IRQ_TYPE_EDGE_FALLING>;
146724ba675SRob Herring		/*
147724ba675SRob Herring		 * The I2C bus is using a PCA9306 level translator from L16A
148724ba675SRob Herring		 * to L2B so these two voltages are needed and L16A is
149724ba675SRob Herring		 * kind of the IO voltage, however L16Aisn't really fed to
150724ba675SRob Herring		 * the TMA340, which relies entirely on L2B (PM8901 L2).
151724ba675SRob Herring		 */
152724ba675SRob Herring		vcpin-supply = <&pm8058_l16>;
153724ba675SRob Herring		vdd-supply = <&pm8901_l2>;
154724ba675SRob Herring		/* GPIO58, called WAKE_CTP */
155724ba675SRob Herring		reset-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
156724ba675SRob Herring		touchscreen-size-x = <480>;
157724ba675SRob Herring		touchscreen-size-y = <800>;
158724ba675SRob Herring		active-interval-ms = <0>;
159724ba675SRob Herring		touch-timeout-ms = <255>;
160724ba675SRob Herring		lowpower-interval-ms = <10>;
161724ba675SRob Herring		bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>;
162724ba675SRob Herring		pinctrl-names = "default";
163724ba675SRob Herring		pinctrl-0 = <&dragon_tma340_gpios>;
164724ba675SRob Herring	};
165724ba675SRob Herring};
166724ba675SRob Herring
167724ba675SRob Herring&gsbi8 {
168724ba675SRob Herring	qcom,mode = <GSBI_PROT_I2C>;
169724ba675SRob Herring	status = "okay";
170724ba675SRob Herring};
171724ba675SRob Herring
172724ba675SRob Herring&gsbi8_i2c {
173724ba675SRob Herring	pinctrl-names = "default";
174724ba675SRob Herring	pinctrl-0 = <&dragon_gsbi8_i2c_pins>;
175724ba675SRob Herring	status = "okay";
176724ba675SRob Herring
177724ba675SRob Herring	eeprom@52 {
178724ba675SRob Herring		/* A 16KiB Platform ID EEPROM on the CPU carrier board */
179724ba675SRob Herring		compatible = "atmel,24c128";
180724ba675SRob Herring		reg = <0x52>;
181724ba675SRob Herring		vcc-supply = <&pm8058_s3>;
182724ba675SRob Herring		pagesize = <64>;
183724ba675SRob Herring	};
184724ba675SRob Herring	wm8903: wm8903@1a {
185724ba675SRob Herring		/* This Woolfson Micro device has an unrouted interrupt line */
186724ba675SRob Herring		compatible = "wlf,wm8903";
187724ba675SRob Herring		reg = <0x1a>;
188724ba675SRob Herring
189724ba675SRob Herring		AVDD-supply = <&pm8058_l16>;
190724ba675SRob Herring		CPVDD-supply = <&pm8058_l16>;
191724ba675SRob Herring		DBVDD-supply = <&pm8058_s3>;
192724ba675SRob Herring		DCVDD-supply = <&pm8058_l0>;
193724ba675SRob Herring
194724ba675SRob Herring		gpio-controller;
195724ba675SRob Herring		#gpio-cells = <2>;
196724ba675SRob Herring
197724ba675SRob Herring		micdet-cfg = <0>;
198724ba675SRob Herring		micdet-delay = <100>;
199724ba675SRob Herring		gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
200724ba675SRob Herring	};
201724ba675SRob Herring};
202724ba675SRob Herring
203724ba675SRob Herring&gsbi12 {
204724ba675SRob Herring	qcom,mode = <GSBI_PROT_I2C_UART>;
205724ba675SRob Herring	status = "okay";
206724ba675SRob Herring};
207724ba675SRob Herring
208724ba675SRob Herring&gsbi12_serial {
209724ba675SRob Herring	pinctrl-names = "default";
210724ba675SRob Herring	pinctrl-0 = <&dragon_gsbi12_serial_pins>;
211724ba675SRob Herring	status = "okay";
212724ba675SRob Herring};
213724ba675SRob Herring
214724ba675SRob Herring&gsbi12_i2c {
215724ba675SRob Herring	pinctrl-names = "default";
216724ba675SRob Herring	pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
217724ba675SRob Herring	status = "okay";
218724ba675SRob Herring
219724ba675SRob Herring	ak8975@c {
220724ba675SRob Herring		compatible = "asahi-kasei,ak8975";
221724ba675SRob Herring		reg = <0x0c>;
222724ba675SRob Herring		interrupt-parent = <&pm8058_gpio>;
223724ba675SRob Herring		interrupts = <33 IRQ_TYPE_EDGE_RISING>;
224724ba675SRob Herring		pinctrl-names = "default";
225724ba675SRob Herring		pinctrl-0 = <&dragon_ak8975_gpios>;
226724ba675SRob Herring		vid-supply = <&pm8058_lvs0>; // 1.8V
227724ba675SRob Herring		vdd-supply = <&pm8058_l14>; // 2.85V
228724ba675SRob Herring	};
229724ba675SRob Herring	bmp085@77 {
230724ba675SRob Herring		compatible = "bosch,bmp085";
231724ba675SRob Herring		reg = <0x77>;
232724ba675SRob Herring		interrupt-parent = <&pm8058_gpio>;
233724ba675SRob Herring		interrupts = <16 IRQ_TYPE_EDGE_RISING>;
234724ba675SRob Herring		reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
235724ba675SRob Herring		pinctrl-names = "default";
236724ba675SRob Herring		pinctrl-0 = <&dragon_bmp085_gpios>;
237724ba675SRob Herring		vddd-supply = <&pm8058_lvs0>; // 1.8V
238724ba675SRob Herring		vdda-supply = <&pm8058_l14>; // 2.85V
239724ba675SRob Herring	};
240724ba675SRob Herring	mpu3050@68 {
241724ba675SRob Herring		compatible = "invensense,mpu3050";
242724ba675SRob Herring		reg = <0x68>;
243724ba675SRob Herring		/*
244724ba675SRob Herring		 * GPIO17 is pulled high by a 10k
245724ba675SRob Herring		 * resistor to VLOGIC so needs to be
246724ba675SRob Herring		 * active low/falling edge.
247724ba675SRob Herring		 */
248724ba675SRob Herring		interrupts-extended = <&pm8058_gpio 17 IRQ_TYPE_EDGE_FALLING>;
249724ba675SRob Herring		pinctrl-names = "default";
250724ba675SRob Herring		pinctrl-0 = <&dragon_mpu3050_gpios>;
251724ba675SRob Herring		vlogic-supply = <&pm8058_lvs0>; // 1.8V
252724ba675SRob Herring		vdd-supply = <&pm8058_l14>; // 2.85V
253724ba675SRob Herring
254724ba675SRob Herring		/*
255724ba675SRob Herring		 * The MPU-3050 acts as a hub for the
256724ba675SRob Herring		 * accelerometer.
257724ba675SRob Herring		 */
258724ba675SRob Herring		i2c-gate {
259724ba675SRob Herring			#address-cells = <1>;
260724ba675SRob Herring			#size-cells = <0>;
261724ba675SRob Herring
262724ba675SRob Herring			kxsd9@18 {
263724ba675SRob Herring				compatible = "kionix,kxsd9";
264724ba675SRob Herring				reg = <0x18>;
265724ba675SRob Herring				interrupt-parent = <&tlmm>;
266724ba675SRob Herring				interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
267724ba675SRob Herring				pinctrl-names = "default";
268724ba675SRob Herring				pinctrl-0 = <&dragon_kxsd9_gpios>;
269724ba675SRob Herring				iovdd-supply = <&pm8058_lvs0>; // 1.8V
270724ba675SRob Herring				vdd-supply = <&pm8058_l14>; // 2.85V
271724ba675SRob Herring			};
272724ba675SRob Herring		};
273724ba675SRob Herring	};
274724ba675SRob Herring};
275724ba675SRob Herring
27641cdee8aSDmitry Baryshkov&pm8058 {
27741cdee8aSDmitry Baryshkov	interrupts-extended = <&tlmm 88 IRQ_TYPE_LEVEL_LOW>;
27841cdee8aSDmitry Baryshkov};
27941cdee8aSDmitry Baryshkov
280724ba675SRob Herring&pm8058_gpio {
281724ba675SRob Herring	dragon_ethernet_gpios: ethernet-state {
282724ba675SRob Herring		pinconf {
283724ba675SRob Herring			pins = "gpio7";
284724ba675SRob Herring			function = "normal";
285724ba675SRob Herring			input-enable;
286724ba675SRob Herring			bias-disable;
287724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
288724ba675SRob Herring		};
289724ba675SRob Herring	};
290724ba675SRob Herring	dragon_bmp085_gpios: bmp085-state {
291724ba675SRob Herring		pinconf {
292724ba675SRob Herring			pins = "gpio16";
293724ba675SRob Herring			function = "normal";
294724ba675SRob Herring			input-enable;
295724ba675SRob Herring			bias-disable;
296724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
297724ba675SRob Herring		};
298724ba675SRob Herring	};
299724ba675SRob Herring	dragon_mpu3050_gpios: mpu3050-state {
300724ba675SRob Herring		pinconf {
301724ba675SRob Herring			pins = "gpio17";
302724ba675SRob Herring			function = "normal";
303724ba675SRob Herring			input-enable;
304724ba675SRob Herring			bias-disable;
305724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
306724ba675SRob Herring		};
307724ba675SRob Herring	};
308724ba675SRob Herring	dragon_sdcc3_gpios: sdcc3-state {
309724ba675SRob Herring		pinconf {
310724ba675SRob Herring			pins = "gpio22";
311724ba675SRob Herring			function = "normal";
312724ba675SRob Herring			input-enable;
313724ba675SRob Herring			bias-disable;
314724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
315724ba675SRob Herring		};
316724ba675SRob Herring	};
317724ba675SRob Herring	dragon_sdcc5_gpios: sdcc5-state {
318724ba675SRob Herring		pinconf {
319724ba675SRob Herring			pins = "gpio26";
320724ba675SRob Herring			function = "normal";
321724ba675SRob Herring			input-enable;
322724ba675SRob Herring			bias-pull-up;
323724ba675SRob Herring			qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
324724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
325724ba675SRob Herring		};
326724ba675SRob Herring	};
327724ba675SRob Herring	dragon_ak8975_gpios: ak8975-state {
328724ba675SRob Herring		pinconf {
329724ba675SRob Herring			pins = "gpio33";
330724ba675SRob Herring			function = "normal";
331724ba675SRob Herring			input-enable;
332724ba675SRob Herring			bias-disable;
333724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
334724ba675SRob Herring		};
335724ba675SRob Herring	};
336724ba675SRob Herring	dragon_cm3605_gpios: cm3605-state {
337724ba675SRob Herring		/* Pin 34 connected to the proxy IRQ */
338724ba675SRob Herring		gpio34-pins {
339724ba675SRob Herring			pins = "gpio34";
340724ba675SRob Herring			function = "normal";
341724ba675SRob Herring			input-enable;
342724ba675SRob Herring			bias-disable;
343724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
344724ba675SRob Herring		};
345724ba675SRob Herring		/* Pin 35 connected to ASET */
346724ba675SRob Herring		gpio35-pins {
347724ba675SRob Herring			pins = "gpio35";
348724ba675SRob Herring			function = "normal";
349724ba675SRob Herring			output-high;
350724ba675SRob Herring			bias-disable;
351724ba675SRob Herring			power-source = <PM8058_GPIO_S3>;
352724ba675SRob Herring		};
353724ba675SRob Herring	};
354724ba675SRob Herring	dragon_veth_gpios: veth-state {
355724ba675SRob Herring		pinconf {
356724ba675SRob Herring			pins = "gpio40";
357724ba675SRob Herring			function = "normal";
358724ba675SRob Herring			bias-disable;
359724ba675SRob Herring			drive-push-pull;
360724ba675SRob Herring		};
361724ba675SRob Herring	};
362724ba675SRob Herring};
363724ba675SRob Herring
364724ba675SRob Herring&pm8058_keypad {
365724ba675SRob Herring	linux,keymap = <
366724ba675SRob Herring		MATRIX_KEY(0, 0, KEY_MENU)
367724ba675SRob Herring		MATRIX_KEY(0, 2, KEY_1)
368724ba675SRob Herring		MATRIX_KEY(0, 3, KEY_4)
369724ba675SRob Herring		MATRIX_KEY(0, 4, KEY_7)
370724ba675SRob Herring		MATRIX_KEY(1, 0, KEY_UP)
371724ba675SRob Herring		MATRIX_KEY(1, 1, KEY_LEFT)
372724ba675SRob Herring		MATRIX_KEY(1, 2, KEY_DOWN)
373724ba675SRob Herring		MATRIX_KEY(1, 3, KEY_5)
374724ba675SRob Herring		MATRIX_KEY(1, 3, KEY_8)
375724ba675SRob Herring		MATRIX_KEY(2, 0, KEY_HOME)
376724ba675SRob Herring		MATRIX_KEY(2, 1, KEY_REPLY)
377724ba675SRob Herring		MATRIX_KEY(2, 2, KEY_2)
378724ba675SRob Herring		MATRIX_KEY(2, 3, KEY_6)
379724ba675SRob Herring		MATRIX_KEY(3, 0, KEY_VOLUMEUP)
380724ba675SRob Herring		MATRIX_KEY(3, 1, KEY_RIGHT)
381724ba675SRob Herring		MATRIX_KEY(3, 2, KEY_3)
382724ba675SRob Herring		MATRIX_KEY(3, 3, KEY_9)
383724ba675SRob Herring		MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
384724ba675SRob Herring		MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
385724ba675SRob Herring		MATRIX_KEY(4, 1, KEY_BACK)
386724ba675SRob Herring		MATRIX_KEY(4, 2, KEY_CAMERA)
387724ba675SRob Herring		MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
388724ba675SRob Herring	>;
389724ba675SRob Herring	keypad,num-rows = <6>;
390724ba675SRob Herring	keypad,num-columns = <5>;
391724ba675SRob Herring};
392724ba675SRob Herring
393724ba675SRob Herring&pm8058_led48 {
394724ba675SRob Herring	/*
395724ba675SRob Herring	 * The keypad LED @0x48 is routed to
396724ba675SRob Herring	 * the sensor board where it is
397724ba675SRob Herring	 * connected to an infrared LED
398724ba675SRob Herring	 * SFH4650 (60mW, @850nm) next to the
399724ba675SRob Herring	 * ambient light and proximity sensor
400724ba675SRob Herring	 * Capella Microsystems CM3605.
401724ba675SRob Herring	 */
402724ba675SRob Herring	label = "pm8058:infrared:proximitysensor";
403724ba675SRob Herring	default-state = "off";
404724ba675SRob Herring	linux,default-trigger = "cm3605";
405724ba675SRob Herring	status = "okay";
406724ba675SRob Herring};
407724ba675SRob Herring
408724ba675SRob Herring&pm8058_led131 {
409724ba675SRob Herring	label = "pm8058:red";
410724ba675SRob Herring	color = <LED_COLOR_ID_RED>;
411724ba675SRob Herring	default-state = "off";
412724ba675SRob Herring	status = "okay";
413724ba675SRob Herring};
414724ba675SRob Herring
415724ba675SRob Herring&pm8058_led132 {
416724ba675SRob Herring	/*
417724ba675SRob Herring	 * This is actually green too on my
418724ba675SRob Herring	 * board, but documented as yellow.
419724ba675SRob Herring	 */
420724ba675SRob Herring	label = "pm8058:yellow";
421724ba675SRob Herring	color = <LED_COLOR_ID_YELLOW>;
422724ba675SRob Herring	default-state = "off";
423724ba675SRob Herring	linux,default-trigger = "mmc0";
424724ba675SRob Herring	status = "okay";
425724ba675SRob Herring};
426724ba675SRob Herring
427724ba675SRob Herring&pm8058_led133 {
428724ba675SRob Herring	label = "pm8058:green";
429724ba675SRob Herring	function = LED_FUNCTION_HEARTBEAT;
430724ba675SRob Herring	color = <LED_COLOR_ID_GREEN>;
431724ba675SRob Herring	default-state = "on";
432724ba675SRob Herring	linux,default-trigger = "heartbeat";
433724ba675SRob Herring	status = "okay";
434724ba675SRob Herring};
435724ba675SRob Herring
436724ba675SRob Herring&pm8058_mpps {
437724ba675SRob Herring	dragon_cm3605_mpps: cm3605-mpps-state {
438724ba675SRob Herring		pins = "mpp5";
439724ba675SRob Herring		function = "analog";
440724ba675SRob Herring		input-enable;
441724ba675SRob Herring		bias-high-impedance;
442724ba675SRob Herring		/* Let's use channel 5 */
443724ba675SRob Herring		qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
444724ba675SRob Herring		power-source = <PM8058_GPIO_S3>;
445724ba675SRob Herring	};
446724ba675SRob Herring};
447724ba675SRob Herring
448724ba675SRob Herring&rpm {
449724ba675SRob Herring	/*
450724ba675SRob Herring	 * Set up of the PMIC RPM regulators for this board
451724ba675SRob Herring	 * PM8901 supplies "preliminary regulators" whatever
452724ba675SRob Herring	 * that means
453724ba675SRob Herring	 */
454724ba675SRob Herring	regulators-0 {
455203cc864SDmitry Baryshkov		compatible = "qcom,rpm-pm8901-regulators";
456203cc864SDmitry Baryshkov
457724ba675SRob Herring		vdd_l0-supply = <&pm8901_s4>;
458724ba675SRob Herring		vdd_l1-supply = <&vph>;
459724ba675SRob Herring		vdd_l2-supply = <&vph>;
460724ba675SRob Herring		vdd_l3-supply = <&vph>;
461724ba675SRob Herring		vdd_l4-supply = <&vph>;
462724ba675SRob Herring		vdd_l5-supply = <&vph>;
463724ba675SRob Herring		vdd_l6-supply = <&vph>;
464724ba675SRob Herring		/* vdd_s0-supply, vdd_s1-supply: SAW regulators */
465724ba675SRob Herring		vdd_s2-supply = <&vph>;
466724ba675SRob Herring		vdd_s3-supply = <&vph>;
467724ba675SRob Herring		vdd_s4-supply = <&vph>;
468724ba675SRob Herring		lvs0_in-supply = <&pm8058_s3>;
469724ba675SRob Herring		lvs1_in-supply = <&pm8901_s4>;
470724ba675SRob Herring		lvs2_in-supply = <&pm8058_l0>;
471724ba675SRob Herring		lvs3_in-supply = <&pm8058_s2>;
472724ba675SRob Herring		mvs_in-supply = <&pm8058_s3>;
473724ba675SRob Herring
474203cc864SDmitry Baryshkov		pm8901_l0: l0 {
475724ba675SRob Herring			regulator-min-microvolt = <1200000>;
476724ba675SRob Herring			regulator-max-microvolt = <1200000>;
477724ba675SRob Herring			bias-pull-down;
478724ba675SRob Herring		};
479203cc864SDmitry Baryshkov
480203cc864SDmitry Baryshkov		pm8901_l1: l1 {
481724ba675SRob Herring			regulator-min-microvolt = <3300000>;
482724ba675SRob Herring			regulator-max-microvolt = <3300000>;
483724ba675SRob Herring			bias-pull-down;
484724ba675SRob Herring		};
485203cc864SDmitry Baryshkov
486203cc864SDmitry Baryshkov		pm8901_l2: l2 {
487724ba675SRob Herring			/* TMA340 requires strictly 3.3V */
488724ba675SRob Herring			regulator-min-microvolt = <3300000>;
489724ba675SRob Herring			regulator-max-microvolt = <3300000>;
490724ba675SRob Herring			bias-pull-down;
491724ba675SRob Herring		};
492203cc864SDmitry Baryshkov
493203cc864SDmitry Baryshkov		pm8901_l3: l3 {
494724ba675SRob Herring			regulator-min-microvolt = <3300000>;
495724ba675SRob Herring			regulator-max-microvolt = <3300000>;
496724ba675SRob Herring			bias-pull-down;
497724ba675SRob Herring		};
498203cc864SDmitry Baryshkov
499203cc864SDmitry Baryshkov		pm8901_l4: l4 {
500724ba675SRob Herring			regulator-min-microvolt = <2600000>;
501724ba675SRob Herring			regulator-max-microvolt = <2600000>;
502724ba675SRob Herring			bias-pull-down;
503724ba675SRob Herring		};
504203cc864SDmitry Baryshkov
505203cc864SDmitry Baryshkov		pm8901_l5: l5 {
506724ba675SRob Herring			regulator-min-microvolt = <2850000>;
507724ba675SRob Herring			regulator-max-microvolt = <2850000>;
508724ba675SRob Herring			bias-pull-down;
509724ba675SRob Herring		};
510203cc864SDmitry Baryshkov
511203cc864SDmitry Baryshkov		pm8901_l6: l6 {
512724ba675SRob Herring			regulator-min-microvolt = <2200000>;
513724ba675SRob Herring			regulator-max-microvolt = <2200000>;
514724ba675SRob Herring			bias-pull-down;
515724ba675SRob Herring		};
516724ba675SRob Herring
517724ba675SRob Herring		/* s0 and s1 are SAW regulators controlled over SPM */
518203cc864SDmitry Baryshkov		pm8901_s2: s2 {
519724ba675SRob Herring			regulator-min-microvolt = <1300000>;
520724ba675SRob Herring			regulator-max-microvolt = <1300000>;
521724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
522724ba675SRob Herring			bias-pull-down;
523724ba675SRob Herring		};
524203cc864SDmitry Baryshkov		pm8901_s3: s3 {
525724ba675SRob Herring			regulator-min-microvolt = <1100000>;
526724ba675SRob Herring			regulator-max-microvolt = <1100000>;
527724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
528724ba675SRob Herring			bias-pull-down;
529724ba675SRob Herring		};
530203cc864SDmitry Baryshkov		pm8901_s4: s4 {
531724ba675SRob Herring			regulator-min-microvolt = <1225000>;
532724ba675SRob Herring			regulator-max-microvolt = <1225000>;
533724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
534724ba675SRob Herring			bias-pull-down;
535724ba675SRob Herring		};
536724ba675SRob Herring
537724ba675SRob Herring		/* LVS0 thru 3 and mvs are just switches */
538203cc864SDmitry Baryshkov		pm8901_lvs0: lvs0 {
539724ba675SRob Herring			regulator-always-on;
540724ba675SRob Herring		};
541724ba675SRob Herring
542203cc864SDmitry Baryshkov		pm8901_lvs1: lvs1 { };
543203cc864SDmitry Baryshkov
544203cc864SDmitry Baryshkov		pm8901_lvs2: lvs2 { };
545203cc864SDmitry Baryshkov
546203cc864SDmitry Baryshkov		pm8901_lvs3: lvs3 { };
547203cc864SDmitry Baryshkov
548203cc864SDmitry Baryshkov		pm8901_mvs: mvs { };
549724ba675SRob Herring	};
550724ba675SRob Herring
551724ba675SRob Herring	regulators-1 {
552203cc864SDmitry Baryshkov		compatible = "qcom,rpm-pm8058-regulators";
553203cc864SDmitry Baryshkov
554724ba675SRob Herring		vdd_l0_l1_lvs-supply = <&pm8058_s3>;
555724ba675SRob Herring		vdd_l2_l11_l12-supply = <&vph>;
556724ba675SRob Herring		vdd_l3_l4_l5-supply = <&vph>;
557724ba675SRob Herring		vdd_l6_l7-supply = <&vph>;
558724ba675SRob Herring		vdd_l8-supply = <&vph>;
559724ba675SRob Herring		vdd_l9-supply = <&vph>;
560724ba675SRob Herring		vdd_l10-supply = <&vph>;
561724ba675SRob Herring		vdd_l13_l16-supply = <&pm8058_s4>;
562724ba675SRob Herring		vdd_l14_l15-supply = <&vph>;
563724ba675SRob Herring		vdd_l17_l18-supply = <&vph>;
564724ba675SRob Herring		vdd_l19_l20-supply = <&vph>;
565724ba675SRob Herring		vdd_l21-supply = <&pm8058_s3>;
566724ba675SRob Herring		vdd_l22-supply = <&pm8058_s3>;
567724ba675SRob Herring		vdd_l23_l24_l25-supply = <&pm8058_s3>;
568724ba675SRob Herring		vdd_s0-supply = <&vph>;
569724ba675SRob Herring		vdd_s1-supply = <&vph>;
570724ba675SRob Herring		vdd_s2-supply = <&vph>;
571724ba675SRob Herring		vdd_s3-supply = <&vph>;
572724ba675SRob Herring		vdd_s4-supply = <&vph>;
573724ba675SRob Herring		vdd_ncp-supply = <&vph>;
574724ba675SRob Herring
575203cc864SDmitry Baryshkov		pm8058_l0: l0 {
576724ba675SRob Herring			regulator-min-microvolt = <1200000>;
577724ba675SRob Herring			regulator-max-microvolt = <1200000>;
578724ba675SRob Herring			bias-pull-down;
579724ba675SRob Herring		};
580203cc864SDmitry Baryshkov
581203cc864SDmitry Baryshkov		pm8058_l1: l1 {
582724ba675SRob Herring			regulator-min-microvolt = <1200000>;
583724ba675SRob Herring			regulator-max-microvolt = <1200000>;
584724ba675SRob Herring			bias-pull-down;
585724ba675SRob Herring		};
586203cc864SDmitry Baryshkov
587203cc864SDmitry Baryshkov		pm8058_l2: l2 {
588724ba675SRob Herring			regulator-min-microvolt = <1800000>;
589724ba675SRob Herring			regulator-max-microvolt = <2600000>;
590724ba675SRob Herring			bias-pull-down;
591724ba675SRob Herring		};
592203cc864SDmitry Baryshkov
593203cc864SDmitry Baryshkov		pm8058_l3: l3 {
594724ba675SRob Herring			regulator-min-microvolt = <1800000>;
595724ba675SRob Herring			regulator-max-microvolt = <1800000>;
596724ba675SRob Herring			bias-pull-down;
597724ba675SRob Herring		};
598203cc864SDmitry Baryshkov
599203cc864SDmitry Baryshkov		pm8058_l4: l4 {
600724ba675SRob Herring			regulator-min-microvolt = <2850000>;
601724ba675SRob Herring			regulator-max-microvolt = <2850000>;
602724ba675SRob Herring			bias-pull-down;
603724ba675SRob Herring		};
604203cc864SDmitry Baryshkov
605203cc864SDmitry Baryshkov		pm8058_l5: l5 {
606724ba675SRob Herring			regulator-min-microvolt = <2850000>;
607724ba675SRob Herring			regulator-max-microvolt = <2850000>;
608724ba675SRob Herring			bias-pull-down;
609724ba675SRob Herring		};
610203cc864SDmitry Baryshkov
611203cc864SDmitry Baryshkov		pm8058_l6: l6 {
612724ba675SRob Herring			regulator-min-microvolt = <3000000>;
613724ba675SRob Herring			regulator-max-microvolt = <3600000>;
614724ba675SRob Herring			bias-pull-down;
615724ba675SRob Herring		};
616203cc864SDmitry Baryshkov
617203cc864SDmitry Baryshkov		pm8058_l7: l7 {
618724ba675SRob Herring			regulator-min-microvolt = <1800000>;
619724ba675SRob Herring			regulator-max-microvolt = <1800000>;
620724ba675SRob Herring			bias-pull-down;
621724ba675SRob Herring		};
622203cc864SDmitry Baryshkov
623203cc864SDmitry Baryshkov		pm8058_l8: l8 {
624724ba675SRob Herring			regulator-min-microvolt = <2900000>;
625724ba675SRob Herring			regulator-max-microvolt = <3050000>;
626724ba675SRob Herring			bias-pull-down;
627724ba675SRob Herring		};
628203cc864SDmitry Baryshkov
629203cc864SDmitry Baryshkov		pm8058_l9: l9 {
630724ba675SRob Herring			regulator-min-microvolt = <1800000>;
631724ba675SRob Herring			regulator-max-microvolt = <1800000>;
632724ba675SRob Herring			bias-pull-down;
633724ba675SRob Herring		};
634203cc864SDmitry Baryshkov
635203cc864SDmitry Baryshkov		pm8058_l10: l10 {
636724ba675SRob Herring			regulator-min-microvolt = <2600000>;
637724ba675SRob Herring			regulator-max-microvolt = <2600000>;
638724ba675SRob Herring			bias-pull-down;
639724ba675SRob Herring		};
640203cc864SDmitry Baryshkov
641203cc864SDmitry Baryshkov		pm8058_l11: l11 {
642724ba675SRob Herring			regulator-min-microvolt = <1500000>;
643724ba675SRob Herring			regulator-max-microvolt = <1500000>;
644724ba675SRob Herring			bias-pull-down;
645724ba675SRob Herring		};
646203cc864SDmitry Baryshkov
647203cc864SDmitry Baryshkov		pm8058_l12: l12 {
648724ba675SRob Herring			regulator-min-microvolt = <2900000>;
649724ba675SRob Herring			regulator-max-microvolt = <2900000>;
650724ba675SRob Herring			bias-pull-down;
651724ba675SRob Herring		};
652203cc864SDmitry Baryshkov
653203cc864SDmitry Baryshkov		pm8058_l13: l13 {
654724ba675SRob Herring			regulator-min-microvolt = <2050000>;
655724ba675SRob Herring			regulator-max-microvolt = <2050000>;
656724ba675SRob Herring			bias-pull-down;
657724ba675SRob Herring		};
658203cc864SDmitry Baryshkov
659203cc864SDmitry Baryshkov		pm8058_l14: l14 {
660724ba675SRob Herring			regulator-min-microvolt = <2850000>;
661724ba675SRob Herring			regulator-max-microvolt = <2850000>;
662724ba675SRob Herring		};
663203cc864SDmitry Baryshkov
664203cc864SDmitry Baryshkov		pm8058_l15: l15 {
665724ba675SRob Herring			regulator-min-microvolt = <2850000>;
666724ba675SRob Herring			regulator-max-microvolt = <2850000>;
667724ba675SRob Herring			bias-pull-down;
668724ba675SRob Herring		};
669203cc864SDmitry Baryshkov
670203cc864SDmitry Baryshkov		pm8058_l16: l16 {
671724ba675SRob Herring			regulator-min-microvolt = <1800000>;
672724ba675SRob Herring			regulator-max-microvolt = <1800000>;
673724ba675SRob Herring			bias-pull-down;
674724ba675SRob Herring			regulator-always-on;
675724ba675SRob Herring		};
676203cc864SDmitry Baryshkov
677203cc864SDmitry Baryshkov		pm8058_l17: l17 {
678724ba675SRob Herring			// 1.5V according to schematic
679724ba675SRob Herring			regulator-min-microvolt = <2600000>;
680724ba675SRob Herring			regulator-max-microvolt = <2600000>;
681724ba675SRob Herring			bias-pull-down;
682724ba675SRob Herring		};
683203cc864SDmitry Baryshkov
684203cc864SDmitry Baryshkov		pm8058_l18: l18 {
685724ba675SRob Herring			regulator-min-microvolt = <2200000>;
686724ba675SRob Herring			regulator-max-microvolt = <2200000>;
687724ba675SRob Herring			bias-pull-down;
688724ba675SRob Herring		};
689203cc864SDmitry Baryshkov
690203cc864SDmitry Baryshkov		pm8058_l19: l19 {
691724ba675SRob Herring			regulator-min-microvolt = <2500000>;
692724ba675SRob Herring			regulator-max-microvolt = <2500000>;
693724ba675SRob Herring			bias-pull-down;
694724ba675SRob Herring		};
695203cc864SDmitry Baryshkov
696203cc864SDmitry Baryshkov		pm8058_l20: l20 {
697724ba675SRob Herring			regulator-min-microvolt = <1800000>;
698724ba675SRob Herring			regulator-max-microvolt = <1800000>;
699724ba675SRob Herring			bias-pull-down;
700724ba675SRob Herring		};
701203cc864SDmitry Baryshkov
702203cc864SDmitry Baryshkov		pm8058_l21: l21 {
703724ba675SRob Herring			// 1.1 V according to schematic
704724ba675SRob Herring			regulator-min-microvolt = <1200000>;
705724ba675SRob Herring			regulator-max-microvolt = <1200000>;
706724ba675SRob Herring			bias-pull-down;
707724ba675SRob Herring			regulator-always-on;
708724ba675SRob Herring		};
709203cc864SDmitry Baryshkov
710203cc864SDmitry Baryshkov		pm8058_l22: l22 {
711724ba675SRob Herring			// 1.2 V according to schematic
712724ba675SRob Herring			regulator-min-microvolt = <1150000>;
713724ba675SRob Herring			regulator-max-microvolt = <1150000>;
714724ba675SRob Herring			bias-pull-down;
715724ba675SRob Herring		};
716203cc864SDmitry Baryshkov
717203cc864SDmitry Baryshkov		pm8058_l23: l23 {
718724ba675SRob Herring			// Unused
719724ba675SRob Herring			regulator-min-microvolt = <1200000>;
720724ba675SRob Herring			regulator-max-microvolt = <1200000>;
721724ba675SRob Herring			bias-pull-down;
722724ba675SRob Herring		};
723724ba675SRob Herring
724203cc864SDmitry Baryshkov		pm8058_l24: l24 {
725203cc864SDmitry Baryshkov			// Unused
726203cc864SDmitry Baryshkov			regulator-min-microvolt = <1200000>;
727203cc864SDmitry Baryshkov			regulator-max-microvolt = <1200000>;
728203cc864SDmitry Baryshkov			bias-pull-down;
729203cc864SDmitry Baryshkov		};
730203cc864SDmitry Baryshkov
731203cc864SDmitry Baryshkov		pm8058_l25: l25 {
732203cc864SDmitry Baryshkov			regulator-min-microvolt = <1200000>;
733203cc864SDmitry Baryshkov			regulator-max-microvolt = <1200000>;
734203cc864SDmitry Baryshkov			bias-pull-down;
735203cc864SDmitry Baryshkov		};
736203cc864SDmitry Baryshkov
737203cc864SDmitry Baryshkov		pm8058_s0: s0 {
738724ba675SRob Herring			// regulator-min-microvolt = <500000>;
739724ba675SRob Herring			// regulator-max-microvolt = <1325000>;
740724ba675SRob Herring			regulator-min-microvolt = <1100000>;
741724ba675SRob Herring			regulator-max-microvolt = <1100000>;
742724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
743724ba675SRob Herring			bias-pull-down;
744724ba675SRob Herring		};
745203cc864SDmitry Baryshkov
746203cc864SDmitry Baryshkov		pm8058_s1: s1 {
747724ba675SRob Herring			// regulator-min-microvolt = <500000>;
748724ba675SRob Herring			// regulator-max-microvolt = <1250000>;
749724ba675SRob Herring			regulator-min-microvolt = <1100000>;
750724ba675SRob Herring			regulator-max-microvolt = <1100000>;
751724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
752724ba675SRob Herring			bias-pull-down;
753724ba675SRob Herring		};
754203cc864SDmitry Baryshkov
755203cc864SDmitry Baryshkov		pm8058_s2: s2 {
756724ba675SRob Herring			// 1.3 V according to schematic
757724ba675SRob Herring			regulator-min-microvolt = <1200000>;
758724ba675SRob Herring			regulator-max-microvolt = <1400000>;
759724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
760724ba675SRob Herring			bias-pull-down;
761724ba675SRob Herring		};
762203cc864SDmitry Baryshkov
763203cc864SDmitry Baryshkov		pm8058_s3: s3 {
764724ba675SRob Herring			regulator-min-microvolt = <1800000>;
765724ba675SRob Herring			regulator-max-microvolt = <1800000>;
766724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
767724ba675SRob Herring			regulator-always-on;
768724ba675SRob Herring			bias-pull-down;
769724ba675SRob Herring		};
770203cc864SDmitry Baryshkov
771203cc864SDmitry Baryshkov		pm8058_s4: s4 {
772724ba675SRob Herring			regulator-min-microvolt = <2200000>;
773724ba675SRob Herring			regulator-max-microvolt = <2200000>;
774724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
775724ba675SRob Herring			regulator-always-on;
776724ba675SRob Herring			bias-pull-down;
777724ba675SRob Herring		};
778724ba675SRob Herring
779724ba675SRob Herring		/* LVS0 and LVS1 are just switches */
780203cc864SDmitry Baryshkov		pm8058_lvs0: lvs0 {
781724ba675SRob Herring			bias-pull-down;
782724ba675SRob Herring		};
783724ba675SRob Herring
784203cc864SDmitry Baryshkov		pm8058_lvs1: lvs1 {
785203cc864SDmitry Baryshkov			bias-pull-down;
786203cc864SDmitry Baryshkov		};
787203cc864SDmitry Baryshkov
788203cc864SDmitry Baryshkov		pm8058_ncp: ncp {
789724ba675SRob Herring			regulator-min-microvolt = <1800000>;
790724ba675SRob Herring			regulator-max-microvolt = <1800000>;
791724ba675SRob Herring			qcom,switch-mode-frequency = <1600000>;
792724ba675SRob Herring		};
793724ba675SRob Herring	};
794724ba675SRob Herring};
795724ba675SRob Herring
796724ba675SRob Herring/* Internal 3.69 GiB eMMC */
797724ba675SRob Herring&sdcc1 {
798724ba675SRob Herring	pinctrl-names = "default";
799724ba675SRob Herring	pinctrl-0 = <&dragon_sdcc1_pins>;
800724ba675SRob Herring	vmmc-supply = <&pm8901_l5>;
801724ba675SRob Herring	vqmmc-supply = <&pm8901_lvs0>;
802724ba675SRob Herring	status = "okay";
803724ba675SRob Herring};
804724ba675SRob Herring
805724ba675SRob Herring/* External micro SD card, directly connected, pulled up to 2.85 V */
806724ba675SRob Herring&sdcc3 {
807724ba675SRob Herring	/* Enable SSBI GPIO 22 as input, use for card detect */
808724ba675SRob Herring	pinctrl-names = "default";
809724ba675SRob Herring	pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
810724ba675SRob Herring	cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
811724ba675SRob Herring	wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
812724ba675SRob Herring	vmmc-supply = <&pm8058_l14>;
813724ba675SRob Herring	status = "okay";
814724ba675SRob Herring};
815724ba675SRob Herring
816724ba675SRob Herring/*
817724ba675SRob Herring * Second external micro SD card, using two TXB104RGYR levelshifters
818724ba675SRob Herring * to lift from 1.8 V to 2.85 V
819724ba675SRob Herring */
820724ba675SRob Herring&sdcc5 {
821724ba675SRob Herring	/* Enable SSBI GPIO 26 as input, use for card detect */
822724ba675SRob Herring	pinctrl-names = "default";
823724ba675SRob Herring	pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
824724ba675SRob Herring	cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
825724ba675SRob Herring	wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
826724ba675SRob Herring	vmmc-supply = <&pm8058_l14>;
827724ba675SRob Herring	vqmmc-supply = <&dragon_vio_txb>;
828724ba675SRob Herring	status = "okay";
829724ba675SRob Herring};
830724ba675SRob Herring
831724ba675SRob Herring&tlmm {
832724ba675SRob Herring	/* eMMC pins, all 8 data lines connected */
833724ba675SRob Herring	dragon_sdcc1_pins: sdcc1-state {
834724ba675SRob Herring		clk-pins {
835724ba675SRob Herring			pins = "gpio167"; /* SDC1 CLK */
836724ba675SRob Herring			function = "sdc1";
837724ba675SRob Herring			drive-strength = <16>;
838724ba675SRob Herring			bias-disable;
839724ba675SRob Herring		};
840724ba675SRob Herring		cmd-pins {
841724ba675SRob Herring			pins = "gpio168"; /* SDC1 CMD */
842724ba675SRob Herring			function = "sdc1";
843724ba675SRob Herring			drive-strength = <10>;
844724ba675SRob Herring			bias-pull-up;
845724ba675SRob Herring		};
846724ba675SRob Herring		data-pins {
847724ba675SRob Herring			/* SDC1 D0 to D7 */
848724ba675SRob Herring			pins = "gpio159", "gpio160", "gpio161", "gpio162",
849724ba675SRob Herring			     "gpio163", "gpio164", "gpio165", "gpio166";
850724ba675SRob Herring			function = "sdc1";
851724ba675SRob Herring			drive-strength = <10>;
852724ba675SRob Herring			bias-pull-up;
853724ba675SRob Herring		};
854724ba675SRob Herring	};
855724ba675SRob Herring
856724ba675SRob Herring	/*
857724ba675SRob Herring	 * The SDCC3 pins are hardcoded (non-muxable) but need some pin
858724ba675SRob Herring	 * configuration.
859724ba675SRob Herring	 */
860724ba675SRob Herring	dragon_sdcc3_pins: sdcc3-state {
861724ba675SRob Herring		clk-pins {
862724ba675SRob Herring			pins = "sdc3_clk";
863724ba675SRob Herring			drive-strength = <8>;
864724ba675SRob Herring			bias-disable;
865724ba675SRob Herring		};
866724ba675SRob Herring		cmd-pins {
867724ba675SRob Herring			pins = "sdc3_cmd";
868724ba675SRob Herring			drive-strength = <8>;
869724ba675SRob Herring			bias-pull-up;
870724ba675SRob Herring		};
871724ba675SRob Herring		data-pins {
872724ba675SRob Herring			pins = "sdc3_data";
873724ba675SRob Herring			drive-strength = <8>;
874724ba675SRob Herring			bias-pull-up;
875724ba675SRob Herring		};
876724ba675SRob Herring	};
877724ba675SRob Herring
878724ba675SRob Herring	/* Second SD card slot pins */
879724ba675SRob Herring	dragon_sdcc5_pins: sdcc5-state {
880724ba675SRob Herring		clk-pins {
881724ba675SRob Herring			pins = "gpio97"; /* SDC5 CLK */
882724ba675SRob Herring			function = "sdc5";
883724ba675SRob Herring			drive-strength = <16>;
884724ba675SRob Herring			bias-disable;
885724ba675SRob Herring		};
886724ba675SRob Herring		cmd-pins {
887724ba675SRob Herring			pins = "gpio95"; /* SDC5 CMD */
888724ba675SRob Herring			function = "sdc5";
889724ba675SRob Herring			drive-strength = <10>;
890724ba675SRob Herring			bias-pull-up;
891724ba675SRob Herring		};
892724ba675SRob Herring		data-pins {
893724ba675SRob Herring			/* SDC5 D0 to D3 */
894724ba675SRob Herring			pins = "gpio96", "gpio98", "gpio99", "gpio100";
895724ba675SRob Herring			function = "sdc5";
896724ba675SRob Herring			drive-strength = <10>;
897724ba675SRob Herring			bias-pull-up;
898724ba675SRob Herring		};
899724ba675SRob Herring	};
900724ba675SRob Herring
901724ba675SRob Herring	dragon_gsbi3_i2c_pins: gsbi3-i2c-state {
902724ba675SRob Herring		pins = "gpio43", "gpio44";
903724ba675SRob Herring		function = "gsbi3";
904724ba675SRob Herring		drive-strength = <8>;
905724ba675SRob Herring		/* These have external pull-up 2.2kOhm to 1.8V */
906724ba675SRob Herring		bias-disable;
907724ba675SRob Herring	};
908724ba675SRob Herring
909724ba675SRob Herring	dragon_gsbi8_i2c_pins: gsbi8-i2c-state {
910724ba675SRob Herring		pins = "gpio64", "gpio65";
911724ba675SRob Herring		function = "gsbi8";
912724ba675SRob Herring		drive-strength = <16>;
913724ba675SRob Herring		/* These have external pull-up 2.2kOhm to 1.8V */
914724ba675SRob Herring		bias-disable;
915724ba675SRob Herring	};
916724ba675SRob Herring
917724ba675SRob Herring	dragon_gsbi12_i2c_pins: gsbi12-i2c-state {
918724ba675SRob Herring		pins = "gpio115", "gpio116";
919724ba675SRob Herring		function = "gsbi12";
920724ba675SRob Herring		drive-strength = <16>;
921724ba675SRob Herring		/* These have external pull-up 4.7kOhm to 1.8V */
922724ba675SRob Herring		bias-disable;
923724ba675SRob Herring	};
924724ba675SRob Herring
925724ba675SRob Herring	/* Primary serial port uart 0 pins */
926724ba675SRob Herring	dragon_gsbi12_serial_pins: gsbi12-serial-state {
927724ba675SRob Herring		tx-pins {
928724ba675SRob Herring			pins = "gpio117";
929724ba675SRob Herring			function = "gsbi12";
930724ba675SRob Herring			drive-strength = <8>;
931724ba675SRob Herring			bias-disable;
932724ba675SRob Herring		};
933724ba675SRob Herring		rx-pins {
934724ba675SRob Herring			pins = "gpio118";
935724ba675SRob Herring			function = "gsbi12";
936724ba675SRob Herring			drive-strength = <2>;
937724ba675SRob Herring			bias-pull-up;
938724ba675SRob Herring		};
939724ba675SRob Herring	};
940724ba675SRob Herring
941724ba675SRob Herring	dragon_ebi2_pins: ebi2-state {
942724ba675SRob Herring		/*
943724ba675SRob Herring		 * Pins used by EBI2 on the Dragonboard, actually only
944724ba675SRob Herring		 * CS2 is used by a real peripheral. CS0 is just
945724ba675SRob Herring		 * routed to a test point.
946724ba675SRob Herring		 */
947724ba675SRob Herring		mux0-pins {
948724ba675SRob Herring			pins =
949724ba675SRob Herring			    /* "gpio39", CS1A_N this is not good to mux */
950724ba675SRob Herring			    "gpio40", /* CS2A_N */
951724ba675SRob Herring			    "gpio134"; /* CS0_N testpoint TP29 */
952724ba675SRob Herring			function = "ebi2cs";
953724ba675SRob Herring		};
954724ba675SRob Herring		mux1-pins {
955724ba675SRob Herring			pins =
956724ba675SRob Herring			    /* EBI2_ADDR_7 downto EBI2_ADDR_0 address bus */
957724ba675SRob Herring			    "gpio123", "gpio124", "gpio125", "gpio126",
958724ba675SRob Herring			    "gpio127", "gpio128", "gpio129", "gpio130",
959724ba675SRob Herring			    /* EBI2_DATA_15 downto EBI2_DATA_0 data bus */
960724ba675SRob Herring			    "gpio135", "gpio136", "gpio137", "gpio138",
961724ba675SRob Herring			    "gpio139", "gpio140", "gpio141", "gpio142",
962724ba675SRob Herring			    "gpio143", "gpio144", "gpio145", "gpio146",
963724ba675SRob Herring			    "gpio147", "gpio148", "gpio149", "gpio150",
964724ba675SRob Herring			    "gpio151", /* EBI2_OE_N */
965724ba675SRob Herring			    "gpio153", /* EBI2_ADV */
966724ba675SRob Herring			    "gpio157"; /* EBI2_WE_N */
967724ba675SRob Herring			function = "ebi2";
968724ba675SRob Herring		};
969724ba675SRob Herring	};
970724ba675SRob Herring
971724ba675SRob Herring	/* Interrupt line for the KXSD9 accelerometer */
972724ba675SRob Herring	dragon_kxsd9_gpios: kxsd9-state {
973724ba675SRob Herring		pins = "gpio57"; /* IRQ line */
974724ba675SRob Herring		function = "gpio";
975724ba675SRob Herring		bias-pull-up;
976724ba675SRob Herring	};
977724ba675SRob Herring
978724ba675SRob Herring	dragon_tma340_gpios: tma340-state {
979724ba675SRob Herring		reset-pins {
980724ba675SRob Herring			/* RESET line, TS_ATTN, WAKE_CTP */
981724ba675SRob Herring			pins = "gpio58";
982724ba675SRob Herring			function = "gpio";
983724ba675SRob Herring			drive-strength = <6>;
984724ba675SRob Herring			bias-disable;
985724ba675SRob Herring		};
986724ba675SRob Herring		irq-pins {
987724ba675SRob Herring			pins = "gpio61"; /* IRQ line */
988724ba675SRob Herring			function = "gpio";
989724ba675SRob Herring			drive-strength = <2>;
990724ba675SRob Herring			bias-pull-up;
991724ba675SRob Herring		};
992724ba675SRob Herring	};
993724ba675SRob Herring};
994724ba675SRob Herring
995c6d86aa8SDmitry Baryshkov&pm8058_xoadc {
996724ba675SRob Herring	/* Reference voltage 2.2 V */
997724ba675SRob Herring	xoadc-ref-supply = <&pm8058_l18>;
998724ba675SRob Herring
999724ba675SRob Herring	/* Board-specific channels */
1000*3f0533c6SDmitry Baryshkov	adc-channel@5 {
1001724ba675SRob Herring		/* Connected to AOUT of ALS sensor */
1002724ba675SRob Herring		reg = <0x00 0x05>;
1003724ba675SRob Herring	};
1004*3f0533c6SDmitry Baryshkov
1005*3f0533c6SDmitry Baryshkov	adc-channel@6 {
1006724ba675SRob Herring		/* Connected to test point TP43 */
1007724ba675SRob Herring		reg = <0x00 0x06>;
1008724ba675SRob Herring	};
1009*3f0533c6SDmitry Baryshkov
1010*3f0533c6SDmitry Baryshkov	adc-channel@7 {
1011724ba675SRob Herring		/* Connected to battery thermistor */
1012724ba675SRob Herring		reg = <0x00 0x07>;
1013724ba675SRob Herring	};
1014*3f0533c6SDmitry Baryshkov
1015*3f0533c6SDmitry Baryshkov	adc-channel@8 {
1016724ba675SRob Herring		/* Connected to battery ID detector */
1017724ba675SRob Herring		reg = <0x00 0x08>;
1018724ba675SRob Herring	};
1019*3f0533c6SDmitry Baryshkov
1020*3f0533c6SDmitry Baryshkov	adc-channel@9 {
1021724ba675SRob Herring		/* Connected to XO thermistor */
1022724ba675SRob Herring		reg = <0x00 0x09>;
1023724ba675SRob Herring	};
1024724ba675SRob Herring};
1025