0001 // SPDX-License-Identifier: GPL-2.0-only
0002 // Copyright (C) 2019 Stephan Gerhold
0003
0004 /dts-v1/;
0005
0006 #include "msm8916-pm8916.dtsi"
0007 #include <dt-bindings/gpio/gpio.h>
0008 #include <dt-bindings/input/input.h>
0009 #include <dt-bindings/interrupt-controller/irq.h>
0010
0011 /*
0012 * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
0013 * Unfortunately, the firmware is signed and cannot be replaced easily.
0014 * There seems to be no way to boot ARM64 kernels on this device at the moment,
0015 * even though the hardware would support it.
0016 *
0017 * However, it is possible to use this device tree by compiling an ARM32 kernel
0018 * instead. For clarity and build testing this device tree is maintained next
0019 * to the other MSM8916 device trees. However, it is actually used through
0020 * arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dts
0021 */
0022
0023 / {
0024 model = "Samsung Galaxy S4 Mini Value Edition";
0025 compatible = "samsung,serranove", "qcom,msm8916";
0026 chassis-type = "handset";
0027
0028 aliases {
0029 serial0 = &blsp1_uart2;
0030 };
0031
0032 chosen {
0033 stdout-path = "serial0";
0034 };
0035
0036 reserved-memory {
0037 /* Additional memory used by Samsung firmware modifications */
0038 tz-apps@85500000 {
0039 reg = <0x0 0x85500000 0x0 0xb00000>;
0040 no-map;
0041 };
0042 };
0043
0044 gpio-keys {
0045 compatible = "gpio-keys";
0046
0047 pinctrl-names = "default";
0048 pinctrl-0 = <&gpio_keys_default>;
0049
0050 label = "GPIO Buttons";
0051
0052 button-volume-up {
0053 label = "Volume Up";
0054 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
0055 linux,code = <KEY_VOLUMEUP>;
0056 };
0057
0058 button-home {
0059 label = "Home";
0060 gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
0061 linux,code = <KEY_HOMEPAGE>;
0062 };
0063 };
0064
0065 gpio-hall-sensor {
0066 compatible = "gpio-keys";
0067
0068 pinctrl-names = "default";
0069 pinctrl-0 = <&gpio_hall_sensor_default>;
0070
0071 label = "GPIO Hall Effect Sensor";
0072
0073 event-hall-sensor {
0074 label = "Hall Effect Sensor";
0075 gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
0076 linux,input-type = <EV_SW>;
0077 linux,code = <SW_LID>;
0078 linux,can-disable;
0079 };
0080 };
0081
0082 reg_vdd_tsp: regulator-vdd-tsp {
0083 compatible = "regulator-fixed";
0084 regulator-name = "vdd_tsp";
0085 regulator-min-microvolt = <3300000>;
0086 regulator-max-microvolt = <3300000>;
0087
0088 gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
0089 enable-active-high;
0090
0091 pinctrl-names = "default";
0092 pinctrl-0 = <&tsp_en_default>;
0093 };
0094
0095 reg_touch_key: regulator-touch-key {
0096 compatible = "regulator-fixed";
0097 regulator-name = "touch_key";
0098 regulator-min-microvolt = <2800000>;
0099 regulator-max-microvolt = <2800000>;
0100
0101 gpio = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
0102 enable-active-high;
0103
0104 pinctrl-names = "default";
0105 pinctrl-0 = <&tkey_en_default>;
0106 };
0107
0108 reg_key_led: regulator-key-led {
0109 compatible = "regulator-fixed";
0110 regulator-name = "key_led";
0111 regulator-min-microvolt = <3300000>;
0112 regulator-max-microvolt = <3300000>;
0113
0114 gpio = <&msmgpio 60 GPIO_ACTIVE_HIGH>;
0115 enable-active-high;
0116
0117 pinctrl-names = "default";
0118 pinctrl-0 = <&tkey_led_en_default>;
0119 };
0120
0121 i2c-muic {
0122 compatible = "i2c-gpio";
0123 sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0124 scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0125
0126 pinctrl-names = "default";
0127 pinctrl-0 = <&muic_i2c_default>;
0128
0129 #address-cells = <1>;
0130 #size-cells = <0>;
0131
0132 muic: extcon@14 {
0133 compatible = "siliconmitus,sm5504-muic";
0134 reg = <0x14>;
0135
0136 interrupt-parent = <&msmgpio>;
0137 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
0138
0139 pinctrl-names = "default";
0140 pinctrl-0 = <&muic_irq_default>;
0141 };
0142 };
0143
0144 i2c-tkey {
0145 compatible = "i2c-gpio";
0146 sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0147 scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0148
0149 pinctrl-names = "default";
0150 pinctrl-0 = <&tkey_i2c_default>;
0151
0152 #address-cells = <1>;
0153 #size-cells = <0>;
0154
0155 touchkey@20 {
0156 compatible = "coreriver,tc360-touchkey";
0157 reg = <0x20>;
0158
0159 interrupt-parent = <&msmgpio>;
0160 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
0161
0162 vcc-supply = <®_touch_key>;
0163 vdd-supply = <®_key_led>;
0164 vddio-supply = <&pm8916_l6>;
0165
0166 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
0167
0168 pinctrl-names = "default";
0169 pinctrl-0 = <&tkey_default>;
0170 };
0171 };
0172
0173 i2c-nfc {
0174 compatible = "i2c-gpio";
0175 sda-gpios = <&msmgpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0176 scl-gpios = <&msmgpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0177
0178 pinctrl-names = "default";
0179 pinctrl-0 = <&nfc_i2c_default>;
0180
0181 #address-cells = <1>;
0182 #size-cells = <0>;
0183
0184 nfc@2b {
0185 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
0186 reg = <0x2b>;
0187
0188 interrupt-parent = <&msmgpio>;
0189 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
0190
0191 enable-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
0192 firmware-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
0193
0194 pinctrl-names = "default";
0195 pinctrl-0 = <&nfc_default>;
0196 };
0197 };
0198 };
0199
0200 &blsp_i2c2 {
0201 status = "okay";
0202
0203 imu@6b {
0204 compatible = "st,lsm6ds3";
0205 reg = <0x6b>;
0206
0207 interrupt-parent = <&msmgpio>;
0208 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
0209
0210 pinctrl-names = "default";
0211 pinctrl-0 = <&imu_irq_default>;
0212 };
0213 };
0214
0215 &blsp_i2c4 {
0216 status = "okay";
0217
0218 battery@35 {
0219 compatible = "richtek,rt5033-battery";
0220 reg = <0x35>;
0221
0222 interrupt-parent = <&msmgpio>;
0223 interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
0224
0225 pinctrl-names = "default";
0226 pinctrl-0 = <&fg_alert_default>;
0227 };
0228 };
0229
0230 &blsp_i2c5 {
0231 status = "okay";
0232
0233 touchscreen@20 {
0234 compatible = "zinitix,bt541";
0235 reg = <0x20>;
0236
0237 interrupt-parent = <&msmgpio>;
0238 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
0239
0240 touchscreen-size-x = <540>;
0241 touchscreen-size-y = <960>;
0242
0243 vdd-supply = <®_vdd_tsp>;
0244 vddo-supply = <&pm8916_l6>;
0245
0246 pinctrl-names = "default";
0247 pinctrl-0 = <&tsp_irq_default>;
0248 };
0249 };
0250
0251 &blsp1_uart2 {
0252 status = "okay";
0253 };
0254
0255 &pm8916_resin {
0256 status = "okay";
0257 linux,code = <KEY_VOLUMEDOWN>;
0258 };
0259
0260 &pm8916_vib {
0261 status = "okay";
0262 };
0263
0264 &pronto {
0265 status = "okay";
0266
0267 iris {
0268 compatible = "qcom,wcn3660b";
0269 };
0270 };
0271
0272 &sdhc_1 {
0273 status = "okay";
0274
0275 pinctrl-names = "default", "sleep";
0276 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
0277 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
0278 };
0279
0280 &sdhc_2 {
0281 status = "okay";
0282
0283 pinctrl-names = "default", "sleep";
0284 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
0285 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
0286
0287 non-removable;
0288
0289 /*
0290 * FIXME: Disable UHS-I modes since tuning fails with:
0291 *
0292 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found
0293 * mmc1: tuning execution failed: -5
0294 * mmc1: error -5 whilst initialising SD card
0295 *
0296 * This is the quirk used on downstream, which suggests this is
0297 * a hardware limitation. However, probing a card using DDR50 works
0298 * (without tuning), so maybe only tuning is broken?
0299 */
0300 no-1-8-v;
0301 };
0302
0303 &usb {
0304 status = "okay";
0305 extcon = <&muic>, <&muic>;
0306 };
0307
0308 &usb_hs_phy {
0309 extcon = <&muic>;
0310 };
0311
0312 &smd_rpm_regulators {
0313 vdd_l1_l2_l3-supply = <&pm8916_s3>;
0314 vdd_l4_l5_l6-supply = <&pm8916_s4>;
0315 vdd_l7-supply = <&pm8916_s4>;
0316
0317 s3 {
0318 regulator-min-microvolt = <1200000>;
0319 regulator-max-microvolt = <1300000>;
0320 };
0321
0322 s4 {
0323 regulator-min-microvolt = <1800000>;
0324 regulator-max-microvolt = <2100000>;
0325 };
0326
0327 l1 {
0328 regulator-min-microvolt = <1225000>;
0329 regulator-max-microvolt = <1225000>;
0330 };
0331
0332 l2 {
0333 regulator-min-microvolt = <1200000>;
0334 regulator-max-microvolt = <1200000>;
0335 };
0336
0337 l4 {
0338 regulator-min-microvolt = <2050000>;
0339 regulator-max-microvolt = <2050000>;
0340 };
0341
0342 l5 {
0343 regulator-min-microvolt = <1800000>;
0344 regulator-max-microvolt = <1800000>;
0345 };
0346
0347 l6 {
0348 regulator-min-microvolt = <1800000>;
0349 regulator-max-microvolt = <1800000>;
0350 };
0351
0352 l7 {
0353 regulator-min-microvolt = <1800000>;
0354 regulator-max-microvolt = <1800000>;
0355 };
0356
0357 l8 {
0358 regulator-min-microvolt = <2850000>;
0359 regulator-max-microvolt = <2900000>;
0360 };
0361
0362 l9 {
0363 regulator-min-microvolt = <3300000>;
0364 regulator-max-microvolt = <3300000>;
0365 };
0366
0367 l10 {
0368 regulator-min-microvolt = <2700000>;
0369 regulator-max-microvolt = <2800000>;
0370 };
0371
0372 l11 {
0373 regulator-min-microvolt = <1800000>;
0374 regulator-max-microvolt = <2950000>;
0375 regulator-allow-set-load;
0376 regulator-system-load = <200000>;
0377 };
0378
0379 l12 {
0380 regulator-min-microvolt = <1800000>;
0381 regulator-max-microvolt = <2950000>;
0382 };
0383
0384 l13 {
0385 regulator-min-microvolt = <3075000>;
0386 regulator-max-microvolt = <3075000>;
0387 };
0388
0389 l14 {
0390 regulator-min-microvolt = <1800000>;
0391 regulator-max-microvolt = <3300000>;
0392 };
0393
0394 l15 {
0395 regulator-min-microvolt = <1800000>;
0396 regulator-max-microvolt = <3300000>;
0397 };
0398
0399 l16 {
0400 regulator-min-microvolt = <1800000>;
0401 regulator-max-microvolt = <3300000>;
0402 };
0403
0404 l17 {
0405 regulator-min-microvolt = <2850000>;
0406 regulator-max-microvolt = <2850000>;
0407 };
0408
0409 l18 {
0410 regulator-min-microvolt = <2700000>;
0411 regulator-max-microvolt = <2700000>;
0412 };
0413 };
0414
0415 &msmgpio {
0416 fg_alert_default: fg-alert-default {
0417 pins = "gpio121";
0418 function = "gpio";
0419
0420 drive-strength = <2>;
0421 bias-disable;
0422 };
0423
0424 gpio_keys_default: gpio-keys-default {
0425 pins = "gpio107", "gpio109";
0426 function = "gpio";
0427
0428 drive-strength = <2>;
0429 bias-pull-up;
0430 };
0431
0432 gpio_hall_sensor_default: gpio-hall-sensor-default {
0433 pins = "gpio52";
0434 function = "gpio";
0435
0436 drive-strength = <2>;
0437 bias-disable;
0438 };
0439
0440 imu_irq_default: imu-irq-default {
0441 pins = "gpio115";
0442 function = "gpio";
0443
0444 drive-strength = <2>;
0445 bias-disable;
0446 };
0447
0448 muic_i2c_default: muic-i2c-default {
0449 pins = "gpio105", "gpio106";
0450 function = "gpio";
0451
0452 drive-strength = <2>;
0453 bias-disable;
0454 };
0455
0456 muic_irq_default: muic-irq-default {
0457 pins = "gpio12";
0458 function = "gpio";
0459
0460 drive-strength = <2>;
0461 bias-disable;
0462 };
0463
0464 nfc_default: nfc-default {
0465 pins = "gpio20", "gpio49";
0466 function = "gpio";
0467
0468 drive-strength = <2>;
0469 bias-disable;
0470
0471 irq {
0472 pins = "gpio21";
0473 function = "gpio";
0474
0475 drive-strength = <2>;
0476 bias-pull-down;
0477 };
0478 };
0479
0480 nfc_i2c_default: nfc-i2c-default {
0481 pins = "gpio0", "gpio1";
0482 function = "gpio";
0483
0484 drive-strength = <2>;
0485 bias-disable;
0486 };
0487
0488 tkey_default: tkey-default {
0489 pins = "gpio98";
0490 function = "gpio";
0491
0492 drive-strength = <2>;
0493 bias-disable;
0494 };
0495
0496 tkey_en_default: tkey-en-default {
0497 pins = "gpio86";
0498 function = "gpio";
0499
0500 drive-strength = <2>;
0501 bias-disable;
0502 };
0503
0504 tkey_i2c_default: tkey-i2c-default {
0505 pins = "gpio16", "gpio17";
0506 function = "gpio";
0507
0508 drive-strength = <2>;
0509 bias-disable;
0510 };
0511
0512 tkey_led_en_default: tkey-led-en-default {
0513 pins = "gpio60";
0514 function = "gpio";
0515
0516 drive-strength = <2>;
0517 bias-disable;
0518 };
0519
0520 tsp_en_default: tsp-en-default {
0521 pins = "gpio73";
0522 function = "gpio";
0523
0524 drive-strength = <2>;
0525 bias-disable;
0526 };
0527
0528 tsp_irq_default: tsp-irq-default {
0529 pins = "gpio13";
0530 function = "gpio";
0531
0532 drive-strength = <2>;
0533 bias-disable;
0534 };
0535 };