1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2019 Stephan Gerhold
8 #include "msm8916-pm8916.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/interrupt-controller/irq.h>
14 * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
15 * Unfortunately, the firmware is signed and cannot be replaced easily.
16 * There seems to be no way to boot ARM64 kernels on this device at the moment,
17 * even though the hardware would support it.
19 * However, it is possible to use this device tree by compiling an ARM32 kernel
20 * instead. For clarity and build testing this device tree is maintained next
21 * to the other MSM8916 device trees. However, it is actually used through
22 * arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dts
26 model = "Samsung Galaxy S4 Mini Value Edition";
27 compatible = "samsung,serranove", "qcom,msm8916";
28 chassis-type = "handset";
31 serial0 = &blsp1_uart2;
35 stdout-path = "serial0";
39 /* Additional memory used by Samsung firmware modifications */
41 reg = <0x0 0x85500000 0x0 0xb00000>;
47 compatible = "gpio-keys";
49 pinctrl-names = "default";
50 pinctrl-0 = <&gpio_keys_default>;
52 label = "GPIO Buttons";
56 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_VOLUMEUP>;
62 gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_HOMEPAGE>;
68 compatible = "gpio-keys";
70 pinctrl-names = "default";
71 pinctrl-0 = <&gpio_hall_sensor_default>;
73 label = "GPIO Hall Effect Sensor";
76 label = "Hall Effect Sensor";
77 gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
78 linux,input-type = <EV_SW>;
79 linux,code = <SW_LID>;
84 reg_vdd_tsp: regulator-vdd-tsp {
85 compatible = "regulator-fixed";
86 regulator-name = "vdd_tsp";
87 regulator-min-microvolt = <3300000>;
88 regulator-max-microvolt = <3300000>;
90 gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
93 pinctrl-names = "default";
94 pinctrl-0 = <&tsp_en_default>;
97 reg_touch_key: regulator-touch-key {
98 compatible = "regulator-fixed";
99 regulator-name = "touch_key";
100 regulator-min-microvolt = <2800000>;
101 regulator-max-microvolt = <2800000>;
103 gpio = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
106 pinctrl-names = "default";
107 pinctrl-0 = <&tkey_en_default>;
110 reg_key_led: regulator-key-led {
111 compatible = "regulator-fixed";
112 regulator-name = "key_led";
113 regulator-min-microvolt = <3300000>;
114 regulator-max-microvolt = <3300000>;
116 gpio = <&msmgpio 60 GPIO_ACTIVE_HIGH>;
119 pinctrl-names = "default";
120 pinctrl-0 = <&tkey_led_en_default>;
124 compatible = "i2c-gpio";
125 sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
126 scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
128 pinctrl-names = "default";
129 pinctrl-0 = <&muic_i2c_default>;
131 #address-cells = <1>;
135 compatible = "siliconmitus,sm5504-muic";
138 interrupt-parent = <&msmgpio>;
139 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
141 pinctrl-names = "default";
142 pinctrl-0 = <&muic_irq_default>;
147 compatible = "i2c-gpio";
148 sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
149 scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
151 pinctrl-names = "default";
152 pinctrl-0 = <&tkey_i2c_default>;
154 #address-cells = <1>;
158 compatible = "coreriver,tc360-touchkey";
161 interrupt-parent = <&msmgpio>;
162 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
164 vcc-supply = <®_touch_key>;
165 vdd-supply = <®_key_led>;
166 vddio-supply = <&pm8916_l6>;
168 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
170 pinctrl-names = "default";
171 pinctrl-0 = <&tkey_default>;
176 compatible = "i2c-gpio";
177 sda-gpios = <&msmgpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
178 scl-gpios = <&msmgpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
180 pinctrl-names = "default";
181 pinctrl-0 = <&nfc_i2c_default>;
183 #address-cells = <1>;
187 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
190 interrupt-parent = <&msmgpio>;
191 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
193 enable-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
194 firmware-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
196 pinctrl-names = "default";
197 pinctrl-0 = <&nfc_default>;
206 compatible = "st,lsm6ds3";
209 interrupt-parent = <&msmgpio>;
210 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
212 pinctrl-names = "default";
213 pinctrl-0 = <&imu_irq_default>;
217 compatible = "yamaha,yas537";
220 mount-matrix = "0", "1", "0",
230 compatible = "richtek,rt5033-battery";
233 interrupt-parent = <&msmgpio>;
234 interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
236 pinctrl-names = "default";
237 pinctrl-0 = <&fg_alert_default>;
245 compatible = "zinitix,bt541";
248 interrupt-parent = <&msmgpio>;
249 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
251 touchscreen-size-x = <540>;
252 touchscreen-size-y = <960>;
254 vdd-supply = <®_vdd_tsp>;
255 vddo-supply = <&pm8916_l6>;
257 pinctrl-names = "default";
258 pinctrl-0 = <&tsp_irq_default>;
268 linux,code = <KEY_VOLUMEDOWN>;
278 pinctrl-names = "default", "sleep";
279 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
280 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
286 pinctrl-names = "default", "sleep";
287 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
288 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
293 * FIXME: Disable UHS-I modes since tuning fails with:
295 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
296 * mmc1: tuning execution failed: -5
297 * mmc1: error -5 whilst initialising SD card
299 * This is the quirk used on downstream, which suggests this is
300 * a hardware limitation. However, probing a card using DDR50 works
301 * (without tuning), so maybe only tuning is broken?
308 extcon = <&muic>, <&muic>;
320 compatible = "qcom,wcn3660b";
323 &smd_rpm_regulators {
324 vdd_l1_l2_l3-supply = <&pm8916_s3>;
325 vdd_l4_l5_l6-supply = <&pm8916_s4>;
326 vdd_l7-supply = <&pm8916_s4>;
329 regulator-min-microvolt = <1200000>;
330 regulator-max-microvolt = <1300000>;
334 regulator-min-microvolt = <1800000>;
335 regulator-max-microvolt = <2100000>;
339 regulator-min-microvolt = <1225000>;
340 regulator-max-microvolt = <1225000>;
344 regulator-min-microvolt = <1200000>;
345 regulator-max-microvolt = <1200000>;
349 regulator-min-microvolt = <2050000>;
350 regulator-max-microvolt = <2050000>;
354 regulator-min-microvolt = <1800000>;
355 regulator-max-microvolt = <1800000>;
359 regulator-min-microvolt = <1800000>;
360 regulator-max-microvolt = <1800000>;
364 regulator-min-microvolt = <1800000>;
365 regulator-max-microvolt = <1800000>;
369 regulator-min-microvolt = <2850000>;
370 regulator-max-microvolt = <2900000>;
374 regulator-min-microvolt = <3300000>;
375 regulator-max-microvolt = <3300000>;
379 regulator-min-microvolt = <2700000>;
380 regulator-max-microvolt = <2800000>;
384 regulator-min-microvolt = <1800000>;
385 regulator-max-microvolt = <2950000>;
386 regulator-allow-set-load;
387 regulator-system-load = <200000>;
391 regulator-min-microvolt = <1800000>;
392 regulator-max-microvolt = <2950000>;
396 regulator-min-microvolt = <3075000>;
397 regulator-max-microvolt = <3075000>;
401 regulator-min-microvolt = <1800000>;
402 regulator-max-microvolt = <3300000>;
406 regulator-min-microvolt = <1800000>;
407 regulator-max-microvolt = <3300000>;
411 regulator-min-microvolt = <1800000>;
412 regulator-max-microvolt = <3300000>;
416 regulator-min-microvolt = <2850000>;
417 regulator-max-microvolt = <2850000>;
421 regulator-min-microvolt = <2700000>;
422 regulator-max-microvolt = <2700000>;
427 fg_alert_default: fg-alert-default-state {
431 drive-strength = <2>;
435 gpio_keys_default: gpio-keys-default-state {
436 pins = "gpio107", "gpio109";
439 drive-strength = <2>;
443 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
447 drive-strength = <2>;
451 imu_irq_default: imu-irq-default-state {
455 drive-strength = <2>;
459 muic_i2c_default: muic-i2c-default-state {
460 pins = "gpio105", "gpio106";
463 drive-strength = <2>;
467 muic_irq_default: muic-irq-default-state {
471 drive-strength = <2>;
475 nfc_default: nfc-default-state {
477 pins = "gpio20", "gpio49";
480 drive-strength = <2>;
487 drive-strength = <2>;
492 nfc_i2c_default: nfc-i2c-default-state {
493 pins = "gpio0", "gpio1";
496 drive-strength = <2>;
500 tkey_default: tkey-default-state {
504 drive-strength = <2>;
508 tkey_en_default: tkey-en-default-state {
512 drive-strength = <2>;
516 tkey_i2c_default: tkey-i2c-default-state {
517 pins = "gpio16", "gpio17";
520 drive-strength = <2>;
524 tkey_led_en_default: tkey-led-en-default-state {
528 drive-strength = <2>;
532 tsp_en_default: tsp-en-default-state {
536 drive-strength = <2>;
540 tsp_irq_default: tsp-irq-default-state {
544 drive-strength = <2>;