xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8910.dts (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8916-pm8916.dtsi"
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/input/input.h>
8#include <dt-bindings/leds/common.h>
9
10/ {
11	model = "BQ Aquaris X5 (Longcheer L8910)";
12	compatible = "longcheer,l8910", "qcom,msm8916";
13	chassis-type = "handset";
14
15	aliases {
16		mmc0 = &sdhc_1; /* eMMC */
17		mmc1 = &sdhc_2; /* SD card */
18		serial0 = &blsp_uart2;
19	};
20
21	chosen {
22		stdout-path = "serial0";
23	};
24
25	flash-led-controller {
26		compatible = "ocs,ocp8110";
27		enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
28		flash-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
29
30		pinctrl-0 = <&camera_front_flash_default>;
31		pinctrl-names = "default";
32
33		flash_led: led {
34			function = LED_FUNCTION_FLASH;
35			color = <LED_COLOR_ID_WHITE>;
36			flash-max-timeout-us = <250000>;
37		};
38	};
39
40	gpio-keys {
41		compatible = "gpio-keys";
42
43		pinctrl-names = "default";
44		pinctrl-0 = <&gpio_keys_default>;
45
46		label = "GPIO Buttons";
47
48		button-volume-up {
49			label = "Volume Up";
50			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
51			linux,code = <KEY_VOLUMEUP>;
52		};
53	};
54
55	leds {
56		compatible = "gpio-leds";
57
58		led-0 {
59			gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
60			color = <LED_COLOR_ID_WHITE>;
61			default-state = "off";
62			function = LED_FUNCTION_KBD_BACKLIGHT;
63
64			pinctrl-names = "default";
65			pinctrl-0 = <&button_backlight_default>;
66		};
67	};
68
69	usb_id: usb-id {
70		compatible = "linux,extcon-usb-gpio";
71		id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
72		pinctrl-names = "default";
73		pinctrl-0 = <&usb_id_default>;
74	};
75};
76
77&blsp_i2c3 {
78	status = "okay";
79
80	magnetometer@d {
81		compatible = "asahi-kasei,ak09911";
82		reg = <0x0d>;
83
84		vdd-supply = <&pm8916_l17>;
85		vid-supply = <&pm8916_l6>;
86
87		reset-gpios = <&tlmm 111 GPIO_ACTIVE_LOW>;
88
89		pinctrl-names = "default";
90		pinctrl-0 = <&mag_reset_default>;
91	};
92
93	imu@68 {
94		compatible = "bosch,bmi160";
95		reg = <0x68>;
96
97		vdd-supply = <&pm8916_l17>;
98		vddio-supply = <&pm8916_l6>;
99
100		mount-matrix = "0", "1", "0",
101			      "-1", "0", "0",
102			       "0", "0", "1";
103	};
104};
105
106&blsp_uart2 {
107	status = "okay";
108};
109
110&pm8916_resin {
111	status = "okay";
112	linux,code = <KEY_VOLUMEDOWN>;
113};
114
115&pm8916_rpm_regulators {
116	pm8916_l17: l17 {
117		regulator-min-microvolt = <2850000>;
118		regulator-max-microvolt = <2850000>;
119	};
120};
121
122&pm8916_vib {
123	status = "okay";
124};
125
126&sdhc_1 {
127	status = "okay";
128};
129
130&sdhc_2 {
131	status = "okay";
132
133	pinctrl-names = "default", "sleep";
134	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
135	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
136
137	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
138};
139
140&usb {
141	status = "okay";
142	extcon = <&usb_id>, <&usb_id>;
143};
144
145&usb_hs_phy {
146	extcon = <&usb_id>;
147};
148
149&wcnss {
150	status = "okay";
151};
152
153&wcnss_iris {
154	compatible = "qcom,wcn3620";
155};
156
157&tlmm {
158	button_backlight_default: button-backlight-default-state {
159		pins = "gpio17";
160		function = "gpio";
161
162		drive-strength = <2>;
163		bias-disable;
164	};
165
166	camera_front_flash_default: camera-front-flash-default-state {
167		pins = "gpio49", "gpio119";
168		function = "gpio";
169		drive-strength = <2>;
170		bias-disable;
171	};
172
173	gpio_keys_default: gpio-keys-default-state {
174		pins = "gpio107";
175		function = "gpio";
176
177		drive-strength = <2>;
178		bias-pull-up;
179	};
180
181	mag_reset_default: mag-reset-default-state {
182		pins = "gpio111";
183		function = "gpio";
184
185		drive-strength = <2>;
186		bias-disable;
187	};
188
189	sdc2_cd_default: sdc2-cd-default-state {
190		pins = "gpio38";
191		function = "gpio";
192		drive-strength = <2>;
193		bias-disable;
194	};
195
196	usb_id_default: usb-id-default-state {
197		pins = "gpio110";
198		function = "gpio";
199
200		drive-strength = <8>;
201		bias-pull-up;
202	};
203};
204