xref: /freebsd/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548-mangoh-green.dts (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree Source for mangOH Green Board with WP8548 Module
4f126890aSEmmanuel Vadot *
5f126890aSEmmanuel Vadot * Copyright (C) 2016 BayLibre, SAS.
6f126890aSEmmanuel Vadot * Author : Neil Armstrong <narmstrong@baylibre.com>
7f126890aSEmmanuel Vadot */
8f126890aSEmmanuel Vadot
9*8d13bc63SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
11*8d13bc63SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
12f126890aSEmmanuel Vadot
13f126890aSEmmanuel Vadot#include "qcom-mdm9615-wp8548.dtsi"
14f126890aSEmmanuel Vadot
15f126890aSEmmanuel Vadot/ {
16f126890aSEmmanuel Vadot	model = "MangOH Green with WP8548 Module";
17f126890aSEmmanuel Vadot	compatible = "swir,mangoh-green-wp8548", "swir,wp8548", "qcom,mdm9615";
18f126890aSEmmanuel Vadot
19f126890aSEmmanuel Vadot	aliases {
20f126890aSEmmanuel Vadot		spi0 = &gsbi3_spi;
21f126890aSEmmanuel Vadot		serial0 = &gsbi4_serial;
22f126890aSEmmanuel Vadot		serial1 = &gsbi5_serial;
23f126890aSEmmanuel Vadot		i2c0 = &gsbi5_i2c;
24f126890aSEmmanuel Vadot		mmc0 = &sdcc1;
25f126890aSEmmanuel Vadot	};
26f126890aSEmmanuel Vadot
27f126890aSEmmanuel Vadot	chosen {
28f126890aSEmmanuel Vadot		stdout-path = "serial1:115200n8";
29f126890aSEmmanuel Vadot	};
30f126890aSEmmanuel Vadot};
31f126890aSEmmanuel Vadot
32f126890aSEmmanuel Vadot&msmgpio {
33f126890aSEmmanuel Vadot	/* MangOH GPIO Mapping :
34f126890aSEmmanuel Vadot	 * - 2 : GPIOEXP_INT2
35f126890aSEmmanuel Vadot	 * - 7 : IOT1_GPIO2
36f126890aSEmmanuel Vadot	 * - 8 : IOT0_GPIO4
37f126890aSEmmanuel Vadot	 * - 13: IOT0_GPIO3
38f126890aSEmmanuel Vadot	 * - 21: IOT1_GPIO4
39f126890aSEmmanuel Vadot	 * - 22: IOT2_GPIO1
40f126890aSEmmanuel Vadot	 * - 23: IOT2_GPIO2
41f126890aSEmmanuel Vadot	 * - 24: IOT2_GPIO3
42f126890aSEmmanuel Vadot	 * - 25: IOT1_GPIO1
43f126890aSEmmanuel Vadot	 * - 32: IOT1_GPIO3
44f126890aSEmmanuel Vadot	 * - 33: IOT0_GPIO2
45f126890aSEmmanuel Vadot	 * - 42: IOT0_GPIO1 and SD Card Detect
46f126890aSEmmanuel Vadot	 */
47f126890aSEmmanuel Vadot
48f126890aSEmmanuel Vadot	gpioext1_pins: gpioext1-state {
49f126890aSEmmanuel Vadot		gpioext1-pins {
50f126890aSEmmanuel Vadot			pins = "gpio2";
51f126890aSEmmanuel Vadot			function = "gpio";
52f126890aSEmmanuel Vadot			bias-disable;
53f126890aSEmmanuel Vadot		};
54f126890aSEmmanuel Vadot	};
55f126890aSEmmanuel Vadot
56f126890aSEmmanuel Vadot	sdc_cd_pins: sdc-cd-state {
57f126890aSEmmanuel Vadot		sdc-cd-pins {
58f126890aSEmmanuel Vadot			pins = "gpio42";
59f126890aSEmmanuel Vadot			function = "gpio";
60f126890aSEmmanuel Vadot			drive-strength = <2>;
61f126890aSEmmanuel Vadot			bias-pull-up;
62f126890aSEmmanuel Vadot		};
63f126890aSEmmanuel Vadot	};
64f126890aSEmmanuel Vadot};
65f126890aSEmmanuel Vadot
66f126890aSEmmanuel Vadot&gsbi3_spi {
67f126890aSEmmanuel Vadot	spi@0 {
68f126890aSEmmanuel Vadot		compatible = "swir,mangoh-iotport-spi";
69f126890aSEmmanuel Vadot		spi-max-frequency = <24000000>;
70f126890aSEmmanuel Vadot		reg = <0>;
71f126890aSEmmanuel Vadot	};
72f126890aSEmmanuel Vadot};
73f126890aSEmmanuel Vadot
74f126890aSEmmanuel Vadot&gsbi5_i2c {
75f126890aSEmmanuel Vadot	mux@71 {
76f126890aSEmmanuel Vadot		compatible = "nxp,pca9548";
77f126890aSEmmanuel Vadot		#address-cells = <1>;
78f126890aSEmmanuel Vadot		#size-cells = <0>;
79f126890aSEmmanuel Vadot		reg = <0x71>;
80f126890aSEmmanuel Vadot
81f126890aSEmmanuel Vadot		i2c_iot0: i2c@0 {
82f126890aSEmmanuel Vadot			#address-cells = <1>;
83f126890aSEmmanuel Vadot			#size-cells = <0>;
84f126890aSEmmanuel Vadot			reg = <0>;
85f126890aSEmmanuel Vadot		};
86f126890aSEmmanuel Vadot
87f126890aSEmmanuel Vadot		i2c_iot1: i2c@1 {
88f126890aSEmmanuel Vadot			#address-cells = <1>;
89f126890aSEmmanuel Vadot			#size-cells = <0>;
90f126890aSEmmanuel Vadot			reg = <1>;
91f126890aSEmmanuel Vadot		};
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot		i2c_iot2: i2c@2 {
94f126890aSEmmanuel Vadot			#address-cells = <1>;
95f126890aSEmmanuel Vadot			#size-cells = <0>;
96f126890aSEmmanuel Vadot			reg = <2>;
97f126890aSEmmanuel Vadot		};
98f126890aSEmmanuel Vadot
99f126890aSEmmanuel Vadot		i2c@3 {
100f126890aSEmmanuel Vadot			#address-cells = <1>;
101f126890aSEmmanuel Vadot			#size-cells = <0>;
102f126890aSEmmanuel Vadot			reg = <3>;
103f126890aSEmmanuel Vadot
104f126890aSEmmanuel Vadot			usbhub: hub@8 {
105f126890aSEmmanuel Vadot				compatible = "smsc,usb3503a";
106f126890aSEmmanuel Vadot				reg = <0x8>;
107f126890aSEmmanuel Vadot				connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>;
108f126890aSEmmanuel Vadot				intn-gpios = <&gpioext2 0 GPIO_ACTIVE_HIGH>;
109f126890aSEmmanuel Vadot				initial-mode = <1>;
110f126890aSEmmanuel Vadot			};
111f126890aSEmmanuel Vadot		};
112f126890aSEmmanuel Vadot
113f126890aSEmmanuel Vadot		i2c@4 {
114f126890aSEmmanuel Vadot			#address-cells = <1>;
115f126890aSEmmanuel Vadot			#size-cells = <0>;
116f126890aSEmmanuel Vadot			reg = <4>;
117f126890aSEmmanuel Vadot
118f126890aSEmmanuel Vadot			gpioext0: pinctrl@3e {
119f126890aSEmmanuel Vadot				/* GPIO Expander 0 Mapping :
120f126890aSEmmanuel Vadot				 * - 0: ARDUINO_RESET_Level shift
121f126890aSEmmanuel Vadot				 * - 1: BattChrgr_PG_N
122f126890aSEmmanuel Vadot				 * - 2: BattGauge_GPIO
123f126890aSEmmanuel Vadot				 * - 3: LED_ON (out active high)
124f126890aSEmmanuel Vadot				 * - 4: ATmega_reset_GPIO
125f126890aSEmmanuel Vadot				 * - 5: X
126f126890aSEmmanuel Vadot				 * - 6: PCM_ANALOG_SELECT (out active high)
127f126890aSEmmanuel Vadot				 * - 7: X
128f126890aSEmmanuel Vadot				 * - 8: Board_rev_res1 (in)
129f126890aSEmmanuel Vadot				 * - 9: Board_rev_res2 (in)
130f126890aSEmmanuel Vadot				 * - 10: UART_EXP1_ENn (out active low / pull-down)
131f126890aSEmmanuel Vadot				 * - 11: UART_EXP1_IN (out pull-down)
132f126890aSEmmanuel Vadot				 * - 12: UART_EXP2_IN (out pull-down)
133f126890aSEmmanuel Vadot				 * - 13: SDIO_SEL (out pull-down)
134f126890aSEmmanuel Vadot				 * - 14: SPI_EXP1_ENn (out active low / pull-down)
135f126890aSEmmanuel Vadot				 * - 15: SPI_EXP1_IN (out pull-down)
136f126890aSEmmanuel Vadot				 */
137f126890aSEmmanuel Vadot				#gpio-cells = <2>;
138f126890aSEmmanuel Vadot				#interrupt-cells = <2>;
139f126890aSEmmanuel Vadot				compatible = "semtech,sx1509q";
140f126890aSEmmanuel Vadot				reg = <0x3e>;
141f126890aSEmmanuel Vadot				interrupt-parent = <&gpioext1>;
142f126890aSEmmanuel Vadot				interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
143f126890aSEmmanuel Vadot
144f126890aSEmmanuel Vadot				semtech,probe-reset;
145f126890aSEmmanuel Vadot
146f126890aSEmmanuel Vadot				gpio-controller;
147f126890aSEmmanuel Vadot				interrupt-controller;
148f126890aSEmmanuel Vadot			};
149f126890aSEmmanuel Vadot		};
150f126890aSEmmanuel Vadot
151f126890aSEmmanuel Vadot		i2c@5 {
152f126890aSEmmanuel Vadot			#address-cells = <1>;
153f126890aSEmmanuel Vadot			#size-cells = <0>;
154f126890aSEmmanuel Vadot			reg = <5>;
155f126890aSEmmanuel Vadot
156f126890aSEmmanuel Vadot			gpioext1: pinctrl@3f {
157f126890aSEmmanuel Vadot				/* GPIO Expander 1 Mapping :
158f126890aSEmmanuel Vadot				 * - 0: GPIOEXP_INT1
159f126890aSEmmanuel Vadot				 * - 1: Battery detect
160f126890aSEmmanuel Vadot				 * - 2: GPIO_SCF3_RESET
161f126890aSEmmanuel Vadot				 * - 3: LED_CARD_DETECT_IOT0 (in)
162f126890aSEmmanuel Vadot				 * - 4: LED_CARD_DETECT_IOT1 (in)
163f126890aSEmmanuel Vadot				 * - 5: LED_CARD_DETECT_IOT2 (in)
164f126890aSEmmanuel Vadot				 * - 6: UIM2_PWM_SELECT
165f126890aSEmmanuel Vadot				 * - 7: UIM2_M2_S_SELECT
166f126890aSEmmanuel Vadot				 * - 8: TP900
167f126890aSEmmanuel Vadot				 * - 9: SENSOR_INT1 (in)
168f126890aSEmmanuel Vadot				 * - 10: SENSOR_INT2 (in)
169f126890aSEmmanuel Vadot				 * - 11: CARD_DETECT_IOT0 (in pull-up)
170f126890aSEmmanuel Vadot				 * - 12: CARD_DETECT_IOT2 (in pull-up)
171f126890aSEmmanuel Vadot				 * - 13: CARD_DETECT_IOT1 (in pull-up)
172f126890aSEmmanuel Vadot				 * - 14: GPIOEXP_INT3 (in active low / pull-up)
173f126890aSEmmanuel Vadot				 * - 15: BattChrgr_INT_N
174f126890aSEmmanuel Vadot				 */
175f126890aSEmmanuel Vadot				pinctrl-0 = <&gpioext1_pins>;
176f126890aSEmmanuel Vadot				pinctrl-names = "default";
177f126890aSEmmanuel Vadot
178f126890aSEmmanuel Vadot				#gpio-cells = <2>;
179f126890aSEmmanuel Vadot				#interrupt-cells = <2>;
180f126890aSEmmanuel Vadot				compatible = "semtech,sx1509q";
181f126890aSEmmanuel Vadot				reg = <0x3f>;
182f126890aSEmmanuel Vadot				interrupt-parent = <&msmgpio>;
183f126890aSEmmanuel Vadot				interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
184f126890aSEmmanuel Vadot
185f126890aSEmmanuel Vadot				semtech,probe-reset;
186f126890aSEmmanuel Vadot
187f126890aSEmmanuel Vadot				gpio-controller;
188f126890aSEmmanuel Vadot				interrupt-controller;
189f126890aSEmmanuel Vadot			};
190f126890aSEmmanuel Vadot		};
191f126890aSEmmanuel Vadot
192f126890aSEmmanuel Vadot		i2c@6 {
193f126890aSEmmanuel Vadot			#address-cells = <1>;
194f126890aSEmmanuel Vadot			#size-cells = <0>;
195f126890aSEmmanuel Vadot			reg = <6>;
196f126890aSEmmanuel Vadot
197f126890aSEmmanuel Vadot			gpioext2: pinctrl@70 {
198f126890aSEmmanuel Vadot				/* GPIO Expander 2 Mapping :
199f126890aSEmmanuel Vadot				 * - 0: USB_HUB_INTn
200f126890aSEmmanuel Vadot				 * - 1: HUB_CONNECT
201f126890aSEmmanuel Vadot				 * - 2: GPIO_IOT2_RESET (out active low / pull-up)
202f126890aSEmmanuel Vadot				 * - 3: GPIO_IOT1_RESET (out active low / pull-up)
203f126890aSEmmanuel Vadot				 * - 4: GPIO_IOT0_RESET (out active low / pull-up)
204f126890aSEmmanuel Vadot				 * - 5: TP901
205f126890aSEmmanuel Vadot				 * - 6: TP902
206f126890aSEmmanuel Vadot				 * - 7: TP903
207f126890aSEmmanuel Vadot				 * - 8: UART_EXP2_ENn (out active low / pull-down)
208f126890aSEmmanuel Vadot				 * - 9: PCM_EXP1_ENn (out active low)
209f126890aSEmmanuel Vadot				 * - 10: PCM_EXP1_SEL (out)
210f126890aSEmmanuel Vadot				 * - 11: ARD_FTDI
211f126890aSEmmanuel Vadot				 * - 12: TP904
212f126890aSEmmanuel Vadot				 * - 13: TP905
213f126890aSEmmanuel Vadot				 * - 14: TP906
214f126890aSEmmanuel Vadot				 * - 15: RS232_Enable (out active high / pull-up)
215f126890aSEmmanuel Vadot				 */
216f126890aSEmmanuel Vadot				#gpio-cells = <2>;
217f126890aSEmmanuel Vadot				#interrupt-cells = <2>;
218f126890aSEmmanuel Vadot				compatible = "semtech,sx1509q";
219f126890aSEmmanuel Vadot				reg = <0x70>;
220f126890aSEmmanuel Vadot				interrupt-parent = <&gpioext1>;
221f126890aSEmmanuel Vadot				interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
222f126890aSEmmanuel Vadot
223f126890aSEmmanuel Vadot				semtech,probe-reset;
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot				gpio-controller;
226f126890aSEmmanuel Vadot				interrupt-controller;
227f126890aSEmmanuel Vadot			};
228f126890aSEmmanuel Vadot		};
229f126890aSEmmanuel Vadot
230f126890aSEmmanuel Vadot		i2c@7 {
231f126890aSEmmanuel Vadot			#address-cells = <1>;
232f126890aSEmmanuel Vadot			#size-cells = <0>;
233f126890aSEmmanuel Vadot			reg = <7>;
234f126890aSEmmanuel Vadot		};
235f126890aSEmmanuel Vadot	};
236f126890aSEmmanuel Vadot};
237f126890aSEmmanuel Vadot
238f126890aSEmmanuel Vadot&sdcc1 {
239f126890aSEmmanuel Vadot	pinctrl-0 = <&sdc_cd_pins>;
240f126890aSEmmanuel Vadot	pinctrl-names = "default";
241f126890aSEmmanuel Vadot	disable-wp;
242f126890aSEmmanuel Vadot	cd-gpios = <&msmgpio 42 GPIO_ACTIVE_LOW>; /* Active low CD */
243f126890aSEmmanuel Vadot};
244