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"; 136 interrupts-extended = <&tlmm 6 135 interrupts-extended = <&tlmm 65 IRQ_TYPE_EDGE_FALLING>; 137 136 138 #address-cells = <1>; 137 #address-cells = <1>; 139 #size-cells = <0>; 138 #size-cells = <0>; 140 139 141 vdd-supply = <&pm8953_l10>; 140 vdd-supply = <&pm8953_l10>; 142 vio-supply = <&pm8953_l6>; 141 vio-supply = <&pm8953_l6>; 143 142 144 pinctrl-names = "init", "suspe 143 pinctrl-names = "init", "suspend"; 145 pinctrl-0 = <&ts_reset_active 144 pinctrl-0 = <&ts_reset_active &ts_int_active>; 146 pinctrl-1 = <&ts_reset_suspend 145 pinctrl-1 = <&ts_reset_suspend &ts_int_suspend>; 147 syna,reset-delay-ms = <200>; 146 syna,reset-delay-ms = <200>; 148 syna,startup-delay-ms = <500>; 147 syna,startup-delay-ms = <500>; 149 148 150 rmi4-f01@1 { 149 rmi4-f01@1 { 151 reg = <0x01>; 150 reg = <0x01>; 152 syna,nosleep-mode = <1 151 syna,nosleep-mode = <1>; 153 }; 152 }; 154 153 155 rmi4-f12@12 { 154 rmi4-f12@12 { 156 reg = <0x12>; 155 reg = <0x12>; 157 syna,rezero-wait-ms = 156 syna,rezero-wait-ms = <20>; 158 syna,sensor-type = <1> 157 syna,sensor-type = <1>; 159 touchscreen-x-mm = <68 158 touchscreen-x-mm = <68>; 160 touchscreen-y-mm = <12 159 touchscreen-y-mm = <122>; 161 }; 160 }; 162 }; 161 }; 163 }; 162 }; 164 163 165 &pm8953_resin { 164 &pm8953_resin { 166 linux,code = <KEY_VOLUMEDOWN>; 165 linux,code = <KEY_VOLUMEDOWN>; 167 status = "okay"; 166 status = "okay"; 168 }; 167 }; 169 168 170 &pmi8950_wled { 169 &pmi8950_wled { 171 qcom,current-limit-microamp = <20000>; 170 qcom,current-limit-microamp = <20000>; 172 qcom,ovp-millivolt = <29600>; 171 qcom,ovp-millivolt = <29600>; 173 qcom,num-strings = <2>; 172 qcom,num-strings = <2>; 174 qcom,external-pfet; 173 qcom,external-pfet; 175 qcom,cabc; 174 qcom,cabc; 176 175 177 status = "okay"; 176 status = "okay"; 178 }; 177 }; 179 178 180 &rpm_requests { 179 &rpm_requests { 181 regulators { 180 regulators { 182 compatible = "qcom,rpm-pm8953- 181 compatible = "qcom,rpm-pm8953-regulators"; 183 vdd_s1-supply = <&vph_pwr>; 182 vdd_s1-supply = <&vph_pwr>; 184 vdd_s2-supply = <&vph_pwr>; 183 vdd_s2-supply = <&vph_pwr>; 185 vdd_s3-supply = <&vph_pwr>; 184 vdd_s3-supply = <&vph_pwr>; 186 vdd_s4-supply = <&vph_pwr>; 185 vdd_s4-supply = <&vph_pwr>; 187 vdd_s5-supply = <&vph_pwr>; 186 vdd_s5-supply = <&vph_pwr>; 188 vdd_s6-supply = <&vph_pwr>; 187 vdd_s6-supply = <&vph_pwr>; 189 vdd_s7-supply = <&vph_pwr>; 188 vdd_s7-supply = <&vph_pwr>; 190 vdd_l1-supply = <&pm8953_s3>; 189 vdd_l1-supply = <&pm8953_s3>; 191 vdd_l2_l3-supply = <&pm8953_s3 190 vdd_l2_l3-supply = <&pm8953_s3>; 192 vdd_l4_l5_l6_l7_l16_l19-supply 191 vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>; 193 vdd_l8_l11_l12_l13_l14_l15-sup 192 vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>; 194 vdd_l9_l10_l17_l18_l22-supply 193 vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>; 195 194 196 pm8953_s1: s1 { 195 pm8953_s1: s1 { 197 regulator-min-microvol 196 regulator-min-microvolt = <870000>; 198 regulator-max-microvol 197 regulator-max-microvolt = <1156000>; 199 }; 198 }; 200 199 201 pm8953_s3: s3 { 200 pm8953_s3: s3 { 202 regulator-min-microvol 201 regulator-min-microvolt = <984000>; 203 regulator-max-microvol 202 regulator-max-microvolt = <1224000>; 204 }; 203 }; 205 204 206 pm8953_s4: s4 { 205 pm8953_s4: s4 { 207 regulator-min-microvol 206 regulator-min-microvolt = <1900000>; 208 regulator-max-microvol 207 regulator-max-microvolt = <2050000>; 209 }; 208 }; 210 209 211 pm8953_l1: l1 { 210 pm8953_l1: l1 { 212 regulator-min-microvol 211 regulator-min-microvolt = <1000000>; 213 regulator-max-microvol 212 regulator-max-microvolt = <1100000>; 214 }; 213 }; 215 214 216 pm8953_l2: l2 { 215 pm8953_l2: l2 { 217 regulator-min-microvol 216 regulator-min-microvolt = <1200000>; 218 regulator-max-microvol 217 regulator-max-microvolt = <1225000>; 219 }; 218 }; 220 219 221 pm8953_l3: l3 { 220 pm8953_l3: l3 { 222 regulator-min-microvol 221 regulator-min-microvolt = <925000>; 223 regulator-max-microvol 222 regulator-max-microvolt = <925000>; 224 }; 223 }; 225 224 226 pm8953_l5: l5 { 225 pm8953_l5: l5 { 227 regulator-min-microvol 226 regulator-min-microvolt = <1800000>; 228 regulator-max-microvol 227 regulator-max-microvolt = <1800000>; 229 }; 228 }; 230 229 231 pm8953_l6: l6 { 230 pm8953_l6: l6 { 232 regulator-min-microvol 231 regulator-min-microvolt = <1800000>; 233 regulator-max-microvol 232 regulator-max-microvolt = <1800000>; 234 }; 233 }; 235 234 236 pm8953_l7: l7 { 235 pm8953_l7: l7 { 237 regulator-min-microvol 236 regulator-min-microvolt = <1800000>; 238 regulator-max-microvol 237 regulator-max-microvolt = <1900000>; 239 }; 238 }; 240 239 241 pm8953_l8: l8 { 240 pm8953_l8: l8 { 242 regulator-min-microvol 241 regulator-min-microvolt = <2900000>; 243 regulator-max-microvol 242 regulator-max-microvolt = <2900000>; 244 }; 243 }; 245 244 246 pm8953_l9: l9 { 245 pm8953_l9: l9 { 247 regulator-min-microvol 246 regulator-min-microvolt = <3000000>; 248 regulator-max-microvol 247 regulator-max-microvolt = <3300000>; 249 }; 248 }; 250 249 251 pm8953_l10: l10 { 250 pm8953_l10: l10 { 252 regulator-min-microvol 251 regulator-min-microvolt = <2850000>; 253 regulator-max-microvol 252 regulator-max-microvolt = <2850000>; 254 }; 253 }; 255 254 256 pm8953_l11: l11 { 255 pm8953_l11: l11 { 257 regulator-min-microvol 256 regulator-min-microvolt = <2950000>; 258 regulator-max-microvol 257 regulator-max-microvolt = <2950000>; 259 }; 258 }; 260 259 261 pm8953_l12: l12 { 260 pm8953_l12: l12 { 262 regulator-min-microvol 261 regulator-min-microvolt = <1800000>; 263 regulator-max-microvol 262 regulator-max-microvolt = <2950000>; 264 }; 263 }; 265 264 266 pm8953_l13: l13 { 265 pm8953_l13: l13 { 267 regulator-min-microvol 266 regulator-min-microvolt = <3125000>; 268 regulator-max-microvol 267 regulator-max-microvolt = <3125000>; 269 }; 268 }; 270 269 271 pm8953_l16: l16 { 270 pm8953_l16: l16 { 272 regulator-min-microvol 271 regulator-min-microvolt = <1800000>; 273 regulator-max-microvol 272 regulator-max-microvolt = <1800000>; 274 }; 273 }; 275 274 276 pm8953_l17: l17 { 275 pm8953_l17: l17 { 277 regulator-min-microvol 276 regulator-min-microvolt = <2750000>; 278 regulator-max-microvol 277 regulator-max-microvolt = <2850000>; 279 }; 278 }; 280 279 281 pm8953_l19: l19 { 280 pm8953_l19: l19 { 282 regulator-min-microvol 281 regulator-min-microvolt = <1200000>; 283 regulator-max-microvol 282 regulator-max-microvolt = <1380000>; 284 }; 283 }; 285 284 286 pm8953_l22: l22 { 285 pm8953_l22: l22 { 287 regulator-min-microvol 286 regulator-min-microvolt = <2800000>; 288 regulator-max-microvol 287 regulator-max-microvolt = <2800000>; 289 }; 288 }; 290 289 291 pm8953_l23: l23 { 290 pm8953_l23: l23 { 292 regulator-min-microvol 291 regulator-min-microvolt = <1200000>; 293 regulator-max-microvol 292 regulator-max-microvolt = <1225000>; 294 }; 293 }; 295 }; 294 }; 296 }; 295 }; 297 296 298 &sdhc_1 { 297 &sdhc_1 { 299 vmmc-supply = <&pm8953_l8>; 298 vmmc-supply = <&pm8953_l8>; 300 vqmmc-supply = <&pm8953_l5>; 299 vqmmc-supply = <&pm8953_l5>; 301 300 302 status = "okay"; 301 status = "okay"; 303 }; 302 }; 304 303 305 &sdhc_2 { 304 &sdhc_2 { 306 vmmc-supply = <&pm8953_l11>; 305 vmmc-supply = <&pm8953_l11>; 307 vqmmc-supply = <&pm8953_l12>; 306 vqmmc-supply = <&pm8953_l12>; 308 307 309 pinctrl-names = "default", "sleep"; 308 pinctrl-names = "default", "sleep"; 310 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on 309 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 311 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_o 310 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 312 311 313 status = "okay"; 312 status = "okay"; 314 }; 313 }; 315 314 316 &tlmm { 315 &tlmm { 317 gpio-reserved-ranges = <0 4>, <16 4>, 316 gpio-reserved-ranges = <0 4>, <16 4>, <135 4>; 318 317 319 ts_reset_active: ts-reset-active-state 318 ts_reset_active: ts-reset-active-state { 320 pins = "gpio64"; 319 pins = "gpio64"; 321 function = "gpio"; 320 function = "gpio"; 322 drive-strength = <8>; 321 drive-strength = <8>; 323 bias-pull-up; 322 bias-pull-up; 324 }; 323 }; 325 324 326 ts_reset_suspend: ts-reset-suspend-sta 325 ts_reset_suspend: ts-reset-suspend-state { 327 pins = "gpio64"; 326 pins = "gpio64"; 328 function = "gpio"; 327 function = "gpio"; 329 drive-strength = <2>; 328 drive-strength = <2>; 330 bias-pull-up; 329 bias-pull-up; 331 }; 330 }; 332 331 333 ts_int_active: ts-int-active-state { 332 ts_int_active: ts-int-active-state { 334 pins = "gpio65"; 333 pins = "gpio65"; 335 function = "gpio"; 334 function = "gpio"; 336 drive-strength = <8>; 335 drive-strength = <8>; 337 bias-pull-up; 336 bias-pull-up; 338 }; 337 }; 339 338 340 ts_int_suspend: ts-int-suspend-state { 339 ts_int_suspend: ts-int-suspend-state { 341 pins = "gpio65"; 340 pins = "gpio65"; 342 function = "gpio"; 341 function = "gpio"; 343 drive-strength = <2>; 342 drive-strength = <2>; 344 bias-pull-down; 343 bias-pull-down; 345 }; 344 }; 346 }; 345 }; 347 346 348 &uart_0 { 347 &uart_0 { 349 pinctrl-names = "default"; 348 pinctrl-names = "default"; 350 pinctrl-0 = <&uart_console_active>; 349 pinctrl-0 = <&uart_console_active>; 351 350 352 status = "okay"; 351 status = "okay"; 353 }; 352 }; 354 353 355 &usb3 { 354 &usb3 { 356 status = "okay"; 355 status = "okay"; 357 }; 356 }; 358 357 359 &usb3_dwc3 { 358 &usb3_dwc3 { 360 /delete-property/ usb-role-switch; << 361 dr_mode = "peripheral"; 359 dr_mode = "peripheral"; 362 }; 360 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.