1 // SPDX-License-Identifier: GPL-2.0-only
3 #include "msm8916-pm8916.dtsi"
4 #include "msm8916-modem-qdsp6.dtsi"
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
10 #include <dt-bindings/sound/apq8016-lpass.h>
14 mmc0 = &sdhc_1; /* eMMC */
15 mmc1 = &sdhc_2; /* SD card */
16 serial0 = &blsp_uart2;
20 stdout-path = "serial0";
24 /* Additional memory used by Samsung firmware modifications */
26 reg = <0x0 0x85500000 0x0 0xb00000>;
32 compatible = "clk-pwm";
35 clocks = <&gcc GCC_GP2_CLK>;
37 pinctrl-names = "default";
38 pinctrl-0 = <&motor_pwm_default>;
43 compatible = "gpio-keys";
45 pinctrl-names = "default";
46 pinctrl-0 = <&gpio_keys_default>;
48 label = "GPIO Buttons";
52 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_VOLUMEUP>;
58 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_HOMEPAGE>;
64 compatible = "gpio-keys";
66 pinctrl-names = "default";
67 pinctrl-0 = <&gpio_hall_sensor_default>;
69 label = "GPIO Hall Effect Sensor";
72 label = "Hall Effect Sensor";
73 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
74 linux,input-type = <EV_SW>;
75 linux,code = <SW_LID>;
81 * NOTE: A5 connects GPIO 76 to a reglator powering the motor
82 * driver IC but A3 connects the same signal to an ENABLE pin of
85 reg_motor_vdd: regulator-motor-vdd {
86 compatible = "regulator-fixed";
87 regulator-name = "motor_vdd";
88 regulator-min-microvolt = <3000000>;
89 regulator-max-microvolt = <3000000>;
91 gpio = <&tlmm 76 GPIO_ACTIVE_HIGH>;
94 pinctrl-names = "default";
95 pinctrl-0 = <&motor_en_default>;
98 reg_vdd_tsp_a: regulator-vdd-tsp-a {
99 compatible = "regulator-fixed";
100 regulator-name = "vdd_tsp_a";
101 regulator-min-microvolt = <3300000>;
102 regulator-max-microvolt = <3300000>;
104 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
107 pinctrl-names = "default";
108 pinctrl-0 = <&tsp_en_default>;
112 compatible = "i2c-gpio";
113 sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
114 scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
116 pinctrl-names = "default";
117 pinctrl-0 = <&muic_i2c_default>;
119 #address-cells = <1>;
123 compatible = "siliconmitus,sm5502-muic";
126 interrupt-parent = <&tlmm>;
127 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
129 pinctrl-names = "default";
130 pinctrl-0 = <&muic_int_default>;
135 compatible = "i2c-gpio";
136 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
137 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&tkey_i2c_default>;
142 #address-cells = <1>;
145 touchkey: touchkey@20 {
146 /* Note: Actually an ABOV MCU that implements same interface */
147 compatible = "coreriver,tc360-touchkey";
150 interrupt-parent = <&tlmm>;
151 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
153 /* vcc/vdd-supply are board-specific */
154 vddio-supply = <&pm8916_l6>;
156 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
158 pinctrl-names = "default";
159 pinctrl-0 = <&tkey_default>;
164 compatible = "i2c-gpio";
165 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
166 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
168 pinctrl-names = "default";
169 pinctrl-0 = <&nfc_i2c_default>;
171 #address-cells = <1>;
175 compatible = "samsung,s3fwrn5-i2c";
178 interrupt-parent = <&tlmm>;
179 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
181 en-gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
182 wake-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
184 clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
186 pinctrl-names = "default";
187 pinctrl-0 = <&nfc_default &nfc_clk_req>;
192 compatible = "pwm-vibrator";
194 pwms = <&clk_pwm 0 100000>;
195 pwm-names = "enable";
197 vcc-supply = <®_motor_vdd>;
205 speaker_codec: audio-codec@34 {
206 compatible = "nxp,tfa9895";
208 vddd-supply = <&pm8916_l5>;
209 sound-name-prefix = "Speaker";
210 #sound-dai-cells = <0>;
217 accelerometer: accelerometer@10 {
218 compatible = "bosch,bmc150_accel";
220 interrupt-parent = <&tlmm>;
221 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
223 vdd-supply = <&pm8916_l17>;
224 vddio-supply = <&pm8916_l5>;
226 pinctrl-names = "default";
227 pinctrl-0 = <&accel_int_default>;
231 compatible = "bosch,bmc150_magn";
234 vdd-supply = <&pm8916_l17>;
235 vddio-supply = <&pm8916_l5>;
243 compatible = "richtek,rt5033-battery";
245 interrupt-parent = <&tlmm>;
246 interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
248 pinctrl-names = "default";
249 pinctrl-0 = <&fg_alert_default>;
262 * For some reason the speaker amplifier is connected to the second SD line
263 * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the
264 * device tree, otherwise audio will seemingly play fine on the wrong SD line
265 * but the speaker stays silent.
267 * When routing audio via QDSP6 (the default) the &lpass node is reserved and
268 * the definitions from &q6afedai are used. When the modem is disabled audio can
269 * be alternatively routed directly to the LPASS hardware with reduced latency.
270 * The definitions for &lpass are here for completeness to simplify changing the
271 * setup with minor changes to the DT (either manually or with DT overlays).
275 reg = <MI2S_QUATERNARY>;
276 qcom,playback-sd-lines = <1>;
285 pinctrl-names = "default", "sleep";
286 pinctrl-0 = <&mdss_default>;
287 pinctrl-1 = <&mdss_sleep>;
291 reg = <0x0 0x86800000 0x0 0x5400000>;
296 linux,code = <KEY_VOLUMEDOWN>;
299 &pm8916_rpm_regulators {
301 regulator-min-microvolt = <2850000>;
302 regulator-max-microvolt = <2850000>;
308 reg = <QUATERNARY_MI2S_RX>;
320 pinctrl-names = "default", "sleep";
321 pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
322 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
324 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
328 model = "samsung-a2015";
330 "AMIC1", "MIC BIAS External1",
331 "AMIC2", "MIC BIAS Internal2",
332 "AMIC3", "MIC BIAS External1";
334 pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
335 pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
336 pinctrl-names = "default", "sleep";
338 sound_link_backend2: backend2-dai-link {
339 link-name = "Quaternary MI2S";
342 sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
345 sound-dai = <&q6routing>;
348 sound-dai = <&speaker_codec>;
355 extcon = <&muic>, <&muic>;
371 accel_int_default: accel-int-default-state {
375 drive-strength = <2>;
379 fg_alert_default: fg-alert-default-state {
383 drive-strength = <2>;
387 gpio_keys_default: gpio-keys-default-state {
388 pins = "gpio107", "gpio109";
391 drive-strength = <2>;
395 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
399 drive-strength = <2>;
403 mdss_default: mdss-default-state {
407 drive-strength = <8>;
410 mdss_sleep: mdss-sleep-state {
414 drive-strength = <2>;
418 motor_en_default: motor-en-default-state {
422 drive-strength = <2>;
426 motor_pwm_default: motor-pwm-default-state {
428 function = "gcc_gp2_clk_a";
431 muic_i2c_default: muic-i2c-default-state {
432 pins = "gpio105", "gpio106";
435 drive-strength = <2>;
439 muic_int_default: muic-int-default-state {
443 drive-strength = <2>;
447 nfc_default: nfc-default-state {
449 pins = "gpio20", "gpio49";
452 drive-strength = <2>;
460 drive-strength = <2>;
465 nfc_i2c_default: nfc-i2c-default-state {
466 pins = "gpio0", "gpio1";
469 drive-strength = <2>;
473 sdc2_cd_default: sdc2-cd-default-state {
476 drive-strength = <2>;
480 tkey_default: tkey-default-state {
484 drive-strength = <2>;
488 tkey_i2c_default: tkey-i2c-default-state {
489 pins = "gpio16", "gpio17";
492 drive-strength = <2>;
496 tsp_en_default: tsp-en-default-state {
500 drive-strength = <2>;
504 ts_int_default: ts-int-default-state {
508 drive-strength = <2>;
514 nfc_clk_req: nfc-clk-req-state {
520 power-source = <PM8916_GPIO_L2>;