1 // SPDX-License-Identifier: BSD-3-Clause 1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 2 /* 3 * Copyright (c) 2022-2024 Jianhua Lu <lujianhu !! 3 * Copyright (c) 2022, 2023 Jianhua Lu <lujianhua000@gmail.com> 4 */ 4 */ 5 5 6 #include <dt-bindings/arm/qcom,ids.h> 6 #include <dt-bindings/arm/qcom,ids.h> 7 #include <dt-bindings/phy/phy.h> 7 #include <dt-bindings/phy/phy.h> 8 #include <dt-bindings/regulator/qcom,rpmh-regu 8 #include <dt-bindings/regulator/qcom,rpmh-regulator.h> 9 #include <dt-bindings/usb/pd.h> 9 #include <dt-bindings/usb/pd.h> 10 #include "sm8250.dtsi" 10 #include "sm8250.dtsi" 11 #include "pm8150.dtsi" 11 #include "pm8150.dtsi" 12 #include "pm8150b.dtsi" 12 #include "pm8150b.dtsi" 13 #include "pm8150l.dtsi" 13 #include "pm8150l.dtsi" 14 #include "pm8009.dtsi" 14 #include "pm8009.dtsi" 15 15 16 /* 16 /* 17 * Delete following upstream (sm8250.dtsi) res 17 * Delete following upstream (sm8250.dtsi) reserved 18 * memory mappings which are different on this 18 * memory mappings which are different on this device. 19 */ 19 */ 20 /delete-node/ &adsp_mem; 20 /delete-node/ &adsp_mem; 21 /delete-node/ &cdsp_secure_heap; 21 /delete-node/ &cdsp_secure_heap; 22 /delete-node/ &slpi_mem; 22 /delete-node/ &slpi_mem; 23 /delete-node/ &spss_mem; 23 /delete-node/ &spss_mem; 24 /delete-node/ &xbl_aop_mem; 24 /delete-node/ &xbl_aop_mem; 25 25 26 / { 26 / { 27 chassis-type = "tablet"; 27 chassis-type = "tablet"; 28 28 29 /* required for bootloader to select c 29 /* required for bootloader to select correct board */ 30 qcom,msm-id = <QCOM_ID_SM8250 0x20001> 30 qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */ 31 qcom,board-id = <0x10008 0>; 31 qcom,board-id = <0x10008 0>; 32 32 33 chosen { 33 chosen { 34 #address-cells = <2>; 34 #address-cells = <2>; 35 #size-cells = <2>; 35 #size-cells = <2>; 36 ranges; 36 ranges; 37 37 38 framebuffer: framebuffer@9c000 38 framebuffer: framebuffer@9c000000 { 39 compatible = "simple-f 39 compatible = "simple-framebuffer"; 40 reg = <0x0 0x9c000000 40 reg = <0x0 0x9c000000 0x0 0x2300000>; 41 width = <1600>; 41 width = <1600>; 42 height = <2560>; 42 height = <2560>; 43 stride = <(1600 * 4)>; 43 stride = <(1600 * 4)>; 44 format = "a8r8g8b8"; 44 format = "a8r8g8b8"; 45 }; 45 }; 46 }; 46 }; 47 47 48 battery_l: battery-l { 48 battery_l: battery-l { 49 compatible = "simple-battery"; 49 compatible = "simple-battery"; 50 voltage-min-design-microvolt = 50 voltage-min-design-microvolt = <3870000>; 51 energy-full-design-microwatt-h 51 energy-full-design-microwatt-hours = <16600000>; 52 charge-full-design-microamp-ho 52 charge-full-design-microamp-hours = <4300000>; 53 }; 53 }; 54 54 55 battery_r: battery-r { 55 battery_r: battery-r { 56 compatible = "simple-battery"; 56 compatible = "simple-battery"; 57 voltage-min-design-microvolt = 57 voltage-min-design-microvolt = <3870000>; 58 energy-full-design-microwatt-h 58 energy-full-design-microwatt-hours = <16600000>; 59 charge-full-design-microamp-ho 59 charge-full-design-microamp-hours = <4300000>; 60 }; 60 }; 61 61 62 bl_vddpos_5p5: bl-vddpos-regulator { 62 bl_vddpos_5p5: bl-vddpos-regulator { 63 compatible = "regulator-fixed" 63 compatible = "regulator-fixed"; 64 regulator-name = "bl_vddpos_5p 64 regulator-name = "bl_vddpos_5p5"; 65 regulator-min-microvolt = <550 65 regulator-min-microvolt = <5500000>; 66 regulator-max-microvolt = <550 66 regulator-max-microvolt = <5500000>; 67 regulator-enable-ramp-delay = 67 regulator-enable-ramp-delay = <233>; 68 gpio = <&tlmm 130 GPIO_ACTIVE_ 68 gpio = <&tlmm 130 GPIO_ACTIVE_HIGH>; 69 enable-active-high; 69 enable-active-high; 70 regulator-boot-on; 70 regulator-boot-on; 71 }; 71 }; 72 72 73 bl_vddneg_5p5: bl-vddneg-regulator { 73 bl_vddneg_5p5: bl-vddneg-regulator { 74 compatible = "regulator-fixed" 74 compatible = "regulator-fixed"; 75 regulator-name = "bl_vddneg_5p 75 regulator-name = "bl_vddneg_5p5"; 76 regulator-min-microvolt = <550 76 regulator-min-microvolt = <5500000>; 77 regulator-max-microvolt = <550 77 regulator-max-microvolt = <5500000>; 78 regulator-enable-ramp-delay = 78 regulator-enable-ramp-delay = <233>; 79 gpio = <&tlmm 131 GPIO_ACTIVE_ 79 gpio = <&tlmm 131 GPIO_ACTIVE_HIGH>; 80 enable-active-high; 80 enable-active-high; 81 regulator-boot-on; 81 regulator-boot-on; 82 }; 82 }; 83 83 84 gpio_keys: gpio-keys { 84 gpio_keys: gpio-keys { 85 compatible = "gpio-keys"; 85 compatible = "gpio-keys"; 86 86 87 pinctrl-names = "default"; 87 pinctrl-names = "default"; 88 pinctrl-0 = <&vol_up_n>; 88 pinctrl-0 = <&vol_up_n>; 89 89 90 key-vol-up { 90 key-vol-up { 91 label = "Volume Up"; 91 label = "Volume Up"; 92 gpios = <&pm8150_gpios 92 gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>; 93 linux,code = <KEY_VOLU 93 linux,code = <KEY_VOLUMEUP>; 94 debounce-interval = <1 94 debounce-interval = <15>; 95 linux,can-disable; 95 linux,can-disable; 96 wakeup-source; 96 wakeup-source; 97 }; 97 }; 98 }; 98 }; 99 99 100 vph_pwr: vph-pwr-regulator { 100 vph_pwr: vph-pwr-regulator { 101 compatible = "regulator-fixed" 101 compatible = "regulator-fixed"; 102 regulator-name = "vph_pwr"; 102 regulator-name = "vph_pwr"; 103 regulator-min-microvolt = <370 103 regulator-min-microvolt = <3700000>; 104 regulator-max-microvolt = <370 104 regulator-max-microvolt = <3700000>; 105 }; 105 }; 106 106 107 /* S6c is really ebi.lvl but it's ther 107 /* S6c is really ebi.lvl but it's there for supply map completeness sake. */ 108 vreg_s6c_0p88: smpc6-regulator { 108 vreg_s6c_0p88: smpc6-regulator { 109 compatible = "regulator-fixed" 109 compatible = "regulator-fixed"; 110 regulator-name = "vreg_s6c_0p8 110 regulator-name = "vreg_s6c_0p88"; 111 regulator-min-microvolt = <880 111 regulator-min-microvolt = <880000>; 112 regulator-max-microvolt = <880 112 regulator-max-microvolt = <880000>; 113 regulator-always-on; 113 regulator-always-on; 114 vin-supply = <&vph_pwr>; 114 vin-supply = <&vph_pwr>; 115 }; 115 }; 116 116 117 reserved-memory { 117 reserved-memory { 118 xbl_aop_mem: xbl-aop@80600000 118 xbl_aop_mem: xbl-aop@80600000 { 119 reg = <0x0 0x80600000 119 reg = <0x0 0x80600000 0x0 0x260000>; 120 no-map; 120 no-map; 121 }; 121 }; 122 122 123 slpi_mem: slpi@88c00000 { 123 slpi_mem: slpi@88c00000 { 124 reg = <0x0 0x88c00000 124 reg = <0x0 0x88c00000 0x0 0x2f00000>; 125 no-map; 125 no-map; 126 }; 126 }; 127 127 128 adsp_mem: adsp@8bb00000 { 128 adsp_mem: adsp@8bb00000 { 129 reg = <0x0 0x8bb00000 129 reg = <0x0 0x8bb00000 0x0 0x2500000>; 130 no-map; 130 no-map; 131 }; 131 }; 132 132 133 spss_mem: spss@8e000000 { 133 spss_mem: spss@8e000000 { 134 reg = <0x0 0x8e000000 134 reg = <0x0 0x8e000000 0x0 0x100000>; 135 no-map; 135 no-map; 136 }; 136 }; 137 137 138 cdsp_secure_heap: cdsp-secure- 138 cdsp_secure_heap: cdsp-secure-heap@8e100000 { 139 reg = <0x0 0x8e100000 139 reg = <0x0 0x8e100000 0x0 0x4600000>; 140 no-map; 140 no-map; 141 }; 141 }; 142 142 143 cont_splash_mem: cont-splash@9 143 cont_splash_mem: cont-splash@9c000000 { 144 reg = <0x0 0x9c000000 144 reg = <0x0 0x9c000000 0x0 0x2300000>; 145 no-map; 145 no-map; 146 }; 146 }; 147 147 148 ramoops@b0000000 { 148 ramoops@b0000000 { 149 compatible = "ramoops" 149 compatible = "ramoops"; 150 reg = <0x0 0xb0000000 150 reg = <0x0 0xb0000000 0x0 0x400000>; 151 record-size = <0x1000> 151 record-size = <0x1000>; 152 console-size = <0x2000 152 console-size = <0x200000>; 153 ecc-size = <16>; 153 ecc-size = <16>; 154 no-map; 154 no-map; 155 }; 155 }; 156 }; 156 }; 157 }; 157 }; 158 158 159 &adsp { 159 &adsp { 160 firmware-name = "qcom/sm8250/xiaomi/el 160 firmware-name = "qcom/sm8250/xiaomi/elish/adsp.mbn"; 161 status = "okay"; 161 status = "okay"; 162 }; 162 }; 163 163 164 &apps_rsc { 164 &apps_rsc { 165 regulators-0 { 165 regulators-0 { 166 compatible = "qcom,pm8150-rpmh 166 compatible = "qcom,pm8150-rpmh-regulators"; 167 qcom,pmic-id = "a"; 167 qcom,pmic-id = "a"; 168 168 169 vdd-s1-supply = <&vph_pwr>; 169 vdd-s1-supply = <&vph_pwr>; 170 vdd-s2-supply = <&vph_pwr>; 170 vdd-s2-supply = <&vph_pwr>; 171 vdd-s3-supply = <&vph_pwr>; 171 vdd-s3-supply = <&vph_pwr>; 172 vdd-s4-supply = <&vph_pwr>; 172 vdd-s4-supply = <&vph_pwr>; 173 vdd-s5-supply = <&vph_pwr>; 173 vdd-s5-supply = <&vph_pwr>; 174 vdd-s6-supply = <&vph_pwr>; 174 vdd-s6-supply = <&vph_pwr>; 175 vdd-s7-supply = <&vph_pwr>; 175 vdd-s7-supply = <&vph_pwr>; 176 vdd-s8-supply = <&vph_pwr>; 176 vdd-s8-supply = <&vph_pwr>; 177 vdd-s9-supply = <&vph_pwr>; 177 vdd-s9-supply = <&vph_pwr>; 178 vdd-s10-supply = <&vph_pwr>; 178 vdd-s10-supply = <&vph_pwr>; 179 vdd-l1-l8-l11-supply = <&vreg_ 179 vdd-l1-l8-l11-supply = <&vreg_s6c_0p88>; 180 vdd-l2-l10-supply = <&vreg_bob 180 vdd-l2-l10-supply = <&vreg_bob>; 181 vdd-l3-l4-l5-l18-supply = <&vr 181 vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>; 182 vdd-l6-l9-supply = <&vreg_s8c_ 182 vdd-l6-l9-supply = <&vreg_s8c_1p35>; 183 vdd-l7-l12-l14-l15-supply = <& 183 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>; 184 vdd-l13-l16-l17-supply = <&vre 184 vdd-l13-l16-l17-supply = <&vreg_bob>; 185 185 186 /* (S1+S2+S3) - cx.lvl (ARC) * 186 /* (S1+S2+S3) - cx.lvl (ARC) */ 187 187 188 vreg_s4a_1p8: smps4 { 188 vreg_s4a_1p8: smps4 { 189 regulator-name = "vreg 189 regulator-name = "vreg_s4a_1p8"; 190 regulator-min-microvol 190 regulator-min-microvolt = <1800000>; 191 regulator-max-microvol 191 regulator-max-microvolt = <1920000>; 192 regulator-initial-mode 192 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 193 regulator-allow-set-lo 193 regulator-allow-set-load; 194 regulator-allowed-mode 194 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 195 195 RPMH_REGULATOR_MODE_HPM>; 196 }; 196 }; 197 197 198 vreg_s5a_1p9: smps5 { 198 vreg_s5a_1p9: smps5 { 199 regulator-name = "vreg 199 regulator-name = "vreg_s5a_1p9"; 200 regulator-min-microvol 200 regulator-min-microvolt = <1900000>; 201 regulator-max-microvol 201 regulator-max-microvolt = <2040000>; 202 regulator-initial-mode 202 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 203 }; 203 }; 204 204 205 vreg_s6a_0p95: smps6 { 205 vreg_s6a_0p95: smps6 { 206 regulator-name = "vreg 206 regulator-name = "vreg_s6a_0p95"; 207 regulator-min-microvol 207 regulator-min-microvolt = <950000>; 208 regulator-max-microvol 208 regulator-max-microvolt = <1128000>; 209 regulator-initial-mode 209 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 210 }; 210 }; 211 211 212 vreg_l2a_3p1: ldo2 { 212 vreg_l2a_3p1: ldo2 { 213 regulator-name = "vreg 213 regulator-name = "vreg_l2a_3p1"; 214 regulator-min-microvol 214 regulator-min-microvolt = <3072000>; 215 regulator-max-microvol 215 regulator-max-microvolt = <3072000>; 216 regulator-initial-mode 216 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 217 }; 217 }; 218 218 219 vreg_l3a_0p9: ldo3 { 219 vreg_l3a_0p9: ldo3 { 220 regulator-name = "vreg 220 regulator-name = "vreg_l3a_0p9"; 221 regulator-min-microvol 221 regulator-min-microvolt = <928000>; 222 regulator-max-microvol 222 regulator-max-microvolt = <932000>; 223 regulator-initial-mode 223 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 224 }; 224 }; 225 225 226 /* L4 - lmx.lvl (ARC) */ 226 /* L4 - lmx.lvl (ARC) */ 227 227 228 vreg_l5a_0p88: ldo5 { 228 vreg_l5a_0p88: ldo5 { 229 regulator-name = "vreg 229 regulator-name = "vreg_l5a_0p88"; 230 regulator-min-microvol 230 regulator-min-microvolt = <880000>; 231 regulator-max-microvol 231 regulator-max-microvolt = <880000>; 232 regulator-initial-mode 232 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 233 }; 233 }; 234 234 235 vreg_l6a_1p2: ldo6 { 235 vreg_l6a_1p2: ldo6 { 236 regulator-name = "vreg 236 regulator-name = "vreg_l6a_1p2"; 237 regulator-min-microvol 237 regulator-min-microvolt = <1200000>; 238 regulator-max-microvol 238 regulator-max-microvolt = <1200000>; 239 regulator-initial-mode 239 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 240 regulator-allow-set-lo 240 regulator-allow-set-load; 241 regulator-allowed-mode 241 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 242 242 RPMH_REGULATOR_MODE_HPM>; 243 }; 243 }; 244 244 245 /* L7 is unused. */ 245 /* L7 is unused. */ 246 246 247 vreg_l9a_1p2: ldo9 { 247 vreg_l9a_1p2: ldo9 { 248 regulator-name = "vreg 248 regulator-name = "vreg_l9a_1p2"; 249 regulator-min-microvol 249 regulator-min-microvolt = <1200000>; 250 regulator-max-microvol 250 regulator-max-microvolt = <1200000>; 251 regulator-initial-mode 251 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 252 }; 252 }; 253 253 254 /* L10 is unused, L11 - lcx.lv 254 /* L10 is unused, L11 - lcx.lvl (ARC) */ 255 255 256 vreg_l12a_1p8: ldo12 { 256 vreg_l12a_1p8: ldo12 { 257 regulator-name = "vreg 257 regulator-name = "vreg_l12a_1p8"; 258 regulator-min-microvol 258 regulator-min-microvolt = <1800000>; 259 regulator-max-microvol 259 regulator-max-microvolt = <1800000>; 260 regulator-initial-mode 260 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 261 }; 261 }; 262 262 263 /* L13 is unused. */ 263 /* L13 is unused. */ 264 264 265 vreg_l14a_1p88: ldo14 { 265 vreg_l14a_1p88: ldo14 { 266 regulator-name = "vreg 266 regulator-name = "vreg_l14a_1p88"; 267 regulator-min-microvol 267 regulator-min-microvolt = <1880000>; 268 regulator-max-microvol 268 regulator-max-microvolt = <1880000>; 269 regulator-initial-mode 269 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 270 }; 270 }; 271 271 272 /* L15 & L16 are unused. */ 272 /* L15 & L16 are unused. */ 273 273 274 vreg_l17a_3p0: ldo17 { 274 vreg_l17a_3p0: ldo17 { 275 regulator-name = "vreg 275 regulator-name = "vreg_l17a_3p0"; 276 regulator-min-microvol 276 regulator-min-microvolt = <2496000>; 277 regulator-max-microvol 277 regulator-max-microvolt = <3008000>; 278 regulator-initial-mode 278 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 279 regulator-allow-set-lo 279 regulator-allow-set-load; 280 regulator-allowed-mode 280 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 281 281 RPMH_REGULATOR_MODE_HPM>; 282 }; 282 }; 283 283 284 vreg_l18a_0p9: ldo18 { 284 vreg_l18a_0p9: ldo18 { 285 regulator-name = "vreg 285 regulator-name = "vreg_l18a_0p9"; 286 regulator-min-microvol 286 regulator-min-microvolt = <800000>; 287 regulator-max-microvol 287 regulator-max-microvolt = <920000>; 288 regulator-initial-mode 288 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 289 }; 289 }; 290 }; 290 }; 291 291 292 /* 292 /* 293 * Remaining regulators that are not y 293 * Remaining regulators that are not yet supported: 294 * OLEDB: 4925000-8100000 294 * OLEDB: 4925000-8100000 295 * ab: 4600000-6100000 295 * ab: 4600000-6100000 296 * ibb: 800000-5400000 296 * ibb: 800000-5400000 297 */ 297 */ 298 regulators-1 { 298 regulators-1 { 299 compatible = "qcom,pm8150l-rpm 299 compatible = "qcom,pm8150l-rpmh-regulators"; 300 qcom,pmic-id = "c"; 300 qcom,pmic-id = "c"; 301 301 302 vdd-s1-supply = <&vph_pwr>; 302 vdd-s1-supply = <&vph_pwr>; 303 vdd-s2-supply = <&vph_pwr>; 303 vdd-s2-supply = <&vph_pwr>; 304 vdd-s3-supply = <&vph_pwr>; 304 vdd-s3-supply = <&vph_pwr>; 305 vdd-s4-supply = <&vph_pwr>; 305 vdd-s4-supply = <&vph_pwr>; 306 vdd-s5-supply = <&vph_pwr>; 306 vdd-s5-supply = <&vph_pwr>; 307 vdd-s6-supply = <&vph_pwr>; 307 vdd-s6-supply = <&vph_pwr>; 308 vdd-s7-supply = <&vph_pwr>; 308 vdd-s7-supply = <&vph_pwr>; 309 vdd-s8-supply = <&vph_pwr>; 309 vdd-s8-supply = <&vph_pwr>; 310 vdd-l1-l8-supply = <&vreg_s4a_ 310 vdd-l1-l8-supply = <&vreg_s4a_1p8>; 311 vdd-l2-l3-supply = <&vreg_s8c_ 311 vdd-l2-l3-supply = <&vreg_s8c_1p35>; 312 vdd-l4-l5-l6-supply = <&vreg_b 312 vdd-l4-l5-l6-supply = <&vreg_bob>; 313 vdd-l7-l11-supply = <&vreg_bob 313 vdd-l7-l11-supply = <&vreg_bob>; 314 vdd-l9-l10-supply = <&vreg_bob 314 vdd-l9-l10-supply = <&vreg_bob>; 315 vdd-bob-supply = <&vph_pwr>; 315 vdd-bob-supply = <&vph_pwr>; 316 316 317 vreg_bob: bob { 317 vreg_bob: bob { 318 regulator-name = "vreg 318 regulator-name = "vreg_bob"; 319 regulator-min-microvol 319 regulator-min-microvolt = <3350000>; 320 regulator-max-microvol 320 regulator-max-microvolt = <3960000>; 321 regulator-initial-mode 321 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 322 }; 322 }; 323 323 324 /* 324 /* 325 * S1-S6 are ARCs: 325 * S1-S6 are ARCs: 326 * (S1+S2) - gfx.lvl, 326 * (S1+S2) - gfx.lvl, 327 * S3 - mx.lvl, 327 * S3 - mx.lvl, 328 * (S4+S5) - mmcx.lvl, 328 * (S4+S5) - mmcx.lvl, 329 * S6 - ebi.lvl 329 * S6 - ebi.lvl 330 */ 330 */ 331 331 332 vreg_s7c_0p35: smps7 { 332 vreg_s7c_0p35: smps7 { 333 regulator-name = "vreg 333 regulator-name = "vreg_s7c_0p35"; 334 regulator-min-microvol 334 regulator-min-microvolt = <348000>; 335 regulator-max-microvol 335 regulator-max-microvolt = <1000000>; 336 regulator-initial-mode 336 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 337 }; 337 }; 338 338 339 vreg_s8c_1p35: smps8 { 339 vreg_s8c_1p35: smps8 { 340 regulator-name = "vreg 340 regulator-name = "vreg_s8c_1p35"; 341 regulator-min-microvol 341 regulator-min-microvolt = <1350000>; 342 regulator-max-microvol 342 regulator-max-microvolt = <1400000>; 343 regulator-initial-mode 343 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 344 }; 344 }; 345 345 346 vreg_l1c_1p8: ldo1 { 346 vreg_l1c_1p8: ldo1 { 347 regulator-name = "vreg 347 regulator-name = "vreg_l1c_1p8"; 348 regulator-min-microvol 348 regulator-min-microvolt = <1800000>; 349 regulator-max-microvol 349 regulator-max-microvolt = <1800000>; 350 regulator-initial-mode 350 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 351 }; 351 }; 352 352 353 /* L2-4 are unused. */ 353 /* L2-4 are unused. */ 354 354 355 vreg_l5c_1p8: ldo5 { 355 vreg_l5c_1p8: ldo5 { 356 regulator-name = "vreg 356 regulator-name = "vreg_l5c_1p8"; 357 regulator-min-microvol 357 regulator-min-microvolt = <1800000>; 358 regulator-max-microvol 358 regulator-max-microvolt = <2800000>; 359 regulator-initial-mode 359 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 360 }; 360 }; 361 361 362 vreg_l6c_2p9: ldo6 { 362 vreg_l6c_2p9: ldo6 { 363 regulator-name = "vreg 363 regulator-name = "vreg_l6c_2p9"; 364 regulator-min-microvol 364 regulator-min-microvolt = <1800000>; 365 regulator-max-microvol 365 regulator-max-microvolt = <2960000>; 366 regulator-initial-mode 366 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 367 regulator-allow-set-lo 367 regulator-allow-set-load; 368 regulator-allowed-mode 368 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 369 369 RPMH_REGULATOR_MODE_HPM>; 370 }; 370 }; 371 371 372 vreg_l7c_2p85: ldo7 { 372 vreg_l7c_2p85: ldo7 { 373 regulator-name = "vreg 373 regulator-name = "vreg_l7c_2p85"; 374 regulator-min-microvol 374 regulator-min-microvolt = <2856000>; 375 regulator-max-microvol 375 regulator-max-microvolt = <3104000>; 376 regulator-initial-mode 376 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 377 }; 377 }; 378 378 379 vreg_l8c_1p8: ldo8 { 379 vreg_l8c_1p8: ldo8 { 380 regulator-name = "vreg 380 regulator-name = "vreg_l8c_1p8"; 381 regulator-min-microvol 381 regulator-min-microvolt = <1800000>; 382 regulator-max-microvol 382 regulator-max-microvolt = <1800000>; 383 regulator-initial-mode 383 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 384 }; 384 }; 385 385 386 vreg_l9c_2p9: ldo9 { 386 vreg_l9c_2p9: ldo9 { 387 regulator-name = "vreg 387 regulator-name = "vreg_l9c_2p9"; 388 regulator-min-microvol 388 regulator-min-microvolt = <2704000>; 389 regulator-max-microvol 389 regulator-max-microvolt = <2960000>; 390 regulator-initial-mode 390 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 391 regulator-allow-set-lo 391 regulator-allow-set-load; 392 regulator-allowed-mode 392 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 393 393 RPMH_REGULATOR_MODE_HPM>; 394 }; 394 }; 395 395 396 vreg_l10c_3p3: ldo10 { 396 vreg_l10c_3p3: ldo10 { 397 regulator-name = "vreg 397 regulator-name = "vreg_l10c_3p3"; 398 regulator-min-microvol 398 regulator-min-microvolt = <3296000>; 399 regulator-max-microvol 399 regulator-max-microvolt = <3296000>; 400 regulator-initial-mode 400 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 401 }; 401 }; 402 402 403 vreg_l11c_3p0: ldo11 { 403 vreg_l11c_3p0: ldo11 { 404 regulator-name = "vreg 404 regulator-name = "vreg_l11c_3p0"; 405 regulator-min-microvol 405 regulator-min-microvolt = <3000000>; 406 regulator-max-microvol 406 regulator-max-microvolt = <3000000>; 407 regulator-initial-mode 407 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 408 }; 408 }; 409 }; 409 }; 410 410 411 regulators-2 { 411 regulators-2 { 412 compatible = "qcom,pm8009-rpmh 412 compatible = "qcom,pm8009-rpmh-regulators"; 413 qcom,pmic-id = "f"; 413 qcom,pmic-id = "f"; 414 414 415 vdd-s1-supply = <&vph_pwr>; 415 vdd-s1-supply = <&vph_pwr>; 416 vdd-s2-supply = <&vreg_bob>; 416 vdd-s2-supply = <&vreg_bob>; 417 vdd-l2-supply = <&vreg_s8c_1p3 417 vdd-l2-supply = <&vreg_s8c_1p35>; 418 vdd-l5-l6-supply = <&vreg_bob> 418 vdd-l5-l6-supply = <&vreg_bob>; 419 vdd-l7-supply = <&vreg_s4a_1p8 419 vdd-l7-supply = <&vreg_s4a_1p8>; 420 420 421 vreg_s1f_1p2: smps1 { 421 vreg_s1f_1p2: smps1 { 422 regulator-name = "vreg 422 regulator-name = "vreg_s1f_1p2"; 423 regulator-min-microvol 423 regulator-min-microvolt = <1200000>; 424 regulator-max-microvol 424 regulator-max-microvolt = <1200000>; 425 regulator-initial-mode 425 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 426 }; 426 }; 427 427 428 vreg_s2f_0p5: smps2 { 428 vreg_s2f_0p5: smps2 { 429 regulator-name = "vreg 429 regulator-name = "vreg_s2f_0p5"; 430 regulator-min-microvol 430 regulator-min-microvolt = <512000>; 431 regulator-max-microvol 431 regulator-max-microvolt = <1100000>; 432 regulator-initial-mode 432 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 433 }; 433 }; 434 434 435 /* L1 is unused. */ 435 /* L1 is unused. */ 436 436 437 vreg_l2f_1p3: ldo2 { 437 vreg_l2f_1p3: ldo2 { 438 regulator-name = "vreg 438 regulator-name = "vreg_l2f_1p3"; 439 regulator-min-microvol 439 regulator-min-microvolt = <1304000>; 440 regulator-max-microvol 440 regulator-max-microvolt = <1304000>; 441 regulator-initial-mode 441 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 442 }; 442 }; 443 443 444 /* L3 & L4 are unused. */ 444 /* L3 & L4 are unused. */ 445 445 446 vreg_l5f_2p8: ldo5 { 446 vreg_l5f_2p8: ldo5 { 447 regulator-name = "vreg 447 regulator-name = "vreg_l5f_2p85"; 448 regulator-min-microvol 448 regulator-min-microvolt = <2800000>; 449 regulator-max-microvol 449 regulator-max-microvolt = <2800000>; 450 regulator-initial-mode 450 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 451 }; 451 }; 452 452 453 vreg_l6f_2p8: ldo6 { 453 vreg_l6f_2p8: ldo6 { 454 regulator-name = "vreg 454 regulator-name = "vreg_l6f_2p8"; 455 regulator-min-microvol 455 regulator-min-microvolt = <2800000>; 456 regulator-max-microvol 456 regulator-max-microvolt = <2800000>; 457 regulator-initial-mode 457 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 458 }; 458 }; 459 459 460 vreg_l7f_1p8: ldo7 { 460 vreg_l7f_1p8: ldo7 { 461 regulator-name = "vreg 461 regulator-name = "vreg_l7f_1p8"; 462 regulator-min-microvol 462 regulator-min-microvolt = <1800000>; 463 regulator-max-microvol 463 regulator-max-microvolt = <1800000>; 464 regulator-initial-mode 464 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 465 }; 465 }; 466 }; 466 }; 467 }; 467 }; 468 468 469 &cdsp { 469 &cdsp { 470 firmware-name = "qcom/sm8250/xiaomi/el 470 firmware-name = "qcom/sm8250/xiaomi/elish/cdsp.mbn"; 471 status = "okay"; 471 status = "okay"; 472 }; 472 }; 473 473 474 &gmu { 474 &gmu { 475 status = "okay"; 475 status = "okay"; 476 }; 476 }; 477 477 478 &gpi_dma0 { 478 &gpi_dma0 { 479 status = "okay"; 479 status = "okay"; 480 }; 480 }; 481 481 482 &gpi_dma1 { 482 &gpi_dma1 { 483 status = "okay"; 483 status = "okay"; 484 }; 484 }; 485 485 486 &gpi_dma2 { 486 &gpi_dma2 { 487 status = "okay"; 487 status = "okay"; 488 }; 488 }; 489 489 490 &gpu { 490 &gpu { 491 status = "okay"; 491 status = "okay"; 492 492 493 zap-shader { 493 zap-shader { 494 memory-region = <&gpu_mem>; 494 memory-region = <&gpu_mem>; 495 firmware-name = "qcom/sm8250/x 495 firmware-name = "qcom/sm8250/xiaomi/elish/a650_zap.mbn"; 496 }; 496 }; 497 }; 497 }; 498 498 499 &i2c0 { 499 &i2c0 { 500 clock-frequency = <400000>; 500 clock-frequency = <400000>; 501 status = "okay"; 501 status = "okay"; 502 502 503 fuel-gauge@55 { 503 fuel-gauge@55 { 504 compatible = "ti,bq27z561"; 504 compatible = "ti,bq27z561"; 505 reg = <0x55>; 505 reg = <0x55>; 506 monitored-battery = <&battery_ 506 monitored-battery = <&battery_r>; 507 }; 507 }; 508 }; 508 }; 509 509 510 &i2c11 { 510 &i2c11 { 511 clock-frequency = <400000>; 511 clock-frequency = <400000>; 512 status = "okay"; 512 status = "okay"; 513 513 514 backlight: backlight@11 { 514 backlight: backlight@11 { 515 compatible = "kinetic,ktz8866" 515 compatible = "kinetic,ktz8866"; 516 reg = <0x11>; 516 reg = <0x11>; 517 vddpos-supply = <&bl_vddpos_5p 517 vddpos-supply = <&bl_vddpos_5p5>; 518 vddneg-supply = <&bl_vddneg_5p 518 vddneg-supply = <&bl_vddneg_5p5>; 519 enable-gpios = <&tlmm 139 GPIO 519 enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>; 520 current-num-sinks = <5>; 520 current-num-sinks = <5>; 521 kinetic,current-ramp-delay-ms 521 kinetic,current-ramp-delay-ms = <128>; 522 kinetic,led-enable-ramp-delay- 522 kinetic,led-enable-ramp-delay-ms = <1>; 523 kinetic,enable-lcd-bias; 523 kinetic,enable-lcd-bias; 524 }; 524 }; 525 }; 525 }; 526 526 527 &i2c13 { 527 &i2c13 { 528 clock-frequency = <400000>; 528 clock-frequency = <400000>; 529 status = "okay"; 529 status = "okay"; 530 530 531 fuel-gauge@55 { 531 fuel-gauge@55 { 532 compatible = "ti,bq27z561"; 532 compatible = "ti,bq27z561"; 533 reg = <0x55>; 533 reg = <0x55>; 534 monitored-battery = <&battery_ 534 monitored-battery = <&battery_l>; 535 }; 535 }; 536 }; 536 }; 537 537 538 &mdss { 538 &mdss { 539 status = "okay"; 539 status = "okay"; 540 }; 540 }; 541 541 542 &mdss_dsi0 { 542 &mdss_dsi0 { 543 vdda-supply = <&vreg_l9a_1p2>; 543 vdda-supply = <&vreg_l9a_1p2>; 544 qcom,dual-dsi-mode; 544 qcom,dual-dsi-mode; 545 qcom,sync-dual-dsi; 545 qcom,sync-dual-dsi; 546 qcom,master-dsi; 546 qcom,master-dsi; 547 status = "okay"; 547 status = "okay"; 548 548 549 display_panel: panel@0 { 549 display_panel: panel@0 { 550 reg = <0>; 550 reg = <0>; 551 vddio-supply = <&vreg_l14a_1p8 551 vddio-supply = <&vreg_l14a_1p88>; 552 reset-gpios = <&tlmm 75 GPIO_A 552 reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; 553 backlight = <&backlight>; 553 backlight = <&backlight>; 554 rotation = <90>; << 555 554 556 status = "disabled"; 555 status = "disabled"; 557 556 558 ports { 557 ports { 559 #address-cells = <1>; 558 #address-cells = <1>; 560 #size-cells = <0>; 559 #size-cells = <0>; 561 560 562 port@0 { 561 port@0 { 563 reg = <0>; 562 reg = <0>; 564 563 565 panel_in_0: en 564 panel_in_0: endpoint { 566 remote 565 remote-endpoint = <&mdss_dsi0_out>; 567 }; 566 }; 568 }; 567 }; 569 568 570 port@1 { 569 port@1 { 571 reg = <1>; 570 reg = <1>; 572 571 573 panel_in_1: en 572 panel_in_1: endpoint { 574 remote 573 remote-endpoint = <&mdss_dsi1_out>; 575 }; 574 }; 576 }; 575 }; 577 }; 576 }; 578 }; 577 }; 579 }; 578 }; 580 579 581 &mdss_dsi0_out { 580 &mdss_dsi0_out { 582 data-lanes = <0 1 2>; 581 data-lanes = <0 1 2>; 583 remote-endpoint = <&panel_in_0>; 582 remote-endpoint = <&panel_in_0>; 584 }; 583 }; 585 584 586 &mdss_dsi0_phy { 585 &mdss_dsi0_phy { 587 vdds-supply = <&vreg_l5a_0p88>; 586 vdds-supply = <&vreg_l5a_0p88>; 588 phy-type = <PHY_TYPE_CPHY>; 587 phy-type = <PHY_TYPE_CPHY>; 589 status = "okay"; 588 status = "okay"; 590 }; 589 }; 591 590 592 &mdss_dsi1 { 591 &mdss_dsi1 { 593 vdda-supply = <&vreg_l9a_1p2>; 592 vdda-supply = <&vreg_l9a_1p2>; 594 qcom,dual-dsi-mode; 593 qcom,dual-dsi-mode; 595 qcom,sync-dual-dsi; 594 qcom,sync-dual-dsi; 596 /* DSI1 is slave, so use DSI0 clocks * 595 /* DSI1 is slave, so use DSI0 clocks */ 597 assigned-clock-parents = <&mdss_dsi0_p 596 assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>; 598 status = "okay"; 597 status = "okay"; 599 }; 598 }; 600 599 601 &mdss_dsi1_out { 600 &mdss_dsi1_out { 602 data-lanes = <0 1 2>; 601 data-lanes = <0 1 2>; 603 remote-endpoint = <&panel_in_1>; 602 remote-endpoint = <&panel_in_1>; 604 }; 603 }; 605 604 606 &mdss_dsi1_phy { 605 &mdss_dsi1_phy { 607 vdds-supply = <&vreg_l5a_0p88>; 606 vdds-supply = <&vreg_l5a_0p88>; 608 phy-type = <PHY_TYPE_CPHY>; 607 phy-type = <PHY_TYPE_CPHY>; 609 status = "okay"; 608 status = "okay"; 610 }; 609 }; 611 610 612 &pcie0 { 611 &pcie0 { 613 status = "okay"; 612 status = "okay"; 614 }; 613 }; 615 614 616 &pcie0_phy { 615 &pcie0_phy { 617 vdda-phy-supply = <&vreg_l5a_0p88>; 616 vdda-phy-supply = <&vreg_l5a_0p88>; 618 vdda-pll-supply = <&vreg_l9a_1p2>; 617 vdda-pll-supply = <&vreg_l9a_1p2>; 619 status = "okay"; 618 status = "okay"; 620 }; 619 }; 621 620 622 &pm8150_gpios { 621 &pm8150_gpios { 623 vol_up_n: vol-up-n-state { 622 vol_up_n: vol-up-n-state { 624 pins = "gpio6"; 623 pins = "gpio6"; 625 function = "normal"; 624 function = "normal"; 626 power-source = <1>; 625 power-source = <1>; 627 input-enable; 626 input-enable; 628 bias-pull-up; 627 bias-pull-up; 629 }; 628 }; 630 }; 629 }; 631 630 632 &pm8150b_typec { 631 &pm8150b_typec { 633 vdd-pdphy-supply = <&vreg_l2a_3p1>; 632 vdd-pdphy-supply = <&vreg_l2a_3p1>; 634 status = "okay"; 633 status = "okay"; 635 634 636 connector { 635 connector { 637 compatible = "usb-c-connector" 636 compatible = "usb-c-connector"; 638 637 639 op-sink-microwatt = <10000000> !! 638 power-role = "source"; 640 power-role = "dual"; << 641 data-role = "dual"; 639 data-role = "dual"; 642 self-powered; 640 self-powered; 643 641 644 source-pdos = <PDO_FIXED(5000, 642 source-pdos = <PDO_FIXED(5000, 3000, 645 PDO_F 643 PDO_FIXED_DUAL_ROLE | 646 PDO_F 644 PDO_FIXED_USB_COMM | 647 PDO_F 645 PDO_FIXED_DATA_SWAP)>; 648 646 649 sink-pdos = <PDO_FIXED(5000, 3 << 650 PDO_FIX << 651 PDO_FIX << 652 PDO_FIX << 653 PDO_VAR << 654 << 655 ports { 647 ports { 656 #address-cells = <1>; 648 #address-cells = <1>; 657 #size-cells = <0>; 649 #size-cells = <0>; 658 650 659 port@0 { 651 port@0 { 660 reg = <0>; 652 reg = <0>; 661 653 662 pm8150b_hs_in: !! 654 pm8150b_role_switch_in: endpoint { 663 remote !! 655 remote-endpoint = <&usb_1_role_switch_out>; 664 }; 656 }; 665 }; 657 }; 666 }; 658 }; 667 }; 659 }; 668 }; 660 }; 669 661 670 &pm8150b_vbus { 662 &pm8150b_vbus { 671 regulator-min-microamp = <500000>; << 672 regulator-max-microamp = <3000000>; << 673 status = "okay"; 663 status = "okay"; 674 }; 664 }; 675 665 676 &pon_pwrkey { 666 &pon_pwrkey { 677 status = "okay"; 667 status = "okay"; 678 }; 668 }; 679 669 680 &pon_resin { 670 &pon_resin { 681 linux,code = <KEY_VOLUMEDOWN>; 671 linux,code = <KEY_VOLUMEDOWN>; 682 status = "okay"; 672 status = "okay"; 683 }; 673 }; 684 674 685 &qupv3_id_0 { 675 &qupv3_id_0 { 686 status = "okay"; 676 status = "okay"; 687 }; 677 }; 688 678 689 &qupv3_id_1 { 679 &qupv3_id_1 { 690 status = "okay"; 680 status = "okay"; 691 }; 681 }; 692 682 693 &qupv3_id_2 { 683 &qupv3_id_2 { 694 status = "okay"; 684 status = "okay"; 695 }; 685 }; 696 686 697 &slpi { 687 &slpi { 698 firmware-name = "qcom/sm8250/xiaomi/el 688 firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn"; 699 status = "okay"; 689 status = "okay"; 700 }; 690 }; 701 691 702 &tlmm { 692 &tlmm { 703 gpio-reserved-ranges = <40 4>; 693 gpio-reserved-ranges = <40 4>; 704 }; 694 }; 705 695 706 &usb_1 { 696 &usb_1 { 707 /* USB 2.0 only */ 697 /* USB 2.0 only */ 708 qcom,select-utmi-as-pipe-clk; 698 qcom,select-utmi-as-pipe-clk; 709 status = "okay"; 699 status = "okay"; 710 }; 700 }; 711 701 712 &usb_1_dwc3 { 702 &usb_1_dwc3 { 713 dr_mode = "otg"; 703 dr_mode = "otg"; 714 maximum-speed = "high-speed"; 704 maximum-speed = "high-speed"; 715 /* Remove USB3 phy */ 705 /* Remove USB3 phy */ 716 phys = <&usb_1_hsphy>; 706 phys = <&usb_1_hsphy>; 717 phy-names = "usb2-phy"; 707 phy-names = "usb2-phy"; 718 usb-role-switch; 708 usb-role-switch; 719 }; 709 }; 720 710 721 &usb_1_hsphy { 711 &usb_1_hsphy { 722 vdda-pll-supply = <&vreg_l5a_0p88>; 712 vdda-pll-supply = <&vreg_l5a_0p88>; 723 vdda18-supply = <&vreg_l12a_1p8>; 713 vdda18-supply = <&vreg_l12a_1p8>; 724 vdda33-supply = <&vreg_l2a_3p1>; 714 vdda33-supply = <&vreg_l2a_3p1>; 725 status = "okay"; 715 status = "okay"; 726 }; 716 }; 727 717 728 &usb_1_dwc3_hs_out { !! 718 &usb_1_role_switch_out { 729 remote-endpoint = <&pm8150b_hs_in>; !! 719 remote-endpoint = <&pm8150b_role_switch_in>; 730 }; 720 }; 731 721 732 &ufs_mem_hc { 722 &ufs_mem_hc { 733 vcc-supply = <&vreg_l17a_3p0>; 723 vcc-supply = <&vreg_l17a_3p0>; 734 vcc-max-microamp = <800000>; 724 vcc-max-microamp = <800000>; 735 vccq-supply = <&vreg_l6a_1p2>; 725 vccq-supply = <&vreg_l6a_1p2>; 736 vccq-max-microamp = <800000>; 726 vccq-max-microamp = <800000>; 737 vccq2-supply = <&vreg_s4a_1p8>; 727 vccq2-supply = <&vreg_s4a_1p8>; 738 vccq2-max-microamp = <800000>; 728 vccq2-max-microamp = <800000>; 739 status = "okay"; 729 status = "okay"; 740 }; 730 }; 741 731 742 &ufs_mem_phy { 732 &ufs_mem_phy { 743 vdda-phy-supply = <&vreg_l5a_0p88>; 733 vdda-phy-supply = <&vreg_l5a_0p88>; 744 vdda-pll-supply = <&vreg_l9a_1p2>; 734 vdda-pll-supply = <&vreg_l9a_1p2>; 745 status = "okay"; 735 status = "okay"; 746 }; 736 }; 747 737 748 &venus { 738 &venus { 749 firmware-name = "qcom/sm8250/xiaomi/el 739 firmware-name = "qcom/sm8250/xiaomi/elish/venus.mbn"; 750 status = "okay"; 740 status = "okay"; 751 }; 741 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.