1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2019 Stephan Gerhold
6 #include "msm8916-pm8916.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/interrupt-controller/irq.h>
12 * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
13 * Unfortunately, the firmware is signed and cannot be replaced easily.
14 * There seems to be no way to boot ARM64 kernels on this device at the moment,
15 * even though the hardware would support it.
17 * However, it is possible to use this device tree by compiling an ARM32 kernel
18 * instead. For clarity and build testing this device tree is maintained next
19 * to the other MSM8916 device trees. However, it is actually used through
20 * arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dts
24 model = "Samsung Galaxy S4 Mini Value Edition";
25 compatible = "samsung,serranove", "qcom,msm8916";
26 chassis-type = "handset";
29 serial0 = &blsp1_uart2;
33 stdout-path = "serial0";
37 /* Additional memory used by Samsung firmware modifications */
39 reg = <0x0 0x85500000 0x0 0xb00000>;
45 compatible = "gpio-keys";
47 pinctrl-names = "default";
48 pinctrl-0 = <&gpio_keys_default>;
50 label = "GPIO Buttons";
54 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_VOLUMEUP>;
60 gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_HOMEPAGE>;
66 compatible = "gpio-keys";
68 pinctrl-names = "default";
69 pinctrl-0 = <&gpio_hall_sensor_default>;
71 label = "GPIO Hall Effect Sensor";
74 label = "Hall Effect Sensor";
75 gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
76 linux,input-type = <EV_SW>;
77 linux,code = <SW_LID>;
82 reg_vdd_tsp: regulator-vdd-tsp {
83 compatible = "regulator-fixed";
84 regulator-name = "vdd_tsp";
85 regulator-min-microvolt = <3300000>;
86 regulator-max-microvolt = <3300000>;
88 gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
91 pinctrl-names = "default";
92 pinctrl-0 = <&tsp_en_default>;
95 reg_touch_key: regulator-touch-key {
96 compatible = "regulator-fixed";
97 regulator-name = "touch_key";
98 regulator-min-microvolt = <2800000>;
99 regulator-max-microvolt = <2800000>;
101 gpio = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
104 pinctrl-names = "default";
105 pinctrl-0 = <&tkey_en_default>;
108 reg_key_led: regulator-key-led {
109 compatible = "regulator-fixed";
110 regulator-name = "key_led";
111 regulator-min-microvolt = <3300000>;
112 regulator-max-microvolt = <3300000>;
114 gpio = <&msmgpio 60 GPIO_ACTIVE_HIGH>;
117 pinctrl-names = "default";
118 pinctrl-0 = <&tkey_led_en_default>;
122 compatible = "i2c-gpio";
123 sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
124 scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&muic_i2c_default>;
129 #address-cells = <1>;
133 compatible = "siliconmitus,sm5504-muic";
136 interrupt-parent = <&msmgpio>;
137 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&muic_irq_default>;
145 compatible = "i2c-gpio";
146 sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
147 scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
149 pinctrl-names = "default";
150 pinctrl-0 = <&tkey_i2c_default>;
152 #address-cells = <1>;
156 compatible = "coreriver,tc360-touchkey";
159 interrupt-parent = <&msmgpio>;
160 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
162 vcc-supply = <®_touch_key>;
163 vdd-supply = <®_key_led>;
164 vddio-supply = <&pm8916_l6>;
166 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
168 pinctrl-names = "default";
169 pinctrl-0 = <&tkey_default>;
174 compatible = "i2c-gpio";
175 sda-gpios = <&msmgpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
176 scl-gpios = <&msmgpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
178 pinctrl-names = "default";
179 pinctrl-0 = <&nfc_i2c_default>;
181 #address-cells = <1>;
185 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
188 interrupt-parent = <&msmgpio>;
189 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
191 enable-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
192 firmware-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
194 pinctrl-names = "default";
195 pinctrl-0 = <&nfc_default>;
204 compatible = "st,lsm6ds3";
207 interrupt-parent = <&msmgpio>;
208 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&imu_irq_default>;
219 compatible = "richtek,rt5033-battery";
222 interrupt-parent = <&msmgpio>;
223 interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
225 pinctrl-names = "default";
226 pinctrl-0 = <&fg_alert_default>;
234 compatible = "zinitix,bt541";
237 interrupt-parent = <&msmgpio>;
238 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
240 touchscreen-size-x = <540>;
241 touchscreen-size-y = <960>;
243 vdd-supply = <®_vdd_tsp>;
244 vddo-supply = <&pm8916_l6>;
246 pinctrl-names = "default";
247 pinctrl-0 = <&tsp_irq_default>;
257 linux,code = <KEY_VOLUMEDOWN>;
268 compatible = "qcom,wcn3660b";
275 pinctrl-names = "default", "sleep";
276 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
277 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
283 pinctrl-names = "default", "sleep";
284 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
285 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
290 * FIXME: Disable UHS-I modes since tuning fails with:
292 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
293 * mmc1: tuning execution failed: -5
294 * mmc1: error -5 whilst initialising SD card
296 * This is the quirk used on downstream, which suggests this is
297 * a hardware limitation. However, probing a card using DDR50 works
298 * (without tuning), so maybe only tuning is broken?
305 extcon = <&muic>, <&muic>;
312 &smd_rpm_regulators {
313 vdd_l1_l2_l3-supply = <&pm8916_s3>;
314 vdd_l4_l5_l6-supply = <&pm8916_s4>;
315 vdd_l7-supply = <&pm8916_s4>;
318 regulator-min-microvolt = <1200000>;
319 regulator-max-microvolt = <1300000>;
323 regulator-min-microvolt = <1800000>;
324 regulator-max-microvolt = <2100000>;
328 regulator-min-microvolt = <1225000>;
329 regulator-max-microvolt = <1225000>;
333 regulator-min-microvolt = <1200000>;
334 regulator-max-microvolt = <1200000>;
338 regulator-min-microvolt = <2050000>;
339 regulator-max-microvolt = <2050000>;
343 regulator-min-microvolt = <1800000>;
344 regulator-max-microvolt = <1800000>;
348 regulator-min-microvolt = <1800000>;
349 regulator-max-microvolt = <1800000>;
353 regulator-min-microvolt = <1800000>;
354 regulator-max-microvolt = <1800000>;
358 regulator-min-microvolt = <2850000>;
359 regulator-max-microvolt = <2900000>;
363 regulator-min-microvolt = <3300000>;
364 regulator-max-microvolt = <3300000>;
368 regulator-min-microvolt = <2700000>;
369 regulator-max-microvolt = <2800000>;
373 regulator-min-microvolt = <1800000>;
374 regulator-max-microvolt = <2950000>;
375 regulator-allow-set-load;
376 regulator-system-load = <200000>;
380 regulator-min-microvolt = <1800000>;
381 regulator-max-microvolt = <2950000>;
385 regulator-min-microvolt = <3075000>;
386 regulator-max-microvolt = <3075000>;
390 regulator-min-microvolt = <1800000>;
391 regulator-max-microvolt = <3300000>;
395 regulator-min-microvolt = <1800000>;
396 regulator-max-microvolt = <3300000>;
400 regulator-min-microvolt = <1800000>;
401 regulator-max-microvolt = <3300000>;
405 regulator-min-microvolt = <2850000>;
406 regulator-max-microvolt = <2850000>;
410 regulator-min-microvolt = <2700000>;
411 regulator-max-microvolt = <2700000>;
416 fg_alert_default: fg-alert-default {
420 drive-strength = <2>;
424 gpio_keys_default: gpio-keys-default {
425 pins = "gpio107", "gpio109";
428 drive-strength = <2>;
432 gpio_hall_sensor_default: gpio-hall-sensor-default {
436 drive-strength = <2>;
440 imu_irq_default: imu-irq-default {
444 drive-strength = <2>;
448 muic_i2c_default: muic-i2c-default {
449 pins = "gpio105", "gpio106";
452 drive-strength = <2>;
456 muic_irq_default: muic-irq-default {
460 drive-strength = <2>;
464 nfc_default: nfc-default {
465 pins = "gpio20", "gpio49";
468 drive-strength = <2>;
475 drive-strength = <2>;
480 nfc_i2c_default: nfc-i2c-default {
481 pins = "gpio0", "gpio1";
484 drive-strength = <2>;
488 tkey_default: tkey-default {
492 drive-strength = <2>;
496 tkey_en_default: tkey-en-default {
500 drive-strength = <2>;
504 tkey_i2c_default: tkey-i2c-default {
505 pins = "gpio16", "gpio17";
508 drive-strength = <2>;
512 tkey_led_en_default: tkey-led-en-default {
516 drive-strength = <2>;
520 tsp_en_default: tsp-en-default {
524 drive-strength = <2>;
528 tsp_irq_default: tsp-irq-default {
532 drive-strength = <2>;