1// SPDX-License-Identifier: GPL-2.0-only
2
3#include "msm8916-pm8916.dtsi"
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7
8/ {
9	aliases {
10		mmc0 = &sdhc_1; /* eMMC */
11		mmc1 = &sdhc_2; /* SD card */
12		serial0 = &blsp_uart2;
13	};
14
15	chosen {
16		stdout-path = "serial0";
17	};
18
19	reserved-memory {
20		/* Additional memory used by Samsung firmware modifications */
21		tz-apps@85500000 {
22			reg = <0x0 0x85500000 0x0 0xb00000>;
23			no-map;
24		};
25	};
26
27	gpio_hall_sensor: gpio-hall-sensor {
28		compatible = "gpio-keys";
29
30		pinctrl-names = "default";
31		pinctrl-0 = <&gpio_hall_sensor_default>;
32
33		label = "GPIO Hall Effect Sensor";
34
35		event-hall-sensor {
36			label = "Hall Effect Sensor";
37			gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
38			linux,input-type = <EV_SW>;
39			linux,code = <SW_LID>;
40			linux,can-disable;
41		};
42	};
43
44	gpio-keys {
45		compatible = "gpio-keys";
46
47		pinctrl-names = "default";
48		pinctrl-0 = <&gpio_keys_default>;
49
50		label = "GPIO Buttons";
51
52		button-volume-up {
53			label = "Volume Up";
54			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
55			linux,code = <KEY_VOLUMEUP>;
56		};
57
58		button-home {
59			label = "Home Key";
60			gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
61			linux,code = <KEY_HOMEPAGE>;
62		};
63	};
64
65	i2c_muic: i2c-muic {
66		compatible = "i2c-gpio";
67		sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
68		scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
69
70		pinctrl-names = "default";
71		pinctrl-0 = <&muic_i2c_default>;
72
73		#address-cells = <1>;
74		#size-cells = <0>;
75
76		muic: extcon@25 {
77			compatible = "siliconmitus,sm5703-muic";
78			reg = <0x25>;
79
80			interrupt-parent = <&tlmm>;
81			interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
82
83			pinctrl-names = "default";
84			pinctrl-0 = <&muic_int_default>;
85		};
86	};
87};
88
89&blsp_i2c5 {
90	status = "okay";
91
92	touchscreen: touchscreen@50 {
93		compatible = "imagis,ist3038c";
94		reg = <0x50>;
95
96		interrupt-parent = <&tlmm>;
97		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
98
99		touchscreen-size-x = <720>;
100		touchscreen-size-y = <1280>;
101
102		vddio-supply = <&pm8916_l6>;
103
104		pinctrl-0 = <&tsp_int_default>;
105		pinctrl-names = "default";
106	};
107};
108
109&blsp_uart2 {
110	status = "okay";
111};
112
113&pm8916_resin {
114	status = "okay";
115	linux,code = <KEY_VOLUMEDOWN>;
116};
117
118&sdhc_1 {
119	status = "okay";
120};
121
122&sdhc_2 {
123	status = "okay";
124
125	pinctrl-names = "default", "sleep";
126	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
127	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
128
129	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
130};
131
132&usb {
133	extcon = <&muic>, <&muic>;
134	status = "okay";
135};
136
137&usb_hs_phy {
138	extcon = <&muic>;
139};
140
141&wcnss {
142	status = "okay";
143};
144
145&wcnss_iris {
146	compatible = "qcom,wcn3620";
147};
148
149&tlmm {
150	gpio_hall_sensor_default: gpio-hall-sensor-default-state {
151		pins = "gpio52";
152		function = "gpio";
153
154		drive-strength = <2>;
155		bias-disable;
156	};
157
158	gpio_keys_default: gpio-keys-default-state {
159		pins = "gpio107", "gpio109";
160		function = "gpio";
161
162		drive-strength = <2>;
163		bias-pull-up;
164	};
165
166	muic_i2c_default: muic-i2c-default-state {
167		pins = "gpio105", "gpio106";
168		function = "gpio";
169
170		drive-strength = <2>;
171		bias-disable;
172	};
173
174	muic_int_default: muic-int-default-state {
175		pins = "gpio12";
176		function = "gpio";
177
178		drive-strength = <2>;
179		bias-disable;
180	};
181
182	sdc2_cd_default: sdc2-cd-default-state {
183		pins = "gpio38";
184		function = "gpio";
185
186		drive-strength = <2>;
187		bias-disable;
188	};
189
190	tsp_int_default: tsp-int-default-state {
191		pins = "gpio13";
192		function = "gpio";
193
194		drive-strength = <2>;
195		bias-disable;
196	};
197};
198