xref: /openbmc/linux/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts (revision b0a8f16ae4a0eb423122256691849b3ebc64efc2)
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		serial0 = &blsp1_uart2;
17	};
18
19	chosen {
20		stdout-path = "serial0";
21	};
22
23	flash-led-controller {
24		compatible = "ocs,ocp8110";
25		enable-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
26		flash-gpios = <&msmgpio 119 GPIO_ACTIVE_HIGH>;
27
28		pinctrl-0 = <&camera_front_flash_default>;
29		pinctrl-names = "default";
30
31		flash_led: led {
32			function = LED_FUNCTION_FLASH;
33			color = <LED_COLOR_ID_WHITE>;
34			flash-max-timeout-us = <250000>;
35		};
36	};
37
38	gpio-keys {
39		compatible = "gpio-keys";
40
41		pinctrl-names = "default";
42		pinctrl-0 = <&gpio_keys_default>;
43
44		label = "GPIO Buttons";
45
46		button-volume-up {
47			label = "Volume Up";
48			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
49			linux,code = <KEY_VOLUMEUP>;
50		};
51	};
52
53	leds {
54		compatible = "gpio-leds";
55
56		led-0 {
57			gpios = <&msmgpio 17 GPIO_ACTIVE_HIGH>;
58			color = <LED_COLOR_ID_WHITE>;
59			default-state = "off";
60			function = LED_FUNCTION_KBD_BACKLIGHT;
61
62			pinctrl-names = "default";
63			pinctrl-0 = <&button_backlight_default>;
64		};
65	};
66
67	usb_id: usb-id {
68		compatible = "linux,extcon-usb-gpio";
69		id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
70		pinctrl-names = "default";
71		pinctrl-0 = <&usb_id_default>;
72	};
73};
74
75&blsp_i2c3 {
76	status = "okay";
77
78	magnetometer@d {
79		compatible = "asahi-kasei,ak09911";
80		reg = <0x0d>;
81
82		vdd-supply = <&pm8916_l17>;
83		vid-supply = <&pm8916_l6>;
84
85		reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;
86
87		pinctrl-names = "default";
88		pinctrl-0 = <&mag_reset_default>;
89	};
90
91	imu@68 {
92		compatible = "bosch,bmi160";
93		reg = <0x68>;
94
95		vdd-supply = <&pm8916_l17>;
96		vddio-supply = <&pm8916_l6>;
97
98		mount-matrix = "0", "1", "0",
99			      "-1", "0", "0",
100			       "0", "0", "1";
101	};
102};
103
104&blsp1_uart2 {
105	status = "okay";
106};
107
108&pm8916_resin {
109	status = "okay";
110	linux,code = <KEY_VOLUMEDOWN>;
111};
112
113&pm8916_rpm_regulators {
114	pm8916_l17: l17 {
115		regulator-min-microvolt = <2850000>;
116		regulator-max-microvolt = <2850000>;
117	};
118};
119
120&pm8916_vib {
121	status = "okay";
122};
123
124&sdhc_1 {
125	status = "okay";
126
127	pinctrl-names = "default", "sleep";
128	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
129	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
130};
131
132&sdhc_2 {
133	status = "okay";
134
135	pinctrl-names = "default", "sleep";
136	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
137	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
138
139	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
140};
141
142&usb {
143	status = "okay";
144	extcon = <&usb_id>, <&usb_id>;
145};
146
147&usb_hs_phy {
148	extcon = <&usb_id>;
149};
150
151&wcnss {
152	status = "okay";
153};
154
155&wcnss_iris {
156	compatible = "qcom,wcn3620";
157};
158
159&msmgpio {
160	button_backlight_default: button-backlight-default-state {
161		pins = "gpio17";
162		function = "gpio";
163
164		drive-strength = <2>;
165		bias-disable;
166	};
167
168	camera_front_flash_default: camera-front-flash-default-state {
169		pins = "gpio49", "gpio119";
170		function = "gpio";
171		drive-strength = <2>;
172		bias-disable;
173	};
174
175	gpio_keys_default: gpio-keys-default-state {
176		pins = "gpio107";
177		function = "gpio";
178
179		drive-strength = <2>;
180		bias-pull-up;
181	};
182
183	mag_reset_default: mag-reset-default-state {
184		pins = "gpio111";
185		function = "gpio";
186
187		drive-strength = <2>;
188		bias-disable;
189	};
190
191	usb_id_default: usb-id-default-state {
192		pins = "gpio110";
193		function = "gpio";
194
195		drive-strength = <8>;
196		bias-pull-up;
197	};
198};
199