1*faf69431SYang Xiwen// SPDX-License-Identifier: GPL-2.0-only
2*faf69431SYang Xiwen
3*faf69431SYang Xiwen#include "msm8916-pm8916.dtsi"
4*faf69431SYang Xiwen
5*faf69431SYang Xiwen#include <dt-bindings/gpio/gpio.h>
6*faf69431SYang Xiwen#include <dt-bindings/leds/common.h>
7*faf69431SYang Xiwen
8*faf69431SYang Xiwen/ {
9*faf69431SYang Xiwen	chassis-type = "embedded";
10*faf69431SYang Xiwen
11*faf69431SYang Xiwen	aliases {
12*faf69431SYang Xiwen		serial0 = &blsp1_uart2;
13*faf69431SYang Xiwen	};
14*faf69431SYang Xiwen
15*faf69431SYang Xiwen	chosen {
16*faf69431SYang Xiwen		stdout-path = "serial0";
17*faf69431SYang Xiwen	};
18*faf69431SYang Xiwen
19*faf69431SYang Xiwen	reserved-memory {
20*faf69431SYang Xiwen		mpss_mem: mpss@86800000 {
21*faf69431SYang Xiwen			reg = <0x0 0x86800000 0x0 0x5500000>;
22*faf69431SYang Xiwen			no-map;
23*faf69431SYang Xiwen		};
24*faf69431SYang Xiwen
25*faf69431SYang Xiwen		gps_mem: gps@8bd00000 {
26*faf69431SYang Xiwen			reg = <0x0 0x8bd00000 0x0 0x200000>;
27*faf69431SYang Xiwen			no-map;
28*faf69431SYang Xiwen		};
29*faf69431SYang Xiwen	};
30*faf69431SYang Xiwen
31*faf69431SYang Xiwen	gpio-keys {
32*faf69431SYang Xiwen		compatible = "gpio-keys";
33*faf69431SYang Xiwen
34*faf69431SYang Xiwen		pinctrl-0 = <&button_default>;
35*faf69431SYang Xiwen		pinctrl-names = "default";
36*faf69431SYang Xiwen
37*faf69431SYang Xiwen		label = "GPIO Buttons";
38*faf69431SYang Xiwen
39*faf69431SYang Xiwen		/* GPIO is board-specific */
40*faf69431SYang Xiwen		button_restart: button-restart {
41*faf69431SYang Xiwen			label = "Restart";
42*faf69431SYang Xiwen			linux,code = <KEY_RESTART>;
43*faf69431SYang Xiwen		};
44*faf69431SYang Xiwen	};
45*faf69431SYang Xiwen
46*faf69431SYang Xiwen	leds {
47*faf69431SYang Xiwen		compatible = "gpio-leds";
48*faf69431SYang Xiwen
49*faf69431SYang Xiwen		pinctrl-0 = <&gpio_leds_default>;
50*faf69431SYang Xiwen		pinctrl-names = "default";
51*faf69431SYang Xiwen
52*faf69431SYang Xiwen		/*
53*faf69431SYang Xiwen		 * GPIOs are board-specific.
54*faf69431SYang Xiwen		 * Functions and default-states defined here are fallbacks.
55*faf69431SYang Xiwen		 * Feel free to override them if your board is different.
56*faf69431SYang Xiwen		 */
57*faf69431SYang Xiwen		led_r: led-r {
58*faf69431SYang Xiwen			color = <LED_COLOR_ID_RED>;
59*faf69431SYang Xiwen			default-state = "on";
60*faf69431SYang Xiwen			function = LED_FUNCTION_POWER;
61*faf69431SYang Xiwen		};
62*faf69431SYang Xiwen
63*faf69431SYang Xiwen		led_g: led-g {
64*faf69431SYang Xiwen			color = <LED_COLOR_ID_GREEN>;
65*faf69431SYang Xiwen			default-state = "off";
66*faf69431SYang Xiwen			function = LED_FUNCTION_WLAN;
67*faf69431SYang Xiwen		};
68*faf69431SYang Xiwen
69*faf69431SYang Xiwen		led_b: led-b {
70*faf69431SYang Xiwen			color = <LED_COLOR_ID_BLUE>;
71*faf69431SYang Xiwen			default-state = "off";
72*faf69431SYang Xiwen			function = LED_FUNCTION_WAN;
73*faf69431SYang Xiwen		};
74*faf69431SYang Xiwen	};
75*faf69431SYang Xiwen};
76*faf69431SYang Xiwen
77*faf69431SYang Xiwen&bam_dmux {
78*faf69431SYang Xiwen	status = "okay";
79*faf69431SYang Xiwen};
80*faf69431SYang Xiwen
81*faf69431SYang Xiwen&bam_dmux_dma {
82*faf69431SYang Xiwen	status = "okay";
83*faf69431SYang Xiwen};
84*faf69431SYang Xiwen
85*faf69431SYang Xiwen&blsp1_uart2 {
86*faf69431SYang Xiwen	status = "okay";
87*faf69431SYang Xiwen};
88*faf69431SYang Xiwen
89*faf69431SYang Xiwen/* Remove &dsi_phy0 from clocks to make sure that gcc probes with display disabled */
90*faf69431SYang Xiwen&gcc {
91*faf69431SYang Xiwen	clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
92*faf69431SYang Xiwen};
93*faf69431SYang Xiwen
94*faf69431SYang Xiwen&mpss {
95*faf69431SYang Xiwen	pinctrl-0 = <&sim_ctrl_default>;
96*faf69431SYang Xiwen	pinctrl-names = "default";
97*faf69431SYang Xiwen
98*faf69431SYang Xiwen	status = "okay";
99*faf69431SYang Xiwen};
100*faf69431SYang Xiwen
101*faf69431SYang Xiwen&pm8916_usbin {
102*faf69431SYang Xiwen	status = "okay";
103*faf69431SYang Xiwen};
104*faf69431SYang Xiwen
105*faf69431SYang Xiwen&pronto {
106*faf69431SYang Xiwen	status = "okay";
107*faf69431SYang Xiwen};
108*faf69431SYang Xiwen
109*faf69431SYang Xiwen&sdhc_1 {
110*faf69431SYang Xiwen	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
111*faf69431SYang Xiwen	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
112*faf69431SYang Xiwen	pinctrl-names = "default", "sleep";
113*faf69431SYang Xiwen
114*faf69431SYang Xiwen	status = "okay";
115*faf69431SYang Xiwen};
116*faf69431SYang Xiwen
117*faf69431SYang Xiwen&usb {
118*faf69431SYang Xiwen	extcon = <&pm8916_usbin>;
119*faf69431SYang Xiwen	dr_mode = "peripheral";
120*faf69431SYang Xiwen
121*faf69431SYang Xiwen	status = "okay";
122*faf69431SYang Xiwen};
123*faf69431SYang Xiwen
124*faf69431SYang Xiwen&usb_hs_phy {
125*faf69431SYang Xiwen	extcon = <&pm8916_usbin>;
126*faf69431SYang Xiwen};
127*faf69431SYang Xiwen
128*faf69431SYang Xiwen&smd_rpm_regulators {
129*faf69431SYang Xiwen	vdd_l1_l2_l3-supply = <&pm8916_s3>;
130*faf69431SYang Xiwen	vdd_l4_l5_l6-supply = <&pm8916_s4>;
131*faf69431SYang Xiwen	vdd_l7-supply = <&pm8916_s4>;
132*faf69431SYang Xiwen
133*faf69431SYang Xiwen	s3 {
134*faf69431SYang Xiwen		regulator-min-microvolt = <1200000>;
135*faf69431SYang Xiwen		regulator-max-microvolt = <1300000>;
136*faf69431SYang Xiwen	};
137*faf69431SYang Xiwen
138*faf69431SYang Xiwen	s4 {
139*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
140*faf69431SYang Xiwen		regulator-max-microvolt = <2100000>;
141*faf69431SYang Xiwen	};
142*faf69431SYang Xiwen
143*faf69431SYang Xiwen	l1 {
144*faf69431SYang Xiwen		regulator-min-microvolt = <1225000>;
145*faf69431SYang Xiwen		regulator-max-microvolt = <1225000>;
146*faf69431SYang Xiwen	};
147*faf69431SYang Xiwen
148*faf69431SYang Xiwen	l2 {
149*faf69431SYang Xiwen		regulator-min-microvolt = <1200000>;
150*faf69431SYang Xiwen		regulator-max-microvolt = <1200000>;
151*faf69431SYang Xiwen	};
152*faf69431SYang Xiwen
153*faf69431SYang Xiwen	l4 {
154*faf69431SYang Xiwen		regulator-min-microvolt = <2050000>;
155*faf69431SYang Xiwen		regulator-max-microvolt = <2050000>;
156*faf69431SYang Xiwen	};
157*faf69431SYang Xiwen
158*faf69431SYang Xiwen	l5 {
159*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
160*faf69431SYang Xiwen		regulator-max-microvolt = <1800000>;
161*faf69431SYang Xiwen	};
162*faf69431SYang Xiwen
163*faf69431SYang Xiwen	l6 {
164*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
165*faf69431SYang Xiwen		regulator-max-microvolt = <1800000>;
166*faf69431SYang Xiwen	};
167*faf69431SYang Xiwen
168*faf69431SYang Xiwen	l7 {
169*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
170*faf69431SYang Xiwen		regulator-max-microvolt = <1800000>;
171*faf69431SYang Xiwen	};
172*faf69431SYang Xiwen
173*faf69431SYang Xiwen	l8 {
174*faf69431SYang Xiwen		regulator-min-microvolt = <2850000>;
175*faf69431SYang Xiwen		regulator-max-microvolt = <2900000>;
176*faf69431SYang Xiwen	};
177*faf69431SYang Xiwen
178*faf69431SYang Xiwen	l9 {
179*faf69431SYang Xiwen		regulator-min-microvolt = <3300000>;
180*faf69431SYang Xiwen		regulator-max-microvolt = <3300000>;
181*faf69431SYang Xiwen	};
182*faf69431SYang Xiwen
183*faf69431SYang Xiwen	l10 {
184*faf69431SYang Xiwen		regulator-min-microvolt = <2700000>;
185*faf69431SYang Xiwen		regulator-max-microvolt = <2800000>;
186*faf69431SYang Xiwen	};
187*faf69431SYang Xiwen
188*faf69431SYang Xiwen	l11 {
189*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
190*faf69431SYang Xiwen		regulator-max-microvolt = <2950000>;
191*faf69431SYang Xiwen		regulator-system-load = <200000>;
192*faf69431SYang Xiwen		regulator-allow-set-load;
193*faf69431SYang Xiwen	};
194*faf69431SYang Xiwen
195*faf69431SYang Xiwen	l12 {
196*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
197*faf69431SYang Xiwen		regulator-max-microvolt = <2950000>;
198*faf69431SYang Xiwen	};
199*faf69431SYang Xiwen
200*faf69431SYang Xiwen	l13 {
201*faf69431SYang Xiwen		regulator-min-microvolt = <3075000>;
202*faf69431SYang Xiwen		regulator-max-microvolt = <3075000>;
203*faf69431SYang Xiwen	};
204*faf69431SYang Xiwen
205*faf69431SYang Xiwen	l14 {
206*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
207*faf69431SYang Xiwen		regulator-max-microvolt = <3300000>;
208*faf69431SYang Xiwen	};
209*faf69431SYang Xiwen
210*faf69431SYang Xiwen	l15 {
211*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
212*faf69431SYang Xiwen		regulator-max-microvolt = <3300000>;
213*faf69431SYang Xiwen	};
214*faf69431SYang Xiwen
215*faf69431SYang Xiwen	l16 {
216*faf69431SYang Xiwen		regulator-min-microvolt = <1800000>;
217*faf69431SYang Xiwen		regulator-max-microvolt = <3300000>;
218*faf69431SYang Xiwen	};
219*faf69431SYang Xiwen
220*faf69431SYang Xiwen	l17 {
221*faf69431SYang Xiwen		regulator-min-microvolt = <2850000>;
222*faf69431SYang Xiwen		regulator-max-microvolt = <2850000>;
223*faf69431SYang Xiwen	};
224*faf69431SYang Xiwen
225*faf69431SYang Xiwen	l18 {
226*faf69431SYang Xiwen		regulator-min-microvolt = <2700000>;
227*faf69431SYang Xiwen		regulator-max-microvolt = <2700000>;
228*faf69431SYang Xiwen	};
229*faf69431SYang Xiwen};
230*faf69431SYang Xiwen
231*faf69431SYang Xiwen&msmgpio {
232*faf69431SYang Xiwen	/* pins are board-specific */
233*faf69431SYang Xiwen	button_default: button-default-state {
234*faf69431SYang Xiwen		function = "gpio";
235*faf69431SYang Xiwen		drive-strength = <2>;
236*faf69431SYang Xiwen	};
237*faf69431SYang Xiwen
238*faf69431SYang Xiwen	gpio_leds_default: gpio-leds-default-state {
239*faf69431SYang Xiwen		function = "gpio";
240*faf69431SYang Xiwen		drive-strength = <2>;
241*faf69431SYang Xiwen		bias-disable;
242*faf69431SYang Xiwen	};
243*faf69431SYang Xiwen
244*faf69431SYang Xiwen	sim_ctrl_default: sim-ctrl-default-state {
245*faf69431SYang Xiwen		function = "gpio";
246*faf69431SYang Xiwen		drive-strength = <2>;
247*faf69431SYang Xiwen		bias-disable;
248*faf69431SYang Xiwen		output-low;
249*faf69431SYang Xiwen	};
250*faf69431SYang Xiwen};
251