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 mmc0 = &sdhc_1; /* eMMC */
32 mmc1 = &sdhc_2; /* SD card */
33 serial0 = &blsp_uart2;
37 stdout-path = "serial0";
41 /* Additional memory used by Samsung firmware modifications */
43 reg = <0x0 0x85500000 0x0 0xb00000>;
49 compatible = "gpio-keys";
51 pinctrl-names = "default";
52 pinctrl-0 = <&gpio_keys_default>;
54 label = "GPIO Buttons";
58 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_VOLUMEUP>;
64 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_HOMEPAGE>;
70 compatible = "gpio-keys";
72 pinctrl-names = "default";
73 pinctrl-0 = <&gpio_hall_sensor_default>;
75 label = "GPIO Hall Effect Sensor";
78 label = "Hall Effect Sensor";
79 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
80 linux,input-type = <EV_SW>;
81 linux,code = <SW_LID>;
86 reg_vdd_tsp: regulator-vdd-tsp {
87 compatible = "regulator-fixed";
88 regulator-name = "vdd_tsp";
89 regulator-min-microvolt = <3300000>;
90 regulator-max-microvolt = <3300000>;
92 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
95 pinctrl-names = "default";
96 pinctrl-0 = <&tsp_en_default>;
99 reg_touch_key: regulator-touch-key {
100 compatible = "regulator-fixed";
101 regulator-name = "touch_key";
102 regulator-min-microvolt = <2800000>;
103 regulator-max-microvolt = <2800000>;
105 gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
108 pinctrl-names = "default";
109 pinctrl-0 = <&tkey_en_default>;
112 reg_key_led: regulator-key-led {
113 compatible = "regulator-fixed";
114 regulator-name = "key_led";
115 regulator-min-microvolt = <3300000>;
116 regulator-max-microvolt = <3300000>;
118 gpio = <&tlmm 60 GPIO_ACTIVE_HIGH>;
121 pinctrl-names = "default";
122 pinctrl-0 = <&tkey_led_en_default>;
126 compatible = "i2c-gpio";
127 sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
128 scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
130 pinctrl-names = "default";
131 pinctrl-0 = <&muic_i2c_default>;
133 #address-cells = <1>;
137 compatible = "siliconmitus,sm5504-muic";
140 interrupt-parent = <&tlmm>;
141 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
143 pinctrl-names = "default";
144 pinctrl-0 = <&muic_irq_default>;
147 compatible = "usb-b-connector";
155 compatible = "i2c-gpio";
156 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
157 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
159 pinctrl-names = "default";
160 pinctrl-0 = <&tkey_i2c_default>;
162 #address-cells = <1>;
166 compatible = "coreriver,tc360-touchkey";
169 interrupt-parent = <&tlmm>;
170 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
172 vcc-supply = <®_touch_key>;
173 vdd-supply = <®_key_led>;
174 vddio-supply = <&pm8916_l6>;
176 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
178 pinctrl-names = "default";
179 pinctrl-0 = <&tkey_default>;
184 compatible = "i2c-gpio";
185 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
186 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&nfc_i2c_default>;
191 #address-cells = <1>;
195 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
198 interrupt-parent = <&tlmm>;
199 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
201 enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
202 firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
204 pinctrl-names = "default";
205 pinctrl-0 = <&nfc_default>;
210 compatible = "simple-battery";
211 precharge-current-microamp = <450000>;
212 constant-charge-current-max-microamp = <1000000>;
213 charge-term-current-microamp = <150000>;
214 precharge-upper-limit-microvolt = <3500000>;
215 constant-charge-voltage-max-microvolt = <4350000>;
223 compatible = "st,lsm6ds3";
226 interrupt-parent = <&tlmm>;
227 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&imu_irq_default>;
234 compatible = "yamaha,yas537";
237 mount-matrix = "0", "1", "0",
247 compatible = "richtek,rt5033-battery";
250 interrupt-parent = <&tlmm>;
251 interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
253 pinctrl-names = "default";
254 pinctrl-0 = <&fg_alert_default>;
256 power-supplies = <&rt5033_charger>;
264 compatible = "zinitix,bt541";
267 interrupt-parent = <&tlmm>;
268 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
270 touchscreen-size-x = <540>;
271 touchscreen-size-y = <960>;
273 vdd-supply = <®_vdd_tsp>;
274 vddo-supply = <&pm8916_l6>;
276 pinctrl-names = "default";
277 pinctrl-0 = <&tsp_irq_default>;
285 compatible = "richtek,rt5033";
288 interrupt-parent = <&tlmm>;
289 interrupts = <62 IRQ_TYPE_EDGE_FALLING>;
291 pinctrl-names = "default";
292 pinctrl-0 = <&pmic_int_default>;
295 rt5033_reg_safe_ldo: SAFE_LDO {
296 regulator-min-microvolt = <4900000>;
297 regulator-max-microvolt = <4900000>;
300 rt5033_reg_ldo: LDO {
301 regulator-min-microvolt = <2800000>;
302 regulator-max-microvolt = <2800000>;
304 rt5033_reg_buck: BUCK {
305 regulator-min-microvolt = <1200000>;
306 regulator-max-microvolt = <1200000>;
310 rt5033_charger: charger {
311 compatible = "richtek,rt5033-charger";
312 monitored-battery = <&battery>;
313 richtek,usb-connector = <&usb_con>;
324 linux,code = <KEY_VOLUMEDOWN>;
340 * FIXME: Disable UHS-I modes since tuning fails with:
342 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
343 * mmc1: tuning execution failed: -5
344 * mmc1: error -5 whilst initialising SD card
346 * This is the quirk used on downstream, which suggests this is
347 * a hardware limitation. However, probing a card using DDR50 works
348 * (without tuning), so maybe only tuning is broken?
355 extcon = <&muic>, <&muic>;
375 compatible = "qcom,wcn3660b";
383 fg_alert_default: fg-alert-default-state {
387 drive-strength = <2>;
391 gpio_keys_default: gpio-keys-default-state {
392 pins = "gpio107", "gpio109";
395 drive-strength = <2>;
399 gpio_hall_sensor_default: gpio-hall-sensor-default-state {
403 drive-strength = <2>;
407 imu_irq_default: imu-irq-default-state {
411 drive-strength = <2>;
415 muic_i2c_default: muic-i2c-default-state {
416 pins = "gpio105", "gpio106";
419 drive-strength = <2>;
423 muic_irq_default: muic-irq-default-state {
427 drive-strength = <2>;
431 nfc_default: nfc-default-state {
433 pins = "gpio20", "gpio49";
436 drive-strength = <2>;
443 drive-strength = <2>;
448 nfc_i2c_default: nfc-i2c-default-state {
449 pins = "gpio0", "gpio1";
452 drive-strength = <2>;
456 pmic_int_default: pmic-int-default-state {
460 drive-strength = <2>;
464 tkey_default: tkey-default-state {
468 drive-strength = <2>;
472 tkey_en_default: tkey-en-default-state {
476 drive-strength = <2>;
480 tkey_i2c_default: tkey-i2c-default-state {
481 pins = "gpio16", "gpio17";
484 drive-strength = <2>;
488 tkey_led_en_default: tkey-led-en-default-state {
492 drive-strength = <2>;
496 tsp_en_default: tsp-en-default-state {
500 drive-strength = <2>;
504 tsp_irq_default: tsp-irq-default-state {
508 drive-strength = <2>;