1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2019 Stephan Gerhold
8 #include "msm8916-pm8916.dtsi"
9 #include "msm8916-modem-qdsp6.dtsi"
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/interrupt-controller/irq.h>
16 * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
17 * Unfortunately, the firmware is signed and cannot be replaced easily.
18 * There seems to be no way to boot ARM64 kernels on this device at the moment,
19 * even though the hardware would support it.
21 * However, it is possible to use this device tree by compiling an ARM32 kernel
22 * instead. For clarity and build testing this device tree is maintained next
23 * to the other MSM8916 device trees. However, it is actually used through
24 * arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dts
28 model = "Samsung Galaxy S4 Mini Value Edition";
29 compatible = "samsung,serranove", "qcom,msm8916";
30 chassis-type = "handset";
33 mmc0 = &sdhc_1; /* eMMC */
34 mmc1 = &sdhc_2; /* SD card */
35 serial0 = &blsp_uart2;
39 stdout-path = "serial0";
43 /* Additional memory used by Samsung firmware modifications */
45 reg = <0x0 0x85500000 0x0 0xb00000>;
51 compatible = "gpio-keys";
53 pinctrl-names = "default";
54 pinctrl-0 = <&gpio_keys_default>;
56 label = "GPIO Buttons";
60 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_VOLUMEUP>;
66 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_HOMEPAGE>;
72 compatible = "gpio-keys";
74 pinctrl-names = "default";
75 pinctrl-0 = <&gpio_hall_sensor_default>;
77 label = "GPIO Hall Effect Sensor";
80 label = "Hall Effect Sensor";
81 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
82 linux,input-type = <EV_SW>;
83 linux,code = <SW_LID>;
88 reg_vdd_tsp: regulator-vdd-tsp {
89 compatible = "regulator-fixed";
90 regulator-name = "vdd_tsp";
91 regulator-min-microvolt = <3300000>;
92 regulator-max-microvolt = <3300000>;
94 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
97 pinctrl-names = "default";
98 pinctrl-0 = <&tsp_en_default>;
101 reg_touch_key: regulator-touch-key {
102 compatible = "regulator-fixed";
103 regulator-name = "touch_key";
104 regulator-min-microvolt = <2800000>;
105 regulator-max-microvolt = <2800000>;
107 gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
110 pinctrl-names = "default";
111 pinctrl-0 = <&tkey_en_default>;
114 reg_key_led: regulator-key-led {
115 compatible = "regulator-fixed";
116 regulator-name = "key_led";
117 regulator-min-microvolt = <3300000>;
118 regulator-max-microvolt = <3300000>;
120 gpio = <&tlmm 60 GPIO_ACTIVE_HIGH>;
123 pinctrl-names = "default";
124 pinctrl-0 = <&tkey_led_en_default>;
128 compatible = "i2c-gpio";
129 sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
130 scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
132 pinctrl-names = "default";
133 pinctrl-0 = <&muic_i2c_default>;
135 #address-cells = <1>;
139 compatible = "siliconmitus,sm5504-muic";
142 interrupt-parent = <&tlmm>;
143 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
145 pinctrl-names = "default";
146 pinctrl-0 = <&muic_irq_default>;
149 compatible = "usb-b-connector";
157 compatible = "i2c-gpio";
158 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
159 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
161 pinctrl-names = "default";
162 pinctrl-0 = <&tkey_i2c_default>;
164 #address-cells = <1>;
168 compatible = "coreriver,tc360-touchkey";
171 interrupt-parent = <&tlmm>;
172 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
174 vcc-supply = <®_touch_key>;
175 vdd-supply = <®_key_led>;
176 vddio-supply = <&pm8916_l6>;
178 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
180 pinctrl-names = "default";
181 pinctrl-0 = <&tkey_default>;
186 compatible = "i2c-gpio";
187 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
188 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
190 pinctrl-names = "default";
191 pinctrl-0 = <&nfc_i2c_default>;
193 #address-cells = <1>;
197 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
200 interrupt-parent = <&tlmm>;
201 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
203 enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
204 firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&nfc_default>;
212 compatible = "simple-battery";
213 precharge-current-microamp = <450000>;
214 constant-charge-current-max-microamp = <1000000>;
215 charge-term-current-microamp = <150000>;
216 precharge-upper-limit-microvolt = <3500000>;
217 constant-charge-voltage-max-microvolt = <4350000>;
225 compatible = "st,lsm6ds3";
228 interrupt-parent = <&tlmm>;
229 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
231 pinctrl-names = "default";
232 pinctrl-0 = <&imu_irq_default>;
236 compatible = "yamaha,yas537";
239 mount-matrix = "0", "1", "0",
249 compatible = "richtek,rt5033-battery";
252 interrupt-parent = <&tlmm>;
253 interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
255 pinctrl-names = "default";
256 pinctrl-0 = <&fg_alert_default>;
258 power-supplies = <&rt5033_charger>;
266 compatible = "zinitix,bt541";
269 interrupt-parent = <&tlmm>;
270 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
272 touchscreen-size-x = <540>;
273 touchscreen-size-y = <960>;
275 vdd-supply = <®_vdd_tsp>;
276 vddo-supply = <&pm8916_l6>;
278 pinctrl-names = "default";
279 pinctrl-0 = <&tsp_irq_default>;
287 compatible = "richtek,rt5033";
290 interrupt-parent = <&tlmm>;
291 interrupts = <62 IRQ_TYPE_EDGE_FALLING>;
293 pinctrl-names = "default";
294 pinctrl-0 = <&pmic_int_default>;
297 rt5033_reg_safe_ldo: SAFE_LDO {
298 regulator-min-microvolt = <4900000>;
299 regulator-max-microvolt = <4900000>;
302 rt5033_reg_ldo: LDO {
303 regulator-min-microvolt = <2800000>;
304 regulator-max-microvolt = <2800000>;
306 rt5033_reg_buck: BUCK {
307 regulator-min-microvolt = <1200000>;
308 regulator-max-microvolt = <1200000>;
312 rt5033_charger: charger {
313 compatible = "richtek,rt5033-charger";
314 monitored-battery = <&battery>;
315 richtek,usb-connector = <&usb_con>;
325 reg = <0x0 0x86800000 0x0 0x5a00000>;
330 linux,code = <KEY_VOLUMEDOWN>;
346 * FIXME: Disable UHS-I modes since tuning fails with:
348 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
349 * mmc1: tuning execution failed: -5
350 * mmc1: error -5 whilst initialising SD card
352 * This is the quirk used on downstream, which suggests this is
353 * a hardware limitation. However, probing a card using DDR50 works
354 * (without tuning), so maybe only tuning is broken?
361 "AMIC1", "MIC BIAS External1",
362 "AMIC2", "MIC BIAS Internal2",
363 "AMIC3", "MIC BIAS External1";
368 extcon = <&muic>, <&muic>;
388 compatible = "qcom,wcn3660b";
396 fg_alert_default: fg-alert-default-state {
400 drive-strength = <2>;
404 gpio_keys_default: gpio-keys-default-state {
405 pins = "gpio107", "gpio109";
408 drive-strength = <2>;
412 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
416 drive-strength = <2>;
420 imu_irq_default: imu-irq-default-state {
424 drive-strength = <2>;
428 muic_i2c_default: muic-i2c-default-state {
429 pins = "gpio105", "gpio106";
432 drive-strength = <2>;
436 muic_irq_default: muic-irq-default-state {
440 drive-strength = <2>;
444 nfc_default: nfc-default-state {
446 pins = "gpio20", "gpio49";
449 drive-strength = <2>;
456 drive-strength = <2>;
461 nfc_i2c_default: nfc-i2c-default-state {
462 pins = "gpio0", "gpio1";
465 drive-strength = <2>;
469 pmic_int_default: pmic-int-default-state {
473 drive-strength = <2>;
477 tkey_default: tkey-default-state {
481 drive-strength = <2>;
485 tkey_en_default: tkey-en-default-state {
489 drive-strength = <2>;
493 tkey_i2c_default: tkey-i2c-default-state {
494 pins = "gpio16", "gpio17";
497 drive-strength = <2>;
501 tkey_led_en_default: tkey-led-en-default-state {
505 drive-strength = <2>;
509 tsp_en_default: tsp-en-default-state {
513 drive-strength = <2>;
517 tsp_irq_default: tsp-irq-default-state {
521 drive-strength = <2>;