0001 // SPDX-License-Identifier: GPL-2.0-only
0002
0003 #include "msm8916-pm8916.dtsi"
0004 #include <dt-bindings/gpio/gpio.h>
0005 #include <dt-bindings/input/input.h>
0006 #include <dt-bindings/interrupt-controller/irq.h>
0007 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0008
0009 / {
0010 aliases {
0011 serial0 = &blsp1_uart2;
0012 };
0013
0014 chosen {
0015 stdout-path = "serial0";
0016 };
0017
0018 reserved-memory {
0019 /* Additional memory used by Samsung firmware modifications */
0020 tz-apps@85500000 {
0021 reg = <0x0 0x85500000 0x0 0xb00000>;
0022 no-map;
0023 };
0024 };
0025
0026 gpio-keys {
0027 compatible = "gpio-keys";
0028
0029 pinctrl-names = "default";
0030 pinctrl-0 = <&gpio_keys_default>;
0031
0032 label = "GPIO Buttons";
0033
0034 button-volume-up {
0035 label = "Volume Up";
0036 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
0037 linux,code = <KEY_VOLUMEUP>;
0038 };
0039
0040 button-home {
0041 label = "Home";
0042 gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
0043 linux,code = <KEY_HOMEPAGE>;
0044 };
0045 };
0046
0047 gpio-hall-sensor {
0048 compatible = "gpio-keys";
0049
0050 pinctrl-names = "default";
0051 pinctrl-0 = <&gpio_hall_sensor_default>;
0052
0053 label = "GPIO Hall Effect Sensor";
0054
0055 event-hall-sensor {
0056 label = "Hall Effect Sensor";
0057 gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
0058 linux,input-type = <EV_SW>;
0059 linux,code = <SW_LID>;
0060 linux,can-disable;
0061 };
0062 };
0063
0064 reg_vdd_tsp: regulator-vdd-tsp {
0065 compatible = "regulator-fixed";
0066 regulator-name = "vdd_tsp";
0067 regulator-min-microvolt = <3300000>;
0068 regulator-max-microvolt = <3300000>;
0069
0070 gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
0071 enable-active-high;
0072
0073 pinctrl-names = "default";
0074 pinctrl-0 = <&tsp_en_default>;
0075 };
0076
0077 i2c-muic {
0078 compatible = "i2c-gpio";
0079 sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0080 scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0081
0082 pinctrl-names = "default";
0083 pinctrl-0 = <&muic_i2c_default>;
0084
0085 #address-cells = <1>;
0086 #size-cells = <0>;
0087
0088 muic: extcon@25 {
0089 compatible = "siliconmitus,sm5502-muic";
0090
0091 reg = <0x25>;
0092 interrupt-parent = <&msmgpio>;
0093 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
0094
0095 pinctrl-names = "default";
0096 pinctrl-0 = <&muic_int_default>;
0097 };
0098 };
0099
0100 i2c-tkey {
0101 compatible = "i2c-gpio";
0102 sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0103 scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0104
0105 pinctrl-names = "default";
0106 pinctrl-0 = <&tkey_i2c_default>;
0107
0108 #address-cells = <1>;
0109 #size-cells = <0>;
0110
0111 touchkey: touchkey@20 {
0112 /* Note: Actually an ABOV MCU that implements same interface */
0113 compatible = "coreriver,tc360-touchkey";
0114 reg = <0x20>;
0115
0116 interrupt-parent = <&msmgpio>;
0117 interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
0118
0119 /* vcc/vdd-supply are board-specific */
0120 vddio-supply = <&pm8916_l6>;
0121
0122 linux,keycodes = <KEY_APPSELECT KEY_BACK>;
0123
0124 pinctrl-names = "default";
0125 pinctrl-0 = <&tkey_default>;
0126 };
0127 };
0128
0129 i2c-nfc {
0130 compatible = "i2c-gpio";
0131 sda-gpios = <&msmgpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0132 scl-gpios = <&msmgpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0133
0134 pinctrl-names = "default";
0135 pinctrl-0 = <&nfc_i2c_default>;
0136
0137 #address-cells = <1>;
0138 #size-cells = <0>;
0139
0140 nfc@27 {
0141 compatible = "samsung,s3fwrn5-i2c";
0142 reg = <0x27>;
0143
0144 interrupt-parent = <&msmgpio>;
0145 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
0146
0147 en-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
0148 wake-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
0149
0150 clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
0151
0152 pinctrl-names = "default";
0153 pinctrl-0 = <&nfc_default &nfc_clk_req>;
0154 };
0155 };
0156 };
0157
0158 &blsp_i2c2 {
0159 status = "okay";
0160
0161 accelerometer: accelerometer@10 {
0162 compatible = "bosch,bmc150_accel";
0163 reg = <0x10>;
0164 interrupt-parent = <&msmgpio>;
0165 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
0166
0167 vdd-supply = <&pm8916_l17>;
0168 vddio-supply = <&pm8916_l5>;
0169
0170 pinctrl-names = "default";
0171 pinctrl-0 = <&accel_int_default>;
0172 };
0173
0174 magnetometer@12 {
0175 compatible = "bosch,bmc150_magn";
0176 reg = <0x12>;
0177
0178 vdd-supply = <&pm8916_l17>;
0179 vddio-supply = <&pm8916_l5>;
0180 };
0181 };
0182
0183 &blsp_i2c4 {
0184 status = "okay";
0185
0186 battery@35 {
0187 compatible = "richtek,rt5033-battery";
0188 reg = <0x35>;
0189 interrupt-parent = <&msmgpio>;
0190 interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
0191
0192 pinctrl-names = "default";
0193 pinctrl-0 = <&fg_alert_default>;
0194 };
0195 };
0196
0197 &blsp1_uart2 {
0198 status = "okay";
0199 };
0200
0201 &dsi0 {
0202 pinctrl-names = "default", "sleep";
0203 pinctrl-0 = <&mdss_default>;
0204 pinctrl-1 = <&mdss_sleep>;
0205 };
0206
0207 &mdss {
0208 status = "okay";
0209 };
0210
0211 &pm8916_resin {
0212 status = "okay";
0213 linux,code = <KEY_VOLUMEDOWN>;
0214 };
0215
0216 &pronto {
0217 status = "okay";
0218 };
0219
0220 &sdhc_1 {
0221 status = "okay";
0222
0223 pinctrl-names = "default", "sleep";
0224 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
0225 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
0226 };
0227
0228 &sdhc_2 {
0229 status = "okay";
0230
0231 pinctrl-names = "default", "sleep";
0232 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
0233 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
0234
0235 cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
0236 };
0237
0238 &usb {
0239 status = "okay";
0240 extcon = <&muic>, <&muic>;
0241 };
0242
0243 &usb_hs_phy {
0244 extcon = <&muic>;
0245 };
0246
0247 &smd_rpm_regulators {
0248 vdd_l1_l2_l3-supply = <&pm8916_s3>;
0249 vdd_l4_l5_l6-supply = <&pm8916_s4>;
0250 vdd_l7-supply = <&pm8916_s4>;
0251
0252 s3 {
0253 regulator-min-microvolt = <1200000>;
0254 regulator-max-microvolt = <1300000>;
0255 };
0256
0257 s4 {
0258 regulator-min-microvolt = <1800000>;
0259 regulator-max-microvolt = <2100000>;
0260 };
0261
0262 l1 {
0263 regulator-min-microvolt = <1225000>;
0264 regulator-max-microvolt = <1225000>;
0265 };
0266
0267 l2 {
0268 regulator-min-microvolt = <1200000>;
0269 regulator-max-microvolt = <1200000>;
0270 };
0271
0272 l4 {
0273 regulator-min-microvolt = <2050000>;
0274 regulator-max-microvolt = <2050000>;
0275 };
0276
0277 l5 {
0278 regulator-min-microvolt = <1800000>;
0279 regulator-max-microvolt = <1800000>;
0280 };
0281
0282 l6 {
0283 regulator-min-microvolt = <1800000>;
0284 regulator-max-microvolt = <1800000>;
0285 };
0286
0287 l7 {
0288 regulator-min-microvolt = <1800000>;
0289 regulator-max-microvolt = <1800000>;
0290 };
0291
0292 l8 {
0293 regulator-min-microvolt = <2850000>;
0294 regulator-max-microvolt = <2900000>;
0295 };
0296
0297 l9 {
0298 regulator-min-microvolt = <3300000>;
0299 regulator-max-microvolt = <3300000>;
0300 };
0301
0302 l10 {
0303 regulator-min-microvolt = <2700000>;
0304 regulator-max-microvolt = <2800000>;
0305 };
0306
0307 l11 {
0308 regulator-min-microvolt = <1800000>;
0309 regulator-max-microvolt = <2950000>;
0310 regulator-allow-set-load;
0311 regulator-system-load = <200000>;
0312 };
0313
0314 l12 {
0315 regulator-min-microvolt = <1800000>;
0316 regulator-max-microvolt = <2950000>;
0317 };
0318
0319 l13 {
0320 regulator-min-microvolt = <3075000>;
0321 regulator-max-microvolt = <3075000>;
0322 };
0323
0324 l14 {
0325 regulator-min-microvolt = <1800000>;
0326 regulator-max-microvolt = <3300000>;
0327 };
0328
0329 l15 {
0330 regulator-min-microvolt = <1800000>;
0331 regulator-max-microvolt = <3300000>;
0332 };
0333
0334 l16 {
0335 regulator-min-microvolt = <1800000>;
0336 regulator-max-microvolt = <3300000>;
0337 };
0338
0339 l17 {
0340 regulator-min-microvolt = <2850000>;
0341 regulator-max-microvolt = <2850000>;
0342 };
0343
0344 l18 {
0345 regulator-min-microvolt = <2700000>;
0346 regulator-max-microvolt = <2700000>;
0347 };
0348 };
0349
0350 &msmgpio {
0351 accel_int_default: accel-int-default {
0352 pins = "gpio115";
0353 function = "gpio";
0354
0355 drive-strength = <2>;
0356 bias-disable;
0357 };
0358
0359 fg_alert_default: fg-alert-default {
0360 pins = "gpio121";
0361 function = "gpio";
0362
0363 drive-strength = <2>;
0364 bias-disable;
0365 };
0366
0367 gpio_keys_default: gpio-keys-default {
0368 pins = "gpio107", "gpio109";
0369 function = "gpio";
0370
0371 drive-strength = <2>;
0372 bias-pull-up;
0373 };
0374
0375 gpio_hall_sensor_default: gpio-hall-sensor-default {
0376 pins = "gpio52";
0377 function = "gpio";
0378
0379 drive-strength = <2>;
0380 bias-disable;
0381 };
0382
0383 mdss {
0384 mdss_default: mdss-default {
0385 pins = "gpio25";
0386 function = "gpio";
0387
0388 drive-strength = <8>;
0389 bias-disable;
0390 };
0391 mdss_sleep: mdss-sleep {
0392 pins = "gpio25";
0393 function = "gpio";
0394
0395 drive-strength = <2>;
0396 bias-pull-down;
0397 };
0398 };
0399
0400 muic_i2c_default: muic-i2c-default {
0401 pins = "gpio105", "gpio106";
0402 function = "gpio";
0403
0404 drive-strength = <2>;
0405 bias-disable;
0406 };
0407
0408 muic_int_default: muic-int-default {
0409 pins = "gpio12";
0410 function = "gpio";
0411
0412 drive-strength = <2>;
0413 bias-disable;
0414 };
0415
0416 nfc_default: nfc-default {
0417 pins = "gpio20", "gpio49";
0418 function = "gpio";
0419
0420 drive-strength = <2>;
0421 bias-disable;
0422
0423 irq {
0424 pins = "gpio21";
0425 function = "gpio";
0426
0427 drive-strength = <2>;
0428 bias-pull-down;
0429 };
0430 };
0431
0432 nfc_i2c_default: nfc-i2c-default {
0433 pins = "gpio0", "gpio1";
0434 function = "gpio";
0435
0436 drive-strength = <2>;
0437 bias-disable;
0438 };
0439
0440 tkey_default: tkey-default {
0441 pins = "gpio98";
0442 function = "gpio";
0443
0444 drive-strength = <2>;
0445 bias-disable;
0446 };
0447
0448 tkey_i2c_default: tkey-i2c-default {
0449 pins = "gpio16", "gpio17";
0450 function = "gpio";
0451
0452 drive-strength = <2>;
0453 bias-disable;
0454 };
0455
0456 tsp_en_default: tsp-en-default {
0457 pins = "gpio73";
0458 function = "gpio";
0459
0460 drive-strength = <2>;
0461 bias-disable;
0462 };
0463
0464 ts_int_default: ts-int-default {
0465 pins = "gpio13";
0466 function = "gpio";
0467
0468 drive-strength = <2>;
0469 bias-disable;
0470 };
0471 };
0472
0473 &pm8916_gpios {
0474 nfc_clk_req: nfc-clk-req-state {
0475 pins = "gpio2";
0476 function = "func1";
0477
0478 input-enable;
0479 bias-disable;
0480 power-source = <PM8916_GPIO_L2>;
0481 };
0482 };