File Index
Files and directories
Sign in
FILE

msm8916-samsung-gt5-common.dtsi

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi DEVICETREE
  1// SPDX-License-Identifier: GPL-2.0-only
  2
  3/dts-v1/;
  4
  5#include "msm8916-pm8916.dtsi"
  6#include "msm8916-modem-qdsp6.dtsi"
  7
  8#include <dt-bindings/gpio/gpio.h>
  9#include <dt-bindings/input/input.h>
 10#include <dt-bindings/interrupt-controller/irq.h>
 11#include <dt-bindings/sound/apq8016-lpass.h>
 12
 13/ {
 14	aliases {
 15		mmc0 = &sdhc_1; /* eMMC */
 16		mmc1 = &sdhc_2; /* SD card */
 17		serial0 = &blsp_uart2;
 18	};
 19
 20	chosen {
 21		stdout-path = "serial0";
 22	};
 23
 24	reserved-memory {
 25		/* Additional memory used by Samsung firmware modifications */
 26		tz-apps@85500000 {
 27			reg = <0x0 0x85500000 0x0 0xb00000>;
 28			no-map;
 29		};
 30	};
 31
 32	gpio-keys {
 33		compatible = "gpio-keys";
 34
 35		pinctrl-0 = <&gpio_keys_default>;
 36		pinctrl-names = "default";
 37
 38		label = "GPIO Buttons";
 39
 40		volume-up-button {
 41			label = "Volume Up";
 42			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
 43			linux,code = <KEY_VOLUMEUP>;
 44		};
 45
 46		home-button {
 47			label = "Home";
 48			gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
 49			linux,code = <KEY_HOMEPAGE>;
 50		};
 51	};
 52
 53	gpio-hall-sensor {
 54		compatible = "gpio-keys";
 55
 56		pinctrl-0 = <&gpio_hall_sensor_default>;
 57		pinctrl-names = "default";
 58
 59		label = "GPIO Hall Effect Sensor";
 60
 61		hall-sensor-switch {
 62			label = "Hall Effect Sensor";
 63			gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
 64			linux,input-type = <EV_SW>;
 65			linux,code = <SW_LID>;
 66			linux,can-disable;
 67		};
 68	};
 69};
 70
 71&blsp_i2c2 {
 72	status = "okay";
 73
 74	light-sensor@10 {
 75		compatible = "capella,cm3323";
 76		reg = <0x10>;
 77	};
 78
 79	accelerometer@1d {
 80		compatible = "st,lis2hh12";
 81		reg = <0x1d>;
 82
 83		vdd-supply = <&pm8916_l17>;
 84		vddio-supply = <&pm8916_l5>;
 85
 86		interrupt-parent = <&tlmm>;
 87		interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
 88
 89		st,drdy-int-pin = <1>;
 90		mount-matrix = "0", "1", "0",
 91			      "-1", "0", "0",
 92			       "0", "0", "1";
 93
 94		pinctrl-0 = <&accel_int_default>;
 95		pinctrl-names = "default";
 96	};
 97};
 98
 99&blsp_i2c4 {
100	status = "okay";
101
102	fuelgauge@36 {
103		compatible = "maxim,max77849-battery";
104		reg = <0x36>;
105
106		maxim,rsns-microohm = <10000>;
107		maxim,over-heat-temp = <600>;
108		maxim,over-volt = <4400>;
109
110		interrupt-parent = <&tlmm>;
111		interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
112
113		pinctrl-0 = <&fuelgauge_int_default>;
114		pinctrl-names = "default";
115	};
116};
117
118&blsp_uart2 {
119	pinctrl-0 = <&blsp_uart2_console_default>;
120	pinctrl-1 = <&blsp_uart2_console_sleep>;
121	pinctrl-names = "default", "sleep";
122	status = "okay";
123};
124
125/*
126 * For some reason the speaker amplifier is connected to the second SD line
127 * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the
128 * device tree, otherwise audio will seemingly play fine on the wrong SD line
129 * but the speaker stays silent.
130 *
131 * When routing audio via QDSP6 (the default) the &lpass node is reserved and
132 * the definitions from &q6afedai are used. When the modem is disabled audio can
133 * be alternatively routed directly to the LPASS hardware with reduced latency.
134 * The definitions for &lpass are here for completeness to simplify changing the
135 * setup with minor changes to the DT (either manually or with DT overlays).
136 */
137&lpass {
138	dai-link@3 {
139		reg = <MI2S_QUATERNARY>;
140		qcom,playback-sd-lines = <1>;
141	};
142};
143
144&mpss_mem {
145	reg = <0x0 0x86800000 0x0 0x5400000>;
146};
147
148&pm8916_resin {
149	linux,code = <KEY_VOLUMEDOWN>;
150	status = "okay";
151};
152
153&pm8916_rpm_regulators {
154	pm8916_l17: l17 {
155		regulator-min-microvolt = <2850000>;
156		regulator-max-microvolt = <2850000>;
157	};
158};
159
160/* FIXME: Replace with MAX77849 MUIC when driver is available */
161&pm8916_usbin {
162	status = "okay";
163};
164
165&q6afedai {
166	dai@22 {
167		reg = <QUATERNARY_MI2S_RX>;
168		qcom,sd-lines = <1>;
169	};
170};
171
172&sdhc_1 {
173	status = "okay";
174};
175
176&sdhc_2 {
177	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
178	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
179	pinctrl-names = "default", "sleep";
180
181	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
182
183	status = "okay";
184};
185
186&sound {
187	audio-routing =
188		"AMIC1", "MIC BIAS External1",
189		"AMIC2", "MIC BIAS Internal2",
190		"AMIC3", "MIC BIAS External1";
191
192	sound_link_backend2: backend2-dai-link {
193		link-name = "Quaternary MI2S";
194
195		cpu {
196			sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
197		};
198		platform {
199			sound-dai = <&q6routing>;
200		};
201		codec {
202			sound-dai = <&speaker_codec>;
203		};
204	};
205};
206
207&usb {
208	dr_mode = "peripheral";
209	extcon = <&pm8916_usbin>;
210
211	status = "okay";
212};
213
214&usb_hs_phy {
215	extcon = <&pm8916_usbin>;
216};
217
218&venus {
219	status = "okay";
220};
221
222&venus_mem {
223	status = "okay";
224};
225
226&wcnss {
227	status = "okay";
228};
229
230&wcnss_iris {
231	compatible = "qcom,wcn3660b";
232};
233
234&wcnss_mem {
235	status = "okay";
236};
237
238&tlmm {
239	accel_int_default: accel-int-default-state {
240		pins = "gpio115";
241		function = "gpio";
242		drive-strength = <2>;
243		bias-disable;
244	};
245
246	fuelgauge_int_default: fuelgauge-int-default-state {
247		pins = "gpio121";
248		function = "gpio";
249		drive-strength = <2>;
250		bias-disable;
251	};
252
253	gpio_keys_default: gpio-keys-default-state {
254		pins = "gpio107", "gpio109";
255		function = "gpio";
256		drive-strength = <2>;
257		bias-pull-up;
258	};
259
260	gpio_hall_sensor_default: gpio-hall-sensor-default-state {
261		pins = "gpio52";
262		function = "gpio";
263		drive-strength = <2>;
264		bias-disable;
265	};
266
267	sdc2_cd_default: sdc2-cd-default-state {
268		pins = "gpio38";
269		function = "gpio";
270		drive-strength = <2>;
271		bias-disable;
272	};
273};
~/ Read-only file preview.