1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2019, Jeffrey Hugo. All rights reserved. */ 3 4/* 5 * Common include for MSM8998 clamshell devices, ie the Lenovo Miix 630, 6 * Asus NovaGo TP370QL, and HP Envy x2. All three devices are basically the 7 * same, with differences in peripherals. 8 */ 9 10#include "msm8998.dtsi" 11#include "pm8998.dtsi" 12#include "pm8005.dtsi" 13 14/ { 15 chosen { 16 }; 17 18 vph_pwr: vph-pwr-regulator { 19 compatible = "regulator-fixed"; 20 regulator-name = "vph_pwr"; 21 regulator-always-on; 22 regulator-boot-on; 23 }; 24}; 25 26&blsp1_uart3 { 27 status = "okay"; 28 29 bluetooth { 30 compatible = "qcom,wcn3990-bt"; 31 32 vddio-supply = <&vreg_s4a_1p8>; 33 vddxo-supply = <&vreg_l7a_1p8>; 34 vddrf-supply = <&vreg_l17a_1p3>; 35 vddch0-supply = <&vreg_l25a_3p3>; 36 max-speed = <3200000>; 37 }; 38}; 39 40/* 41 * The laptop FW does not appear to support the retention state as it is 42 * not advertised as enabled in ACPI, and enabling it in DT can cause boot 43 * hangs. 44 */ 45&CPU0 { 46 cpu-idle-states = <&LITTLE_CPU_SLEEP_1>; 47}; 48 49&CPU1 { 50 cpu-idle-states = <&LITTLE_CPU_SLEEP_1>; 51}; 52 53&CPU2 { 54 cpu-idle-states = <&LITTLE_CPU_SLEEP_1>; 55}; 56 57&CPU3 { 58 cpu-idle-states = <&LITTLE_CPU_SLEEP_1>; 59}; 60 61&CPU4 { 62 cpu-idle-states = <&BIG_CPU_SLEEP_1>; 63}; 64 65&CPU5 { 66 cpu-idle-states = <&BIG_CPU_SLEEP_1>; 67}; 68 69&CPU6 { 70 cpu-idle-states = <&BIG_CPU_SLEEP_1>; 71}; 72 73&CPU7 { 74 cpu-idle-states = <&BIG_CPU_SLEEP_1>; 75}; 76 77&pm8005_lsid1 { 78 pm8005-regulators { 79 compatible = "qcom,pm8005-regulators"; 80 81 vdd_s1-supply = <&vph_pwr>; 82 83 pm8005_s1: s1 { /* VDD_GFX supply */ 84 regulator-min-microvolt = <524000>; 85 regulator-max-microvolt = <1100000>; 86 regulator-enable-ramp-delay = <500>; 87 88 /* hack until we rig up the gpu consumer */ 89 regulator-always-on; 90 }; 91 }; 92}; 93 94&qusb2phy { 95 status = "okay"; 96 97 vdda-pll-supply = <&vreg_l12a_1p8>; 98 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; 99}; 100 101&rpm_requests { 102 pm8998-regulators { 103 compatible = "qcom,rpm-pm8998-regulators"; 104 105 vdd_s1-supply = <&vph_pwr>; 106 vdd_s2-supply = <&vph_pwr>; 107 vdd_s3-supply = <&vph_pwr>; 108 vdd_s4-supply = <&vph_pwr>; 109 vdd_s5-supply = <&vph_pwr>; 110 vdd_s6-supply = <&vph_pwr>; 111 vdd_s7-supply = <&vph_pwr>; 112 vdd_s8-supply = <&vph_pwr>; 113 vdd_s9-supply = <&vph_pwr>; 114 vdd_s10-supply = <&vph_pwr>; 115 vdd_s11-supply = <&vph_pwr>; 116 vdd_s12-supply = <&vph_pwr>; 117 vdd_s13-supply = <&vph_pwr>; 118 vdd_l1_l27-supply = <&vreg_s7a_1p025>; 119 vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>; 120 vdd_l3_l11-supply = <&vreg_s7a_1p025>; 121 vdd_l4_l5-supply = <&vreg_s7a_1p025>; 122 vdd_l6-supply = <&vreg_s5a_2p04>; 123 vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>; 124 vdd_l9-supply = <&vph_pwr>; 125 vdd_l10_l23_l25-supply = <&vph_pwr>; 126 vdd_l13_l19_l21-supply = <&vph_pwr>; 127 vdd_l16_l28-supply = <&vph_pwr>; 128 vdd_l18_l22-supply = <&vph_pwr>; 129 vdd_l20_l24-supply = <&vph_pwr>; 130 vdd_l26-supply = <&vreg_s3a_1p35>; 131 vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>; 132 133 vreg_s3a_1p35: s3 { 134 regulator-min-microvolt = <1352000>; 135 regulator-max-microvolt = <1352000>; 136 }; 137 vreg_s4a_1p8: s4 { 138 regulator-min-microvolt = <1800000>; 139 regulator-max-microvolt = <1800000>; 140 regulator-allow-set-load; 141 }; 142 vreg_s5a_2p04: s5 { 143 regulator-min-microvolt = <1904000>; 144 regulator-max-microvolt = <2040000>; 145 }; 146 vreg_s7a_1p025: s7 { 147 regulator-min-microvolt = <900000>; 148 regulator-max-microvolt = <1028000>; 149 }; 150 vreg_l1a_0p875: l1 { 151 regulator-min-microvolt = <880000>; 152 regulator-max-microvolt = <880000>; 153 regulator-allow-set-load; 154 }; 155 vreg_l2a_1p2: l2 { 156 regulator-min-microvolt = <1200000>; 157 regulator-max-microvolt = <1200000>; 158 regulator-allow-set-load; 159 }; 160 vreg_l3a_1p0: l3 { 161 regulator-min-microvolt = <1000000>; 162 regulator-max-microvolt = <1000000>; 163 }; 164 vreg_l5a_0p8: l5 { 165 regulator-min-microvolt = <800000>; 166 regulator-max-microvolt = <800000>; 167 }; 168 vreg_l6a_1p8: l6 { 169 regulator-min-microvolt = <1808000>; 170 regulator-max-microvolt = <1808000>; 171 }; 172 vreg_l7a_1p8: l7 { 173 regulator-min-microvolt = <1800000>; 174 regulator-max-microvolt = <1800000>; 175 regulator-allow-set-load; 176 }; 177 vreg_l8a_1p2: l8 { 178 regulator-min-microvolt = <1200000>; 179 regulator-max-microvolt = <1200000>; 180 }; 181 vreg_l9a_1p8: l9 { 182 regulator-min-microvolt = <1808000>; 183 regulator-max-microvolt = <2960000>; 184 }; 185 vreg_l10a_1p8: l10 { 186 regulator-min-microvolt = <1808000>; 187 regulator-max-microvolt = <2960000>; 188 }; 189 vreg_l11a_1p0: l11 { 190 regulator-min-microvolt = <1000000>; 191 regulator-max-microvolt = <1000000>; 192 }; 193 vreg_l12a_1p8: l12 { 194 regulator-min-microvolt = <1800000>; 195 regulator-max-microvolt = <1800000>; 196 }; 197 vreg_l13a_2p95: l13 { 198 regulator-min-microvolt = <1808000>; 199 regulator-max-microvolt = <2960000>; 200 }; 201 vreg_l14a_1p88: l14 { 202 regulator-min-microvolt = <1880000>; 203 regulator-max-microvolt = <1880000>; 204 }; 205 vreg_15a_1p8: l15 { 206 regulator-min-microvolt = <1800000>; 207 regulator-max-microvolt = <1800000>; 208 }; 209 vreg_l16a_2p7: l16 { 210 regulator-min-microvolt = <2704000>; 211 regulator-max-microvolt = <2704000>; 212 }; 213 vreg_l17a_1p3: l17 { 214 regulator-min-microvolt = <1304000>; 215 regulator-max-microvolt = <1304000>; 216 regulator-allow-set-load; 217 }; 218 vreg_l18a_2p7: l18 { 219 regulator-min-microvolt = <2704000>; 220 regulator-max-microvolt = <2704000>; 221 }; 222 vreg_l19a_3p0: l19 { 223 regulator-min-microvolt = <3008000>; 224 regulator-max-microvolt = <3008000>; 225 }; 226 vreg_l20a_2p95: l20 { 227 regulator-min-microvolt = <2960000>; 228 regulator-max-microvolt = <2960000>; 229 regulator-allow-set-load; 230 }; 231 vreg_l21a_2p95: l21 { 232 regulator-min-microvolt = <2960000>; 233 regulator-max-microvolt = <2960000>; 234 regulator-allow-set-load; 235 regulator-system-load = <800000>; 236 }; 237 vreg_l22a_2p85: l22 { 238 regulator-min-microvolt = <2864000>; 239 regulator-max-microvolt = <2864000>; 240 }; 241 vreg_l23a_3p3: l23 { 242 regulator-min-microvolt = <3312000>; 243 regulator-max-microvolt = <3312000>; 244 }; 245 vreg_l24a_3p075: l24 { 246 regulator-min-microvolt = <3088000>; 247 regulator-max-microvolt = <3088000>; 248 }; 249 vreg_l25a_3p3: l25 { 250 regulator-min-microvolt = <3104000>; 251 regulator-max-microvolt = <3312000>; 252 regulator-allow-set-load; 253 }; 254 vreg_l26a_1p2: l26 { 255 regulator-min-microvolt = <1200000>; 256 regulator-max-microvolt = <1200000>; 257 }; 258 vreg_l28_3p0: l28 { 259 regulator-min-microvolt = <3008000>; 260 regulator-max-microvolt = <3008000>; 261 }; 262 263 vreg_lvs1a_1p8: lvs1 { 264 regulator-min-microvolt = <1800000>; 265 regulator-max-microvolt = <1800000>; 266 }; 267 268 vreg_lvs2a_1p8: lvs2 { 269 regulator-min-microvolt = <1800000>; 270 regulator-max-microvolt = <1800000>; 271 }; 272 273 }; 274}; 275 276&tlmm { 277 gpio-reserved-ranges = <0 4>, <81 4>; 278 279 touchpad: touchpad { 280 config { 281 pins = "gpio123"; 282 bias-pull-up; /* pull up */ 283 }; 284 }; 285}; 286 287&sdhc2 { 288 status = "okay"; 289 290 vmmc-supply = <&vreg_l21a_2p95>; 291 vqmmc-supply = <&vreg_l13a_2p95>; 292 293 pinctrl-names = "default", "sleep"; 294 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 295 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 296}; 297 298&usb3 { 299 status = "okay"; 300}; 301 302&usb3_dwc3 { 303 dr_mode = "host"; /* Force to host until we have Type-C hooked up */ 304}; 305 306&usb3phy { 307 status = "okay"; 308 309 vdda-phy-supply = <&vreg_l1a_0p875>; 310 vdda-pll-supply = <&vreg_l2a_1p2>; 311}; 312 313&wifi { 314 status = "okay"; 315 316 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; 317 vdd-1.8-xo-supply = <&vreg_l7a_1p8>; 318 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; 319 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>; 320}; 321 322/* PINCTRL - board-specific pinctrl */ 323&blsp1_uart3_on { 324 rx { 325 /delete-property/ bias-disable; 326 /* 327 * Configure a pull-up on 45 (RX). This is needed to 328 * avoid garbage data when the TX pin of the Bluetooth 329 * module is in tri-state (module powered off or not 330 * driving the signal yet). 331 */ 332 bias-pull-up; 333 }; 334 335 cts { 336 /delete-property/ bias-disable; 337 /* 338 * Configure a pull-down on 47 (CTS) to match the pull 339 * of the Bluetooth module. 340 */ 341 bias-pull-down; 342 }; 343}; 344