1 // SPDX-License-Identifier: BSD-3-Clause 1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 2 /* 3 * Copyright (c) 2022, Eugene Lepshy <fekz115@g 3 * Copyright (c) 2022, Eugene Lepshy <fekz115@gmail.com> 4 * Copyright (c) 2022, Gianluca Boiano <morf308 4 * Copyright (c) 2022, Gianluca Boiano <morf3089@gmail.com> 5 */ 5 */ 6 /dts-v1/; 6 /dts-v1/; 7 7 8 #include "msm8953.dtsi" 8 #include "msm8953.dtsi" 9 #include "pm8953.dtsi" 9 #include "pm8953.dtsi" 10 #include "pmi8950.dtsi" 10 #include "pmi8950.dtsi" 11 #include <dt-bindings/leds/common.h> 11 #include <dt-bindings/leds/common.h> 12 12 13 /delete-node/ &adsp_fw_mem; 13 /delete-node/ &adsp_fw_mem; 14 /delete-node/ &cont_splash_mem; 14 /delete-node/ &cont_splash_mem; 15 /delete-node/ &qseecom_mem; 15 /delete-node/ &qseecom_mem; 16 /delete-node/ &wcnss_fw_mem; 16 /delete-node/ &wcnss_fw_mem; 17 17 18 / { 18 / { 19 model = "Xiaomi Redmi 5 Plus"; 19 model = "Xiaomi Redmi 5 Plus"; 20 compatible = "xiaomi,vince", "qcom,msm 20 compatible = "xiaomi,vince", "qcom,msm8953"; 21 chassis-type = "handset"; 21 chassis-type = "handset"; 22 qcom,msm-id = <293 0>; 22 qcom,msm-id = <293 0>; 23 qcom,board-id = <0x1000b 0x08>; !! 23 qcom,board-id= <0x1000b 0x08>; 24 24 25 gpio-keys { 25 gpio-keys { 26 compatible = "gpio-keys"; 26 compatible = "gpio-keys"; 27 27 28 pinctrl-names = "default"; 28 pinctrl-names = "default"; 29 pinctrl-0 = <&gpio_key_default 29 pinctrl-0 = <&gpio_key_default>; 30 30 31 key-volume-up { 31 key-volume-up { 32 label = "volume_up"; 32 label = "volume_up"; 33 linux,code = <KEY_VOLU 33 linux,code = <KEY_VOLUMEUP>; 34 gpios = <&tlmm 85 GPIO 34 gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; 35 }; 35 }; 36 }; 36 }; 37 37 38 reserved-memory { 38 reserved-memory { 39 qseecom_mem: qseecom@84a00000 39 qseecom_mem: qseecom@84a00000 { 40 reg = <0x0 0x84a00000 40 reg = <0x0 0x84a00000 0x0 0x1900000>; 41 no-map; 41 no-map; 42 }; 42 }; 43 43 44 cont_splash_mem: cont-splash@9 44 cont_splash_mem: cont-splash@90001000 { 45 reg = <0x0 0x90001000 45 reg = <0x0 0x90001000 0x0 (1080 * 2160 * 3)>; 46 no-map; 46 no-map; 47 }; 47 }; 48 48 49 adsp_fw_mem: adsp@8d600000 { 49 adsp_fw_mem: adsp@8d600000 { 50 reg = <0x0 0x8d600000 50 reg = <0x0 0x8d600000 0x0 0x1200000>; 51 no-map; 51 no-map; 52 }; 52 }; 53 53 54 wcnss_fw_mem: wcnss@8e800000 { 54 wcnss_fw_mem: wcnss@8e800000 { 55 reg = <0x0 0x8e800000 55 reg = <0x0 0x8e800000 0x0 0x700000>; 56 no-map; 56 no-map; 57 }; 57 }; 58 58 59 ramoops@9ff00000 { 59 ramoops@9ff00000 { 60 compatible = "ramoops" 60 compatible = "ramoops"; 61 reg = <0x0 0x9ff00000 61 reg = <0x0 0x9ff00000 0x0 0x100000>; 62 record-size = <0x1000> 62 record-size = <0x1000>; 63 console-size = <0x8000 63 console-size = <0x80000>; 64 ftrace-size = <0x1000> 64 ftrace-size = <0x1000>; 65 pmsg-size = <0x8000>; 65 pmsg-size = <0x8000>; 66 }; 66 }; 67 }; 67 }; 68 68 69 /* 69 /* 70 * We bitbang on &i2c_4 because BLSP i 70 * We bitbang on &i2c_4 because BLSP is protected by TZ as sensors are 71 * normally proxied via ADSP firmware. 71 * normally proxied via ADSP firmware. GPIOs aren't protected. 72 */ 72 */ 73 i2c-sensors { 73 i2c-sensors { 74 compatible = "i2c-gpio"; 74 compatible = "i2c-gpio"; 75 sda-gpios = <&tlmm 14 (GPIO_AC 75 sda-gpios = <&tlmm 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 76 scl-gpios = <&tlmm 15 (GPIO_AC 76 scl-gpios = <&tlmm 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 77 i2c-gpio,delay-us = <2>; /* ~1 77 i2c-gpio,delay-us = <2>; /* ~100 kHz */ 78 #address-cells = <1>; 78 #address-cells = <1>; 79 #size-cells = <0>; 79 #size-cells = <0>; 80 80 81 imu@6a { 81 imu@6a { 82 compatible = "st,lsm6d 82 compatible = "st,lsm6dsl"; 83 reg = <0x6a>; 83 reg = <0x6a>; 84 vdd-supply = <&pm8953_ 84 vdd-supply = <&pm8953_l10>; 85 vddio-supply = <&pm895 85 vddio-supply = <&pm8953_l6>; 86 mount-matrix = "1", "0 86 mount-matrix = "1", "0", "0", 87 "0", " 87 "0", "-1", "0", 88 "0", " 88 "0", "0", "1"; 89 }; 89 }; 90 }; 90 }; 91 91 92 vph_pwr: vph-pwr-regulator { 92 vph_pwr: vph-pwr-regulator { 93 compatible = "regulator-fixed" 93 compatible = "regulator-fixed"; 94 regulator-name = "vph_pwr"; 94 regulator-name = "vph_pwr"; 95 regulator-always-on; 95 regulator-always-on; 96 regulator-boot-on; 96 regulator-boot-on; 97 }; 97 }; 98 }; 98 }; 99 99 100 &hsusb_phy { 100 &hsusb_phy { 101 vdd-supply = <&pm8953_l3>; 101 vdd-supply = <&pm8953_l3>; 102 vdda-pll-supply = <&pm8953_l7>; 102 vdda-pll-supply = <&pm8953_l7>; 103 vdda-phy-dpdm-supply = <&pm8953_l13>; 103 vdda-phy-dpdm-supply = <&pm8953_l13>; 104 104 105 status = "okay"; 105 status = "okay"; 106 }; 106 }; 107 107 108 &i2c_2 { 108 &i2c_2 { 109 status = "okay"; 109 status = "okay"; 110 110 111 led-controller@45 { 111 led-controller@45 { 112 compatible = "awinic,aw2013"; 112 compatible = "awinic,aw2013"; 113 reg = <0x45>; 113 reg = <0x45>; 114 114 115 vcc-supply = <&pm8953_l10>; 115 vcc-supply = <&pm8953_l10>; 116 vio-supply = <&pm8953_l5>; << 117 116 118 #address-cells = <1>; 117 #address-cells = <1>; 119 #size-cells = <0>; 118 #size-cells = <0>; 120 119 121 led@0 { 120 led@0 { 122 reg = <0>; 121 reg = <0>; 123 led-max-microamp = <50 122 led-max-microamp = <5000>; 124 function = LED_FUNCTIO 123 function = LED_FUNCTION_INDICATOR; 125 color = <LED_COLOR_ID_ 124 color = <LED_COLOR_ID_WHITE>; 126 }; 125 }; 127 }; 126 }; 128 }; 127 }; 129 128 130 &i2c_3 { 129 &i2c_3 { 131 status = "okay"; 130 status = "okay"; 132 131 133 touchscreen@20 { 132 touchscreen@20 { 134 reg = <0x20>; 133 reg = <0x20>; 135 compatible = "syna,rmi4-i2c"; 134 compatible = "syna,rmi4-i2c"; >> 135 interrupts-parent = <&tlmm>; 136 interrupts-extended = <&tlmm 6 136 interrupts-extended = <&tlmm 65 IRQ_TYPE_EDGE_FALLING>; 137 137 138 #address-cells = <1>; 138 #address-cells = <1>; 139 #size-cells = <0>; 139 #size-cells = <0>; 140 140 141 vdd-supply = <&pm8953_l10>; 141 vdd-supply = <&pm8953_l10>; 142 vio-supply = <&pm8953_l6>; 142 vio-supply = <&pm8953_l6>; 143 143 144 pinctrl-names = "init", "suspe 144 pinctrl-names = "init", "suspend"; 145 pinctrl-0 = <&ts_reset_active 145 pinctrl-0 = <&ts_reset_active &ts_int_active>; 146 pinctrl-1 = <&ts_reset_suspend 146 pinctrl-1 = <&ts_reset_suspend &ts_int_suspend>; 147 syna,reset-delay-ms = <200>; 147 syna,reset-delay-ms = <200>; 148 syna,startup-delay-ms = <500>; 148 syna,startup-delay-ms = <500>; 149 149 150 rmi4-f01@1 { 150 rmi4-f01@1 { 151 reg = <0x01>; 151 reg = <0x01>; 152 syna,nosleep-mode = <1 152 syna,nosleep-mode = <1>; 153 }; 153 }; 154 154 155 rmi4-f12@12 { 155 rmi4-f12@12 { 156 reg = <0x12>; 156 reg = <0x12>; 157 syna,rezero-wait-ms = 157 syna,rezero-wait-ms = <20>; 158 syna,sensor-type = <1> 158 syna,sensor-type = <1>; 159 touchscreen-x-mm = <68 159 touchscreen-x-mm = <68>; 160 touchscreen-y-mm = <12 160 touchscreen-y-mm = <122>; 161 }; 161 }; 162 }; 162 }; 163 }; 163 }; 164 164 165 &pm8953_resin { 165 &pm8953_resin { 166 linux,code = <KEY_VOLUMEDOWN>; 166 linux,code = <KEY_VOLUMEDOWN>; 167 status = "okay"; 167 status = "okay"; 168 }; 168 }; 169 169 170 &pmi8950_wled { 170 &pmi8950_wled { 171 qcom,current-limit-microamp = <20000>; 171 qcom,current-limit-microamp = <20000>; 172 qcom,ovp-millivolt = <29600>; 172 qcom,ovp-millivolt = <29600>; 173 qcom,num-strings = <2>; 173 qcom,num-strings = <2>; 174 qcom,external-pfet; 174 qcom,external-pfet; 175 qcom,cabc; 175 qcom,cabc; 176 176 177 status = "okay"; 177 status = "okay"; 178 }; 178 }; 179 179 180 &rpm_requests { 180 &rpm_requests { 181 regulators { 181 regulators { 182 compatible = "qcom,rpm-pm8953- 182 compatible = "qcom,rpm-pm8953-regulators"; 183 vdd_s1-supply = <&vph_pwr>; 183 vdd_s1-supply = <&vph_pwr>; 184 vdd_s2-supply = <&vph_pwr>; 184 vdd_s2-supply = <&vph_pwr>; 185 vdd_s3-supply = <&vph_pwr>; 185 vdd_s3-supply = <&vph_pwr>; 186 vdd_s4-supply = <&vph_pwr>; 186 vdd_s4-supply = <&vph_pwr>; 187 vdd_s5-supply = <&vph_pwr>; 187 vdd_s5-supply = <&vph_pwr>; 188 vdd_s6-supply = <&vph_pwr>; 188 vdd_s6-supply = <&vph_pwr>; 189 vdd_s7-supply = <&vph_pwr>; 189 vdd_s7-supply = <&vph_pwr>; 190 vdd_l1-supply = <&pm8953_s3>; 190 vdd_l1-supply = <&pm8953_s3>; 191 vdd_l2_l3-supply = <&pm8953_s3 191 vdd_l2_l3-supply = <&pm8953_s3>; 192 vdd_l4_l5_l6_l7_l16_l19-supply 192 vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>; 193 vdd_l8_l11_l12_l13_l14_l15-sup 193 vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>; 194 vdd_l9_l10_l17_l18_l22-supply 194 vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>; 195 195 196 pm8953_s1: s1 { 196 pm8953_s1: s1 { 197 regulator-min-microvol 197 regulator-min-microvolt = <870000>; 198 regulator-max-microvol 198 regulator-max-microvolt = <1156000>; 199 }; 199 }; 200 200 201 pm8953_s3: s3 { 201 pm8953_s3: s3 { 202 regulator-min-microvol 202 regulator-min-microvolt = <984000>; 203 regulator-max-microvol 203 regulator-max-microvolt = <1224000>; 204 }; 204 }; 205 205 206 pm8953_s4: s4 { 206 pm8953_s4: s4 { 207 regulator-min-microvol 207 regulator-min-microvolt = <1900000>; 208 regulator-max-microvol 208 regulator-max-microvolt = <2050000>; 209 }; 209 }; 210 210 211 pm8953_l1: l1 { 211 pm8953_l1: l1 { 212 regulator-min-microvol 212 regulator-min-microvolt = <1000000>; 213 regulator-max-microvol 213 regulator-max-microvolt = <1100000>; 214 }; 214 }; 215 215 216 pm8953_l2: l2 { 216 pm8953_l2: l2 { 217 regulator-min-microvol 217 regulator-min-microvolt = <1200000>; 218 regulator-max-microvol 218 regulator-max-microvolt = <1225000>; 219 }; 219 }; 220 220 221 pm8953_l3: l3 { 221 pm8953_l3: l3 { 222 regulator-min-microvol 222 regulator-min-microvolt = <925000>; 223 regulator-max-microvol 223 regulator-max-microvolt = <925000>; 224 }; 224 }; 225 225 226 pm8953_l5: l5 { 226 pm8953_l5: l5 { 227 regulator-min-microvol 227 regulator-min-microvolt = <1800000>; 228 regulator-max-microvol 228 regulator-max-microvolt = <1800000>; 229 }; 229 }; 230 230 231 pm8953_l6: l6 { 231 pm8953_l6: l6 { 232 regulator-min-microvol 232 regulator-min-microvolt = <1800000>; 233 regulator-max-microvol 233 regulator-max-microvolt = <1800000>; 234 }; 234 }; 235 235 236 pm8953_l7: l7 { 236 pm8953_l7: l7 { 237 regulator-min-microvol 237 regulator-min-microvolt = <1800000>; 238 regulator-max-microvol 238 regulator-max-microvolt = <1900000>; 239 }; 239 }; 240 240 241 pm8953_l8: l8 { 241 pm8953_l8: l8 { 242 regulator-min-microvol 242 regulator-min-microvolt = <2900000>; 243 regulator-max-microvol 243 regulator-max-microvolt = <2900000>; 244 }; 244 }; 245 245 246 pm8953_l9: l9 { 246 pm8953_l9: l9 { 247 regulator-min-microvol 247 regulator-min-microvolt = <3000000>; 248 regulator-max-microvol 248 regulator-max-microvolt = <3300000>; 249 }; 249 }; 250 250 251 pm8953_l10: l10 { 251 pm8953_l10: l10 { 252 regulator-min-microvol 252 regulator-min-microvolt = <2850000>; 253 regulator-max-microvol 253 regulator-max-microvolt = <2850000>; 254 }; 254 }; 255 255 256 pm8953_l11: l11 { 256 pm8953_l11: l11 { 257 regulator-min-microvol 257 regulator-min-microvolt = <2950000>; 258 regulator-max-microvol 258 regulator-max-microvolt = <2950000>; 259 }; 259 }; 260 260 261 pm8953_l12: l12 { 261 pm8953_l12: l12 { 262 regulator-min-microvol 262 regulator-min-microvolt = <1800000>; 263 regulator-max-microvol 263 regulator-max-microvolt = <2950000>; 264 }; 264 }; 265 265 266 pm8953_l13: l13 { 266 pm8953_l13: l13 { 267 regulator-min-microvol 267 regulator-min-microvolt = <3125000>; 268 regulator-max-microvol 268 regulator-max-microvolt = <3125000>; 269 }; 269 }; 270 270 271 pm8953_l16: l16 { 271 pm8953_l16: l16 { 272 regulator-min-microvol 272 regulator-min-microvolt = <1800000>; 273 regulator-max-microvol 273 regulator-max-microvolt = <1800000>; 274 }; 274 }; 275 275 276 pm8953_l17: l17 { 276 pm8953_l17: l17 { 277 regulator-min-microvol 277 regulator-min-microvolt = <2750000>; 278 regulator-max-microvol 278 regulator-max-microvolt = <2850000>; 279 }; 279 }; 280 280 281 pm8953_l19: l19 { 281 pm8953_l19: l19 { 282 regulator-min-microvol 282 regulator-min-microvolt = <1200000>; 283 regulator-max-microvol 283 regulator-max-microvolt = <1380000>; 284 }; 284 }; 285 285 286 pm8953_l22: l22 { 286 pm8953_l22: l22 { 287 regulator-min-microvol 287 regulator-min-microvolt = <2800000>; 288 regulator-max-microvol 288 regulator-max-microvolt = <2800000>; 289 }; 289 }; 290 290 291 pm8953_l23: l23 { 291 pm8953_l23: l23 { 292 regulator-min-microvol 292 regulator-min-microvolt = <1200000>; 293 regulator-max-microvol 293 regulator-max-microvolt = <1225000>; 294 }; 294 }; 295 }; 295 }; 296 }; 296 }; 297 297 298 &sdhc_1 { 298 &sdhc_1 { 299 vmmc-supply = <&pm8953_l8>; 299 vmmc-supply = <&pm8953_l8>; 300 vqmmc-supply = <&pm8953_l5>; 300 vqmmc-supply = <&pm8953_l5>; 301 301 302 status = "okay"; 302 status = "okay"; 303 }; 303 }; 304 304 305 &sdhc_2 { 305 &sdhc_2 { 306 vmmc-supply = <&pm8953_l11>; 306 vmmc-supply = <&pm8953_l11>; 307 vqmmc-supply = <&pm8953_l12>; 307 vqmmc-supply = <&pm8953_l12>; 308 308 309 pinctrl-names = "default", "sleep"; 309 pinctrl-names = "default", "sleep"; 310 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on 310 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 311 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_o 311 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 312 312 313 status = "okay"; 313 status = "okay"; 314 }; 314 }; 315 315 316 &tlmm { 316 &tlmm { 317 gpio-reserved-ranges = <0 4>, <16 4>, 317 gpio-reserved-ranges = <0 4>, <16 4>, <135 4>; 318 318 319 ts_reset_active: ts-reset-active-state 319 ts_reset_active: ts-reset-active-state { 320 pins = "gpio64"; 320 pins = "gpio64"; 321 function = "gpio"; 321 function = "gpio"; 322 drive-strength = <8>; 322 drive-strength = <8>; 323 bias-pull-up; 323 bias-pull-up; 324 }; 324 }; 325 325 326 ts_reset_suspend: ts-reset-suspend-sta 326 ts_reset_suspend: ts-reset-suspend-state { 327 pins = "gpio64"; 327 pins = "gpio64"; 328 function = "gpio"; 328 function = "gpio"; 329 drive-strength = <2>; 329 drive-strength = <2>; 330 bias-pull-up; 330 bias-pull-up; 331 }; 331 }; 332 332 333 ts_int_active: ts-int-active-state { 333 ts_int_active: ts-int-active-state { 334 pins = "gpio65"; 334 pins = "gpio65"; 335 function = "gpio"; 335 function = "gpio"; 336 drive-strength = <8>; 336 drive-strength = <8>; 337 bias-pull-up; 337 bias-pull-up; 338 }; 338 }; 339 339 340 ts_int_suspend: ts-int-suspend-state { 340 ts_int_suspend: ts-int-suspend-state { 341 pins = "gpio65"; 341 pins = "gpio65"; 342 function = "gpio"; 342 function = "gpio"; 343 drive-strength = <2>; 343 drive-strength = <2>; 344 bias-pull-down; 344 bias-pull-down; 345 }; 345 }; 346 }; 346 }; 347 347 348 &uart_0 { 348 &uart_0 { 349 pinctrl-names = "default"; 349 pinctrl-names = "default"; 350 pinctrl-0 = <&uart_console_active>; 350 pinctrl-0 = <&uart_console_active>; 351 351 352 status = "okay"; 352 status = "okay"; 353 }; 353 }; 354 354 355 &usb3 { 355 &usb3 { 356 status = "okay"; 356 status = "okay"; 357 }; 357 }; 358 358 359 &usb3_dwc3 { 359 &usb3_dwc3 { 360 /delete-property/ usb-role-switch; << 361 dr_mode = "peripheral"; 360 dr_mode = "peripheral"; 362 }; 361 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.