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>;
215 compatible = "yamaha,yas537";
218 mount-matrix = "0", "1", "0",
228 compatible = "richtek,rt5033-battery";
231 interrupt-parent = <&msmgpio>;
232 interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
234 pinctrl-names = "default";
235 pinctrl-0 = <&fg_alert_default>;
243 compatible = "zinitix,bt541";
246 interrupt-parent = <&msmgpio>;
247 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
249 touchscreen-size-x = <540>;
250 touchscreen-size-y = <960>;
252 vdd-supply = <®_vdd_tsp>;
253 vddo-supply = <&pm8916_l6>;
255 pinctrl-names = "default";
256 pinctrl-0 = <&tsp_irq_default>;
266 linux,code = <KEY_VOLUMEDOWN>;
277 compatible = "qcom,wcn3660b";
284 pinctrl-names = "default", "sleep";
285 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
286 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
292 pinctrl-names = "default", "sleep";
293 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
294 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
299 * FIXME: Disable UHS-I modes since tuning fails with:
301 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
302 * mmc1: tuning execution failed: -5
303 * mmc1: error -5 whilst initialising SD card
305 * This is the quirk used on downstream, which suggests this is
306 * a hardware limitation. However, probing a card using DDR50 works
307 * (without tuning), so maybe only tuning is broken?
314 extcon = <&muic>, <&muic>;
321 &smd_rpm_regulators {
322 vdd_l1_l2_l3-supply = <&pm8916_s3>;
323 vdd_l4_l5_l6-supply = <&pm8916_s4>;
324 vdd_l7-supply = <&pm8916_s4>;
327 regulator-min-microvolt = <1200000>;
328 regulator-max-microvolt = <1300000>;
332 regulator-min-microvolt = <1800000>;
333 regulator-max-microvolt = <2100000>;
337 regulator-min-microvolt = <1225000>;
338 regulator-max-microvolt = <1225000>;
342 regulator-min-microvolt = <1200000>;
343 regulator-max-microvolt = <1200000>;
347 regulator-min-microvolt = <2050000>;
348 regulator-max-microvolt = <2050000>;
352 regulator-min-microvolt = <1800000>;
353 regulator-max-microvolt = <1800000>;
357 regulator-min-microvolt = <1800000>;
358 regulator-max-microvolt = <1800000>;
362 regulator-min-microvolt = <1800000>;
363 regulator-max-microvolt = <1800000>;
367 regulator-min-microvolt = <2850000>;
368 regulator-max-microvolt = <2900000>;
372 regulator-min-microvolt = <3300000>;
373 regulator-max-microvolt = <3300000>;
377 regulator-min-microvolt = <2700000>;
378 regulator-max-microvolt = <2800000>;
382 regulator-min-microvolt = <1800000>;
383 regulator-max-microvolt = <2950000>;
384 regulator-allow-set-load;
385 regulator-system-load = <200000>;
389 regulator-min-microvolt = <1800000>;
390 regulator-max-microvolt = <2950000>;
394 regulator-min-microvolt = <3075000>;
395 regulator-max-microvolt = <3075000>;
399 regulator-min-microvolt = <1800000>;
400 regulator-max-microvolt = <3300000>;
404 regulator-min-microvolt = <1800000>;
405 regulator-max-microvolt = <3300000>;
409 regulator-min-microvolt = <1800000>;
410 regulator-max-microvolt = <3300000>;
414 regulator-min-microvolt = <2850000>;
415 regulator-max-microvolt = <2850000>;
419 regulator-min-microvolt = <2700000>;
420 regulator-max-microvolt = <2700000>;
425 fg_alert_default: fg-alert-default {
429 drive-strength = <2>;
433 gpio_keys_default: gpio-keys-default {
434 pins = "gpio107", "gpio109";
437 drive-strength = <2>;
441 gpio_hall_sensor_default: gpio-hall-sensor-default {
445 drive-strength = <2>;
449 imu_irq_default: imu-irq-default {
453 drive-strength = <2>;
457 muic_i2c_default: muic-i2c-default {
458 pins = "gpio105", "gpio106";
461 drive-strength = <2>;
465 muic_irq_default: muic-irq-default {
469 drive-strength = <2>;
473 nfc_default: nfc-default {
474 pins = "gpio20", "gpio49";
477 drive-strength = <2>;
484 drive-strength = <2>;
489 nfc_i2c_default: nfc-i2c-default {
490 pins = "gpio0", "gpio1";
493 drive-strength = <2>;
497 tkey_default: tkey-default {
501 drive-strength = <2>;
505 tkey_en_default: tkey-en-default {
509 drive-strength = <2>;
513 tkey_i2c_default: tkey-i2c-default {
514 pins = "gpio16", "gpio17";
517 drive-strength = <2>;
521 tkey_led_en_default: tkey-led-en-default {
525 drive-strength = <2>;
529 tsp_en_default: tsp-en-default {
533 drive-strength = <2>;
537 tsp_irq_default: tsp-irq-default {
541 drive-strength = <2>;